FFmpeg: How to Invert the Colors of a Video

Updated

Learn how to invert the colors of a video using FFmpeg

FFmpeg: How to Invert the Colors of a Video

Before we start, make sure you have FFmpeg installed on your system and your input video ready in your working folder.

First, open your terminal or command prompt and navigate to the directory where your video file is saved.

To invert the video colors, run this command:

ffmpeg -i input.mp4 -vf "negate" output.mp4

Depending on the length and resolution of your file, FFmpeg will take a few moments to process the video.

Once the rendering finishes, open output.mp4 to confirm that the colors have inverted properly.

If you're working with transparent videos and want to avoid inverting the alpha channel, you can use negate=w=1 instead.