FFmpeg asplit Filter for Multiple Audio Outputs

This article explains how to use the asplit filter in FFmpeg to duplicate an audio stream and route it to multiple outputs. You will learn the fundamental syntax of the filter, see practical command-line examples for splitting audio, and understand how to apply different effects to each split stream before saving them to separate files.

Understanding the asplit Filter

The asplit filter takes a single audio input and duplicates it into two or more identical audio outputs. This is highly useful when you need to output the same audio to multiple files, or when you want to apply different audio filters (like volume adjustment, equalization, or echoing) to different streams simultaneously.

The basic syntax for the filter is:

asplit=N

Where N is the number of output streams you want to create. If you do not specify a number, it defaults to 2.

Basic Example: Splitting Audio into Two Files

To split an audio input into two identical outputs and save them as separate files, you must use filter_complex to manage the multiple output streams.

Here is the command:

ffmpeg -i input.mp3 -filter_complex "[0:a]asplit=2[out1][out2]" -map "[out1]" output1.mp3 -map "[out2]" output2.mp3

How it works:

Advanced Example: Applying Different Filters to Split Streams

One of the main benefits of splitting audio is the ability to process each stream differently. In the example below, we split the audio into two streams: one is left untouched (clean), while the other has its volume increased.

ffmpeg -i input.wav -filter_complex "[0:a]asplit=2[clean][to_boost]; [to_boost]volume=2.0[boosted]" -map "[clean]" clean_output.wav -map "[boosted]" boosted_output.wav

How it works:

Splitting to Three or More Outputs

If you need to split the audio stream into more than two outputs, simply increase the value of N and define the corresponding output labels.

For example, to split an audio stream into three outputs:

ffmpeg -i input.mp3 -filter_complex "[0:a]asplit=3[out1][out2][out3]" -map "[out1]" out1.mp3 -map "[out2]" out2.mp3 -map "[out3]" out3.mp3