[FFmpeg-trac] #285(FFmpeg:new): RTSP h264 video stream always reports corrupted macroblock

FFmpeg trac at avcodec.org
Thu Jun 23 11:06:55 CEST 2011


#285: RTSP h264 video stream always reports corrupted macroblock
------------------------+----------------------
Reporter:  bovine       |       Owner:  michael
    Type:  defect       |      Status:  new
Priority:  normal       |   Component:  FFmpeg
 Version:  unspecified  |  Resolution:
Keywords:               |  Blocked By:
Blocking:               |  Reproduced:  0
Analyzed:  0            |
------------------------+----------------------

Comment (by andrewc):

 bovine: thanks for the heads up. I didn't realise that digest auth was
 being used (and that zoneminder doesn't support it)! I sidetracked the
 issue, by using the 'ffmpeg' option in zoneminder to grab the stream.

 > Does playing a captured file work for this model?

 cehoyos, my earlier description of 'seems to work ok' wasn't very
 specific. Let me elaborate: It seems to be working fine in zoneminder. I
 can see the stream in my webbrowser, although there are the occasional
 visual glitches (every 5 or 10 minutes, somewhat random), which look like
 they resolve when a keyframe comes along, so I suspect the decoding is not
 100% reliable. I think the glitches are more prevalent around areas of
 motion and when there is more motion being captured.

 I tried dumping the stream again (and again... and again) and everytime
 the result was a slightly different set of errors.

 Run 1: I cancelled after a 10-20 seconds:

 {{{
 fbadmin at zoneminder-test3:/tmp$ ffmpeg -v 9 -loglevel 99 -i
 rtsp://admin:admin@192.168.88.241:8554/CH001.sdp -qscale 10
 /tmp/fisburn.avi
 ffmpeg version N-30935-g86824c1, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on Jun 22 2011 11:43:58 with gcc 4.5.2
   configuration: --enable-gpl --enable-shared --enable-pthreads
   libavutil    51.  9. 1 / 51.  9. 1
   libavcodec   53.  7. 0 / 53.  7. 0
   libavformat  53.  4. 0 / 53.  4. 0
   libavdevice  53.  1. 1 / 53.  1. 1
   libavfilter   2. 23. 0 /  2. 23. 0
   libswscale    2.  0. 0 /  2.  0. 0
   libpostproc  51.  2. 0 / 51.  2. 0
 [rtsp @ 0x863400] SDP:
 v=0
 o=QTSS_Play_List 1308703668637544 1 IN IP4 192.168.88.241
 s=streamed by the GeoVision Rtsp Server
 i=CH001.sdp
 t=0 0
 a=tool:LIVE555 Streaming Media v2010.01.22
 a=type:broadcast
 a=control:*
 a=range:npt=0-
 a=x-qt-text-nam:streamed by the GeoVision Rtsp Server
 a=x-qt-text-inf:CH001.sdp
 m=video 0 RTP/AVP 96
 c=IN IP4 0.0.0.0
 b=AS:500
 a=rtpmap:96 H264/90000
 a=fmtp:96 packetization-mode=1;profile-level-id=674000;sprop-parameter-
 sets=Z0IAHukBQHsgAA==,aM44gAA=
 a=control:track1
 m=audio 0 RTP/AVP 0
 c=IN IP4 0.0.0.0
 b=AS:500
 a=control:track2

 [rtsp @ 0x863400] video codec set to: h264
 [NULL @ 0x8674a0] RTP Packetization Mode: 1
 [NULL @ 0x8674a0] RTP Profile IDC: 67 Profile IOP: 40 Level: 0
 [NULL @ 0x8674a0] Extradata set to 0x867b00 (size: 21)!hello state=0
 [h264 @ 0x8674a0] Unsupported bit depth: 0
 [h264 @ 0x8674a0] no picture
 [h264 @ 0x8674a0] corrupted macroblock 37 7 (total_coeff=-1)
 [h264 @ 0x8674a0] error while decoding MB 37 7
 [h264 @ 0x8674a0] concealing 932 DC, 932 AC, 932 MV errors
 [h264 @ 0x8674a0] Frame num gap 2 0
 [h264 @ 0x8674a0] Frame num gap 6 4
 [h264 @ 0x8674a0] no picture
 [h264 @ 0x8674a0] Frame num gap 10 8
 [h264 @ 0x8674a0] no picture
 [h264 @ 0x8674a0] Frame num gap 1 15
 [h264 @ 0x8674a0] Frame num gap 3 1
 [h264 @ 0x8674a0] Frame num gap 12 10
 [h264 @ 0x8674a0] Frame num gap 6 4
 }}}

 NB, ''/tmp/fishburn.avi'' was not created! (I'm not quite sure why, I
 would have expected at least an empty file) and this was the first time I
 received the _corrupted macroblock_ error with this cam.

 Run 2: Bombed out after a few seconds

 {{{
 fbadmin at zoneminder-test3:/tmp$ ffmpeg -v 9 -loglevel 99 -i
 rtsp://admin:admin@192.168.88.241:8554/CH001.sdp -qscale 10
 /tmp/fisburn.avi
 ffmpeg version N-30935-g86824c1, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on Jun 22 2011 11:43:58 with gcc 4.5.2
   configuration: --enable-gpl --enable-shared --enable-pthreads
   libavutil    51.  9. 1 / 51.  9. 1
   libavcodec   53.  7. 0 / 53.  7. 0
   libavformat  53.  4. 0 / 53.  4. 0
   libavdevice  53.  1. 1 / 53.  1. 1
   libavfilter   2. 23. 0 /  2. 23. 0
   libswscale    2.  0. 0 /  2.  0. 0
   libpostproc  51.  2. 0 / 51.  2. 0
 [rtsp @ 0x8d2400] SDP:
 v=0
 o=QTSS_Play_List 1308703668637544 1 IN IP4 192.168.88.241
 s=streamed by the GeoVision Rtsp Server
 i=CH001.sdp
 t=0 0
 a=tool:LIVE555 Streaming Media v2010.01.22
 a=type:broadcast
 a=control:*
 a=range:npt=0-
 a=x-qt-text-nam:streamed by the GeoVision Rtsp Server
 a=x-qt-text-inf:CH001.sdp
 m=video 0 RTP/AVP 96
 c=IN IP4 0.0.0.0
 b=AS:500
 a=rtpmap:96 H264/90000
 a=fmtp:96 packetization-mode=1;profile-level-id=674000;sprop-parameter-
 sets=Z0IAHukBQHsgAA==,aM44gAA=
 a=control:track1
 m=audio 0 RTP/AVP 0
 c=IN IP4 0.0.0.0
 b=AS:500
 a=control:track2

 [rtsp @ 0x8d2400] video codec set to: h264
 [NULL @ 0x8d64a0] RTP Packetization Mode: 1
 [NULL @ 0x8d64a0] RTP Profile IDC: 67 Profile IOP: 40 Level: 0
 [NULL @ 0x8d64a0] Extradata set to 0x8d6b00 (size: 21)!hello state=0
 [h264 @ 0x8d64a0] Unsupported bit depth: 0
 [h264 @ 0x8d64a0] Missing reference picture
 [h264 @ 0x8d64a0] decode_slice_header error
 [h264 @ 0x8d64a0] concealing 1200 DC, 1200 AC, 1200 MV errors
 [h264 @ 0x8d64a0] Frame num gap 4 2
 [h264 @ 0x8d64a0] no picture
 [h264 @ 0x8d64a0] Frame num gap 1 15
 [h264 @ 0x8d64a0] no picture
     Last message repeated 1 times
 [h264 @ 0x8d64a0] Frame num gap 1 15
 [h264 @ 0x8d64a0] no picture
 [h264 @ 0x8d64a0] Frame num gap 3 1
 [h264 @ 0x8d64a0] no picture
     Last message repeated 1 times
 [rtsp @ 0x8d2400] All info found
 [rtsp @ 0x8d2400] Estimating duration from bitrate, this may be inaccurate

 Seems stream 0 codec frame rate differs from container frame rate:
 180000.00 (180000/1) -> 90000.00 (180000/2)
 Input #0, rtsp, from 'rtsp://admin:admin@192.168.88.241:8554/CH001.sdp':
   Metadata:
     title           : streamed by the GeoVision Rtsp Server
     comment         : CH001.sdp
   Duration: N/A, start: 3.639189, bitrate: N/A
     Stream #0.0, 255, 1/90000: Video: h264 (Baseline), yuv420p, 640x480,
 1/180000, 90k tbr, 90k tbn, 180k tbc
     Stream #0.1, 1, 1/8000: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64
 kb/s
 [buffer @ 0xad8d80] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:0/1
 sws_param:
 [NULL @ 0x8d1e60] Requested sampling rate unsupported using closest
 supported (16000)
 [mpeg4 @ 0x8d7800] removing common factors from framerate
 [mpeg4 @ 0x8d7800] timebase 1/90000 not supported by MPEG 4 standard, the
 maximum admitted value for the timebase denominator is 65535
 Output #0, avi, to '/tmp/fisburn.avi':
     Stream #0.0, 0, 1/90000: Video: mpeg4, yuv420p, 640x480, 1/90000,
 q=2-31, 200 kb/s, 90k tbn, 90k tbc
     Stream #0.1, 0, 1/90000: Audio: mp2, 16000 Hz, 1 channels, s16, 64
 kb/s
 Stream mapping:
   Stream #0.0 -> #0.0
   Stream #0.1 -> #0.1
 Error while opening encoder for output stream #0.0 - maybe incorrect
 parameters such as bit_rate, rate, width or height
 }}}

 Run 3: Bombed out

 {{{

 fbadmin at zoneminder-test3:/tmp$ ffmpeg -v 9 -loglevel 99 -i
 rtsp://admin:admin@192.168.88.241:8554/CH001.sdp -qscale 10
 /tmp/fisburn.avi
 ffmpeg version N-30935-g86824c1, Copyright (c) 2000-2011 the FFmpeg
 developers
   built on Jun 22 2011 11:43:58 with gcc 4.5.2
   configuration: --enable-gpl --enable-shared --enable-pthreads
   libavutil    51.  9. 1 / 51.  9. 1
   libavcodec   53.  7. 0 / 53.  7. 0
   libavformat  53.  4. 0 / 53.  4. 0
   libavdevice  53.  1. 1 / 53.  1. 1
   libavfilter   2. 23. 0 /  2. 23. 0
   libswscale    2.  0. 0 /  2.  0. 0
   libpostproc  51.  2. 0 / 51.  2. 0
 [rtsp @ 0x25df400] SDP:
 v=0
 o=QTSS_Play_List 1308703668637544 1 IN IP4 192.168.88.241
 s=streamed by the GeoVision Rtsp Server
 i=CH001.sdp
 t=0 0
 a=tool:LIVE555 Streaming Media v2010.01.22
 a=type:broadcast
 a=control:*
 a=range:npt=0-
 a=x-qt-text-nam:streamed by the GeoVision Rtsp Server
 a=x-qt-text-inf:CH001.sdp
 m=video 0 RTP/AVP 96
 c=IN IP4 0.0.0.0
 b=AS:500
 a=rtpmap:96 H264/90000
 a=fmtp:96 packetization-mode=1;profile-level-id=674000;sprop-parameter-
 sets=Z0IAHukBQHsgAA==,aM44gAA=
 a=control:track1
 m=audio 0 RTP/AVP 0
 c=IN IP4 0.0.0.0
 b=AS:500
 a=control:track2

 [rtsp @ 0x25df400] video codec set to: h264
 [NULL @ 0x25e34a0] RTP Packetization Mode: 1
 [NULL @ 0x25e34a0] RTP Profile IDC: 67 Profile IOP: 40 Level: 0
 [NULL @ 0x25e34a0] Extradata set to 0x25e3b00 (size: 21)!hello state=0
 [h264 @ 0x25e34a0] Unsupported bit depth: 0
 [h264 @ 0x25e34a0] Frame num gap 2 0
 [h264 @ 0x25e34a0] no picture
 [h264 @ 0x25e34a0] Frame num gap 6 4
 [h264 @ 0x25e34a0] Frame num gap 13 11
 [h264 @ 0x25e34a0] no picture
 [h264 @ 0x25e34a0] Frame num gap 2 0
 [h264 @ 0x25e34a0] corrupted macroblock 26 14 (total_coeff=-1)
 [h264 @ 0x25e34a0] error while decoding MB 26 14
 [h264 @ 0x25e34a0] concealing 663 DC, 663 AC, 663 MV errors
 [h264 @ 0x25e34a0] Frame num gap 3 1
 [h264 @ 0x25e34a0] Frame num gap 1 15
 [h264 @ 0x25e34a0] Frame num gap 13 11
 [udp @ 0x25e13a0] circular_buffer: OVERRUN
 [rtsp @ 0x25df400] Probe buffer size limit 5000000 reached
 [rtsp @ 0x25df400] Estimating duration from bitrate, this may be
 inaccurate

 Seems stream 0 codec frame rate differs from container frame rate:
 180000.00 (180000/1) -> 90000.00 (180000/2)
 Input #0, rtsp, from 'rtsp://admin:admin@192.168.88.241:8554/CH001.sdp':
   Metadata:
     title           : streamed by the GeoVision Rtsp Server
     comment         : CH001.sdp
   Duration: N/A, start: 3.700900, bitrate: N/A
     Stream #0.0, 1206, 1/90000: Video: h264 (Baseline), yuv420p, 640x480,
 1/180000, 90k tbr, 90k tbn, 180k tbc
     Stream #0.1, 0, 1/8000: Audio: pcm_mulaw, 8000 Hz, 1 channels, s16, 64
 kb/s
 [buffer @ 0x27ed560] w:640 h:480 pixfmt:yuv420p tb:1/1000000 sar:0/1
 sws_param:
 [NULL @ 0x27518a0] Requested sampling rate unsupported using closest
 supported (16000)
 [mpeg4 @ 0x25e5480] removing common factors from framerate
 [mpeg4 @ 0x25e5480] timebase 1/90000 not supported by MPEG 4 standard, the
 maximum admitted value for the timebase denominator is 65535
 Output #0, avi, to '/tmp/fisburn.avi':
     Stream #0.0, 0, 1/90000: Video: mpeg4, yuv420p, 640x480, 1/90000,
 q=2-31, 200 kb/s, 90k tbn, 90k tbc
     Stream #0.1, 0, 1/90000: Audio: mp2, 16000 Hz, 1 channels, s16, 64
 kb/s
 Stream mapping:
   Stream #0.0 -> #0.0
   Stream #0.1 -> #0.1
 Error while opening encoder for output stream #0.0 - maybe incorrect
 parameters such as bit_rate, rate, width or height
 }}}

 So it looks like the same issue as the Fisheye cam. Perhaps the issue is
 not as pronounced in zoneminder because of differences in resolution,
 framerate etc.

-- 
Ticket URL: <https://avcodec.org/trac/ffmpeg/ticket/285#comment:10>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list