Why does this gstreamer pipeline stall?

This works:

gst-launch-0.10 
videotestsrc ! ffmpegcolorspace ! 'video/x-raw-yuv' ! mux. 
audiotestsrc ! audioconvert ! 'audio/x-raw-int,rate=44100,channels=1' ! mux. 
avimux name=mux ! filesink location=gst.avi

I can let it run for a while, kill it, and then totem gst.avi displays a nice test card with tone.

However, trying to do something more useful like

gst-launch-0.10 
filesrc location=MVI_2034.AVI ! decodebin name=dec 
dec. ! ffmpegcolorspace ! 'video/x-raw-yuv' ! mux. 
dec. ! audioconvert ! 'audio/x-raw-int,rate=44100,channels=1' ! mux. 
avimux name=mux ! filesink location=gst.avi

it just displays

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

and then stalls indefinitely.

What's the trick to get the version with decodebin rolling ?


Aha... this does what I want:

gst-launch-0.10 
filesrc location=MVI_2034.AVI ! decodebin name=dec 
dec. ! queue ! ffmpegcolorspace ! 'video/x-raw-yuv' ! queue ! mux. 
dec. ! queue ! audioconvert ! 'audio/x-raw-int,channels=1' ! audioresample ! 'audio/x-raw-int,rate=44100' ! queue ! mux. 
avimux name=mux ! filesink location=gst.avi

The queue elements (both leading and trailing) do appear to be crucial.

Further experiments adding things like videoflip or

videorate ! 'video/x-raw-yuv,framerate=25/1'

into the video part of the pipeline all work as expected.


your pipeline seems to be correct. however, gst-launch is a limited tool - i would suggest coding the pipeline in python or ruby for better debugging.

链接地址: http://www.djcxy.com/p/1166.html

上一篇: 在SQL Server中为经常使用的查询创建适当的索引

下一篇: 为什么这个gstreamer管道失速?