Configure afftdn Noise Reduction Strength in FFmpeg

This article provides a quick guide on how to configure and adjust the noise reduction strength using the afftdn (Audio FFT De-noise) filter in FFmpeg. You will learn about the key parameters that control the filter’s intensity, along with practical command-line examples to help you achieve the optimal balance between noise removal and audio quality.

The afftdn filter in FFmpeg is a powerful, non-linear audio bandpass filter that uses Fast Fourier Transforms to reduce background noise. To control the strength of this noise reduction, you primarily adjust the noise_reduction parameter.

The Key Parameter: noise_reduction (or nr)

The noise_reduction parameter (abbreviated as nr) defines the amount of noise reduction applied to the signal in decibels (dB).

A higher value results in more aggressive noise reduction, which is useful for highly corrupted audio but may introduce “musical noise” or watery-sounding digital artifacts. A lower value preserves more of the original audio character while leaving some background hiss.

Practical Command Examples

To apply the filter, use the -af (audio filter) flag in your FFmpeg command.

1. Default Noise Reduction (12 dB)

If you do not specify any parameters, FFmpeg applies the default strength of 12 dB:

ffmpeg -i input.mp3 -af "afftdn" output.mp3

2. Gentle Noise Reduction (6 dB)

For clean audio with only a faint hiss, a lower setting preserves the high frequencies and natural dynamics:

ffmpeg -i input.mp3 -af "afftdn=nr=6" output.mp3

3. Strong Noise Reduction (24 dB)

For noisy environments or loud constant hums, you can increase the reduction strength:

ffmpeg -i input.mp3 -af "afftdn=nr=24" output.mp3

Advanced Fine-Tuning

To get the best results from the afftdn filter, you can combine the noise reduction strength with the noise floor parameter:

For example, to apply 18 dB of noise reduction with a custom noise floor of -40 dB:

ffmpeg -i input.mp3 -af "afftdn=nr=18:nf=-40" output.mp3