[gst-devel] Slow down videos

Andoni Morales ylatuya at gmail.com
Fri Jun 19 15:32:42 CEST 2009


2009/6/15 Maximilan Hoegner <maxi at hg.homeunix.org>

> Hi,
> is there some simple gst-launch-pipeline to slow down a video file?
> Something like
>
> gst-launch-0.10 filesrc location=in.wav ! slowdown ! filesink=out.wav
>
> I know that I can play a video slower if I send a seek event with rate
> != 1.0. But seeking doesn't seem to work with filesink, and I don't know
> how to seek when using gst-launch, if this is possible. So is there a
> simple pipeline I can use with gst-launch?
>
> In case there is not:
>
> Is there another way of seeking that does work with filesink? I also
> tried sync=TRUE for the filesink, which had no effect.
> Perhaps I made some mistake in my program structure. I first set the
> state of the pipeline to playing. Then I do a get_state to wait for the
> state change to complete (otherwise seeking has no effect at all, even
> when not using filesink). Then I call
>
> gst_element_seek(pipeline, 0.5, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH,
> GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE);
>
> which should set the playback rate to 0.5. After that I run the
> gmainloop. This does indeed work if I do not use filesink, but when I
> use it, the file is not slowed down at all (seeking to another position
> doesn't work either). Anything wrong about that?
> I suspect that the work is already done when the program reaches the
> seek line, because state is set to playing before. Doing it the other
> way round does not work however, the seek event does not get handled then.


The seek event will change the rate of the stream but you need to make it
effective (rewrite timestamps according to the new rate) using the videorate
element before the filesink for example.

Andoni


> Thank you for your help,
> Maxi
>
>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>


-- 
Andoni Morales Alastruey

LongoMatch:The Digital Coach
http://www.longomatch.ylatuya.es
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090619/ab24eeb0/attachment.htm>


More information about the gstreamer-devel mailing list