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.mp4
Prefer no terminal?
Use the Speed Changer in your browser
Open Speed Changer

What each flag does

-iInput file. Can be a video, audio, or image. Repeat for multiple inputs.
-c:vVideo codec for output. e.g. libx264, libx265, libvpx-vp9.
-crfConstant Rate Factor — quality target (lower = better, larger file). 23 is visually lossless for libx264.
-c:aAudio codec for output. e.g. aac, libmp3lame, copy.
-b:aAudio bitrate, e.g. 192k.
-yOverwrite output file without confirmation.
setpts=PTS/2Video frames now play at 2× speed. Use PTS/N for N× speed.
atempo=2.0Audio 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