To increase speed of a video by a factor of 1.5x:
ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=PTS/1.5[v];[0:a]atempo=1.5[a]" -map "[v]" -map "[a]" output.mp4
We can use this to adjust the speed of all the videos in a directory (Linux and macOS only):
mkdir -p output
for i in *.mp4; do ffmpeg -i "$i" -filter_complex "[0:v]setpts=PTS/1.5[v];[0:a]atempo=1.5[a]" -map "[v]" -map "[a]" "output/${i%.*}.mp4"; done
We can also control the size of the resulting videos by using the libx264 codec and the -crf
flag. For example:
ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=PTS/1.5[v];[0:a]atempo=1.5[a]" -map "[v]" -map "[a]" -vcodec libx264 -crf 24 output.mp4
Putting it all together for an entire directory, written to an output directory:
for i in *.mp4; do ffmpeg -i "$i" -filter_complex "[0:v]setpts=PTS/1.5[v];[0:a]atempo=1.5[a]" -map "[v]" -map "[a]" -vcodec libx264 -crf 24 "output/${i%.*}.mp4"; done
If installing ffmpeg from source, in order to use the x264 codec, make sure to specify the following flags when running the configuration step:
./configure --enable-gpl --enable-libx264
IGTV 1.5x: