Configure Room Size Damp and Mix in FFmpeg Reverb

This article provides a quick guide on how to configure the spatial acoustics of your audio using FFmpeg’s native freeverb filter. You will learn how to adjust the room size, high-frequency damping, and the wet/dry audio mix using specific command-line parameters to achieve the perfect reverberation effect for your audio files.

To apply reverb in FFmpeg, you use the freeverb audio filter. This filter simulates a studio-quality reverb effect and allows you to customize the environment using several key parameters.

1. Adjusting the Room Size (room_size)

The room_size parameter determines the size of the simulated room, which directly affects the decay time (how long the reverb lasts). * Values: Accepts a float value between 0.0 (empty/no room) and 1.0 (very large hall). The default is 0.5. * Example: room_size=0.8 simulates a large, spacious environment like a cathedral.

2. Adjusting the Damping (damp)

The damp parameter controls the absorption of high-frequency sounds. High frequencies bounce off hard surfaces but are absorbed by soft surfaces like carpet or wood. * Values: Accepts a float value between 0.0 (no damping, very bright sound) and 1.0 (maximum damping, very dark/warm sound). The default is 0.5. * Example: damp=0.3 produces a brighter, more reflective acoustic space.

3. Setting the Wet/Dry Mix (wet_g and dry_g)

Unlike some audio tools that use a single wet/dry slider, FFmpeg controls the mix using two separate gain parameters: * wet_g (Wet Gain): The level of the processed reverb signal. Values range from 0.0 to 1.0. * dry_g (Dry Gain): The level of the original, unprocessed signal. Values range from 0.0 to 1.0. * Example: To get a strong reverb effect with less of the original sound, you might use wet_g=0.6:dry_g=0.4.


Command Syntax and Examples

To apply these parameters, use the -af (audio filter) flag in your FFmpeg command. Separate each parameter with a colon (:).

Example 1: Large, Warm Concert Hall Reverb

This configuration uses a large room size, moderate damping to keep the sound warm, and a balanced wet/dry mix:

ffmpeg -i input.wav -af "freeverb=room_size=0.85:damp=0.6:wet_g=0.5:dry_g=0.7" output.wav

Example 2: Small, Reflective Room Reverb

This configuration simulates a small room with hard walls (low damping) and a subtle wet mix:

ffmpeg -i input.wav -af "freeverb=room_size=0.3:damp=0.2:wet_g=0.3:dry_g=0.8" output.wav