How to Use FFmpeg Chorus Filter for Audio

This article provides a straightforward guide on how to use the FFmpeg chorus filter to add depth and richness to your audio files. You will learn the basic syntax, understand the key parameters of the filter, and see practical command-line examples to help you create a professional chorus effect.

The chorus filter in FFmpeg simulates the effect of multiple voices or instruments playing together by adding modulated, delayed copies of the original audio signal.

FFmpeg Chorus Syntax

The basic structure of the chorus filter is defined as follows:

-af "chorus=in_gain:out_gain:delay:decay:speed:depth[:delay:decay:speed:depth...]"

You can add multiple delayed voices by appending additional sets of delay:decay:speed:depth separated by colons.

Practical Examples

1. Basic Chorus Effect (Single Voice)

To apply a subtle, standard chorus effect to an audio file, use a single delay line:

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

In this command: * The input gain is 0.5 and output gain is 0.9. * The delay is 50 milliseconds. * The decay is 0.4 with a modulation speed of 0.25 Hz and a depth of 2.

2. Rich Chorus Effect (Two Voices)

To make the effect thicker and more lush, you can add a second delayed voice with different delay and modulation parameters:

ffmpeg -i input.mp3 -af "chorus=0.6:0.9:50:0.4:0.25:2:60:0.32:0.4:1.3" output.mp3

Here, the first voice has a delay of 50ms and the second voice has a delay of 60ms with a slightly faster speed (0.4 Hz) to avoid phase cancellation and create a natural ensemble sound.

3. Heavy/Phasing Chorus Effect (Three Voices)

For a highly noticeable, dramatic chorus effect suitable for instruments like electric guitars or synthesizers, you can chain three voices:

ffmpeg -i input.mp3 -af "chorus=0.5:0.9:40:0.3:0.25:1.5:50:0.35:0.4:2.0:60:0.3:0.35:1.8" output.mp3