How to Split Audio into Frequency Bands in FFmpeg
This article explains how to separate a single audio stream into
multiple frequency bands—such as lows, mids, and highs—using FFmpeg. By
combining the asplit filter with frequency filters like
lowpass and highpass, you can duplicate an
incoming audio signal and isolate custom frequency spectrums for
independent processing or export.
The Core Concept
To divide audio into frequency bands, you must duplicate the original
audio stream using asplit, and then route each copy through
appropriate filtering stages:
- Low-pass filter (
lowpass): Cuts off frequencies above a specified threshold (retains bass). - High-pass filter (
highpass): Cuts off frequencies below a specified threshold (retains treble). - Band-pass configuration: Combines high-pass and low-pass filters in sequence to isolate mid-range frequencies.
Basic Example: 3-Band Split (Low, Mid, High)
The following command takes an input file and separates it into three distinct files: Lows (sub-300 Hz), Mids (300 Hz to 3000 Hz), and Highs (above 3000 Hz).
ffmpeg -i input.wav -filter_complex \
"[0:a]asplit=3[in_low][in_mid][in_high]; \
[in_low]lowpass=f=300[out_low]; \
[in_mid]highpass=f=300,lowpass=f=3000[out_mid]; \
[in_high]highpass=f=3000[out_high]" \
-map "[out_low]" low.wav \
-map "[out_mid]" mid.wav \
-map "[out_high]" high.wavBreakdown of the Filtergraph
asplit=3: Creates three identical parallel copies of the original input stream[0:a], named[in_low],[in_mid], and[in_high].[in_low]lowpass=f=300: Discards frequencies higher than 300 Hz.[in_mid]highpass=f=300,lowpass=f=3000: Discards frequencies below 300 Hz, then discards frequencies above 3000 Hz, isolating the mid-range.[in_high]highpass=f=3000: Discards frequencies lower than 3000 Hz.-map: Assigns each filtered stream label to a separate output file.
Controlling Filter Slopes (Roll-Off)
By default, standard lowpass and highpass
filters apply a gentle roll-off slope. To achieve a sharper transition
between bands, adjust the filter order using the p
parameter (poles):
ffmpeg -i input.wav -filter_complex \
"[0:a]asplit=2[in_low][in_high]; \
[in_low]lowpass=f=500:p=2[out_low]; \
[in_high]highpass=f=500:p=2[out_high]" \
-map "[out_low]" sub_bass.wav \
-map "[out_high]" tops.wavUsing p=2 provides a steeper 12 dB/octave attenuation
curve, reducing bleed-through between neighboring bands.
Processing and Recombining Bands
You do not need to export to separate files. You can process bands separately within the filtergraph and merge them back into a single output:
ffmpeg -i input.wav -filter_complex \
"[0:a]asplit=2[in_low][in_high]; \
[in_low]lowpass=f=250,volume=1.5[out_low]; \
[in_high]highpass=f=250,volume=0.8[out_high]; \
[out_low][out_high]amix=inputs=2:normalize=0[aout]" \
-map "[aout]" processed_output.wavThis configuration isolates the low-end to boost its gain while
attenuating the high-end, then recombines them into a single cohesive
stream using amix.