Set amix Filter Dropout Transition Time in FFmpeg

When mixing multiple audio streams using FFmpeg’s amix filter, the volume of the remaining streams automatically renormalizes (increases) when one stream ends. To prevent a sudden, jarring jump in volume, you can configure the dropout_transition parameter to smoothly fade the volume adjustment over a specified number of seconds. This guide shows you how to use this parameter with clear syntax and practical command examples.

The dropout_transition Parameter

The dropout_transition option defines the transition time (in seconds) for volume renormalization when an input stream ends.

Command Syntax

To set the dropout transition time, append the dropout_transition option to your amix filter chain in the -filter_complex or -af flag:

amix=inputs=X:dropout_transition=Y

Practical Example

In the following example, we mix two audio files (music.mp3 and voiceover.mp3) and set the dropout transition time to 5 seconds. This means when the voiceover track ends, the music track’s volume will gradually increase to its solo level over a 5-second window.

ffmpeg -i music.mp3 -i voiceover.mp3 -filter_complex "amix=inputs=2:dropout_transition=5" output.mp3

If you want to disable the transition entirely and have the volume adjust immediately, set the value to 0:

ffmpeg -i music.mp3 -i voiceover.mp3 -filter_complex "amix=inputs=2:dropout_transition=0" output.mp3