How to Use FFmpeg Vaguedenoiser Filter

The vaguedenoiser filter in FFmpeg is a wavelet-based video denoising tool designed to reduce image noise while preserving essential details and edges. This article provides a quick guide on how to use this filter, explaining its core parameters and providing practical command-line examples to help you clean up noisy video files.

The vaguedenoiser filter works by transforming video frames into the wavelet domain, applying a threshold to filter out noise coefficients, and then reconstructing the image. This approach is highly effective for removing high-frequency noise (like film grain or sensor hiss) without causing the motion blur often associated with temporal denoisers.

Basic Syntax

The most basic implementation of the filter uses the default settings, which automatically balances noise reduction and detail preservation:

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

Key Parameters

To fine-tune the denoising process, you can customize the filter using several key parameters:

  • threshold: Controls the strength of the denoising. A higher threshold removes more noise but can lead to a loss of detail and a "plastic" look. The default value is 2.
  • method: Determines the thresholding method used.
    • hard: Keeps coefficients above the threshold and sets the rest to zero. This preserves sharpness but can introduce artifacts.
    • soft: Shrinks all coefficients (default). This provides smoother results.
    • garrote: An intermediate method between hard and soft thresholding.
  • nsteps: The number of times the wavelet decomposition is applied. Higher values (up to 32) target lower frequency noise but increase processing time. The default is 4.
  • percent: The percentage of coefficients to keep. Lower percentages result in stronger denoising. The default is 85.
  • planes: Specifies which color planes to filter. By default, it filters all planes (value 15). To filter only the luma (brightness) channel, use 1.

Practical Examples

Stronger Denoising for High-Noise Video

If your input video has a significant amount of noise, increase the threshold value:

ffmpeg -i input.mp4 -vf "vaguedenoiser=threshold=4" output.mp4

Using Hard Thresholding for Sharper Edges

If soft denoising makes your video look too blurry, switch the method to hard to keep the image edges sharper:

ffmpeg -i input.mp4 -vf "vaguedenoiser=threshold=3:method=hard" output.mp4

Denoising Luma Only to Preserve Color Details

To remove luminance noise while leaving the color (chrominance) channels untouched, target only the first plane (luma):

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