Apply Smart Blur to Video with FFmpeg

This article provides a straightforward guide on how to apply a smart blur to your videos using the FFmpeg smartblur filter. You will learn the basic syntax, understand the key parameters of the filter, and see practical command-line examples to blur your video while preserving sharp edges.

The FFmpeg smartblur filter allows you to smooth out video noise and details without destroying the strong edges of objects. This is highly useful for face smoothing, noise reduction, or creating a stylized look.

The Smartblur Parameters

The filter relies on three primary parameters, which can be applied to both the luma (brightness) and chroma (color) channels:

(Note: You can also use chroma_radius/cr, chroma_strength/cs, and chroma_threshold/ct to control the color channels. If left undefined, they default to the luma values).

Basic Command Example

To apply a simple, overall smart blur to a video, use the following command:

ffmpeg -i input.mp4 -vf "smartblur=luma_radius=5.0:luma_strength=1.0:luma_threshold=0" output.mp4

In this command: * -i input.mp4 specifies your source video. * -vf applies the video filter. * luma_radius=5.0 sets the maximum blur radius. * luma_strength=1.0 applies maximum blur strength. * luma_threshold=0 tells FFmpeg to blur everything because the threshold is set to zero (no edges are preserved).

Edge-Preserving Smart Blur

To smooth out skin or background noise while keeping the outlines of objects sharp, increase the threshold parameter:

ffmpeg -i input.mp4 -vf "smartblur=luma_radius=3.0:luma_strength=0.8:luma_threshold=4" output.mp4

By setting the luma_threshold to 4, FFmpeg will only blur areas with low contrast (like flat surfaces or gradients) and will leave high-contrast areas (like text, eyes, and object borders) untouched. You can adjust this threshold value up or down depending on the amount of detail in your specific video.