Split Audio by Frequency Using FFmpeg acrossover

This guide explains how to use the FFmpeg acrossover audio filter to split a single audio stream into multiple distinct frequency bands. You will learn the syntax of the filter, how to define crossover frequencies, and how to export the resulting outputs to separate files or combine them into a single multi-channel stream for active, multi-amplifier processing.

Understanding the acrossover Filter

The acrossover filter splits an input audio stream into several frequency bands using Linkwitz-Riley crossover filters. This is ideal for active crossover systems where different frequency ranges (like bass, mids, and treble) need to be sent to dedicated amplifiers and drivers.

The filter takes a list of split frequencies as its main argument. The number of output streams generated is always the number of split frequencies plus one. For example, if you define two split frequencies, you will get three output bands: * Low Pass: Everything below the first frequency. * Band Pass: Everything between the first and second frequencies. * High Pass: Everything above the second frequency.

Splitting Audio into Separate Files

To split an audio file into separate files for each frequency band, use FFmpeg’s -filter_complex flag.

In this example, we split a stereo audio file at 500 Hz and 3000 Hz into three separate stereo files (Low, Mid, and High):

ffmpeg -i input.wav -filter_complex "acrossover=split='500 3000'[low][mid][high]" \
-map "[low]" low_frequencies.wav \
-map "[mid]" mid_frequencies.wav \
-map "[high]" high_frequencies.wav

How the Command Works:

Creating a Multi-Channel File for Multi-Amp DACs

If you are using a multi-channel Digital-to-Analog Converter (DAC) connected to multiple amplifiers, you may want to map the split frequency bands into a single multi-channel audio file (e.g., a 6-channel file for a 3-way stereo setup).

The following command splits a stereo input into Low, Mid, and High bands, and then merges them back into a single 6-channel output file using the amerge filter:

ffmpeg -i input.wav -filter_complex \
"acrossover=split='500 3000'[low][mid][high]; \
[low][mid][high]amerge=inputs=3[out]" \
-map "[out]" multi_channel_output.wav

In this layout, the channels in multi_channel_output.wav will be ordered as: 1. Low (Left) 2. Low (Right) 3. Mid (Left) 4. Mid (Right) 5. High (Left) 6. High (Right)

Adjusting Filter Order (Slope)

By default, acrossover uses a 4th-order Linkwitz-Riley filter (24 dB/octave attenuation). You can adjust the filter order to make the transition between frequencies steeper or gentler using the order parameter.

The filter supports several orders, including: * 1st (6 dB/octave) * 2nd (12 dB/octave) * 4th (24 dB/octave - Default) * 8th (48 dB/octave)

To use an 8th-order filter for a steeper slope at 1000 Hz, use the following syntax:

ffmpeg -i input.wav -filter_complex "acrossover=split='1000':order=8th[low][high]" \
-map "[low]" sub.wav \
-map "[high]" main.wav