FFmpeg Change Video Speed


One possible solution is to use FFmpeg in conjunction with yuvfps:

ffmpeg -i input.dv -f yuv4mpegpipe – | yuvfps -s 50:1 -r 50:1 | ffmpeg -f yuv4mpegpipe -i – -b 28800k -y output.avi

http://ubuntuforums.org/showthread.php?t=688679

It can also be done using a pipe,

framerate2 =framerate1 / stretch_factor

Script (fish syntax):
set width (ffprobe -show_streams movie.mpeg | grep width= 2>/dev/null | cut -f2 -d=)
set height (ffprobe -show_streams movie.mpeg | grep height= 2>/dev/null | cut -f2 -d=)
set framerate1 (ffprobe -show_streams movie.mpeg | grep r_frame_rate= | cut -f2 -d=)
set framerate2 (echo "$framerate1 / $stretch_factor" | bc -l)

ffmpeg -i movie.mpeg -pix_fmt yuv420p -an -f rawvideo - |\
http://thread.gmane.org/474C122B.9090307@signal7.de

Or a raw or image intermediate format:

Assume starting from a 25fps avi (UNTESTED!)

ffmpeg -i 25.avi -pix_fmt yuv420p -f raw raw.dat
ffmpeg -s -r 50 -f yuv420p -i raw.dat -r 25 doublespeed.mpg

ffmpeg -f rawvideo -pix_fmt yuv420p -s {$width}x{$height} -r $framerate2 -i - -y movie-stretched.mpg

One thought on “FFmpeg Change Video Speed

  1. LF

    make video from a set of images, ffmpeg -b 7000k -r 10 -i imgs_%5d.bmp -b 7000k -r 10 -vcodec mpeg4 -vtag DIVX a.avi

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s