Use FFmpeg tiltsdr Filter to Apply Spectral Tilt
This article provides a quick guide on how to use the
tiltsdr audio filter in FFmpeg to apply a spectral tilt to
your audio files. You will learn the basic syntax of the filter, its
primary parameters such as slope and center frequency, and practical
command-line examples to easily adjust the tonal balance of your
sound.
The tiltsdr (Tilt Spectral Decay Rate) filter in FFmpeg
is designed to tilt the frequency spectrum of an audio signal around a
specific pivot frequency. This allows you to make an audio file sound
“warmer” (by boosting low frequencies and cutting highs) or “brighter”
(by boosting high frequencies and cutting lows).
Key Parameters of the
tiltsdr Filter
To customize the spectral tilt, you can configure the following main parameters:
s(slope): Sets the tilt slope in decibels per octave (dB/octave).- A negative value (e.g.,
-3) reduces high frequencies and boosts low frequencies, creating a darker, warmer sound. - A positive value (e.g.,
3) reduces low frequencies and boosts high frequencies, creating a brighter sound.
- A negative value (e.g.,
f(frequency): Sets the pivot (or center) frequency in Hz. This is the frequency point around which the spectrum tilts. The default is typically1000Hz.l(level): Adjusts the input level/gain to prevent clipping if the tilt significantly boosts certain frequencies.
Command-Line Examples
Here is how to apply these parameters in your terminal using FFmpeg.
1. Apply a Warm/Dark Spectral Tilt
To apply a negative tilt of -3 dB per octave around the default 1000 Hz pivot frequency, use the following command:
ffmpeg -i input.wav -af "tiltsdr=s=-3" output.wav2. Apply a Bright Spectral Tilt
To apply a positive tilt of +2.5 dB per octave to make the audio brighter:
ffmpeg -i input.wav -af "tiltsdr=s=2.5" output.wav3. Change the Pivot Frequency
If you want to tilt the spectrum around a different frequency, such
as 2000 Hz, and apply a -4 dB slope, define both the s and
f parameters:
ffmpeg -i input.wav -af "tiltsdr=s=-4:f=2000" output.wav4. Prevent Clipping with Level Adjustment
When applying positive slopes or steep tilts, the output volume might
clip. You can lower the input level using the l parameter
(e.g., to 0.8) to maintain headroom:
ffmpeg -i input.wav -af "tiltsdr=s=5:f=1500:l=0.8" output.wav