Single-image slideshow
Andy Robinson
andy at seventhstring.com
Sun Jul 31 14:21:28 UTC 2016
On 31/07/16 13:55, Arjen Veenhuizen wrote:
> You can add -e to gst-launch-1.0 to make the pipeline emit an EOS just before
> shutting it down using control+c (which is required when using mp4mux),
> e.g.:
>
> gst-launch-1.0 -e mp4mux name=mux ! queue ! filesink
> location=BringThatThing.mp4 filesrc location=IMG_2226.JPG ! jpegdec !
> imagefreeze ! video/x-raw,framerate=1/10 ! x264enc ! mux. filesrc
> location=btt.mp3 ! decodebin ! voaacenc bitrate=256000 ! mux.
>
> The problem is that the video source will run indefinitely. Not sure how you
> can make it stop after a specific number of frames or duration (see also
> http://gstreamer-devel.966125.n4.nabble.com/Stopping-command-line-gst-launch-after-processing-certain-no-of-frames-td3919867.html)
> I think you will have to write some code to get that kind of functionality.
I've added the -e
andy at ubuntu:~/Temp0$ gst-launch-1.0 -e mp4mux name=mux ! queue !
filesink location=BringThatThing.mp4 filesrc location=IMG_2226.JPG !
jpegdec ! imagefreeze ! video/x-raw,framerate=1/10 ! x264enc ! mux.
filesrc location=btt.mp3 ! decodebin ! voaacenc bitrate=256000 ! mux.
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
Waiting for EOS...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Interrupt while waiting for EOS - stopping pipeline...
Execution ended after 0:00:15.623976289
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
andy at ubuntu:~/Temp0$
The first time I hit ctrl-C it says "Waiting for EOS..." but the op file
continues growing rapidly. The second time I hit ctrl-C it stops but the
op file is again unplayable.
I don't really want to have to specify a time for it to stop, I just
want it to stop when the source audio file is finished. But it seems
that even if I did specify the length in seconds, there is still no way
to do it with gst-launch. Oh well, never mind. Thanks for the help.
There are any number of videos on YouTube consisting of a static image
while the music plays, which is the kind of video I wanted to be able to
generate.
Regards,
Andy Robinson, Seventh String Software, www.seventhstring.com
More information about the gstreamer-devel
mailing list