How to Use FFmpeg anequalizer Filter for Parametric EQ
This article provides a straightforward guide on how to use the
FFmpeg anequalizer audio filter to apply high-quality
parametric equalization to your audio files. You will learn the core
syntax of the filter, understand its key parameters—such as frequency,
gain, bandwidth, and filter type—and explore practical command-line
examples for single-band, multi-band, and channel-specific EQ
configurations.
Understanding the anequalizer Syntax
The anequalizer filter allows you to configure one or
more equalizer bands by defining their specific parameters. The basic
structure of a single band configuration in the audio filter
(-af) looks like this:
anequalizer=f=FREQUENCY:w=WIDTH:g=GAIN:t=TYPEHere is a breakdown of the essential parameters you need to configure:
f(Frequency): The center frequency of the band in Hz (e.g.,f=1000for 1 kHz).w(Width/Bandwidth): The width of the band. By default, this is measured in Hz.tb(Width Type): Specifies how the width (w) is interpreted. Settb=0for Hz (default),tb=1for octaves, ortb=2for Q-factor.g(Gain): The boost or cut in dB (e.g.,g=6to boost by 6 dB,g=-4to cut by 4 dB).t(Filter Type): The type of filter band:0: Bandpass filter1: Peaking/EQ filter (most common for parametric EQ)2: Low-shelf filter3: High-shelf filter
c(Channel): The channel index to apply the filter to (e.g.,c0for the first channel/left,c1for the second channel/right). If omitted, the filter applies to all channels.
Practical Examples
1. Single-Band Peaking EQ
To boost a specific frequency (e.g., 1000 Hz) by 6 dB with a bandwidth of 200 Hz across all audio channels, use the following command:
ffmpeg -i input.mp3 -af "anequalizer=f=1000:w=200:g=6:t=1" output.mp32. Multi-Band Parametric EQ
To apply multiple EQ bands at once, separate each band configuration
with a pipe character (|). The following command applies
three bands: a low-shelf boost at 100 Hz, a peaking cut at 2500 Hz, and
a high-shelf boost at 12000 Hz:
ffmpeg -i input.wav -af "anequalizer=f=100:w=50:g=4:t=2|f=2500:w=500:g=-5:t=1|f=12000:w=1000:g=3:t=3" output.wav3. Using Q-Factor Instead of Bandwidth in Hz
If you prefer to define your EQ bands using a standard Q-factor
(e.g., a Q of 1.4) instead of bandwidth in Hz, set the width type
(tb) to 2:
ffmpeg -i input.mp3 -af "anequalizer=f=800:tb=2:w=1.4:g=-6:t=1" output.mp34. Channel-Specific Equalization
You can target individual audio channels by prefixing the band
configuration with the channel parameter. For example, to apply a 5 dB
boost at 400 Hz only to the left channel (c0):
ffmpeg -i input.wav -af "anequalizer=c0 f=400 w=100 g=5 t=1" output.wav