How to Use the FFmpeg Chorus Filter

The FFmpeg chorus filter is a powerful audio tool used to make a single instrument or vocal sound like a larger group of performers by adding multiple delayed and pitch-modulated copies of the source signal. This article explains how the filter works, breaks down its key parameters, and provides practical command-line examples to help you apply professional-sounding chorus effects to your audio files.

Understanding the Chorus Filter Parameters

The chorus filter requires specific parameters to control the behavior of the added voices. The basic syntax follows this structure:

chorus=in_gain:out_gain:delays:decays:speeds:depths

Here is what each parameter represents:

Practical FFmpeg Chorus Examples

Example 1: Basic Stereo Chorus Effect

This command applies a standard chorus effect using one delayed voice, which is ideal for widening vocals or acoustic guitars.

ffmpeg -i input.mp3 -af "chorus=0.7:0.9:55:0.4:0.25:2" output.mp3

In this example: * 0.7 and 0.9 represent the input and output gains. * A single voice is added with a delay of 55 ms, a decay of 0.4, a modulation speed of 0.25 Hz, and a depth of 2 ms.

Example 2: Rich, Multi-Voice Chorus

To simulate a larger ensemble or a thicker, dreamier sound, you can add multiple voices by separating the values with pipes (|) inside the filter string.

ffmpeg -i input.wav -af "chorus=0.6:0.9:50|60|70:0.4|0.32|0.21:0.25|0.4|0.3:2|2.3|1.3" output.wav

In this multi-voice configuration: * Delays: Three separate voices are created with delays of 50ms, 60ms, and 70ms. * Decays: The volumes for these voices are set to 0.4, 0.32, and 0.21 respectively. * Speeds: The pitch modulation speeds are set to 0.25Hz, 0.4Hz, and 0.3Hz. * Depths: The modulation depths are set to 2.0ms, 2.3ms, and 1.3ms.

Tips for Tuning the Chorus Filter