stuck pipeline

Tim-Philipp Müller t.i.m at zen.co.uk
Mon Feb 18 07:16:00 PST 2013


On Mon, 2013-02-18 at 08:05 -0700, Gary Thomas wrote:

> I'm trying to write a pipeline which is equivalent to 'playbin2'
> to display an MP4 file (H.264+MP3) on my X based display.  I'm doing
> this to provide finer control over the result, e.g. choice of H.264
> decoder, etc.

What's the "etc." ?

If you prefer a certain h264 decoder, why not just give it a higher rank
than the others (you can do that in your application, fwiw, though not
with gst-launch, unless you change the decoder's source code)?

> I tried this pipeline:
>    gst-launch -v filesrc location=/dcim/Camera/2013-02-18_12-35-40.mp4 ! qtdemux name=demux \
>      demux. ! queue ! h264parse ! ffdec_h264 ! ffmpegcolorspace ! autovideosink \
>      demux. ! queue ! mpegaudioparse ! ffdec_mp3 ! audioconvert ! pulsesink
> 
> Which starts out happy - it brings up a window with the image, but then
> it just gets stuck.  There is no indication or error why.

You also want a videoscale in front of the videosink in case your sink
can't scale (like ximagesink). But that's not the reason if it comes up
in the first place.

> I then tried the [arguably] simpler pipeline and it also gets stuck:
>    gst-launch -v filesrc location=/dcim/Camera/2013-02-18_12-35-40.mp4 ! qtdemux name=demux \
>      demux. ! queue ! h264parse ! filesink location=/tmp/junk.h264 \
>      demux. ! queue ! mpegaudioparse ! filesink location=/tmp/junk.wav
> 
> Any ideas why this is happening?  Where should I look?

If you just want some sink for testing, you can use fakesink.

The reason it stalls might be that the queues are too small. Either make
them larger by increasing the max-size-* limits, or use a multiqueue.

Btw, uridecodebin/decodebin2 also give you a way to influence the
plugging of parsers/decoders/etc. via the autoplug-* signals, so you can
pick/prefer certain decoders there if you like.

Cheers
 -Tim 



More information about the gstreamer-devel mailing list