Halve the timestamps with setpts=0.5*PTS and double the audio tempo with atempo=2.0, and a 10-second clip plays in 5, in sync. Through ReelSDK that 2x job cost under a fifth of a cent, at $0.02 per compute minute.

Speed up or slow down video with ffmpeg

Picture and sound need separate filters, and ReelSDK's API applied both to our 2x clip in about 6 seconds. Frames get dropped or stretched: at 2x every other frame goes, and at half speed 30 fps turns into a steppy 15.

GuidesUpdated

2x
ffmpeg -i in.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" \
  -c:v libx264 -crf 20 -preset veryfast -c:a aac -movflags +faststart fast.mp4

setpts=0.5*PTS halves every frame's timestamp; atempo=2.0 plays the audio twice as fast at the same pitch. The output stays at 30 fps, so every other frame is dropped.

Variations

The other commands you will need

  1. 4x faster

    atempo takes up to 100 in one go, but above 2 it skips samples, so chain two at 2.0. Both versions came out at a quarter of the original length.

    4x
    ffmpeg -i in.mp4 -filter_complex "[0:v]setpts=0.25*PTS[v];[0:a]atempo=2.0,atempo=2.0[a]" -map "[v]" -map "[a]" \
      -c:v libx264 -crf 20 -preset veryfast -c:a aac -movflags +faststart fast4.mp4
  2. Half speed

    setpts=2.0*PTS spreads the same frames over twice the time. No frames are added, so the result runs at 15 fps.

    half speed
    ffmpeg -i in.mp4 -filter_complex "[0:v]setpts=2.0*PTS[v];[0:a]atempo=0.5[a]" -map "[v]" -map "[a]" \
      -c:v libx264 -crf 20 -preset veryfast -c:a aac -movflags +faststart slow.mp4
  3. Smooth slow motion

    minterpolate builds new frames from the motion between real ones: 583 frames at 30 fps instead of 293 at 15. It is slow: about two and a half minutes for under 10 seconds of 1080p.

    smooth
    ffmpeg -i in.mp4 -vf setpts=2.0*PTS,minterpolate=fps=30:mi_mode=mci \
      -an -c:v libx264 -crf 20 -preset veryfast -movflags +faststart smooth.mp4
  4. 8x timelapse

    Sound at 8x is noise, so -an drops it. fps=30 keeps the output rate fixed, so only every eighth frame is left.

    timelapse
    ffmpeg -i in.mp4 -vf setpts=PTS/8,fps=30 -an -c:v libx264 -crf 20 -preset veryfast -movflags +faststart timelapse.mp4

The flags

The filters in these commands

The filters in these commands
FlagWhat it doesUsed here
setpts=0.5*PTSHalves each video timestamp: twice as fast2x
atempo=2.0Doubles audio speed at the same pitch; 0.5 to 100 per filter2x, 4x
setpts=2.0*PTSDoubles each timestamp: half speedHalf speed, smooth
atempo=0.5Half-speed audio, the lowest one filter allowsHalf speed
minterpolateCreates in-between frames from motion; mi_mode=mci is the full methodSmooth
fps=30Fixes the output rate by dropping or repeating framesTimelapse
-anLeaves the audio outSmooth, timelapse

Sources: ffmpeg filters: setpts, ffmpeg filters: atempo, ffmpeg filters: minterpolate, checked November 2026.

Why two filters

setpts only rewrites when each video frame is shown; it never touches the audio. atempo changes the speed of the sound and keeps its pitch. Use matching factors on both: 0.5 for setpts goes with 2.0 for atempo.

The manual says tempo "must be in the [0.5, 100.0] range" and that above 2 it "will skip some samples rather than blend them in". Chain filters for bigger changes, as in the 4x command.

Dropped frames and stretched frames

At 2x our output stayed at 30 fps, so ffmpeg dropped the frames that no longer fit, about every other one. That is fine; the motion still looks smooth.

Slowing down has the opposite problem. Nothing new is made: half speed spread the same frames over twice the time, 15 a second, and pans stutter. minterpolate fixes that by inventing frames, at about 12 times the render time of the plain slow version.

On the API

setpts, atempo, fps and minterpolate are all allowed on POST /v1/ffmpeg. The 2x job ran in about 6 seconds. Keep an eye on minterpolate: it took about two and a half minutes for under 10 seconds of 1080p on our desktop, and a job stops at 600 s, so scale down first or slow the clip in parts. Billing is per compute second; see pricing.

Without installing ffmpeg

The same command as one API call

Send the 2x command's args to POST /v1/ffmpeg. Each job runs ffmpeg 8.1 on a fresh machine at $0.02 per compute minute, billed per second; this one finished in about 6 seconds and cost under a fifth of a cent.

terminalTry it
curl "https://api.reelsdk.com/v1/ffmpeg?wait=60" \
  -H "Authorization: Bearer $REELSDK_KEY" \
  --json '{
    "inputs": {
      "in.mp4": "https://api.reelsdk.com/f/lib/demo/landscape.mp4"
    },
    "args": [
      "-i", "in.mp4", "-filter_complex",
      "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]", "-map", "[v]", "-map",
      "[a]", "-c:v", "libx264", "-crf", "20", "-preset", "veryfast", "-c:a",
      "aac", "-movflags", "+faststart", "fast.mp4"
    ],
    "outputs": ["fast.mp4"]
  }'
fast.mp4 from the API: twice as fast, about 5 seconds long.Input: 9.767 s input

FAQ

Questions, answered

How do I speed up a video 2x with ffmpeg?

Use -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" with -map "[v]" -map "[a]". Our 10-second clip came out at about 5 seconds.

Why does my slow motion look choppy?

setpts=2.0*PTS adds no frames, so 30 fps becomes 15. Add minterpolate=fps=30:mi_mode=mci to build the missing frames, at a much higher render time.

Can atempo go above 2?

Yes, ffmpeg 8.1 accepts 0.5 to 100, but above 2 it skips samples. Chain filters instead, like atempo=2.0,atempo=2.0 for 4x.

How do I make a timelapse with ffmpeg?

Use -vf setpts=PTS/8,fps=30 -an for 8x. Our 10-second clip became just over a second.

Ready to build?

Ship video from your app today

Your first $0.50 is free, and one key covers every endpoint.

Moonlit lake with a lit cabin under the mountains