How to Use FFmpeg Speechnormalizer Filter
This guide explains how to use the speechnormalizer
filter in FFmpeg to balance and improve speech volume in your audio and
video files. You will learn the basic syntax, key parameters for
fine-tuning the audio output, and practical command-line examples to
achieve consistent, professional-grade speech levels.
What is the Speechnormalizer Filter?
The speechnormalizer filter in FFmpeg is an audio filter
designed specifically to normalize speech. Unlike standard volume
normalization, which adjusts the entire audio file by a fixed level,
speechnormalizer dynamically adjusts the volume over time.
It increases the volume of quiet speech and reduces the volume of loud
outbursts, ensuring a consistent listening experience without clipping
or distorting the audio.
Basic Usage
To apply the speechnormalizer filter with its default
settings, use the following basic FFmpeg command:
ffmpeg -i input.mp4 -af speechnormalizer output.mp4In this command, -af stands for audio filter, and
speechnormalizer applies the default voice-balancing
algorithm to the audio stream.
Key Parameters for Fine-Tuning
You can customize the behavior of the filter using specific
parameters. The syntax for passing parameters is
speechnormalizer=parameter1=value1:parameter2=value2.
peak: Sets the maximum peak amplitude. The value ranges from 0.0 to 1.0. The default is0.95.target: Sets the target RMS (Root Mean Square) volume level. The value ranges from 0.0 to 1.0. The default is0.25. Higher values make the speech louder.delay: Sets the look-ahead delay in seconds. This helps the filter anticipate volume changes. The value ranges from 0.5 to 10.0 seconds. The default is1.5.threshold: Sets the noise gate threshold. This prevents the filter from boosting low-level background noise during silent intervals. The value ranges from 0.0 to 1.0. The default is0.0.
Practical Examples
1. Normalizing Low-Volume Voice Recordings
If your voice recording is too quiet, you can increase the
target volume while keeping the peak safe from
clipping:
ffmpeg -i input.wav -af "speechnormalizer=target=0.35:peak=0.9" output.wav2. Reducing Background Noise Amplification
In recordings with background hiss or computer fan noise, use the
threshold parameter to prevent the filter from boosting the
noise during pauses in speech:
ffmpeg -i input.mp3 -af "speechnormalizer=threshold=0.05" output.mp33. Fast Volume Adaptability
For fast-paced dialogue or podcasts with multiple speakers, lowering
the delay helps the filter react more quickly to sudden
changes in volume between speakers:
ffmpeg -i input.mp4 -af "speechnormalizer=delay=0.8:target=0.3" output.mp4