FFmpeg: How to Slow Down & Speed Up a Video (x0.5, x1.5, x2)

Updated

Learn how to slow down or speed up a video using FFmpeg

FFmpeg: How to Slow Down & Speed Up a Video (x0.5, x1.5, x2)

To follow along, make sure you have FFmpeg installed on your system, open your terminal or command prompt, and navigate to the folder containing your video file named input.mp4.

0.5x (Half speed)

First, let's slow down your video to half speed, or 0.5x. To do this, we multiply the video presentation timestamp by 2.0 and set the audio tempo to 0.5. Run this command in your terminal:

ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]" -map "[v]" -map "[a]" output_0.5x.mp4

Depending on the length and resolution of your video, FFmpeg will take a few moments to process the file, so simply wait until you see your command prompt reappear.

1.5x (Fast)

Next, if you want to speed up your video to 1.5x speed, set the video presentation timestamp multiplier to 0.667 and set the audio tempo to 1.5 using this command:

ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=0.667*PTS[v];[0:a]atempo=1.5[a]" -map "[v]" -map "[a]" output_1.5x.mp4

2.0x (Double speed)

Finally, to double the speed of your video to 2.0x, drop the video presentation timestamp multiplier down to 0.5 and increase the audio tempo to 2.0:

ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" output_2.0x.mp4

To quickly confirm everything worked, open your generated file or run ffplay output_2.0x.mp4 in your terminal to check that both the video and audio play back smoothly at double speed.

As a practical tip, the atempo audio filter only accepts values between 0.5 and 2.0, so if you ever need even higher speeds like 4x, you can chain two atempo filters together like atempo=2.0,atempo=2.0