Sometimes I have a long video that I want to speed up. Maybe it’s a screen recording of a process that took a while, or a timelapse that isn’t quite fast enough. FFmpeg makes this simple. If you’re on Mac FFmpeg can be installed via brew.

brew install ffmpeg

The following command speeds up a video by 2x, adjusting both the video and audio streams.

ffmpeg -i $in -filter:v "setpts=0.5*PTS" -filter:a "atempo=2.0" $out

The setpts filter controls the video speed. The value is the inverse of the speed multiplier, so 0.5 means 2x speed, 0.25 means 4x speed, and so on.

The atempo filter controls the audio speed. It accepts values between 0.5 and 100.0. For a 2x speedup use 2.0, for 4x use 4.0.

If you want to speed up the video by 4x:

ffmpeg -i $in -filter:v "setpts=0.25*PTS" -filter:a "atempo=4.0" $out

If you don’t need the audio and just want to speed up the video, you can drop the audio stream entirely:

ffmpeg -i $in -filter:v "setpts=0.5*PTS" -an $out

In all commands replace $in with the input file, and $out with where you want the output file to be written.