Configure FFmpeg aecho Filter Delay Decay and Feedback

The FFmpeg aecho filter allows you to add a realistic echo effect to audio streams by controlling the direct and reflected sound. This guide provides a straightforward explanation of how to configure the filter’s core parameters—specifically delay time, decay factor, and simulated feedback—along with practical command-line examples to get the exact audio effect you need.

Understanding the aecho Syntax

The basic syntax for the aecho filter is:

aecho=in_gain:out_gain:delays:decays

Configuring Delay Time

The delay time determines how long it takes (in milliseconds) for the echo to be heard after the original sound.

Configuring the Decay Factor

The decay factor determines how much quieter each subsequent echo is compared to the original sound. It is expressed as a decimal between 0.0 (complete silence/no echo) and 1.0 (same volume as the original sound, which can cause clipping if not managed).

Configuring Feedback

The aecho filter does not have a dedicated “feedback” parameter like some analog delay pedals. Instead, feedback—the repetition of echoes fading over time—is achieved by configuring multiple delay lines with progressively lower decay factors.

To simulate a dense feedback loop where the sound bounces repeatedly, stack multiple delay steps at equal intervals with descending decay values:

ffmpeg -i input.wav -af "aecho=0.8:0.8:250|500|750|1000:0.5|0.25|0.12|0.06" output.wav

In this example, the delay occurs every 250 milliseconds, and the decay factor is halved each time, simulating a natural, decaying feedback tail.