Concat a video with itself, but in reverse, using ffmpeg

Technically, you can do it using

ffmpeg -i input.mp4 -filter_complex "[0:v]reverse,fifo[r];[0:v][0:a][r] [0:a]concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output.mp4

But the reverse filter will use a lot of memory for large videos. I’ve added a fifo filter to avoid frame drops. But test and see. (I haven’t reversed the audio)

If your clip has no audio, the above command will throw an error – instead, use:

ffmpeg -i input.mp4 -filter_complex "[0:v]reverse,fifo[r];[0:v][r] concat=n=2:v=1 [v]" -map "[v]" output.mp4

Leave a Comment