FFmpeg Horizontal Blur Using gblur Filter

This article provides a quick guide on how to use FFmpeg’s gblur (Gaussian blur) filter to apply blur strictly in the horizontal direction while leaving the vertical direction sharp. You will learn the exact command-line syntax, the key parameters to adjust, and a practical example of the command in action.

The gblur Filter Syntax

The gblur filter in FFmpeg allows you to control horizontal and vertical blur independently using two primary parameters:

By default, if you only set sigma, FFmpeg will apply the same value to sigmaV, blurring both directions equally. To blur only horizontally, you must explicitly set sigmaV to 0.

The Command

To apply a horizontal-only blur, use the following FFmpeg command structure:

ffmpeg -i input.mp4 -vf "gblur=sigma=20:sigmaV=0" output.mp4

Parameter Breakdown

Optional: Adjusting Filter Steps

If you want a smoother or higher-quality blur, you can add the steps parameter. The steps parameter defines how many times the blur filter is applied per frame (default is 1):

ffmpeg -i input.mp4 -vf "gblur=sigma=20:steps=3:sigmaV=0" output.mp4

Using steps=3 produces a higher quality Gaussian approximation, though it requires slightly more processing power.