Invert Video Luma Channel with FFmpeg lut Filter

This article explains how to invert only the luma (brightness) channel of a video using FFmpeg’s lut filter. You will learn the exact command-line syntax to achieve this effect, which reverses the light and dark areas of your footage while keeping the color (chroma) channels completely intact.

To invert only the luma channel of a YUV video, you should use the lutyuv filter (the YUV-specific variant of the lut filter). This allows you to manipulate the Y (luma) channel independently of the U and V (chroma) channels.

The FFmpeg Command

Run the following command in your terminal:

ffmpeg -i input.mp4 -vf "lutyuv=y=255-val" -c:a copy output.mp4

How the Filter Works