FFmpeg speed up or slow down video, and change the frame rate
Change video speed with setpts and audio speed with atempo, and change both so picture and sound stay the same length. On our 10 s, 300 frame test file, a 2x speed up gave 5.066 s and 152 frames, and a 2x slow down gave 19.988 s. The slow down kept only 300 frames until we added fps=30.
What to choose
Use setpts for the picture and atempo for the sound. For frame rate, use the fps filter to change the number of frames, and keep -r for the output side only. minterpolate invents in between frames and is slow.
| Job | Result on our 10 s, 30 fps file |
|---|---|
| setpts=0.5*PTS with atempo=2.0 | 5.066 s, 152 frames |
| setpts=2.0*PTS with atempo=0.5 | 19.988 s, 300 frames |
| Slow down plus fps=30 | 20.000 s, 600 frames |
Speed up and slow down
setpts multiplies each frame time. Smaller is faster. atempo changes the audio speed without changing pitch.
ffmpeg -i a.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" fast2.mp4ffmpeg -i a.mp4 -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]" -map "[v]" -map "[a]" slow2.mp4The half speed file has the same number of frames as the source, stretched over a longer time, so ffprobe reported an average of 9000/599 frames per second. Add the fps filter to get a steady 30 fps.
ffmpeg -i a.mp4 -filter_complex "[0:v]setpts=2.0*PTS,fps=30[v];[0:a]atempo=0.5[a]" -map "[v]" -map "[a]" slow2_cfr.mp4The atempo limit
One atempo filter has a limited range. Asking for a quarter speed in one filter failed with "[fc#-1 @ ...] Error applying option 'tempo' to filter 'atempo': Result too large".
ffmpeg -i a.mp4 -vn -af atempo=0.25 slow4_direct.m4aChain two filters instead. Our 10 s of audio became 39.955 s.
ffmpeg -i a.mp4 -vn -af atempo=0.5,atempo=0.5 slow4_chain.m4aFrame rate: -r or the fps filter
-r after the input sets the output frame rate. The fps filter does a similar job inside the filter graph. -r before the input changes how FFmpeg reads the file, so the timing changes. We ran all three on the 30 fps file.
| Command | Video frames | File length | Video stream |
|---|---|---|---|
| ffmpeg -i a.mp4 -r 15 r15.mp4 | 152 | 10.133 s | 10.133 s at 15/1 fps |
| ffmpeg -i a.mp4 -vf fps=15 fps15.mp4 | 150 | 10.005 s | 10.000 s at 15/1 fps |
| ffmpeg -r 15 -i a.mp4 r_input.mp4 | 300 | 20.000 s | 20.000 s at 15/1 fps |
With -r before -i the 300 frames were read as 15 fps, so the picture ran 20.0 s while the audio stayed at 10.005 s. That breaks sync. Use -r after the input.
Motion interpolation
To raise the frame rate with new in between frames, use minterpolate. fps=60 is the plain alternative. We ran both on the first 3 s.
ffmpeg -t 3 -i a.mp4 -vf "minterpolate=fps=60:mi_mode=mci" -an interp60.mp4ffmpeg -t 3 -i a.mp4 -vf fps=60 -an fps60.mp4minterpolate gave 177 frames in 24.4 s, 3 fewer than the 180 from fps=60, and took far longer. We did not compare the look of the two.
Method and limits
All commands ran on FFmpeg 8.1.2 (a full Windows build) on a Windows 11 laptop, Ryzen 7 7735U, CPU only, on 2026-11-06. We added -y and -threads 4 to every run; they are left out of the commands shown. In quoted FFmpeg messages the hex address after @ changes on every run, so we replaced it with ...
a.mp4 is a synthetic 10 s test file (testsrc2 picture and a sine tone, 1280x720, 30 fps, a keyframe every 2 seconds), made with the command below.
ffmpeg -f lavfi -i testsrc2=duration=10:size=1280x720:rate=30 -f lavfi -i sine=frequency=440:duration=10:sample_rate=48000 -c:v libx264 -pix_fmt yuv420p -g 60 -keyint_min 60 -sc_threshold 0 -c:a aac -shortest a.mp4Limits: one run of each command, so the sizes and times are single measurements and not averages. Times were taken on a laptop that was doing other work. Results depend on the input file and the FFmpeg version, so check yours. Test pictures were synthetic, so we judged nothing about motion quality.
Related: FFmpeg for video editors, FFmpeg trim video: accurate cuts by time, Join videos with FFmpeg without errors, FFmpeg compress video: CRF and presets, measured with VMAF and FFmpeg command builder.
Page checked on Nov 4, 2026.