Configure FFmpeg anequalizer Filter Parameters
This article provides a practical guide on how to configure the
filter parameters for the FFmpeg anequalizer (audio
equalizer) filter. You will learn the exact syntax structure, the
meaning of each parameter like frequency, gain, and width, and how to
apply these settings to specific audio channels using real-world
command-line examples.
The anequalizer filter is a high-order parametric
multiband audio equalizer. It allows you to precisely target and adjust
specific frequency bands in your audio streams.
Parameter Syntax
The configuration string for the anequalizer filter
consists of one or more band specifications separated by the pipe
character (|). Each band is defined using key-value pairs
in the following format:
c{channel_index} f={frequency} w={width} g={gain} t={type}
c(Channel): Specifies which audio channel the band applies to (0-based indexing). For example,c0is the left channel, andc1is the right channel. If you omit this, the band is applied to all channels.f(Frequency): Sets the central frequency of the band in Hz.w(Width): Sets the bandwidth of the filter in Hz.g(Gain): Sets the gain in dB. Positive values boost the frequency, while negative values cut it.t(Type): Sets the filter type using an integer:0: Butterworth (default)1: Chebyshev Type I2: Chebyshev Type II
Practical Examples
1. Global Single-Band Equalization
To boost a central frequency of 1000 Hz by 6 dB with a bandwidth of 200 Hz across all audio channels, use the following command:
ffmpeg -i input.wav -af "anequalizer=f=1000 w=200 g=6 t=1" output.wav2. Multiband Equalization
To configure multiple frequency bands, separate each configuration
block with a |. This example boosts bass at 100 Hz and cuts
harsh mids at 3000 Hz:
ffmpeg -i input.wav -af "anequalizer=f=100 w=50 g=10 t=0|f=3000 w=500 g=-6 t=0" output.wav3. Channel-Specific Equalization
You can target individual audio channels. The following command
applies a 5 dB boost at 500 Hz to the left channel (c0) and
a 3 dB cut at 2000 Hz to the right channel (c1):
ffmpeg -i input.wav -af "anequalizer=c0 f=500 w=100 g=5 t=0|c1 f=2000 w=300 g=-3 t=0" output.wav