[FFmpeg-trac] #1185(avformat:new): broken playback of rtsp streams - under windows at least

FFmpeg trac at avcodec.org
Tue Apr 10 20:00:51 CEST 2012


#1185: broken playback of rtsp streams - under windows at least
----------------------------------+--------------------------------------
             Reporter:  kaptnole  |                     Type:  defect
               Status:  new       |                 Priority:  important
            Component:  avformat  |                  Version:  git-master
             Keywords:  rtsp udp  |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 This refers to or is the same bug as
 [https://ffmpeg.org/trac/ffmpeg/ticket/651]

 I am not able to properly decode any udp rtsp stream under windows with
 ffmpeg.
 It says "RTP: missed n packets" all the time and the display is corrupt.

 For some sources I was able to avoid the bug by switching to TCP transport
 (rtsp_transport=tcp) but unfortunately that is not possible on many of
 them.

 Tested various sources like a vlc-player generated stream, some internet
 sources and streams from several lan cameras.

 Verified that bug with windows versions of ffplay (downloaded from
 [http://ffmpeg.zeranoe.com/builds/], ffmpeg (less errors but they still
 exist) and my own implemantation of an ffmpeg based player compiled from
 the current source. 32 bit and 64 bit versions.

 I presume there is something wrong with the udp-rtsp protocol
 implementation in ffmpeg. Some problem with the ring buffer there or
 different buffer sizes under windows - dont know.
 Unfortunately I was not able to test a unix build yet.

 The fact that I get less errors with ffmpeg but with ffplay lets me
 believe that there is some connection to the frequency network read
 functions are called.

 This is the output from ffmpeg trying to decode the stream gAmeOver
 supplied in his bug report:

 I get all the same errors "RTP: missed n packets" (not always only 1 like
 in this case) with any rtsp stream I tried, also local ones.



 {{{
 D:\Projekte\VideoTest>ffmpeg -v 9 -loglevel 99 -i
 rtsp://admin:dienstag14@192.16
 8.0.226/VideoInput/1/h264/1 -an  output.avi
 ffmpeg version N-39664-g6bfb304 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Apr  9 2012 20:29:24 with gcc 4.6.3
   configuration: --enable-gpl --enable-version3 --disable-w32threads
 --enable-ru
 ntime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-
 libass
  --enable-libcelt --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable
 -libfreetype --enable-libgsm --enable-libmp3lame --enable-libnut --enable-
 libope
 njpeg --enable-librtmp --enable-libschroedinger --enable-libspeex
 --enable-libth
 eora --enable-libutvideo --enable-libvo-aacenc --enable-libvo-amrwbenc
 --enable-
 libvorbis --enable-libvpx --enable-libx264 --enable-libxavs --enable-
 libxvid --e
 nable-zlib
   libavutil      51. 46.100 / 51. 46.100
   libavcodec     54. 14.101 / 54. 14.101
   libavformat    54.  3.100 / 54.  3.100
   libavdevice    53.  4.100 / 53.  4.100
   libavfilter     2. 67.101 /  2. 67.101
   libswscale      2.  1.100 /  2.  1.100
   libswresample   0. 10.100 /  0. 10.100
   libpostproc    52.  0.100 / 52.  0.100
 [rtsp @ 02009cc0] SDP:
 v=0
 o=- 14773669779663671777 14773669779664517885 IN IP4 192.168.0.226
 s=Media Presentation
 c=IN IP4 0.0.0.0
 b=AS:12064
 t=0 0
 m=video 0 RTP/AVP 100
 b=AS:12000
 a=framerate:25.0
 a=quality:4
 a=control:trackID=0
 a=rtpmap:100 H264/90000
 a=fmtp:100 profile-level-id=640028; Reso=1920:1080; Scanning=0;
 TVSystem=pal; Ca
 meraMode=hd; StreamID=0; BitRateMode=vbr; Gop=30; AspectRatio=16:9;
 packetizatio
 n-mode=1; sprop-parameter-
 sets=Z2QAKK0AzlAeAIn5cBEAAA4QAAK/IOAAAAX14QAADuayovfjA
 AADAC+vCAAAdzWVF78G0EQiUsA=,aP48sA==;
 m=data 0 RTP/AVP 111
 a=rtpmap:111 octet-stream/1
 a=fmtp:111 Mac=08007b88f5b8; Model=VCC-HD4600P; TargetBitRate=6000;
 FirmVer=0200
 0300; CameraSeries=2;


 [rtsp @ 02009cc0] video codec set to: h264
 [NULL @ 0200c7a0] RTP Profile IDC: 64 Profile IOP: 0 Level: 28
 [NULL @ 0200c7a0] RTP Packetization Mode: 1
 [NULL @ 0200c7a0] Extradata set to 0200cd60 (size: 68)!hello state=0
 [h264 @ 0200c7a0] RTP: missed 1 packets
 [h264 @ 0200c7a0] Missing reference picture
 [h264 @ 0200c7a0] decode_slice_header error
 [h264 @ 0200c7a0] concealing 8160 DC, 8160 AC, 8160 MV errors
 [h264 @ 0200c7a0] RTP: missed 1 packets
 [h264 @ 0200c7a0] no picture
 [h264 @ 0200c7a0] RTP: missed 1 packets
 [h264 @ 0200c7a0] no picture
 [h264 @ 0200c7a0] RTP: missed 1 packets
 [h264 @ 0200c7a0] no picture
 [h264 @ 0200c7a0] RTP: missed 1 packets
 [h264 @ 0200c7a0] no picture
 [h264 @ 0200c7a0] RTP: missed 1 packets
     Last message repeated 20 times
 [rtsp @ 02009cc0] All info found
 [rtsp @ 02009cc0] Estimating duration from bitrate, this may be inaccurate
 Input #0, rtsp, from
 'rtsp://admin:dienstag14@192.168.0.226/VideoInput/1/h264/1'
 :
   Metadata:
     title           : Media Presentation
   Duration: N/A, start: 0.040000, bitrate: N/A
     Stream #0:0, 26, 1/90000: Video: h264 (High), yuv420p, 1920x1080 [SAR
 1:1 DA
 R 16:9], 1/50, 25 fps, 25 tbr, 90k tbn, 50 tbc
 File 'output.avi' already exists. Overwrite ? [y/N] y
 w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:flags=2
 [mpeg4 @ 04f8aaa0] detected 8 logical cores
 [mpeg4 @ 04f8aaa0] intra_quant_bias = 0 inter_quant_bias = -64
 [h264 @ 0200c7a0] detected 8 logical cores
 Output #0, avi, to 'output.avi':
   Metadata:
     INAM            : Media Presentation
     ISFT            : Lavf54.3.100
     Stream #0:0, 0, 1/25: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p,
 1920x1080 [
 SAR 1:1 DAR 16:9], 1/25, q=2-31, 200 kb/s, 25 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 -> mpeg4)
 Press [q] to stop, [?] for help
 [h264 @ 04eb2040] Missing reference picture
 [h264 @ 04eb2040] decode_slice_header error
 [h264 @ 04eb2040] concealing 8160 DC, 8160 AC, 8160 MV errors
 [h264 @ 051feb40] no picture
 [h264 @ 03e98340] no picture
 [h264 @ 03e98920] no picture
 [h264 @ 03eae460] no picture
 [h264 @ 0200c7a0] RTP: missed 1565 packets
 [h264 @ 0200c7a0] RTP: missed 1566 packets
 [h264 @ 04f23de0] error while decoding MB 30 37, bytestream (-13)
 [h264 @ 04f23de0] concealing 3739 DC, 3739 AC, 3739 MV errors
 [h264 @ 0200c7a0] RTP: missed 1 packets
 [h264 @ 04eb2040] Frame num gap 14 9
 [h264 @ 04eb2040] Frame num gap 14 10
 [h264 @ 04eb2040] Frame num gap 14 11
 [h264 @ 04eb2040] Frame num gap 14 12
 [h264 @ 0200c7a0] RTP: missed 1 packets
     Last message repeated 8 times
 frame=   13 fps=0.0 q=16.3 size=     156kB time=00:00:00.96
 bitrate=1330.0kbits/
 RTP: missed 1 packets
 [h264 @ 0200c7a0] RTP: missed 1 packets
     Last message repeated 11 times
 frame=   26 fps= 25 q=31.0 size=     233kB time=00:00:04.40 bitrate=
 433.7kbits/
 RTP: missed 1 packets
 [h264 @ 0200c7a0] RTP: missed 1 packets
     Last message repeated 11 times
 frame=   39 fps= 25 q=24.8 size=     353kB time=00:00:04.92 bitrate=
 588.4kbits/
 RTP: missed 1 packets
 [h264 @ 0200c7a0] RTP: missed 1 packets
     Last message repeated 11 times
 frame=   52 fps= 25 q=31.0 size=     411kB time=00:00:05.44 bitrate=
 618.2kbits/
 RTP: missed 1 packets
 [h264 @ 0200c7a0] RTP: missed 1 packets
     Last message repeated 11 times
 frame=   65 fps= 25 q=31.0 size=     460kB time=00:00:05.96 bitrate=
 632.6kbits/
 RTP: missed 1 packets
 [h264 @ 0200c7a0] RTP: missed 1 packets
     Last message repeated 9 times
 RTP: missed 1 packets
 frame=   89 fps= 28 q=31.0 Lsize=     559kB time=00:00:06.92 bitrate=
 661.4kbits
 /s
 video:549kB audio:0kB global headers:0kB muxing overhead 1.775516%
 Received signal 2: terminating.
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1185>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list