Configure FFmpeg Loudnorm True Peak and Loudness Range
This article provides a practical guide on how to configure the True
Peak (tp) and Loudness Range (lra) target
parameters in FFmpeg’s loudnorm filter. You will learn the
correct command-line syntax for both single-pass and two-pass audio
normalization to meet specific broadcast or streaming standards.
The loudnorm filter in FFmpeg is an automatic loudness
normalization filter that complies with the EBU R128 standard. To
customize the output audio to your specific target requirements, you
must define the target parameters within the filter argument.
Key Parameters
i(Integrated Loudness): The target integrated loudness in LUFS. The default is-24.0.lra(Loudness Range): The target loudness range in LU. The default is7.0.tp(True Peak): The target maximum true peak in dBTP. The default is-2.0.
Basic Syntax (Single-Pass)
For a quick, single-pass normalization where you set the True Peak to
-1.0 dBTP and Loudness Range to 15.0 LU, use
the following syntax:
ffmpeg -i input.wav -filter:a loudnorm=i=-24:tp=-1.0:lra=15.0 output.wavIn this example: * i=-24 sets the target integrated
loudness to -24 LUFS. * tp=-1.0 limits the maximum true
peak to -1.0 dBTP. * lra=15.0 sets the allowed loudness
dynamic range to 15 LU.
Recommended Workflow (Two-Pass)
While single-pass is fast, it relies on estimation. For professional-grade compliance, a two-pass approach is highly recommended.
Pass 1: Analyze the Audio Run the filter with
print_format=json to analyze the input file’s current
properties.
ffmpeg -i input.wav -filter:a loudnorm=print_format=json -f null -This command outputs JSON data in your terminal containing measured
values such as input_i, input_lra,
input_tp, and input_thresh.
Pass 2: Apply Normalization with Targets Use the
measured values from Pass 1 along with your desired tp and
lra targets to perform the final normalization.
ffmpeg -i input.wav -filter:a loudnorm=i=-24:tp=-1.5:lra=10.0:measured_i=-18.5:measured_tp=1.2:measured_lra=12.1:measured_thresh=-29.4 output.wavBy providing the measured input values to the filter, FFmpeg can
precisely adjust the audio to meet your exact tp and
lra targets without unexpected compression or clipping.