How to Use FFmpeg Smartblur for Skin Smoothing

Achieving a professional skin-smoothing effect in video post-production requires softening skin textures while keeping facial features like eyes, lips, and hair sharp. This article explains how to use the FFmpeg smartblur filter to achieve this balance, detailing its core parameters—radius, strength, and threshold—and providing practical command-line examples to get optimal results.

Understanding the Smartblur Filter

The smartblur filter works by applying a blur to the video, but it selectively excludes areas with high contrast. This makes it highly effective for skin smoothing, as it blurs the low-contrast surfaces of the skin (pores, minor blemishes) while preserving high-contrast edge details (eyes, eyebrows, and facial outlines).

The basic syntax for the filter is:

smartblur=luma_radius:luma_strength:luma_threshold

You can also control chroma (color) channels using additional parameters, but focusing on the luma (brightness) channel is usually sufficient for skin smoothing:

  • luma_radius (lr): Controls the size of the blur. Allowed values range from 0.1 to 5.0. A larger radius creates a wider blur area.
  • luma_strength (ls): Controls how heavily the blur is applied. Allowed values range from -1.0 to 1.0. Positive values blur the image, while negative values sharpen it. For smoothing, use a positive value (typically between 0.5 and 1.0).
  • luma_threshold (lt): This is the key parameter for preserving edges. Allowed values range from -30 to 30. It determines what is considered an "edge." Any pixel detail with a contrast difference lower than this threshold will be blurred. Any detail with a difference higher than this threshold will remain sharp.

Practical FFmpeg Command

To apply skin smoothing to a video, run the following FFmpeg command:

ffmpeg -i input.mp4 -vf "smartblur=lr=1.5:ls=0.8:lt=4" -c:a copy output.mp4

Parameter Breakdown for Skin Smoothing

  • lr=1.5: A moderate radius that covers small skin imperfections without bleeding into larger shapes.
  • ls=0.8: A relatively strong blur to ensure the skin looks noticeably softer.
  • lt=4: A low threshold. This ensures that only subtle transitions (like skin texture) are blurred, while prominent facial features (which have high contrast differences greater than 4) are completely protected from the blur.

Fine-Tuning the Results

If the output does not look right, adjust the parameters using these guidelines:

  • If the eyes and hair look blurry: Decrease the threshold (lt). Lowering it to 2 or 3 will force the filter to treat more subtle lines as edges, keeping them sharp.
  • If the skin is still too rough: Increase the strength (ls) closer to 1.0, or slightly increase the radius (lr) to 2.0 or 2.5.
  • If the face looks like plastic (over-processed): Decrease the strength (ls) to 0.5 or lower, and decrease the radius (lr) to 1.0 to let some natural skin texture show through.