extract multiple elementary streams using one tsdemux element?
Adams, Bruce (KMLWG)
Bruce.Adams at KantarMedia.com
Tue May 1 17:23:24 UTC 2018
Hi,
I'm trying to extract multiple elementary streams (belonging to different programs) from a transport stream simultaneously.
Currently I can only get this to work by adding a tee element and connecting a separate tsdemux for each program. Is this the only way? It seems an unnecessary complication.
If I run a pipeline like:
GST_DEBUG=6 gst-launch-1.0 -v filesrc location=foo.ts ! tsdemux name=demux demux.audio_0_006a ! mpegaudioparse ! mpg123audiodec ! audioresample ! audio/x-raw, rate=8000 ! wavenc ! filesink location=audio1.wav 2>&1 | grep "creating pad" | grep audio | tee audiopads
It looks like the tsdemux element provides pads for all the audio streams:
GST_DEBUG=6 gst-launch-1.0 -v filesrc location=foo.ts ! tsdemux name=demux demux.audio_0_006a ! mpegaudioparse ! mpg123audiodec ! audioresample ! audio/x-raw, rate=8000 ! wavenc ! filesink location=audio1.wav 2>&1 | grep "creating pad" | grep audio | tee audiopads2
0:00:01.284886317 28409 0x5643c2334320 LOG tsdemux tsdemux.c:1594:create_pad_for_stream: stream:0x7fae8c00cd00 creating pad with name audio_0_0066 and caps audio/mpeg, mpegversion=(int)1
0:00:01.285548634 28409 0x5643c2334320 LOG tsdemux tsdemux.c:1594:create_pad_for_stream: stream:0x7fae8c00ef10 creating pad with name audio_0_006a and caps audio/mpeg, mpegversion=(int)1
0:00:01.295740367 28409 0x5643c2334320 LOG tsdemux tsdemux.c:1594:create_pad_for_stream: stream:0x7fae8c09eb80 creating pad with name audio_1_00ca and caps audio/mpeg, mpegversion=(int)1
[snip]
0:00:01.316647548 28409 0x5643c2334320 LOG tsdemux tsdemux.c:1594:create_pad_for_stream: stream:0x7fae8c0b5400 creating pad with name audio_1_0044 and caps audio/mpeg, mpegversion=(int)1
So it looks like a single tsdemux can be used to get at all the elementary streams.
However, when I try to do this programmatically I find I only get the elementary streams
for a single program as if the program_number property is set (explicitly setting it to -1 does not help).
Similarly from the command line I'd like to do something like:
gst-launch-1.0 -v filesrc location=foo.ts ! tsdemux name=demux \
demux.audio_0_0066 ! queue ! mpegaudioparse ! mpg123audiodec ! audioresample ! audio/x-raw, rate=8000 ! wavenc ! filesink location=audio1.wav \
demux.audio_1_00ca ! queue ! mpegaudioparse ! mpg123audiodec ! audioresample ! audio/x-raw, rate=8000 ! wavenc ! filesink location=audio2.wav
Which fails as follows:
WARNING: from element /GstPipeline:pipeline0/GstTSDemux:demux: Delayed linking failed.
Additional debug info:
./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstTSDemux:demux:
failed delayed linking pad audio_1_00ca of GstTSDemux named demux to some pad of GstQueue named queue1
Regards,
Bruce.
Kantar Disclaimer<http://www.kantar.com/disclaimer.html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180501/0f584290/attachment.html>
More information about the gstreamer-devel
mailing list