FFmpeg recipe
FFmpeg: Speed Up a Video 2× (Audio + Video)
setpts changes the video presentation timestamps; atempo time-stretches the audio without changing pitch. The two together give you a clean speed change.
Command
ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=PTS/2[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" -c:v libx264 -crf 23 -c:a aac -b:a 192k -y output_2x.mp4Prefer no terminal?
Use the Speed Changer in your browser
What each flag does
| -i | Input file. Can be a video, audio, or image. Repeat for multiple inputs. |
|---|---|
| -c:v | Video codec for output. e.g. libx264, libx265, libvpx-vp9. |
| -crf | Constant Rate Factor — quality target (lower = better, larger file). 23 is visually lossless for libx264. |
| -c:a | Audio codec for output. e.g. aac, libmp3lame, copy. |
| -b:a | Audio bitrate, e.g. 192k. |
| -y | Overwrite output file without confirmation. |
| setpts=PTS/2 | Video frames now play at 2× speed. Use PTS/N for N× speed. |
| atempo=2.0 | Audio plays at 2× speed without pitch shift. Valid range: 0.5–2.0 per filter; chain (atempo=2.0,atempo=2.0) for 4×. |
Notes & gotchas
- For slow motion, use setpts=PTS*2 (half speed) and atempo=0.5.
- atempo only accepts 0.5–2.0; chain multiple atempo filters for steeper speed changes.
Related recipes
Resize to 1080p · Any video
Resize any video to 1080p (1920×1080) with FFmpeg scale filter. Preserves aspect ratio with -1 trick.
Crop to 9:16 · Any video
Crop a 16:9 video to 9:16 vertical with FFmpeg crop filter. Centered crop for TikTok, Reels, Shorts.
Change frame rate · Any video
Change the frame rate of any video with FFmpeg fps filter. Simple drop / duplicate for safe FPS conversion.
Reverse a video · Any video
Reverse video and audio with FFmpeg using reverse + areverse filters. Useful for boomerangs and easter eggs.