Add Echo Effects with FFmpeg aecho Filter

This article explains how to use the aecho filter in FFmpeg to apply professional audio echo effects to your media files. You will learn the basic syntax of the filter, understand what each parameter does, and see practical command-line examples for creating both simple and multiple echo effects.

The aecho filter in FFmpeg works by mixing the original audio signal with one or more delayed copies of itself. The syntax for the filter is structured as follows:

aecho=in_gain:out_gain:delays:decays

Understanding the Parameters

To customize your echo effect, you need to adjust four key parameters:

Example 1: Creating a Simple, Single Echo

To add a single, clean echo that occurs 1 second (1000 milliseconds) after the original sound with half the original volume, use the following command:

ffmpeg -i input.mp3 -af "aecho=0.8:0.8:1000:0.5" output.mp3

In this command: * in_gain and out_gain are set to 0.8 to avoid digital clipping. * The delay is set to 1000 ms. * The decay is set to 0.5, meaning the echo fades out by 50%.

Example 2: Creating Multiple Echoes (Canyon Effect)

You can chain multiple delays to create a richer, “canyon-like” echo effect. This is done by adding multiple values to the delays and decays parameters, separated by pipes (|):

ffmpeg -i input.wav -af "aecho=0.8:0.9:1000|1800|2500:0.4|0.25|0.1" output.wav

In this example: * The first echo occurs at 1000 ms with a decay of 0.4. * The second echo occurs at 1800 ms with a decay of 0.25. * The third echo occurs at 2500 ms with a decay of 0.1.

Tips for Best Results