GNOME Bugzilla – Bug 787044
Unable to decode h.264 from RTSP server
Last modified: 2018-11-03 11:59:30 UTC
I've got an IPTV device which appears to work just fine with VLC and other RTSP-capable software. However within the playbin (as well as other pipelines I've tried) it appears h264parse is unable to handle the datastream. I see the following from the gstreamer debug output: gst-launch-1.0 playbin uri=rtsp://192.168.1.168:554/hdmi --gst-debug=3 Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Progress: (open) Opening Stream Progress: (connect) Connecting to rtsp://192.168.1.168:554/hdmi Progress: (open) Retrieving server options Progress: (open) Retrieving media info Progress: (request) SETUP stream 0 Progress: (request) SETUP stream 1 Progress: (open) Opened Stream Setting pipeline to PLAYING ... New clock: GstSystemClock Progress: (request) Sending PLAY request 0:00:00.162460000 5723 0x7fe20900b450 FIXME default gstutils.c:3826:gchar *gst_pad_create_stream_id_internal(GstPad *, GstElement *, const gchar *):<fakesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id 0:00:00.162479000 5723 0x7fe20900b4a0 FIXME default gstutils.c:3826:gchar *gst_pad_create_stream_id_internal(GstPad *, GstElement *, const gchar *):<fakesrc1:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id Progress: (request) Sending PLAY request Progress: (request) Sent PLAY request 0:00:02.245090000 5723 0x7fe207820f70 WARN codecparsers_h264 gsth264parser.c:494:gst_h264_parse_vui_parameters: failed to read uint8, nbits: 1 0:00:02.245108000 5723 0x7fe207820f70 WARN codecparsers_h264 gsth264parser.c:519:gst_h264_parse_vui_parameters: error parsing "VUI Parameters" 0:00:02.245112000 5723 0x7fe207820f70 WARN codecparsers_h264 gsth264parser.c:1771:gst_h264_parse_sps: error parsing "Sequence parameter set" 0:00:02.245117000 5723 0x7fe207820f70 WARN h264parse gsth264parse.c:732:gst_h264_parse_process_nal:<h264parse0> failed to parse SPS: 0:00:02.251065000 5723 0x7fe207820f70 FIXME videodecoder gstvideodecoder.c:945:GstFlowReturn gst_video_decoder_drain_out(GstVideoDecoder *, gboolean):<vtdechw0> Sub-class should implement drain() 0:00:02.260569000 5723 0x7fe207820f70 WARN vtdec vtdec.c:310:gst_vtdec_negotiate:<vtdechw0> error: VTDecompressionSessionCreate returned -12913 0:00:02.260609000 5723 0x7fe207820f70 WARN videodecoder gstvideodecoder.c:745:gboolean gst_video_decoder_setcaps(GstVideoDecoder *, GstCaps *):<vtdechw0> Subclass refused caps 0:00:02.260617000 5723 0x7fe207820f70 WARN decodebin gstdecodebin2.c:2505:gboolean connect_pad(GstDecodeBin *, GstElement *, GstDecodePad *, GstPad *, GstCaps *, GValueArray *, GstDecodeChain *, gchar **):<decodebin1> Couldn't set vtdechw0 to PAUSED 0:00:02.261430000 5723 0x7fe207820f70 ERROR libav :0:: Overread VUI by 5 bits 0:00:02.261448000 5723 0x7fe207820f70 ERROR libav :0:: Overread VUI by 5 bits 0:00:02.261454000 5723 0x7fe207820f70 ERROR libav :0:: Decoding sps 0 from avcC failed 0:00:02.261549000 5723 0x7fe207820f70 WARN videodecoder gstvideodecoder.c:745:gboolean gst_video_decoder_setcaps(GstVideoDecoder *, GstCaps *):<avdec_h264-0> Subclass refused caps 0:00:02.261558000 5723 0x7fe207820f70 WARN decodebin gstdecodebin2.c:2505:gboolean connect_pad(GstDecodeBin *, GstElement *, GstDecodePad *, GstPad *, GstCaps *, GValueArray *, GstDecodeChain *, gchar **):<decodebin1> Couldn't set avdec_h264-0 to PAUSED 0:00:02.261831000 5723 0x7fe207820f70 FIXME videodecoder gstvideodecoder.c:945:GstFlowReturn gst_video_decoder_drain_out(GstVideoDecoder *, gboolean):<vtdec0> Sub-class should implement drain() 0:00:02.285609000 5723 0x7fe207820f70 FIXME videodecoder gstvideodecoder.c:945:GstFlowReturn gst_video_decoder_drain_out(GstVideoDecoder *, gboolean):<vtdec0> Sub-class should implement drain() 0:00:02.285719000 5723 0x7fe207820f70 WARN codecparsers_h264 gsth264parser.c:494:gst_h264_parse_vui_parameters: failed to read uint8, nbits: 1 0:00:02.285727000 5723 0x7fe207820f70 WARN codecparsers_h264 gsth264parser.c:519:gst_h264_parse_vui_parameters: error parsing "VUI Parameters" 0:00:02.285731000 5723 0x7fe207820f70 WARN codecparsers_h264 gsth264parser.c:1771:gst_h264_parse_sps: error parsing "Sequence parameter set" 0:00:02.285735000 5723 0x7fe207820f70 WARN h264parse gsth264parse.c:732:gst_h264_parse_process_nal:<h264parse0> failed to parse SPS: 0:00:02.285939000 5723 0x7fe207820f70 WARN codecparsers_h264 gsth264parser.c:494:gst_h264_parse_vui_parameters: failed to read uint8, nbits: 1 0:00:02.285948000 5723 0x7fe207820f70 WARN codecparsers_h264 gsth264parser.c:519:gst_h264_parse_vui_parameters: error parsing "VUI Parameters" 0:00:02.285952000 5723 0x7fe207820f70 WARN codecparsers_h264 gsth264parser.c:1771:gst_h264_parse_sps: error parsing "Sequence parameter set" 0:00:02.285956000 5723 0x7fe207820f70 WARN h264parse gsth264parse.c:732:gst_h264_parse_process_nal:<h264parse0> failed to parse SPS: Redistribute latency... 0:00:02.487635000 5723 0x7fe207820f70 FIXME videodecoder gstvideodecoder.c:945:GstFlowReturn gst_video_decoder_drain_out(GstVideoDecoder *, gboolean):<vtdec0> Sub-class should implement drain() 0:00:02.500567000 5723 0x7fe206d63750 ERROR vtdec vtdec.c:765:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame -12348 0:00:02.992016000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.026161387 < -+0:00:00.020000000 0:00:03.002633000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.022304414 < -+0:00:00.020000000 0:00:03.056081000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.025659650 < -+0:00:00.020000000 0:00:03.098606000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.024199670 < -+0:00:00.020000000 0:00:03.162608000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.025542416 < -+0:00:00.020000000 0:00:03.237276000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.020886785 < -+0:00:00.020000000 0:00:03.344099000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.021757938 < -+0:00:00.020000000 0:00:03.381288000 5723 0x7fe206d63750 ERROR vtdec vtdec.c:765:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame -12348 0:00:03.503956000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.022442428 < -+0:00:00.020000000 0:00:03.727885000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.021587424 < -+0:00:00.020000000 0:00:04.122796000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.021214951 < -+0:00:00.020000000 0:00:04.609725000 5723 0x7fe206d63750 ERROR vtdec vtdec.c:765:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame -12348 0:00:05.584356000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1512:gst_audio_base_sink_skew_slaving:<osxaudiosink0> correct clock skew -0:00:00.020102705 < -+0:00:00.020000000 0:00:05.747763000 5723 0x7fe206d63750 ERROR vtdec vtdec.c:765:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame -12348 0:00:06.979292000 5723 0x7fe206d63750 ERROR vtdec vtdec.c:765:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame -12348 0:00:07.013708000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1807:gst_audio_base_sink_get_alignment:<osxaudiosink0> Unexpected discontinuity in audio timestamps of -0:00:00.130181405, resyncing 0:00:08.208908000 5723 0x7fe206d63750 ERROR vtdec vtdec.c:765:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame -12348 0:00:08.496646000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1807:gst_audio_base_sink_get_alignment:<osxaudiosink0> Unexpected discontinuity in audio timestamps of -0:00:00.130068027, resyncing 0:00:09.347761000 5723 0x7fe206d63750 ERROR vtdec vtdec.c:765:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame -12348 0:00:09.968630000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1807:gst_audio_base_sink_get_alignment:<osxaudiosink0> Unexpected discontinuity in audio timestamps of -0:00:00.130204081, resyncing 0:00:10.581011000 5723 0x7fe206d63750 ERROR vtdec vtdec.c:765:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame -12348 0:00:11.430185000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1807:gst_audio_base_sink_get_alignment:<osxaudiosink0> Unexpected discontinuity in audio timestamps of -0:00:00.130249433, resyncing 0:00:11.814706000 5723 0x7fe206d63750 ERROR vtdec vtdec.c:765:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame -12348 0:00:12.902327000 5723 0x7fe207918a80 WARN audiobasesink gstaudiobasesink.c:1807:gst_audio_base_sink_get_alignment:<osxaudiosink0> Unexpected discontinuity in audio timestamps of -0:00:00.130113378, resyncing 0:00:12.947475000 5723 0x7fe206d63750 ERROR vtdec vtdec.c:765:gst_vtdec_session_output_callback:<vtdec0> Error decoding frame -12348 ^Chandling interrupt. Interrupt: Stopping pipeline ... Execution ended after 0:00:13.542908000 Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... I've also attached a wireshark pcap.
Created attachment 358803 [details] wireshark pcap
We're up to a bad start considering even Wireshark complains that the SDP is malformed ... Does that camera work with any rtsp player out there ?
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/379.