Use FFmpeg anequalizer Filter for Custom Parametric EQ
This guide explains how to use FFmpeg’s anequalizer
(audio equalizer) filter to design and apply custom second-order
parametric filters to your audio files. You will learn the syntax of the
filter, the meaning of its key parameters—including how to specify a
second-order configuration—and see practical command-line examples for
shaping your audio streams.
The anequalizer
Filter Syntax
The anequalizer filter allows you to configure
high-order and second-order parametric equalizers by defining one or
more frequency curves. The basic syntax requires passing a string of
configuration parameters to the -af (audio filter) flag.
Multiple curves are separated by the pipe character
(|).
The syntax structure for a single curve is:
"cQ f=F w=W g=G t=T o=O"
Where cQ specifies the channel, and the remaining letters represent key-value parameters.
Key Parameters for Second-Order Filters
To apply a custom second-order parametric filter, you need to configure the following parameters within your filter string:
c(Channel): Specifies which channel the filter applies to (e.g.,c0for the first channel/left,c1for the second channel/right). If omitted, the curve applies to all channels.f(Frequency): The center frequency of the filter in Hz.w(Width): The bandwidth of the filter in Hz.g(Gain): The boost or cut applied at the center frequency, measured in dB.t(Type): The filter response type.0: Butterworth (highly recommended for clean parametric EQ cuts and boosts)1: Chebyshev Type I2: Chebyshev Type II
o(Order): The filter order. Set this to2to apply a standard second-order parametric filter.
Practical Command Examples
Apply a Second-Order Boost to All Channels
To apply a \(+6\text{ dB}\) boost at \(1000\text{ Hz}\) with a bandwidth of \(200\text{ Hz}\) using a second-order Butterworth filter across all channels:
ffmpeg -i input.mp3 -af "anequalizer=f=1000 w=200 g=6 t=0 o=2" output.mp3Apply Channel-Specific Equalization
To target the left channel (c0) and right channel
(c1) with different parameters, separate the curves with a
|:
ffmpeg -i input.wav -af "anequalizer=c0 f=800 w=150 g=-4 t=0 o=2|c1 f=1200 w=250 g=3 t=0 o=2" output.wavIn this command: * The left channel (c0) gets a \(-4\text{ dB}\) cut at \(800\text{ Hz}\). * The right channel
(c1) gets a \(+3\text{
dB}\) boost at \(1200\text{
Hz}\).
Multi-Band Parametric Equalization
You can stack multiple filters on the same channel by defining multiple curves for that channel:
ffmpeg -i input.wav -af "anequalizer=c0 f=100 w=50 g=5 t=0 o=2|c0 f=2000 w=300 g=-6 t=0 o=2" output.wavThis applies both a low-frequency boost (\(100\text{ Hz}\)) and a mid-frequency cut (\(2000\text{ Hz}\)) to the left channel.