Speed up or slow down a video
Speed up a long tutorial video, or slow down a sports move. ffmpeg adjusts both the picture and the sound; the audio keeps its natural pitch, with no cartoon-voice effect.
Updated on
The lower the number, the better the picture and the larger the file.
How to use it
- Install ffmpeg if you haven't already.
- Open a terminal in the folder containing your file.
- Copy the generated command, adjust the file names if needed, then run it.
- Open the resulting file to check the result.
How it works
The setpts filter recalculates the timestamp of each frame: dividing by 1.5 brings the frames closer together, and the video lasts 1.5 times less. The atempo filter applies the same speed to the audio. The two are set together to keep everything in sync.
For a timelapse
Beyond ×4, it's better to keep one frame out of N rather than speed up: replace the video filter with "framestep=10,setpts=N/30/TB" to keep one frame out of ten, and remove the audio.
Frequently asked questions
The slow motion is choppy. Why?
Slowing down stretches the existing frames: a 30 frames per second (fps) video slowed to half speed only shows 15. For smooth slow motion, shoot at 60 or 120 fps.
Why two atempo filters for ×4?
With older versions of ffmpeg, the atempo filter is limited to a factor between 0.5 and 2. For ×4, two ×2 filters are chained, which works with all versions.
Does the voice stay natural?
Yes: the atempo filter changes the speed of the audio without changing its pitch. The voice is faster or slower, but not higher or lower.