FFmpeg: How to Reverse Video

Updated

Learn how to reverse both the video and audio of a file using FFmpeg.

FFmpeg: How to Reverse Video

Make sure you have FFmpeg installed on your system and open up your terminal or command prompt.

First, navigate to the folder where your video file is located. For this example, our file is named input.mp4. To reverse both the video frames and the audio track together, type this command into your terminal:

ffmpeg -i input.mp4 -vf reverse -af areverse output.mp4

In this command, -vf reverse flips the video stream backward, while -af areverse flips the audio stream.

Because FFmpeg processes the file in memory to turn everything backward, this step may take a few moments to render depending on your clip's length and resolution.

Once the process completes, you will see a new file called output.mp4 in your folder. Play the file in your favorite media player to confirm that both the video and audio are running backward.

Reversing large files uses a lot of RAM, so consider trimming long videos into shorter clips before running this command to speed up render times.