How to Adjust Unsharp Filter Radius in FFmpeg

Adjusting the horizontal and vertical search radii in FFmpeg’s unsharp filter allows you to control the span of the sharpening or blurring effect. This guide explains how to configure the luma and chroma matrix sizes—which define these search radii—using specific command-line parameters to achieve precise control over your video’s sharpness.

The unsharp filter in FFmpeg uses a coordinate grid (matrix) to determine the area of neighboring pixels to analyze. This matrix size represents the horizontal and vertical search radii. You can adjust these values independently for both the luma (brightness) and chroma (color) channels.

The Radius Parameters

The horizontal and vertical search radii are controlled by the following parameters:

Parameter Rules


Command Examples

You can define these parameters using either named options or positional shorthand.

To set a horizontal search radius of 7 and a vertical search radius of 3 for the luma channel, use:

ffmpeg -i input.mp4 -vf "unsharp=luma_msize_x=7:luma_msize_y=3:luma_amount=1.5" output.mp4

Example 2: Adjusting Luma and Chroma Radii with Shorthand Names

To quickly set both luma and chroma search radii to 9x9 with custom sharpness amounts:

ffmpeg -i input.mp4 -vf "unsharp=lx=9:ly=9:la=1.2:cx=9:cy=9:ca=0.5" output.mp4

Example 3: Using Positional Parameters

If you do not want to use parameter names, you can pass the values in order: luma_msize_x:luma_msize_y:luma_amount:chroma_msize_x:chroma_msize_y:chroma_amount

To set a 7x7 luma radius and a 5x5 chroma radius:

ffmpeg -i input.mp4 -vf "unsharp=7:7:1.2:5:5:0.5" output.mp4