How to Use the FFmpeg acrossover Filter

This guide explains how to use the acrossover filter in FFmpeg to split an audio signal into multiple frequency bands. You will learn the basic syntax, how to define crossover frequencies, how to configure the filter order for steeper roll-offs, and how to route the resulting frequency bands into separate output files.

Understanding the acrossover Filter

The acrossover filter splits an incoming audio stream into two or more frequency bands (such as bass, mids, and treble) using Linkwitz-Riley crossover filters. This is highly useful for multi-amping systems, creating custom multi-band audio processors, or isolating specific frequency ranges for analysis.

Basic Syntax and Parameters

The primary parameters for the acrossover filter are:

The number of output bands generated is always \(N + 1\), where \(N\) is the number of split frequencies specified.

Example 1: 3-Way Crossover (Low, Mid, High)

To split an audio file into low (under 500 Hz), mid (500 Hz to 3000 Hz), and high (above 3000 Hz) frequencies, use the following command:

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

In this command: * split='500 3000' sets two crossover points, creating three output streams. * [low][mid][high] labels the output pads of the filter. * The -map options direct each labeled stream to its own output file.

Example 2: Adjusting the Filter Order

A higher filter order creates a sharper transition between the frequency bands. To split an audio stream at 1000 Hz using an 8th-order filter (48 dB/octave slope), use the following syntax:

ffmpeg -i input.wav -filter_complex "acrossover=split=1000:order=8th[low][high]" -map "[low]" bass.wav -map "[high]" treble.wav

Example 3: Merging Splits into a Multi-channel File

If you want to keep the split bands in a single file but assign them to different audio channels (for example, sending the low band to channel 1 and the high band to channel 2), you can combine acrossover with the join filter:

ffmpeg -i input.wav -filter_complex "acrossover=split=150[low][high];[low][high]join=inputs=2:channel_layout=stereo[out]" -map "[out]" output_split.wav