After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 745964 - decoding failure for h264 over rtsp
decoding failure for h264 over rtsp
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: dont know
0.10.x
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-03-10 13:10 UTC by Jan Spurny
Modified: 2015-03-10 13:51 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jan Spurny 2015-03-10 13:10:26 UTC
Linux Debian 7.4, 64bit, gstreamer 0.10.36

I have a program on remote server which reads stream from many cameras and it worked just fine until now - we added 4 new cameras (new model) and gstreamer pipeline for that camera model works fine for a few minutes (2-30) and then it suddenly stops and starts consuming 100% CPU. Other camera's (different models) pipelines are fine.

I'm able to reproduce it from commandline using this pipeline (executed on the server):

 $ GST_DEBUG=3 gst-launch rtspsrc location=rtsp://XX:YY ! decodebin ! fakesink

The stream is h264, 352x288, ~12fps

It's very unpredictable and when I try to reproduce it, it never does the same thing twice. But here is list of all clues that I was able to get:

 1) it never happens immediately. On some cameras, it happens sooner (2-5minutes), on others it take days to manifest

 2) in log there is allways this message:

     ffmpeg :0:: decode_slice_header error

 3) after this error message, it looks fine for 2-3 minutes, and then the stream stops and gst-launch process starts consuming 100% CPU (it was ~1% before)

I was not able to reproduce this problem on my desktop using the same gst-launch pipeline (I'm able to acces the cameras via VPN). On my dektop I have debian 6, 64bit, gstreamer 0.10.30 - but with manually rebuilded gst-plugin-ffmpeg using it's own copy of ffmpeg.

Here are some examples from the logs before the problem starts (I do not post one log, as it is allways different) which I think may be relevant:

-----------------------------------------------------------------

WARN       codecparsers_h264 gsth264parser.c:1646:gst_h264_parse_pps: value not in allowed range. value: 52, range -12-12
WARN       codecparsers_h264 gsth264parser.c:1686:gst_h264_parse_pps: error parsing "Picture parameter set"
WARN       codecparsers_h264 gsth264parser.c:1646:gst_h264_parse_pps: value not in allowed range. value: 52, range -12-12
WARN       codecparsers_h264 gsth264parser.c:1686:gst_h264_parse_pps: error parsing "Picture parameter set"
ERROR                 ffmpeg :0:: cabac_init_idc overflow
ERROR                 ffmpeg :0:: decode_slice_header error
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
ERROR                 ffmpeg :0:: illegal memory management control operation 29
ERROR                 ffmpeg :0:: error while decoding MB 9 0, bytestream (-8)
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
ERROR                 ffmpeg :0:: Missing reference picture
ERROR                 ffmpeg :0:: error while decoding MB 1 0, bytestream (-21)
ERROR                 ffmpeg :0:: number of reference frames (0+3) exceeds max (1; probably corrupt input), discarding one
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
ERROR                 ffmpeg :0:: error while decoding MB 9 0, bytestream (-3)
ERROR                 ffmpeg :0:: number of reference frames (0+3) exceeds max (1; probably corrupt input), discarding one
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
ERROR                 ffmpeg :0:: illegal reordering_of_pic_nums_idc
ERROR                 ffmpeg :0:: decode_slice_header error
ERROR                 ffmpeg :0:: number of reference frames (0+3) exceeds max (1; probably corrupt input), discarding one
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
ERROR                 ffmpeg :0:: error while decoding MB 7 0, bytestream (-5)
ERROR                 ffmpeg :0:: number of reference frames (0+3) exceeds max (1; probably corrupt input), discarding one
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
ERROR                 ffmpeg :0:: illegal reordering_of_pic_nums_idc
ERROR                 ffmpeg :0:: decode_slice_header error
ERROR                 ffmpeg :0:: number of reference frames (0+3) exceeds max (1; probably corrupt input), discarding one
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
ERROR                 ffmpeg :0:: illegal reordering_of_pic_nums_idc
ERROR                 ffmpeg :0:: decode_slice_header error
ERROR                 ffmpeg :0:: number of reference frames (0+3) exceeds max (1; probably corrupt input), discarding one
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
ERROR                 ffmpeg :0:: error while decoding MB 3 0, bytestream (-12)
ERROR                 ffmpeg :0:: number of reference frames (0+3) exceeds max (1; probably corrupt input), discarding one
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
ERROR                 ffmpeg :0:: error while decoding MB 2 0, bytestream (-14)
ERROR                 ffmpeg :0:: number of reference frames (0+3) exceeds max (1; probably corrupt input), discarding one
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
ERROR                 ffmpeg :0:: error while decoding MB 0 0, bytestream (-23)
ERROR                 ffmpeg :0:: number of reference frames (0+3) exceeds max (1; probably corrupt input), discarding one
INFO                  ffmpeg :0:: concealing 396 DC, 396 AC, 396 MV errors
WARN       codecparsers_h264 gsth264parser.c:1756:gst_h264_parser_parse_slice_hdr: couldn't find associated picture parameter set with id: 1
ERROR                 ffmpeg :0:: non-existing PPS 1 referenced
ERROR                 ffmpeg :0:: decode_slice_header error
ERROR                 ffmpeg :0:: Changing field mode (3 -> 3) between slices is not allowed
ERROR                 ffmpeg :0:: decode_slice_header error


ERROR ffmpeg :0:: non-existing SPS 1 referenced in buffering period

WARN ffmpeg gstffmpegdec.c:2299:gst_ffmpegdec_frame:<ffdec_mpeg40> ffdec_mpeg4: decoding error (len: -1, have_data: 0)
WARN codecparsers_mpeg4 gstmpeg4parser.c:184:parse_quant: failed to read uint8, nbits: 8
WARN codecparsers_mpeg4 gstmpeg4parser.c:199:parse_quant: failed parsing quant matrix
WARN codecparsers_mpeg4 gstmpeg4parser.c:1198:gst_mpeg4_parse_video_object_layer: failed parsing "Video Object Layer"

ERROR ffmpeg :0:: header damaged
WARN  ffmpeg gstffmpegdec.c:2299:gst_ffmpegdec_frame:<ffdec_mpeg40> ffdec_mpeg4: decoding error (len: -1, have_data: 0)
Comment 1 Tim-Philipp Müller 2015-03-10 13:15:39 UTC
Thanks for the bug report, but GStreamer 0.10.x is no longer maintained.

Could you try with a recent 1.x version please?
Comment 2 Jan Spurny 2015-03-10 13:29:12 UTC
Oh, I didn't knew that...

Unfortunately I can't - installing anything on that server is a big problem. The server can't connect to anything outside it's local network (probably because of security reasons) and since it's debian, I don't want to "pollute" it with manually compilled and installed software..

Ok, I guess I have to find some workaround.
Comment 3 Tim-Philipp Müller 2015-03-10 13:35:16 UTC
I think you can get 1.2 or 1.4 from debian backports.
Comment 4 Jan Spurny 2015-03-10 13:51:14 UTC
I just can't do that on production server. Not only I don't have internet connectivity there, but also I can't risk breaking other things that work right now, because I don't know if the 1.x version is 100% backward compatible and even if I thought I knew, it would still be impossible on production server :(