Opened 12 years ago
Last modified 12 years ago
#1185 new defect
broken playback of rtsp streams - under windows at least
| Reported by: | Ole | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | git-master | Keywords: | rtsp udp |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
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.
Change History (3)
comment:1 by , 12 years ago
follow-up: 3 comment:2 by , 12 years ago
| Priority: | important → normal |
|---|
Do you think this is a regression?
comment:3 by , 12 years ago
Replying to cehoyos:
Do you think this is a regression?
Can not say that.
You can read quite a bit about similar problems here.
And some say there was something fixed.
All I can say: For me it never worked - but I am only trying since three months or so.
Also tried with libav - same results.
All streams play fine with VLC Player.



Sorry posted the wrong output about one of my local streams.
Here is the right one with an internet stream, so you can reproduce:
D:\Projekte\VideoTest>ffplay -loglevel debug rtsp://dmzosx001.dpa.act.gov.au/med ium ffplay version N-39664-g6bfb304 Copyright (c) 2003-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 @ 01e4f7c0] SDP: v=0 o=- 86591429 86591429 IN IP4 127.0.0.0 s=Wirecast c=IN IP4 0.0.0.0 t=0 0 a=x-qt-text-nam:ACT Legislative Assembly a=x-qt-text-cpy:Copyright ACT 2010 a=x-qt-text-aut:ACT Government a=x-qt-text-inf:http://www.parliament.act.gov.au a=range:npt=now- a=control:* m=audio 0 RTP/AVP 96 a=3GPP-Adaptation-Support:1 a=rtpmap:96 mpeg4-generic/32000/2 a=fmtp:96 profile-level-id=15;mode=AAC-hbr;sizelength=13;indexlength=3;indexdelt alength=3;config=1290 a=control:trackID=1 m=video 0 RTP/AVP 97 a=3GPP-Adaptation-Support:1 a=rtpmap:97 H264/90000 a=fmtp:97 packetization-mode=1;profile-level-id=4D400D;sprop-parameter-sets=J01A DakYKD5gDUGAQa2wrXvfAQ==,KN4JiA== a=cliprect:0,0,240,320 a=framesize:97 320-240 b=AS:256 a=control:trackID=2 [rtsp @ 01e4f7c0] audio codec set to: aac [rtsp @ 01e4f7c0] audio samplerate set to: 32000 [rtsp @ 01e4f7c0] audio channels set to: 2 [rtsp @ 01e4f7c0] video codec set to: h264 [NULL @ 03b996e0] RTP Packetization Mode: 1 [NULL @ 03b996e0] RTP Profile IDC: 4d Profile IOP: 40 Level: d [NULL @ 03b996e0] Extradata set to 03b99b00 (size: 31)!hello state=0 [h264 @ 03b996e0] Missing reference picture [h264 @ 03b996e0] decode_slice_header error [h264 @ 03b996e0] Missing reference picture [h264 @ 03b996e0] decode_slice_header error [h264 @ 03b996e0] concealing 300 DC, 300 AC, 300 MV errors [rtsp @ 01e4f7c0] All info found [rtsp @ 01e4f7c0] Estimating duration from bitrate, this may be inaccurate Input #0, rtsp, from 'rtsp://dmzosx001.dpa.act.gov.au/medium': Metadata: title : Wirecast Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0, 34, 1/32000: Audio: aac, 32000 Hz, stereo, s16 Stream #0:1, 22, 1/90000: Video: h264 (Main), yuv420p, 320x240, 1/180000, 25 tbr, 90k tbn, 180k tbc [h264 @ 03b996e0] detected 8 logical cores [h264 @ 05479480] Missing reference picture [h264 @ 05479480] decode_slice_header error [h264 @ 05479480] Missing reference picture [h264 @ 05479480] decode_slice_header error [h264 @ 05479480] concealing 300 DC, 300 AC, 300 MV errors [h264 @ 03b996e0] RTP: missed 17 packetsq= 0KB sq= 0B f=0/0 f=0/0 [h264 @ 05479480] Frame num gap 16 13 [h264 @ 05479480] Frame num gap 16 14 [h264 @ 05479480] Increasing reorder buffer to 1 [h264 @ 05479480] no picture [h264 @ 03b91a60] corrupted macroblock 8 14 (total_coeff=-1) [h264 @ 03b91a60] error while decoding MB 8 14 [h264 @ 03b91a60] concealing 61 DC, 61 AC, 61 MV errors [h264 @ 03b996e0] RTP: missed 2 packets [h264 @ 03b996e0] RTP: missed 27 packets [h264 @ 03b916a0] Invalid level prefix [h264 @ 03b916a0] error while decoding MB 12 0 [h264 @ 03b916a0] concealing 300 DC, 300 AC, 300 MV errors 3.7[h264 @ 03b91a60] Frame num gap 6 3 1 [h264 @ 03b91a60] Frame num gap 6 4 [h264 @ 03b996e0] RTP: missed 58 packetsq= 1KB sq= 0B f=0/0 [h264 @ 054be2a0] Frame num gap 9 6 [h264 @ 054be2a0] Frame num gap 9 7 [h264 @ 05479480] negative number of zero coeffs at 8 14 [h264 @ 05479480] error while decoding MB 8 14 [h264 @ 05479480] concealing 61 DC, 61 AC, 61 MV errors [h264 @ 03b996e0] RTP: missed 39 packetsq= 1KB sq= 0B f=0/0 7.[h264 @ 03b91a60] Frame num gap 9 6q= 1KB sq= 0B f=0/0 07[h264 @ 03b91a60] Frame num gap 9 7 A-[h264 @ 03b91a60] Increasing reorder buffer to 8 V:[h264 @ 03b91a60] no picture ooo 7[h264 @ 05479480] no picture oooB sq= 0B f=0/0 7[h264 @ 054be2a0] no picture oooq= 1KB sq= 0B f=0/0 7[h264 @ 05515fe0] no picture oooq= 1KB sq= 0B f=0/0 7[h264 @ 05516800] no picture oooq= 1KB sq= 0B f=0/0 7[h264 @ 03c4c400] no picture oooq= 1KB sq= 0B f=0/0 7[h264 @ 03c4d200] no picture oooq= 1KB sq= 0B f=0/0 7[h264 @ 03c4d7e0] no picture B vq= 1KB sq= 0B f=0/0 7[h264 @ 03b916a0] no picture B vq= 1KB sq= 0B f=0/0 .3[h264 @ 03b91a60] no picture 8 A[h264 @ 05479480] no picture -V:[h264 @ 054be2a0] no picture -[h264 @ 05515fe0] no picture 0.003[h264 @ 05516800] no picture [h264 @ 03b996e0] RTP: missed 5 packetsvq= 1KB sq= 0B f=0/1 [h264 @ 03b996e0] RTP: missed 1 packets [h264 @ 03c4d200] Frame num gap 3 0 [h264 @ 03c4d200] Frame num gap 3 1 [h264 @ 03c4c400] concealing 74 DC, 74 AC, 74 MV errors [h264 @ 03c4d7e0] Frame num gap 5 3 [h264 @ 03b996e0] RTP: missed 33 packetsq= 0KB sq= 0B f=0/1 [h264 @ 03b996e0] RTP: missed 46 packets [h264 @ 03b91a60] Frame num gap 3 0 [h264 @ 03b91a60] Frame num gap 3 1 [h264 @ 03b91a60] Increasing reorder buffer to 14 [h264 @ 03b91a60] no picture ooo [h264 @ 05479480] no picture ooo [h264 @ 054be2a0] Frame num gap 3 0 [h264 @ 054be2a0] Frame num gap 3 1 [h264 @ 054be2a0] Increasing reorder buffer to 15 [h264 @ 054be2a0] no picture ooo [h264 @ 05515fe0] no picture ooo [h264 @ 05516800] no picture ooo [h264 @ 03c4c400] no picture ooo [h264 @ 03c4d200] no picture ooo [h264 @ 03c4d7e0] no picture ooo [h264 @ 03b916a0] no picture [h264 @ 03b91a60] no picture [h264 @ 05479480] no picture [h264 @ 054be2a0] no picture [h264 @ 05515fe0] no picture [h264 @ 05516800] no picture [h264 @ 03c4c400] no picture 15.95 A-V: 1.991 fd= 134 aq= 165KB [h264 @ 03b996e0] RTP: missed 204 packets vq[h264 @ 03c4c400] Frame num gap 10 7 = [h264 @ 03c4c400] Frame num gap 10 8 0K[h264 @ 05516800] concealing 74 DC, 74 AC, 74 MV errors 6.73 A-V:-19.300 fd= 158 aq= 174KB vq= 0KB sq= 0B f=0/9