demux/remux pipeline hangs when audio is added
Tim-Philipp Müller
t.i.m at zen.co.uk
Wed Oct 2 10:58:40 PDT 2013
On Wed, 2013-10-02 at 13:46 -0400, Robert Krakora wrote:
> Something like this Tim?
>
>
> gst-launch filesrc location=<path> ! tsdemux name=demux !
> queue ! mpegvideoparse ! mpeg2dec ! x264enc ! mpegtsmux name=mux !
> hlssink demux. ! queue ! a52dec ! audioconvert ! faac ! mux.
Yes, though the queues might be too small by default (only 1 second),
especially if you use x264enc without tune=zerolatency. Since x264 has a
latency of a couple of seconds by default, you'll have to make the audio
queue at least 3-5 seconds (queue max-size-bytes=0 max-size-buffers=0
max-size-time=5000000000).
And if you decode anyway you might just as well use uridecodebin or
decodebin(2).
Also, depending on the decoders/encoders used you might need a
videoconvert/ffmpegcolorspace in front of the video encoder and a
audioconvert ! audioresample in front of the audio encoder.
Cheers
-Tim
> On Wed, Oct 2, 2013 at 1:38 PM, Tim-Philipp Müller <t.i.m at zen.co.uk>
> wrote:
> On Wed, 2013-10-02 at 11:19 -0600, Carah Smith wrote:
>
> Hi,
>
> > I am trying to make a pipeline that takes a transport stream
> in,
> > demuxes it, does some transcoding, remuxes, and sends it to
> a sink.
> > I can make it work if I only have video in the pipeline or
> if I only
> > have audio but once I add both, the application hangs. Here
> is my
> > source code (I removed all the error checking for emailing
> to reduce
> > line length):
>
>
> You need a queue in each branch right after the demuxer. This
> is needed
> for the "preroll" mechanism to work properly, which blocks the
> pushing
> thread in the sink waiting for the 'Go!', but the pipeline
> won't start
> unless all sinks have data, which they won't get if you don't
> use
> queues.
>
> You might also want/need a parser in front of each decoder.
>
> Cheers
> -Tim
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
>
>
>
> --
> Rob Krakora,
> Senior Software Engineer
>
> MessageNet Systems
> 101 E Carmel Dr, Suite 105
> Carmel, IN 46032
>
> MessageNetSystems.com
> Rob.Krakora at MessageNetSystems.com
> P: 317.566.1677, 212
> F: 317.663.0808
>
>
> For the latest news, information, and blogs, please be sure to visit,
> follow, and like us...
>
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
More information about the gstreamer-devel
mailing list