Sharpen Horizontal Video Details with FFmpeg Unsharp

This article explains how to use the FFmpeg unsharp filter to target and sharpen only the horizontal details of a video while leaving vertical details untouched. You will learn the exact filter parameters required, how they function, and how to execute the command-line syntax to achieve this specific visual effect.

The unsharp filter in FFmpeg uses a matrix-based approach to apply sharpening or blurring to the luma (brightness) and chroma (color) channels of a video. To restrict the sharpening effect solely to the horizontal axis, you must configure the horizontal matrix size while setting the vertical matrix size to its minimum, non-effective value.

The Unsharp Filter Syntax

The basic syntax for the unsharp filter is defined as follows:

unsharp=luma_msize_x:luma_msize_y:luma_amount:chroma_msize_x:chroma_msize_y:chroma_amount

To sharpen only horizontal details, configure the parameters using these rules:

Command Example

Below is the standard FFmpeg command to sharpen only the horizontal luma details of a video:

ffmpeg -i input.mp4 -vf "unsharp=7:3:1.5:3:3:0" -c:a copy output.mp4

Parameter Breakdown