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 ?
GStreamer is a pipeline-based multimedia framework that links together a wide variety of media processing systems to complete complex workflows. For instance, GStreamer can be used to build a system that reads files in one format, processes them, and exports them in another.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With