Sharpen Luma Without Chroma Noise in FFmpeg
This guide explains how to use the FFmpeg unsharp filter
to sharpen only the luma (brightness) channel of a video while leaving
the chroma (color) channels untouched. By targeting only the luma
channel, you can significantly improve perceived image clarity and
sharpness without introducing distracting color noise or rainbow
artifacts into your footage.
The FFmpeg Unsharp Filter Syntax
The unsharp filter in FFmpeg uses a set of parameters to
control the box size and the amount of sharpening applied to both the
luma and chroma channels. The basic syntax is:
unsharp=luma_msize_x:luma_msize_y:luma_amount:chroma_msize_x:chroma_msize_y:chroma_amountTo sharpen only the luma channel and completely avoid chroma noise,
you must set the chroma_amount parameter to
0.0.
The Recommended Command
Use the following command to apply sharpening exclusively to the luma channel:
ffmpeg -i input.mp4 -vf "unsharp=5:5:0.8:5:5:0.0" -c:a copy output.mp4Using named parameters makes the command even easier to read and modify:
ffmpeg -i input.mp4 -vf "unsharp=lx=5:ly=5:la=0.8:cx=5:cy=5:ca=0.0" -c:a copy output.mp4Parameter Breakdown
lx/ly(luma_msize_x / luma_msize_y): The matrix size for the luma channel. This must be an odd integer between 3 and 23. A value of5or7is standard for 1080p video. Larger values sharpen larger details, while smaller values sharpen fine details.la(luma_amount): The sharpening strength for the luma channel. It accepts a float value between -1.5 and 1.5. A positive value (e.g.,0.6to1.0) sharpens the image, while a negative value blurs it.cx/cy(chroma_msize_x / chroma_msize_y): The matrix size for the chroma channels. Since we are disabling chroma sharpening, you can leave these at their default value of5.ca(chroma_amount): The sharpening strength for the chroma channels. Setting this strictly to0.0disables chroma sharpening entirely, preventing color fringing and chromatic noise.
Fine-Tuning Your Settings
If the default setting of 0.8 is too subtle or too
harsh, adjust the la parameter to fit your source
material:
- Subtle Sharpening (for high-quality sources):
unsharp=5:5:0.4:5:5:0.0 - Moderate Sharpening (standard default):
unsharp=5:5:0.8:5:5:0.0 - Strong Sharpening (for soft or upscaled sources):
unsharp=7:7:1.2:5:5:0.0