How to Use FFmpeg Limiter to Prevent Color Clipping

This article explains how to use the limiter video filter in FFmpeg to prevent color channel clipping and keep video signals within safe boundaries. You will learn the syntax of the filter, understand how its parameters correspond to luma and chroma channels, and see practical command-line examples for both broadcast-safe YUV limits and RGB scaling.

To prevent color clipping in FFmpeg, you can use the limiter filter. This filter clamps the pixel values of the input video to a specified range, ensuring that bright highlights or highly saturated colors do not exceed maximum thresholds (which causes clipping) or dip below minimum thresholds (which causes crushing).

The Limiter Filter Syntax

The basic syntax for the limiter filter in FFmpeg is:

-vf "limiter=min_l:max_l:min_c:max_c:channels"

The parameters are defined as follows:

Practical Examples

1. Applying Broadcast-Safe Limits (8-bit YUV)

Standard definition and high-definition broadcast video often requires “limited range” YUV, where Luma (Y) is restricted to 16–235, and Chroma (U/V) is restricted to 16–240. To force these limits and prevent any out-of-bounds clipping, use this command:

ffmpeg -i input.mp4 -vf "limiter=16:235:16:240" -c:v libx264 -crf 18 output.mp4

2. Soft-Clipping RGB Channels to Avoid Hard Edges

If you are working in an RGB color space and want to prevent harsh digital clipping at the absolute boundaries (0 and 255), you can slightly compress the range. This example restricts all RGB channels to a safe range of 5 to 250:

ffmpeg -i input.png -vf "limiter=5:250:5:250" output.png

3. Limiting 10-bit Video

If your source video is 10-bit (such as HDR or high-end camera footage), the values scale from 0 to 1023. To apply standard limited range (64–940 for Luma, 64–960 for Chroma) to a 10-bit file, adjust the parameters accordingly:

ffmpeg -i input_10bit.mkv -vf "limiter=64:940:64:960" -c:v libx265 -pix_fmt yuv420p10le output_10bit.mkv