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 707974 - h264parse: Broken conversion to AVC if a SPS/PPS not from the first indizes is used
h264parse: Broken conversion to AVC if a SPS/PPS not from the first indizes i...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal normal
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-12 13:37 UTC by nkef
Modified: 2013-10-03 11:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gst-debug-log level 5 (345.81 KB, application/x-gzip)
2013-09-12 13:37 UTC, nkef
  Details
gst-debug-log level 4 for live h264 ts over udp stream (107.12 KB, text/x-log)
2013-09-18 13:51 UTC, nkef
  Details
Fix playback from live h264 elementary or transport stream over udp (898 bytes, patch)
2013-09-20 14:35 UTC, nkef
needs-work Details | Review
Mpeg transport stream file used to trigger the bug (983.81 KB, video/mp2t)
2013-10-01 10:15 UTC, nkef
  Details
H264 elementary stream file used to trigger the bug (870.73 KB, application/octet-stream)
2013-10-01 10:16 UTC, nkef
  Details

Description nkef 2013-09-12 13:37:10 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
Comment 1 nkef 2013-09-12 13:55:04 UTC
It seems that h264parse not properly initializes avdec_h264.
Comment 2 nkef 2013-09-18 13:51:35 UTC
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
Comment 3 nkef 2013-09-20 14:35:27 UTC
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
Comment 4 Sebastian Dröge (slomo) 2013-09-27 14:32:17 UTC
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.
Comment 5 nkef 2013-10-01 10:15:02 UTC
Created attachment 256170 [details]
Mpeg transport stream file used to trigger the bug
Comment 6 nkef 2013-10-01 10:16:03 UTC
Created attachment 256171 [details]
H264 elementary stream file used to trigger the bug
Comment 7 nkef 2013-10-01 10:19:11 UTC
(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
Comment 8 Sebastian Dröge (slomo) 2013-10-03 11:16:58 UTC
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
Comment 9 Sebastian Dröge (slomo) 2013-10-03 11:28:07 UTC
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