Invert colors of a video using FFMPEG

The lut filter family has a bespoke mode for doing this, when you don't know whether the input is YUV or RGB.

ffmpeg -i in -vf negate out

You can use the lutrgb or lutyuv video filter:

ffmpeg -i input_file -vf lutrgb="r=negval:g=negval:b=negval" output_file

or:

ffmpeg -i input_file -vf lutyuv="y=negval:u=negval:v=negval" output_file

Source: FFmpeg Filters Documentation