GNOME Bugzilla – Bug 707974
h264parse: Broken conversion to AVC if a SPS/PPS not from the first indizes is used
Last modified: 2013-10-03 11:28:23 UTC
Created attachment 254783 [details] gst-debug-log level 5 Up to commit 8e5f0e37f8d776888af468097c98a8130f3db792 it was possible to play live H.264 stream from udp whether it was a raw E.S stream or encapsulated to transport stream. Example pipelines: For transport stream gst-launch-1.0 -vvv udpsrc port=8701 buffer-size=18000000 ! queue ! tsdemux ! queue ! h264parse ! queue ! avdec_h264 max-threads=8 ! queue ! xvimagesink sync=false For raw H264 es stream gst-launch-1.0 -vvv udpsrc port=8701 buffer-size=18000000 ! queue ! h264parse disable-passthrough=false ! queue ! avdec_h264 max-threads=8 ! queue ! xvimagesink sync=false From commit 31d1c05871fefabc2966d09e11331a0f0431e4fa it fails with the following error: WARN videodecoder gstvideodecoder.c:809:gst_video_decoder_setcaps:<avdec_h264-0> Subclass refused caps WARN videodecoder gstvideodecoder.c:2015:gst_video_decoder_chain:<avdec_h264-0> error: decoder not initialized ERROR: from element /GstPipeline:pipeline0/avdec_h264:avdec_h264-0: GStreamer error: negotiation problem. Additional debug info: gstvideodecoder.c(2015): gst_video_decoder_chain (): /GstPipeline:pipeline0/avdec_h264:avdec_h264-0: decoder not initialized
It seems that h264parse not properly initializes avdec_h264.
Created attachment 255219 [details] gst-debug-log level 4 for live h264 ts over udp stream gst-debug-log level 4 for live h264 ts over udp stream
Created attachment 255403 [details] [review] Fix playback from live h264 elementary or transport stream over udp These patch reverts a change made by 31d1c05871fefabc2966d09e11331a0f0431e4fa commit for supporting stream-format=avc3. It is possible that breaks stream-format=avc3 support
Can you provide a sample stream where this fails and pipeline that reproduces the behaviour on this? I fail to see how your patch changes any behaviour on non-avc3 streams.
Created attachment 256170 [details] Mpeg transport stream file used to trigger the bug
Created attachment 256171 [details] H264 elementary stream file used to trigger the bug
(In reply to comment #4) > Can you provide a sample stream where this fails and pipeline that reproduces > the behaviour on this? I fail to see how your patch changes any behaviour on > non-avc3 streams. In order to emulate the real system, the attached m2ts and h264 can be transmitted to gstreamer with the following ffmpeg command from a secondary system. For mpeg transport stream On system A: ffmpeg -an -r 30 -re -i foreman-test.m2ts -vcodec copy -an -f mpegts udp://SYSTEM_B_IP:8701 On system B: gst-launch-1.0 -vvv udpsrc port=8701 buffer-size=18000000 ! queue ! tsdemux ! queue ! h264parse ! queue ! avdec_h264 max-threads=8 ! queue ! xvimagesink sync=false For h264 stream On system A: ffmpeg -an -r 30 -re -i foreman-test.h264 -vcodec copy -an -f rawvideo udp://SYSTEM_B_IP:8701 On system B: gst-launch-1.0 -vvv udpsrc port=8701 buffer-size=18000000 ! queue ! h264parse disable-passthrough=false ! queue ! avdec_h264 max-threads=8 ! queue ! xvimagesink sync=false
Also easy to reproduce with > gst-launch-1.0 filesrc location=test.h264 ! h264parse ! "video/x-h264,stream-format=byte-stream" ! queue ! avdec_h264 ! queue ! xvimagesink vs. > gst-launch-1.0 filesrc location=test.h264 ! h264parse ! "video/x-h264,stream-format=avc" ! queue ! avdec_h264 ! queue ! xvimagesink
commit 24425d8ec35e60d4a4b797191a5e77cc31752f31 Author: Sebastian Dröge <slomo@circular-chaos.org> Date: Thu Oct 3 13:26:06 2013 +0200 h264parse: Fix conversion to AVC if a SPS/PPS not from the first indizes is used https://bugzilla.gnome.org/show_bug.cgi?id=707974