How to Use FFmpeg gblur Filter to Blur Video
This guide explains how to use the gblur (Gaussian blur)
filter in FFmpeg to apply a smooth blur effect to your videos. You will
learn the basic command syntax, the key parameters used to control the
intensity and quality of the blur, and practical examples to help you
integrate this filter into your video editing workflows.
The gblur filter in FFmpeg uses a Gaussian convolution
cascade to blur the input video. It is highly efficient and offers
precise control over the horizontal and vertical blur radius.
Basic Syntax and Parameters
The basic syntax for applying the gblur filter is:
ffmpeg -i input.mp4 -vf "gblur=sigma=10" output.mp4To customize the blur effect, you can adjust the following parameters:
sigma: Sets the horizontal blur strength (standard deviation of the Gaussian formula). The default value is 0.5. Higher values result in a stronger blur.steps: Specifies the number of times the filter is applied. More steps create a smoother, higher-quality blur but require more processing power. The default is 1.sigmaV: Sets the vertical blur strength. If set to -1 (the default), it will automatically match the horizontalsigmavalue.planes: Specifies which color planes to filter (YUV or RGB). By default, it filters all planes.
Practical Examples
1. Apply Uniform Blur To apply a moderate, even blur
across the entire video, set a single sigma value:
ffmpeg -i input.mp4 -vf "gblur=sigma=20" output.mp42. Increase Blur Quality If the blur looks pixelated
or has banding, increase the steps parameter to smooth out
the transition:
ffmpeg -i input.mp4 -vf "gblur=sigma=30:steps=3" output.mp43. Apply Directional Blur To create a motion-blur
effect horizontally while keeping vertical blur minimal, define
different values for sigma and sigmaV:
ffmpeg -i input.mp4 -vf "gblur=sigma=30:sigmaV=2" output.mp4Using these parameters, you can easily control the appearance and performance of the Gaussian blur effect on any video file using FFmpeg.