Split Audio into Frequency Bands with FFmpeg

This article demonstrates how to split a single audio stream into multiple distinct frequency bands—such as bass, mids, and treble—using FFmpeg. By utilizing the asplit filter alongside frequency-filtering options like lowpass and highpass, you can isolate specific frequency ranges and output them into separate audio files or streams.

To split an audio stream by frequency, you must first duplicate the input stream using the asplit filter. Once duplicated, you apply different frequency-cutting filters to each split stream to isolate the desired bands.

The FFmpeg Command

Below is a practical command that splits an input audio file into three bands: Low (under 200 Hz), Mid (200 Hz to 4000 Hz), and High (above 4000 Hz).

ffmpeg -i input.mp3 -filter_complex \
"[0:a]asplit=3[low_in][mid_in][high_in]; \
 [low_in]lowpass=f=200[low]; \
 [mid_in]highpass=f=200,lowpass=f=4000[mid]; \
 [high_in]highpass=f=4000[high]" \
-map "[low]" low.wav \
-map "[mid]" mid.wav \
-map "[high]" high.wav

How the Filters Work

You can customize the cutoff frequencies by changing the f values in the filters to match your specific audio processing needs.