Ch. 19 · Diagnosing Video Quality Problems

한국어日本語
7 min

Color Bleeding: When Red Text Leaks Sideways

Color bleeding mostly comes from the low color resolution of 4:2:0. Color bleeding and the color itself being off (matrix or range tag problems) are different problems, so tell them apart first.

As we saw in Chroma subsampling, 4:2:0 stores color information at only half the luma resolution in both width and height. It is a design that takes advantage of the eye being insensitive to color resolution, so it is fine for most video, but at sharp color edges (red text on a blue background, a screen recording's UI) the color looks like it spills outside the outline or looks blurry.

First tell bleeding apart from color shift

SymptomShapeCauseDirection of the fix
Color bleeding / smeared color edgesColor spills sideways at edges, or color edges are blurrier than brightness edgesLow chroma resolution (4:2:0), chroma quantizationEncode in 4:4:4, adjust chroma quality options, keep the resolution if the destination allows
Colors look washed out or more saturated overallHue and saturation across the whole frame differ from the sourceColor matrix, range, or transfer function tags are wrong or missing (Chapter 14, Color gamut)Check the source's color information and set the encode tags to match
Tonal gradation looks crushedDark areas look clumped, or whites look washed outMixing up TV range (16–235) and PC range (0–255)Check the range tag and conversion

Bleeding appears only at 'edges', while a shift appears across the 'whole frame'. This distinction is the fastest diagnostic.

Fixes for bleeding

  • Encode in 4:4:4. This keeps color resolution equal to luma and is the most direct answer to the root cause of bleeding. In exchange, playback compatibility narrows. Many devices and hardware decoders are built around 4:2:0, and you can check whether a device can decode 4:4:4 with the codec support checker. On a device that can't decode 4:4:4, playback fails or goes through a conversion.
  • Lower chroma quantization. x264 and x265 are known to have options that change the quantization offset of the color channels. Check option names and ranges in the encoder docs.
  • Be aware of color resolution when resizing. When you shrink or enlarge 4:2:0 video, how the color channels get interpolated affects how much bleeding you see. Compare using the scale filter's options (scale lesson).
  • Convert only once before export. Repeated conversions, such as dropping a 4:4:4 source to 4:2:0 and then raising it back up, make the bleeding worse.
Encode the same segment in 4:2:0 and 4:4:4 and compare the edges (check compatibility separately)
ffmpeg -ss 10 -t 5 -i screen.mp4 -c:v libx264 -preset slow -crf 20 -pix_fmt yuv420p -an test_420.mkv
ffmpeg -ss 10 -t 5 -i screen.mp4 -c:v libx264 -preset slow -crf 20 -pix_fmt yuv444p -an test_444.mkv
VMAF barely sees color bleeding

VMAF is known to be a metric computed mainly on the luma (Y) channel, so a problem where only the color bleeds may not show up much in the score (PSNR, SSIM, VMAF lesson). You can't diagnose color bleeding with this site's numbers (mean, 5th percentile, minimum), so always check color by eye.

In practice: within what the codec and destination allow

For files for platform upload or sharing in messaging apps, you most often have to use 4:2:0 for compatibility (Upload notes). In that case, instead of 4:4:4, it is more realistic to lower CRF, or to adjust the content so that screens where bleeding stands out (small text) are shown enlarged.

Chroma bleedingChroma bleeding

A phenomenon where, because of low color resolution, color at a sharp color edge looks like it spills outside the outline.

Color matrixColor matrix

The set of coefficients for converting between YCbCr and RGB (BT.601, BT.709, etc.). If the tag is wrong, the hue shifts across the whole frame.

Check yourself

The hue of the whole frame is subtly different from the source. What should you suspect first?

Check yourself

In a screen recording, the color around red text on a blue background bleeds sideways. What is the most direct response and its cost?