[FFmpeg-trac] #258(avformat:new): RTP over UDP: doesn't reorder packets

FFmpeg trac at avcodec.org
Wed Jun 1 15:11:48 CEST 2011


#258: RTP over UDP: doesn't reorder packets
------------------------+-----------------------
Reporter:  Andrew       |       Owner:
    Type:  defect       |      Status:  new
Priority:  normal       |   Component:  avformat
 Version:  git-master   |  Resolution:
Keywords:  RTP reorder  |  Blocked By:
Blocking:               |  Reproduced:  0
Analyzed:  0            |
------------------------+-----------------------

Comment (by Andrew):

 I'm add light cseq logging to rtp_parse_packet_internal().
 {{{
 @@ -475,6 +475,9 @@ static int rtp_parse_packet_internal(RTPDemuxContext
 *s, AVPacket *pkt,
      /* store the ssrc in the RTPDemuxContext */
      s->ssrc = ssrc;

 +    av_log(NULL, AV_LOG_ERROR, "RTP: PT=%02x: cseq %d expected=%d,
 timestamp %u\n",
 +          payload_type, seq, ((s->seq + 1) & 0xffff), timestamp);
 +
 }}}

 '''rtp_over_udp output'''

 ffmpeg av_find_stream_info(): read 47 packets [22642..22748],
 non_monotonic(!) CSEQs (AVFormat_context->start_time > 4 sec)


 tcpdump on host (see rtp_over_udp.tcpdump.cap): camera send 355(!) packets
 [22393..22749] monotonic(!) CSEQs

 {{{
 % ./muxonly 'rtsp://axis1031:554/axis-
 media/media.amp?video=1&audio=0&videocodec=mpeg4&udp'
 SDP:
 v=0
 o=- 1306932119581619 1306932119581619 IN IP4 axis1031
 s=Media Presentation
 e=NONE
 c=IN IP4 0.0.0.0
 b=AS:8000
 t=0 0
 a=control:rtsp://axis1031:554/axis-
 media/media.amp?video=1&audio=0&videocodec=mpeg4
 a=range:npt=0.000000-
 m=video 0 RTP/AVP 96
 b=AS:8000
 a=framerate:30.0
 a=transform:1,0,0;0,1,0;0,0,1
 a=control:rtsp://axis1031:554/axis-
 media/media.amp/trackID=1?video=1&audio=0&videocodec=mpeg4
 a=rtpmap:96 MP4V-ES/90000
 a=fmtp:96 profile-level-id=245;
 config=000001B0F5000001B50ECF000001000000012000C88D881F4514043C14103F

 video codec set to: mpeg4
 hello state=0
 RTP: PT=60: cseq 22642 expected=1, timestamp 3795513460
 RTP: PT=60: cseq 22643 expected=22643, timestamp 3795516306
 RTP: PT=60: cseq 22648 expected=22644, timestamp 3795522448
 RTP: PT=60: cseq 22649 expected=22649, timestamp 3795525295
 RTP: PT=60: cseq 22652 expected=22650, timestamp 3795528141
 RTP: PT=60: cseq 22653 expected=22653, timestamp 3795531437
 RTP: PT=60: cseq 22656 expected=22654, timestamp 3795534283
 RTP: PT=60: cseq 22657 expected=22657, timestamp 3795537129
 RTP: PT=60: cseq 22660 expected=22658, timestamp 3795540425
 RTP: PT=60: cseq 22661 expected=22661, timestamp 3795543272
 RTP: PT=60: cseq 22664 expected=22662, timestamp 3795546118
 RTP: PT=60: cseq 22665 expected=22665, timestamp 3795549414
 RTP: PT=60: cseq 22668 expected=22666, timestamp 3795552260
 RTP: PT=60: cseq 22669 expected=22669, timestamp 3795555106
 RTP: PT=60: cseq 22672 expected=22670, timestamp 3795558403
 RTP: PT=60: cseq 22673 expected=22673, timestamp 3795561249
 RTP: PT=60: cseq 22676 expected=22674, timestamp 3795564095
 RTP: PT=60: cseq 22677 expected=22677, timestamp 3795567391
 RTP: PT=60: cseq 22680 expected=22678, timestamp 3795570237
 RTP: PT=60: cseq 22681 expected=22681, timestamp 3795573083
 RTP: PT=60: cseq 22684 expected=22682, timestamp 3795576379
 RTP: PT=60: cseq 22685 expected=22685, timestamp 3795579226
 RTP: PT=60: cseq 22688 expected=22686, timestamp 3795582072
 RTP: PT=60: cseq 22689 expected=22689, timestamp 3795585368
 RTP: PT=60: cseq 22692 expected=22690, timestamp 3795588214
 RTP: PT=60: cseq 22693 expected=22693, timestamp 3795591060
 RTP: PT=60: cseq 22696 expected=22694, timestamp 3795594356
 RTP: PT=60: cseq 22697 expected=22697, timestamp 3795597203
 RTP: PT=60: cseq 22700 expected=22698, timestamp 3795600049
 RTP: PT=60: cseq 22701 expected=22701, timestamp 3795603345
 RTP: PT=60: cseq 22714 expected=22702, timestamp 3795603345
 RTP: PT=60: cseq 22715 expected=22715, timestamp 3795603345
 RTP: PT=60: cseq 22716 expected=22716, timestamp 3795606191
 RTP: PT=60: cseq 22719 expected=22717, timestamp 3795609037
 RTP: PT=60: cseq 22720 expected=22720, timestamp 3795611884
 RTP: PT=60: cseq 22723 expected=22721, timestamp 3795615180
 RTP: PT=60: cseq 22724 expected=22724, timestamp 3795618026
 RTP: PT=60: cseq 22729 expected=22725, timestamp 3795624168
 RTP: PT=60: cseq 22730 expected=22730, timestamp 3795627015
 RTP: PT=60: cseq 22735 expected=22731, timestamp 3795633157
 RTP: PT=60: cseq 22736 expected=22736, timestamp 3795636003
 RTP: PT=60: cseq 22739 expected=22737, timestamp 3795638849
 RTP: PT=60: cseq 22740 expected=22740, timestamp 3795642145
 RTP: PT=60: cseq 22743 expected=22741, timestamp 3795644992
 RTP: PT=60: cseq 22744 expected=22744, timestamp 3795647838
 RTP: PT=60: cseq 22747 expected=22745, timestamp 3795651134
 RTP: PT=60: cseq 22748 expected=22748, timestamp 3795653980
 All info found
 Estimating duration from bitrate, this may be inaccurate
 Input #0, rtsp, from 'rtsp://axis1031:554/axis-
 media/media.amp?video=1&audio=0&videocodec=mpeg4&udp':
   Metadata:
     title           : Media Presentation
   Duration: N/A, start: 4.058156, bitrate: N/A
     Stream #0.0, 22, 1/90000: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR
 4:3], 1k tbr, 90k tbn, 1k tbc
 }}}


 '''rtp_over_tcp'''

 ffmpeg av_find_stream_info(): read 58 packets [54144..54201], monotonic
 CSEQs

 tcpdump on host (see rtp_over_tcp.tcpdump.cap): camera send 59 packets
 [54144..54202], monotonic CSEQs

 {{{
 % ./muxonly 'rtsp://axis1031:554/axis-
 media/media.amp?video=1&audio=0&videocodec=mpeg4&tcp'
 SDP:
 v=0
 o=- 1306932351978434 1306932351978434 IN IP4 axis1031
 s=Media Presentation
 e=NONE
 c=IN IP4 0.0.0.0
 b=AS:8000
 t=0 0
 a=control:rtsp://axis1031:554/axis-
 media/media.amp?video=1&audio=0&videocodec=mpeg4
 a=range:npt=0.000000-
 m=video 0 RTP/AVP 96
 b=AS:8000
 a=framerate:30.0
 a=transform:1,0,0;0,1,0;0,0,1
 a=control:rtsp://axis1031:554/axis-
 media/media.amp/trackID=1?video=1&audio=0&videocodec=mpeg4
 a=rtpmap:96 MP4V-ES/90000
 a=fmtp:96 profile-level-id=245;
 config=000001B0F5000001B50ECF000001000000012000C88D881F4514043C14103F

 video codec set to: mpeg4
 hello state=0
 RTP: PT=60: cseq 54144 expected=1, timestamp 3175731840
 RTP: PT=60: cseq 54145 expected=54145, timestamp 3175731840
 RTP: PT=60: cseq 54146 expected=54146, timestamp 3175731840
 RTP: PT=60: cseq 54147 expected=54147, timestamp 3175731840
 RTP: PT=60: cseq 54148 expected=54148, timestamp 3175731840
 RTP: PT=60: cseq 54149 expected=54149, timestamp 3175731840
 RTP: PT=60: cseq 54150 expected=54150, timestamp 3175731840
 RTP: PT=60: cseq 54151 expected=54151, timestamp 3175731840
 RTP: PT=60: cseq 54152 expected=54152, timestamp 3175731840
 RTP: PT=60: cseq 54153 expected=54153, timestamp 3175731840
 RTP: PT=60: cseq 54154 expected=54154, timestamp 3175731840
 RTP: PT=60: cseq 54155 expected=54155, timestamp 3175731840
 RTP: PT=60: cseq 54156 expected=54156, timestamp 3175731840
 RTP: PT=60: cseq 54157 expected=54157, timestamp 3175731840
 RTP: PT=60: cseq 54158 expected=54158, timestamp 3175731840
 RTP: PT=60: cseq 54159 expected=54159, timestamp 3175744124
 RTP: PT=60: cseq 54160 expected=54160, timestamp 3175744124
 RTP: PT=60: cseq 54161 expected=54161, timestamp 3175753112
 RTP: PT=60: cseq 54162 expected=54162, timestamp 3175753112
 RTP: PT=60: cseq 54163 expected=54163, timestamp 3175762101
 RTP: PT=60: cseq 54164 expected=54164, timestamp 3175762101
 RTP: PT=60: cseq 54165 expected=54165, timestamp 3175771090
 RTP: PT=60: cseq 54166 expected=54166, timestamp 3175771090
 RTP: PT=60: cseq 54167 expected=54167, timestamp 3175780078
 RTP: PT=60: cseq 54168 expected=54168, timestamp 3175780078
 RTP: PT=60: cseq 54169 expected=54169, timestamp 3175789067
 RTP: PT=60: cseq 54170 expected=54170, timestamp 3175789067
 RTP: PT=60: cseq 54171 expected=54171, timestamp 3175798055
 RTP: PT=60: cseq 54172 expected=54172, timestamp 3175798055
 RTP: PT=60: cseq 54173 expected=54173, timestamp 3175807044
 RTP: PT=60: cseq 54174 expected=54174, timestamp 3175807044
 RTP: PT=60: cseq 54175 expected=54175, timestamp 3175816032
 RTP: PT=60: cseq 54176 expected=54176, timestamp 3175816032
 RTP: PT=60: cseq 54177 expected=54177, timestamp 3175824571
 RTP: PT=60: cseq 54178 expected=54178, timestamp 3175824571
 RTP: PT=60: cseq 54179 expected=54179, timestamp 3175827867
 RTP: PT=60: cseq 54180 expected=54180, timestamp 3175827867
 RTP: PT=60: cseq 54181 expected=54181, timestamp 3175830714
 RTP: PT=60: cseq 54182 expected=54182, timestamp 3175830714
 RTP: PT=60: cseq 54183 expected=54183, timestamp 3175833560
 RTP: PT=60: cseq 54184 expected=54184, timestamp 3175833560
 RTP: PT=60: cseq 54185 expected=54185, timestamp 3175836856
 RTP: PT=60: cseq 54186 expected=54186, timestamp 3175836856
 RTP: PT=60: cseq 54187 expected=54187, timestamp 3175839702
 RTP: PT=60: cseq 54188 expected=54188, timestamp 3175839702
 RTP: PT=60: cseq 54189 expected=54189, timestamp 3175842548
 RTP: PT=60: cseq 54190 expected=54190, timestamp 3175842548
 RTP: PT=60: cseq 54191 expected=54191, timestamp 3175845844
 RTP: PT=60: cseq 54192 expected=54192, timestamp 3175845844
 RTP: PT=60: cseq 54193 expected=54193, timestamp 3175848691
 RTP: PT=60: cseq 54194 expected=54194, timestamp 3175848691
 RTP: PT=60: cseq 54195 expected=54195, timestamp 3175851537
 RTP: PT=60: cseq 54196 expected=54196, timestamp 3175851537
 RTP: PT=60: cseq 54197 expected=54197, timestamp 3175854833
 RTP: PT=60: cseq 54198 expected=54198, timestamp 3175854833
 RTP: PT=60: cseq 54199 expected=54199, timestamp 3175857679
 RTP: PT=60: cseq 54200 expected=54200, timestamp 3175857679
 RTP: PT=60: cseq 54201 expected=54201, timestamp 3175860525
 All info found
 Estimating duration from bitrate, this may be inaccurate
 Input #0, rtsp, from 'rtsp://axis1031:554/axis-
 media/media.amp?video=1&audio=0&videocodec=mpeg4&tcp':
   Metadata:
     title           : Media Presentation
   Duration: N/A, start: 0.136489, bitrate: N/A
     Stream #0.0, 22, 1/90000: Video: mpeg4, yuv420p, 640x480 [PAR 1:1 DAR
 4:3], 1k tbr, 90k tbn, 1k tbc
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/258#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list