Speed Up or Slow Down a Video with FFmpeg (setpts)
Change a video's playback speed from the command line, adjusting video and audio together.
Run ffmpeg -i input.mp4 -filter:v "setpts=0.5*PTS" -filter:a "atempo=2.0" output.mp4 for 2x speed — divide PTS by the speed factor you want.
01Command
Command
$ ffmpeg -i input.mp4 -filter:v "setpts=0.5*PTS" -filter:a "atempo=2.0" output.mp402What it does
setpts rewrites presentation timestamps: PTS divided by 2 doubles the speed, and multiplying (setpts=2*PTS) halves it into slow motion. atempo adjusts the audio to match and preserves pitch so voices stay natural; the wiki notes its supported range is 0.5–2.0, so for 4x you chain two filters like atempo=2.0,atempo=2.0. Re-encoding is required, so this is slower than stream-copy edits.
03Risk
!Warning: Extreme speed changes make speech unintelligible — test with a short clip first.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- FilteringGuide (FFmpeg wiki)Evidence: Shows the setpts=0.5*PTS pattern for 2x video speed-up and notes atempo tempo adjustment with a supported range of 0.5–2.0 (chainable).
Last verified: 2026-09-18 · Category: Media