Add Echo Effect to Audio with FFmpeg on Linux

This article provides a quick, practical guide on how to add an echo or delay effect to audio files using FFmpeg’s powerful audio filters on Linux. You will learn the core syntax for the aecho filter, understand what each parameter controls, and see real-world command examples to achieve the exact sound depth you want.


Understanding the FFmpeg Echo Filter

To create an echo on Linux, FFmpeg utilizes the -af (audio filter) flag combined with the aecho filter. The basic anatomy of the echo filter relies on four primary parameters, structured as follows:

aecho=in_gain:out_gain:delay:decay

Here is what each specific value controls:


Common Command Examples

Below are practical commands you can run directly in your Linux terminal.

1. Standard Single Echo

This command adds a distinct, single reflection exactly 400 milliseconds after the original audio, with the reflection volume cut in half.

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

2. Multi-Echo (Canyon/Robotic Effect)

By chaining multiple delays and decays, you can create a trailing, atmospheric canyon effect. The example below sets two echoes: one at 500ms (at 50% volume) and a second trailing one at 1000ms (at 25% volume).

ffmpeg -i input.wav -af "aecho=0.8:0.9:500|1000:0.5|0.25" output.wav

3. Short Subtle Room Delay

If you want to give a vocal or instrument track a bit of space without a harsh, obvious echo, use a shorter delay time. This command creates a tight, 60ms ambient reflection.

ffmpeg -i voice.ogg -af "aecho=0.8:0.8:60:0.3" output.ogg