[Libav-user] Problems Receiving H.264 RTSP Stream

Johannes Ebersold johannes.ebersold at dfki.de
Fri Nov 11 11:22:25 CET 2011


Hi,

i currently implementing an application to receive and decode an H.264 
RTSP stream using libavcodec and libavformat.

The stream is displayed correctly for small resolutions (e.g. quarter 
VGA) but the frames are broken for higher resolutions (e.g. HD). The 
upper half of the frame is nicely and correctly displayed, however the 
lower half is simply not there and the last line of correct pixels gets 
interpolated for the complete lower half of the frame. Additionally, 
there are some small artefacts in the upper left corner of the frame. It 
seems like a (ring?)buffer is full, the first macroblock is overwritten 
and the  remaining part of the frame is discarded in order to avoid 
overwritting the complete buffer.

I add some debug output at the end of the mail, it may be helpful.

The problem may be related to ticket #285 
(http://ffmpeg.org/trac/ffmpeg/ticket/285), since the errors look 
exactly the same. However, the proposed fix (comment 12) did not work 
and the "missed x packets" message could not be reproduced.

This issue also appears if ffplay is used to receive the stream and 
appears with ffmpeg version 0.8.5 as well as with the latest git head.

Thanks for any help and hints :)

Regards, Johannes


Debug Output:

[rtsp @ 0x13ed8e0] SDP:
v=0
o=- 1321005425421685 1 IN IP4 172.16.7.100
s=NetVFB
i=netvfbStream0
t=0 0
a=tool:LIVE555 Streaming Media v2011.08.22
a=type:broadcast
a=control:*
a=range:npt=0-
a=x-qt-text-nam:NetVFB
a=x-qt-text-inf:netvfbStream0
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
b=AS:10000
a=rtpmap:96 H264/90000
a=control:track1

[rtsp @ 0x13ed8e0] video codec set to: h264
[rtsp @ 0x13ed8e0] hello state=0
[h264 @ 0x13f0440] Unsupported bit depth: 0
[h264 @ 0x13f0440] non-existing PPS referenced
[h264 @ 0x13f0440] non-existing PPS 0 referenced
[h264 @ 0x13f0440] decode_slice_header error
[h264 @ 0x13f0440] no frame!
[h264 @ 0x13f0440] out of range intra chroma pred mode at 45 33
[h264 @ 0x13f0440] error while decoding MB 45 33
[h264 @ 0x13f0440] concealing 5044 DC, 5044 AC, 5044 MV errors
[rtsp @ 0x13ed8e0] All info found
[rtsp @ 0x13ed8e0] Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://172.16.7.100:8554/netvfbStream0':
   Metadata:
     title           : NetVFB
     comment         : netvfbStream0
   Duration: N/A, start: 0.068189, bitrate: N/A
     Stream #0.0, 22, 1/90000: Video: h264 (Constrained Baseline), 
yuv420p, 1920x1200, 1/50, 41.67 fps, 25 tbr, 90k tbn, 50 tbc
[rtsp @ 0x13ed8e0] hello state=1
[h264 @ 0x13f0440] Missing reference picture
[h264 @ 0x13f0440] decode_slice_header error
[h264 @ 0x13f0440] concealing 9000 DC, 9000 AC, 9000 MV errors
[h264 @ 0x13f0440] out of range intra chroma pred mode at 45 33
[h264 @ 0x13f0440] error while decoding MB 45 33
[h264 @ 0x13f0440] concealing 5044 DC, 5044 AC, 5044 MV errors
[h264 @ 0x13f0440] corrupted macroblock 44 33 (total_coeff=-1)
[h264 @ 0x13f0440] error while decoding MB 44 33
[h264 @ 0x13f0440] concealing 5045 DC, 5045 AC, 5045 MV errors
[h264 @ 0x13f0440] concealing 5054 DC, 5054 AC, 5054 MV errors
[h264 @ 0x13f0440] Frame num gap 3 1
[h264 @ 0x13f0440] Frame num gap 2 0
[h264 @ 0x13f0440] no picture
[h264 @ 0x13f0440] Frame num gap 5 3
[h264 @ 0x13f0440] out of range intra chroma pred mode at 41 33
[h264 @ 0x13f0440] error while decoding MB 41 33
[h264 @ 0x13f0440] concealing 5048 DC, 5048 AC, 5048 MV errors
[h264 @ 0x13f0440] Frame num gap 2 0
[h264 @ 0x13f0440] Frame num gap 7 5
[h264 @ 0x13f0440] Invalid level prefix
[h264 @ 0x13f0440] error while decoding MB 49 33
[h264 @ 0x13f0440] concealing 5040 DC, 5040 AC, 5040 MV errors
[h264 @ 0x13f0440] Frame num gap 2 0
[h264 @ 0x13f0440] Frame num gap 5 3
[h264 @ 0x13f0440] out of range intra chroma pred mode at 48 33
[h264 @ 0x13f0440] error while decoding MB 48 33
[h264 @ 0x13f0440] concealing 5041 DC, 5041 AC, 5041 MV errors
[h264 @ 0x13f0440] Frame num gap 2 0
[h264 @ 0x13f0440] corrupted macroblock 46 33 (total_coeff=-1)
[h264 @ 0x13f0440] error while decoding MB 46 33
[h264 @ 0x13f0440] concealing 5043 DC, 5043 AC, 5043 MV errors
[h264 @ 0x13f0440] Frame num gap 2 0
[h264 @ 0x13f0440] mb_type 163 in I slice too large at 37 33
[h264 @ 0x13f0440] error while decoding MB 37 33
[h264 @ 0x13f0440] concealing 5052 DC, 5052 AC, 5052 MV errors
[h264 @ 0x13f0440] Frame num gap 2 0



More information about the Libav-user mailing list