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=TYPE

Here is a breakdown of the essential parameters you need to configure:


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.mp3

2. 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.wav

3. 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.mp3

4. 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