How to Use vaguedenoiser in FFmpeg

This article provides a practical guide on how to use the vaguedenoiser filter in FFmpeg to apply wavelet-based video denoising. You will learn the basic command syntax, understand the key parameters that control the denoising strength, and view practical examples to help you clean up noisy video footage while preserving details.

The vaguedenoiser filter is a wavelet-based denoiser that transforms video frames into the wavelet domain, filters out noise coefficients, and reconstructs the cleaned image. It is highly effective at reducing high-frequency noise without causing the heavy smearing associated with simple blur filters.

Basic Syntax

To apply the vaguedenoiser filter with its default settings, use the following basic command structure:

ffmpeg -i input.mp4 -vf "vaguedenoiser" output.mp4

Key Parameters

You can fine-tune the denoising process by adjusting the filter's primary parameters. Use the format parameter=value, separating multiple parameters with colons.

  • threshold: Controls the strength of the denoising. A higher threshold removes more noise but can lead to a loss of fine details and introduce blur. The default value is 2.
  • method: Defines the thresholding method used to filter the wavelet coefficients.
    • hard: Keeps coefficients above the threshold and sets those below to zero. This preserves sharpness but can introduce artifacts.
    • soft: Reduces all coefficients toward zero. This produces smoother results but can cause slight blurring.
    • garrote: Universal garrote thresholding. This acts as a middle ground between hard and soft methods, preserving details while smoothing out noise. (Default)
  • nsteps: Specifies the number of times the wavelet decomposition is performed. A higher number targets larger, lower-frequency noise patterns but increases rendering time. The default is 6.
  • percent: Determines the percentage of coefficients to be dropped during denoising. The default is 85.
  • planes: Specifies which color planes to filter. The default is 15, which filters all planes (Y, U, V, and alpha). If you only want to denoise the luma (brightness) channel, set this to 1.

Practical Examples

1. Light Denoising for High-Quality Videos

For videos with minor sensor noise where you want to maximize detail retention, use a lower threshold and the garrote method:

ffmpeg -i input.mp4 -vf "vaguedenoiser=threshold=1.5:method=garrote" output.mp4

2. Heavy Denoising for Low-Light Footage

For highly noisy, grainy footage, increase the threshold and use the soft method to achieve a smoother, cleaner look:

ffmpeg -i input.mp4 -vf "vaguedenoiser=threshold=4.5:method=soft:nsteps=6" output.mp4

3. Denoising Luma (Brightness) Only

To reduce noise only in the brightness channel while keeping the color channels untouched, target plane 1:

ffmpeg -i input.mp4 -vf "vaguedenoiser=threshold=3:planes=1" output.mp4