Configure FFmpeg Vaguedenoiser Filter
This article explains how to configure the vaguedenoiser
filter in FFmpeg to effectively reduce video noise. It provides a direct
overview of how to adjust the noise threshold, select the optimal
thresholding method, and configure the wavelet properties to balance
video quality and processing performance.
The vaguedenoiser filter is a wavelet-based video
denoiser that transforms video frames into the frequency domain, filters
out noise coefficients, and reconstructs the image. It is highly
effective at removing high-frequency noise while preserving image
details.
1. Setting the
Denoising Threshold (threshold)
The threshold parameter determines the strength of the
noise reduction. Coefficients below this value are treated as noise and
are attenuated or discarded.
- Parameter:
threshold(ort) - Value: A float value (default is
2). - Usage: Higher values result in stronger denoising but can blur fine textures and details. Lower values preserve more details but leave more noise in the video.
2. Choosing the Filtering
Method (method)
The method parameter determines how the filter handles
coefficients that fall below or near the threshold.
- Parameter:
method(orm) - Values:
hard(or0): Hard thresholding. This completely discards coefficients below the threshold and leaves those above unchanged. It is highly effective but can introduce “ringing” artifacts.soft(or1): Soft thresholding. This discards coefficients below the threshold and shrinks the remaining coefficients. It produces a smoother image but can cause overall blurring.garrote(or2): Non-negative garrote thresholding (default). This acts as an intermediate approach, preserving sharp edges better than soft thresholding while avoiding the harsh artifacts of hard thresholding.
3. Managing Wavelet
Properties (nsteps)
While the vaguedenoiser filter uses a fixed
Cohen-Daubechies-Feauveau 9/7 wavelet type, you can configure how the
wavelet decomposition is applied using the nsteps
parameter.
- Parameter:
nsteps(orn) - Value: An integer (default is
6). - Usage: This defines the number of times the low-pass filter is applied. Higher values allow the filter to target larger, lower-frequency noise patterns at the expense of higher CPU usage. Fewer steps speed up processing and target only fine, high-frequency grain.
4. Fine-Tuning
Denoising Percentage (percent)
To prevent the video from looking overly processed or plastic, you
can mix the original frames with the denoised frames using the
percent parameter.
- Parameter:
percent(orp) - Value: A float from
0to100(default is85). - Usage: Setting this to
100applies full denoising. Lowering this value mixes some of the original video back in, preserving a natural grain structure.
Example Commands
To apply the filter with a moderate threshold of 3,
using the soft thresholding method, and 4
decomposition steps:
ffmpeg -i input.mp4 -vf "vaguedenoiser=threshold=3:method=soft:nsteps=4" output.mp4To apply a more natural-looking denoise using the default
garrote method, a threshold of 2.5, and
retaining 20% of the original noise:
ffmpeg -i input.mp4 -vf "vaguedenoiser=threshold=2.5:method=garrote:nsteps=5:percent=80" output.mp4