How to Use the FFmpeg Tremolo Filter
This article provides a quick guide on how to use the
tremolo audio filter in FFmpeg to apply rapid amplitude
modulation to your audio files. You will learn the basic syntax,
understand the key parameters of frequency and depth, and see practical
command-line examples to achieve the perfect tremolo effect.
Understanding the Tremolo Filter
The tremolo filter in FFmpeg modulates the amplitude
(volume) of an audio signal using a sinusoidal control signal. This
creates a pulsating, vibrating, or stuttering sound effect.
The filter accepts two primary parameters:
f(Frequency): The modulation frequency in Hz (cycles per second). This defines how fast the volume fluctuates. The value can range from 0.1 to 20000.0, with a default of 5.0 Hz.d(Depth): The modulation depth, which determines how drastic the volume drops during the modulation cycle. The value ranges from 0.0 (no effect) to 1.0 (maximum volume reduction), with a default of 0.5.
Basic Syntax
To apply the filter, use the -af (audio filter) flag
followed by tremolo and its parameters in your FFmpeg
command:
ffmpeg -i input.mp3 -af "tremolo=f=FREQUENCY:d=DEPTH" output.mp3Practical Examples
1. Standard Tremolo Effect
For a classic, gentle tremolo effect (such as a vintage guitar amplifier style), use a moderate frequency of 5 Hz and a depth of 0.5:
ffmpeg -i input.wav -af "tremolo=f=5:d=0.5" output.wav2. Rapid Amplitude Modulation (Stutter Effect)
To create a rapid, aggressive stutter or helicopter-like effect, increase both the frequency and the depth. This example uses a fast 12 Hz frequency and an intense 0.9 depth:
ffmpeg -i input.wav -af "tremolo=f=12:d=0.9" output.wav3. Subtle Slow Shimmer
For a slow, subtle swelling effect that gently modulates the audio without being too distracting, use a low frequency and low depth:
ffmpeg -i input.wav -af "tremolo=f=1.5:d=0.3" output.wav