FFmpeg Limiter Filter: Broadcast-Safe Video Ranges
Broadcast television standards require video signals to stay within
strictly defined luminance and chrominance boundaries, commonly known as
legal or broadcast-safe ranges. When mastering video for television
transmission, pixel values outside these thresholds can cause signal
distortion, audio buzzing, or rejection by network quality control
systems. This guide explains how to use FFmpeg’s native
limiter filter to clamp pixel values directly to Rec. 709
and EBU R103 broadcast specifications for both 8-bit and 10-bit
workflows.
Understanding Broadcast-Safe Limits
Standard consumer video often uses full range (0–255 for 8-bit), where pure black is 0 and peak white is 255. In contrast, broadcast delivery mandates narrow or limited range:
- 8-bit Video:
- Luminance (Y / Plane 0): 16 to 235
- Chrominance (U, V / Planes 1 and 2): 16 to 240
- 10-bit Video:
- Luminance (Y / Plane 0): 64 to 940
- Chrominance (U, V / Planes 1 and 2): 64 to 960
The limiter filter checks each sample value against
specified lower and upper boundaries and truncates any values falling
outside the permitted range.
How the FFmpeg Limiter Filter Works
The limiter filter accepts three primary arguments:
min: The minimum allowed sample value.max: The maximum allowed sample value.planes: A bitmask determining which image planes are affected.1= Y plane (Luminance)2= U plane (Chroma Cb)4= V plane (Chroma Cr)6= Both chroma planes (2 + 4)7= All YUV planes (1 + 2 + 4)
Because luminance and chrominance require different ceilings (235 vs. 240 in 8-bit), the filter is typically called twice in a single filterchain: once for luma, and once for chroma.
Practical Commands
1. Limiting 8-Bit YUV Video
To clamp an 8-bit video file to legal broadcast levels, chain two
instances of the limiter filter:
ffmpeg -i input.mp4 -vf "limiter=min=16:max=235:planes=1,limiter=min=16:max=240:planes=6" -c:v libx264 -c:a copy output.mp4limiter=min=16:max=235:planes=1: Restricts luma values to 16–235.limiter=min=16:max=240:planes=6: Restricts both chroma channels to 16–240.
2. Limiting 10-Bit YUV Video (ProRes / DNxHR)
High-end broadcast delivery formats commonly use 10-bit color depth (such as ProRes 422 HQ). Scale the threshold parameters accordingly:
ffmpeg -i input.mov -vf "limiter=min=64:max=940:planes=1,limiter=min=64:max=960:planes=6" -c:v prores_ks -profile:v 3 -c:a copy output.mov3. Setting Broadcast Color Metadata
Applying the filter changes the raw pixel data, but broadcast workflows also require container-level metadata flagging the stream as limited range. Add standard color tags alongside the filter:
ffmpeg -i input.mov -vf "limiter=min=64:max=940:planes=1,limiter=min=64:max=960:planes=6" \
-color_range tv \
-colorspace bt709 \
-color_primaries bt709 \
-color_trc bt709 \
-c:v libx264 -pix_fmt yuv420p10le -c:a copy output.mp4-color_range tv ensures decoders recognize the output as
limited (studio) swing rather than full swing (pc).
Verifying Legal Levels
To confirm that the limiter successfully removed out-of-gamut values,
inspect the output using the signalstats filter:
ffmpeg -i output.mp4 -vf "signalstats" -f null -Check the standard output for YMIN and
YMAX. For an 8-bit stream processed with the commands
above, YMIN will be no lower than 16 and YMAX
will not exceed 235.