FFmpeg recipe
FFmpeg: Reverse a Video (Audio + Video)
reverse filters the entire video backward — note that it loads everything into memory, so works best on short clips.
Command
ffmpeg -i input.mp4 -vf reverse -af areverse -c:v libx264 -crf 23 -y output_reversed.mp4Prefer no terminal?
Use the Video Reverse in your browser
What each flag does
| -i | Input file. Can be a video, audio, or image. Repeat for multiple inputs. |
|---|---|
| -vf | Video filter chain. e.g. scale=1280:720, crop=, fps=30. |
| -af | Audio filter chain. e.g. silenceremove, loudnorm. |
| -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. |
| reverse | Video filter that buffers the entire stream and emits it in reverse. |
| areverse | Audio counterpart of reverse. Often paired together. |
Notes & gotchas
- Both filters require the entire stream in memory — keep clips under 1 minute or use a workstation with lots of RAM.
- For boomerang-style loops, use the loop recipe and append a reversed copy.
Check it worked
ffprobe -v error -show_entries format=duration -of csv=p=0 output.mp4The same duration as the source. A shorter file means the reverse filter ran out of memory.
What to change
| It holds the whole clip in memory | reverse buffers every frame. A few seconds is fine; a few minutes of 1080p will exhaust RAM. |
|---|---|
| Drop areverse | Reversed speech is unusable. -an gives a silent clip, which is what most reversed video wants. |
| Trim first | Reverse the shortest section that matters rather than the whole file. It is the difference between seconds and minutes. |
If it fails
FFmpeg is killed, or memory use climbs until the machine stalls.
Why: The reverse filter buffers every frame in memory, because it cannot know the last frame until it has read them all.
Fix: Split the clip into short segments, reverse each, then concatenate them in reverse order.
The picture is reversed but the audio still plays forwards.
Why: The reverse filter handles video only.
Fix: Add areverse for the audio stream.