How to Use FFmpeg Tremolo Filter for Volume Modulation

This article provides a quick guide on how to use the FFmpeg tremolo filter to apply volume modulation to your audio files. You will learn the core parameters of the filter—frequency and depth—and how to implement them using practical command-line examples to create pulsing, rhythmic audio effects.

Understanding the Tremolo Filter

The tremolo filter in FFmpeg modulates the amplitude (volume) of an audio signal using a low-frequency sinusoidal wave. This creates a trembling or vibrating effect, commonly used in music production and sound design.

The filter accepts two primary parameters:

  • f (Frequency): Defines the modulation frequency in Hertz (Hz). This determines how fast the volume fluctuates. The default value is 5.0 Hz, with a valid range from 0.1 to 20000.0 Hz.
  • d (Depth): Defines the modulation depth, which determines the intensity of the volume variation. A depth of 0.0 results in no modulation, while a depth of 1.0 results in maximum volume variation (fading all the way down to silence). The default value is 0.5, with a range from 0.0 to 1.0.

Basic Syntax

To apply the tremolo filter, use the -af (audio filter) flag followed by tremolo and your desired parameters:

ffmpeg -i input.wav -af "tremolo=f=frequency:d=depth" output.wav

Practical Examples

1. Apply Tremolo with Default Settings If you do not specify any parameters, FFmpeg will apply the default frequency of 5 Hz and a depth of 0.5.

ffmpeg -i input.mp3 -af "tremolo" output.mp3

2. Create a Slow, Deep Pulsing Effect To create a slow volume swell, lower the frequency and increase the depth. This configuration modulates the volume twice per second with high intensity:

ffmpeg -i input.wav -af "tremolo=f=2:d=0.9" output.wav

3. Create a Fast, Subtle Shimmer For a rapid, subtle vibration effect, increase the frequency and lower the depth:

ffmpeg -i input.wav -af "tremolo=f=12:d=0.3" output.wav

By adjusting these two parameters, you can easily control the speed and strength of the volume modulation to fit your specific audio processing needs.