File-Streaming not working. Incorrect DTS Timestamps
René Calles
gstreamer at renevolution.com
Sat Apr 26 03:25:51 PDT 2014
Hi,
i just figured out that the main issue was using H.264 video in High-Profile with using B-Frames.
It works just when using for e.g. a file in Main-Profile without B-Frames.
Is this a known bug in this scenario? When using e.g. tcpserversink there is no issue even when using a High-Profile Video with B-Frames activated.
Cheers,
René
Am 24. April 2014 bei 08:43:09, René Calles (gstreamer at renevolution.com) schrieb:
It seems like the demuxed could not link to the multiqueue as if i explicitly define sink and source pads like
GST_DEBUG=6 gst-launch-1.0 -v \
filesrc location="/Users/reneVolution/WayBackHome_720P25_H264_High31_AACLC_2_CH_44100.mp4" typefind=true ! queue ! qtdemux name="dmux" ! multiqueue name="mq" \
flvmux name="mux" streamable="true" ! queue ! rtmpsink location="rtmp://localhost/live/test live=1" \
dmux.video_0 ! mq.sink0 mq.src0 ! 'video/x-h264,width=1280,height=720,framerate=(fraction)25/1' ! h264parse config-interval=2 ! mux. \
dmux.audio_0 ! mq.sink1 mq.src1 ! "audio/mpeg,mpegversion=4,stream-format=raw" ! aacparse ! mux.
the pipeline stucks
0:00:01.881439000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:4773:GstFlowReturn gst_pad_push_event_unchecked(GstPad *, GstEvent *, GstPadProbeType):<mq:src_0> Dropping event because pad is not linked
0:00:01.881540000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:3397:gboolean push_sticky(GstPad *, PadEvent *, gpointer):<mq:src_0> pad was not linked, mark pending
0:00:01.881554000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:4773:GstFlowReturn gst_pad_push_event_unchecked(GstPad *, GstEvent *, GstPadProbeType):<mq:src_0> Dropping event because pad is not linked
0:00:01.881563000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:3397:gboolean push_sticky(GstPad *, PadEvent *, gpointer):<mq:src_0> pad was not linked, mark pending
0:00:01.881572000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:4773:GstFlowReturn gst_pad_push_event_unchecked(GstPad *, GstEvent *, GstPadProbeType):<mq:src_0> Dropping event because pad is not linked
0:00:01.881581000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:3397:gboolean push_sticky(GstPad *, PadEvent *, gpointer):<mq:src_0> pad was not linked, mark pending
0:00:01.881591000 65232 0x7f8d2b03b990 LOG qtdemux qtdemux.c:6231:qtdemux_parse_samples:<dmux> parsing samples for stream fourcc mp4a, pad audio_0
0:00:01.887857000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:4773:GstFlowReturn gst_pad_push_event_unchecked(GstPad *, GstEvent *, GstPadProbeType):<mq:src_0> Dropping event because pad is not linked
0:00:01.887901000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:3397:gboolean push_sticky(GstPad *, PadEvent *, gpointer):<mq:src_0> pad was not linked, mark pending
0:00:01.887914000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:4773:GstFlowReturn gst_pad_push_event_unchecked(GstPad *, GstEvent *, GstPadProbeType):<mq:src_0> Dropping event because pad is not linked
0:00:01.887925000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:3397:gboolean push_sticky(GstPad *, PadEvent *, gpointer):<mq:src_0> pad was not linked, mark pending
0:00:01.887934000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:4773:GstFlowReturn gst_pad_push_event_unchecked(GstPad *, GstEvent *, GstPadProbeType):<mq:src_0> Dropping event because pad is not linked
0:00:01.888371000 65232 0x7f8d2a0480f0 DEBUG GST_PADS gstpad.c:3397:gboolean push_sticky(GstPad *, PadEvent *, gpointer):<mq:src_0> pad was not linked, mark pending
0:00:01.888438000 65232 0x7f8d2a0480f0 LOG GST_SCHEDULING gstpad.c:4057:GstFlowReturn gst_pad_push_data(GstPad *, GstPadProbeType, void *):<mq:src_0> pushing, but it was not linked
0:00:01.888462000 65232 0x7f8d2a0480f0 LOG GST_BUFFER gstbuffer.c:554:void _gst_buffer_free(GstBuffer *): finalize 0x7f8d2a077ab0
0:00:01.888491000 65232 0x7f8d2a0480f0 DEBUG GST_MEMORY gstmemory.c:88:void _gst_memory_free(GstMemory *): free memory 0x7f8d2a86f8d0
0:00:01.888522000 65232 0x7f8d2a0480f0 LOG multiqueue gstmultiqueue.c:1391:void gst_multi_queue_loop(GstPad *):<mq> AFTER PUSHING sq->srcresult: not-linked
0:00:01.888580000 65232 0x7f8d2b03b990 LOG qtdemux qtdemux.c:6620:qtdemux_parse_samples:<dmux> Tried to parse up to sample 1 but this sample has already been parsed
0:00:01.889189000 65232 0x7f8d2a0480f0 DEBUG multiqueue gstmultiqueue.c:1211:void gst_multi_queue_loop(GstPad *):<mq> SingleQueue 0 : trying to pop an object
0:00:01.889255000 65232 0x7f8d2b03b990 LOG qtdemux qtdemux.c:4451:next_entry_size:<dmux> Checking Stream 1 (sample_index:1 / offset:308161 / size:78)
0:00:01.889373000 65232 0x7f8d2a0480f0 LOG data_queue_dataflow gstdataqueue.c:583:gst_data_queue_pop: queue:0x7f8d2a014eb0 before popping: 0 visible items, 0 bytes, 0 ns, 0 elements
0:00:01.889409000 65232 0x7f8d2b03b990 LOG qtdemux qtdemux.c:4462:next_entry_size:<dmux> stream 1 offset 308161 demux->offset :308161
0:00:01.889727000 65232 0x7f8d2a0480f0 LOG multiqueue gstmultiqueue.c:1969:void single_queue_underrun_cb(GstDataQueue *, GstSingleQueue *):<mq> Single Queue 0 is empty but not-linked
0:00:01.889784000 65232 0x7f8d2b03b990 LOG GST_SCHEDULING gstpad.c:3764:GstFlowReturn gst_pad_chain_data_unchecked(GstPad *, GstPadProbeType, void *):<dmux:sink> called chainfunction &gst_qtdemux_chain with buffer 0x7f8d2a077bc0, returned not-linked
0:00:01.889862000 65232 0x7f8d2b03b990 DEBUG GST_PADS gstpad.c:5461:gboolean gst_pad_pause_task(GstPad *):<queue0:src> pause task
0:00:01.889879000 65232 0x7f8d2b03b990 DEBUG task gsttask.c:662:gboolean gst_task_set_state(GstTask *, GstTaskState):<queue0:src> Changing task 0x7f8d2b866170 to state 2
0:00:01.889894000 65232 0x7f8d2b03b990 LOG queue_dataflow gstqueue.c:1261:void gst_queue_loop(GstPad *):<queue0> pause task, reason: not-linked
0:00:01.890094000 65232 0x7f8d2b03b990 INFO task gsttask.c:300:void gst_task_func(GstTask *):<queue0:src> Task going to paused
Bests,
René
Am 23. April 2014 bei 20:34:39, René Calles (gstreamer at renevolution.com) schrieb:
So, how exactly does it fail? :)
Oh, i missed to explain that :). So, the Pipeline starts PLAYBACK and everything looks fine from publishing point of view.
Anyway if i try to play the video it seems that there are some gaps in synchronization. It plays sometimes fine for about 5 seconds using ffplay or gstreamer playbin.
When changing the multiqueue to „normal“ queue it doesn’t even start playing. As actually talking about, could you point me to a resource which describes when to choose which queue type in the pipeline?
So far the best results i get using
GST_DEBUG=4 gst-launch-1.0 -v \
filesrc location="/Users/reneVolution/WayBackHome_720P25_H264_High31_AACLC_2_CH_44100.mp4" ! queue ! qtdemux name="dmux" \
flvmux name="mux" streamable="true" ! queue ! rtmpsink location="rtmp://localhost/live/test live=1" \
dmux.video_0 ! multiqueue name="mq" ! 'video/x-h264,width=1280,height=720,framerate=(fraction)25/1' ! h264parse config-interval=2 ! mux. \
dmux.audio_0 ! mq. mq. ! "audio/mpeg,mpegversion=4,stream-format=raw" ! aacparse ! mux.
But it doesn’t play fine, after a few seconds an error message
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: HandleMetadata, error decoding meta data packet
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
ERROR: DECODING ERROR, IGNORING BYTES UNTIL NEXT KNOWN PATTERN!
is thrown.
If you look at the debug logs (try GST_DEBUG=6), do you see that all
multiqueue pads are actually linked? Does it work better if you use
normal queues instead of a multiqueue? Does it work better if you
specify the exact pad names instead of letting gst-launch figure that
out? There is a bug with gst-launch that will cause linking to fail in a
few cases because it's choosing the wrong pads to link if you don't
specify them yourself with element_name.pad_name.
Specifing the pad names doesn’t seem to make a difference.
But strange is that i’m able to find some issues with the multiqueue when grepping for „Could not"
0:00:00.150691000 62712 0x7f8f6150e400 DEBUG GST_ELEMENT_PADS gstutils.c:1102:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mux> Could not find a compatible unlinked always pad to link to aacparse0:src, now checking request pads
0:00:00.153813000 62712 0x7f8f6150e400 INFO default gstutils.c:1889:gboolean gst_element_link_pads_filtered(GstElement *, const gchar *, GstElement *, const gchar *, GstCaps *): Could not link pads: dmux:video_0 - mq:(null)
0:00:00.154315000 62712 0x7f8f6150e400 DEBUG GST_ELEMENT_PADS gstutils.c:1102:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mq> Could not find a compatible unlinked always pad to link to capsfilter0:sink, now checking request pads
0:00:00.154559000 62712 0x7f8f6150e400 INFO GST_ELEMENT_PADS gstutils.c:1123:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mq> Could not find a compatible pad to link to capsfilter0:sink
0:00:00.155370000 62712 0x7f8f6150e400 INFO default gstutils.c:1874:gboolean gst_element_link_pads_filtered(GstElement *, const gchar *, GstElement *, const gchar *, GstCaps *): Could not link pads: mq:(null) - capsfilter:sink
0:00:00.155700000 62712 0x7f8f6150e400 DEBUG GST_ELEMENT_PADS gstutils.c:1102:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mux> Could not find a compatible unlinked always pad to link to h264parse0:src, now checking request pads
0:00:00.156375000 62712 0x7f8f6150e400 INFO default gstutils.c:1889:gboolean gst_element_link_pads_filtered(GstElement *, const gchar *, GstElement *, const gchar *, GstCaps *): Could not link pads: dmux:audio_0 - mq:(null)
0:00:00.156781000 62712 0x7f8f6150e400 DEBUG GST_ELEMENT_PADS gstutils.c:1102:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mq> Could not find a compatible unlinked always pad to link to capsfilter1:sink, now checking request pads
0:00:00.157003000 62712 0x7f8f6150e400 INFO GST_ELEMENT_PADS gstutils.c:1123:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mq> Could not find a compatible pad to link to capsfilter1:sink
0:00:00.158244000 62712 0x7f8f6150e400 INFO default gstutils.c:1874:gboolean gst_element_link_pads_filtered(GstElement *, const gchar *, GstElement *, const gchar *, GstCaps *): Could not link pads: mq:(null) - capsfilter:sink
0:00:00.469011000 62712 0x7f8f618bf940 DEBUG GST_ELEMENT_PADS gstutils.c:1102:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mq> Could not find a compatible unlinked always pad to link to dmux:video_0, now checking request pads
0:00:00.474279000 62712 0x7f8f618bf940 DEBUG GST_ELEMENT_PADS gstutils.c:1102:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mq> Could not find a compatible unlinked always pad to link to capsfilter3:sink, now checking request pads
0:00:00.474536000 62712 0x7f8f618bf940 INFO GST_ELEMENT_PADS gstutils.c:1123:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mq> Could not find a compatible pad to link to capsfilter3:sink
0:00:00.475854000 62712 0x7f8f618bf940 INFO default gstutils.c:1874:gboolean gst_element_link_pads_filtered(GstElement *, const gchar *, GstElement *, const gchar *, GstCaps *): Could not link pads: mq:(null) - capsfilter:sink
0:00:00.478337000 62712 0x7f8f618bf940 DEBUG GST_ELEMENT_PADS gstutils.c:1102:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mq> Could not find a compatible unlinked always pad to link to capsfilter4:sink, now checking request pads
0:00:00.478588000 62712 0x7f8f618bf940 INFO GST_ELEMENT_PADS gstutils.c:1123:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mq> Could not find a compatible pad to link to capsfilter4:sink
0:00:00.479920000 62712 0x7f8f618bf940 INFO default gstutils.c:1874:gboolean gst_element_link_pads_filtered(GstElement *, const gchar *, GstElement *, const gchar *, GstCaps *): Could not link pads: mq:(null) - capsfilter:sink
0:00:00.482039000 62712 0x7f8f618bf940 INFO default gstutils.c:1889:gboolean gst_element_link_pads_filtered(GstElement *, const gchar *, GstElement *, const gchar *, GstCaps *): Could not link pads: dmux:audio_0 - mq:(null)
0:00:00.482361000 62712 0x7f8f618bf940 DEBUG GST_ELEMENT_PADS gstutils.c:1102:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mq> Could not find a compatible unlinked always pad to link to dmux:audio_0, now checking request pads
and when using queue:
0:00:00.170287000 62747 0x7fc681411c00 DEBUG GST_ELEMENT_PADS gstutils.c:1102:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mux> Could not find a compatible unlinked always pad to link to aacparse0:src, now checking request pads
0:00:00.173323000 62747 0x7fc681411c00 INFO default gstutils.c:1889:gboolean gst_element_link_pads_filtered(GstElement *, const gchar *, GstElement *, const gchar *, GstCaps *): Could not link pads: dmux:video_0 - queue2:(null)
0:00:00.175498000 62747 0x7fc681411c00 DEBUG GST_ELEMENT_PADS gstutils.c:1102:GstPad *gst_element_get_compatible_pad(GstElement *, GstPad *, GstCaps *):<mux> Could not find a compatible unlinked always pad to link to h264parse0:src, now checking request pads
0:00:00.176285000 62747 0x7fc681411c00 INFO default gstutils.c:1889:gboolean gst_element_link_pads_filtered(GstElement *, const gchar *, GstElement *, const gchar *, GstCaps *): Could not link pads: dmux:audio_0 - queue3:(null)
0:00:00.501436000 62747 0x7fc6820a02d0 INFO default gstutils.c:1889:gboolean gst_element_link_pads_filtered(GstElement *, const gchar *, GstElement *, const gchar *, GstCaps *): Could not link pads: dmux:audio_0 - queue3:(null)
What i don’t understand is if those links fail … how is it possible the pipeline reaches PLAYBACK state? :)
Thanks,
René
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20140426/215944db/attachment-0001.html>
More information about the gstreamer-devel
mailing list