> speed & reverse

Retiming and reversing clips means touching both the video timestamps and the audio samples, and the two use entirely different filters. This category covers speeding up, slowing down, playing footage backwards, and stitching a forward+reverse boomerang — every operation here re-encodes, since you can't remap presentation times with a stream copy.

// speed & reverse

4 commands

// faq

How do I speed up a video more than 2x?

Modern ffmpeg (3.4+) accepts a single atempo up to 100.0, so -af "atempo=4.0" gives 4x audio. Old builds capped atempo at 2.0, where you chained instances instead: -af "atempo=2.0,atempo=2.0". Either way, pair it with -vf "setpts=0.25*PTS" to match the video (0.25 = 1/4 the duration = 4x speed). The lower bound is still 0.5, so for slower-than-half you must chain.

How do I change speed without affecting the audio pitch?

atempo preserves pitch by time-stretching, unlike asetrate, which changes the sample rate and shifts pitch like a tape machine. Use setpts on the video and atempo on the audio, with atempo set to the reciprocal of the setpts multiplier: 2x video is setpts=0.5*PTS + atempo=2.0; half speed is setpts=2.0*PTS + atempo=0.5.

Why does reversing a long video use so much memory or fail?

The reverse and areverse filters buffer the entire input into RAM before emitting the first reversed frame, so a long or high-resolution clip can exhaust memory. Trim to a short segment first, or split the video, reverse each piece, and concatenate.