Force FFmpeg Input Video to Full Color Range

By default, FFmpeg often assumes incoming YUV video files use limited color range (16–235 for 8-bit luma) unless metadata explicitly specifies otherwise. When an input video is recorded in full color range (0–255) without the proper container flags, FFmpeg can process it incorrectly, resulting in crushed blacks, blown-out highlights, or washed-out colors. This guide explains how to explicitly force FFmpeg to interpret an input video as full color range and properly preserve or convert those color levels during processing.

The Standard Method: Using the setparams Filter

The most reliable way to override input color properties in modern FFmpeg builds is via the setparams video filter. This filter changes the internal frame metadata before any downstream processing (like scaling or encoding) occurs.

To force FFmpeg to treat the input as full range (PC levels):

ffmpeg -i input.mp4 -vf "setparams=range=pc" -c:v libx264 -color_range pc output.mp4
  • -vf "setparams=range=pc": Instructs the filter graph to treat all incoming frames as full color range (pc). You can also use full instead of pc.
  • -color_range pc: Writes the full-range flag into the output video's bitstream/container so players know to decode it as full range.

Converting Full Range Input to Limited Range Output

If your input is full range, but you want your output encoded as standard broadcast limited range (TV levels), combine setparams with the scale filter:

ffmpeg -i input.mp4 -vf "setparams=range=pc,scale=in_range=pc:out_range=tv" -c:v libx264 -color_range tv output.mp4

In this pipeline:

  1. setparams=range=pc corrects the misinterpreted input metadata.
  2. scale=in_range=pc:out_range=tv maps the 0–255 range to standard 16–235 values without clipping.
  3. -color_range tv tags the final output container as limited range.

Alternative Method: The scale Filter Alone

If your FFmpeg build does not support setparams, you can force the input range directly inside the scale filter:

ffmpeg -i input.mp4 -vf "scale=in_range=pc:out_range=pc" -c:v libx264 -color_range pc output.mp4

This ensures the scaling engine recognizes the source video as 0–255 levels and outputs 0–255 levels accordingly.

Verifying the Color Range with FFprobe

To check whether FFmpeg or media players detect the color range correctly before and after conversion, inspect the file with ffprobe:

ffprobe -v error -select_streams v:0 -show_entries stream=color_range input.mp4
  • A full-range file will return color_range=pc.
  • A limited-range file will return color_range=tv.