Configure FFmpeg Loudnorm True Peak Target
This article explains how to configure the true peak target using the
loudnorm filter in FFmpeg. It covers the specific parameter
used for adjusting the true peak limit, provides practical command-line
examples, and explains how this setting interacts with target loudness
and loudness range to ensure your audio complies with modern
broadcasting and streaming standards.
The loudnorm filter in FFmpeg is an automatic loudness
normalization filter that complies with the EBU R128 standard. To
configure the true peak target, you must use the true_peak
parameter (or its shorthand tp).
The True Peak Parameter
The tp parameter specifies the maximum true peak value
in decibels relative to full scale (dBTP). The default value is
-2.0 dBTP, which is the standard for many broadcasting
platforms. However, you can adjust this value to meet specific delivery
specifications (such as -1.0 dBTP for YouTube or
Spotify).
The basic syntax for setting the true peak target is:
loudnorm=tp=-1.0
Single-Pass Normalization Example
To apply loudness normalization to an audio file in a single pass with a target integrated loudness of -16 LUFS, a loudness range of 11 LU, and a true peak target of -1.5 dBTP, use the following FFmpeg command:
ffmpeg -i input.wav -af loudnorm=I=-16:LRA=11:tp=-1.5 output.wavIn this command: * I=-16 sets the target integrated
loudness to -16 LUFS. * LRA=11 sets the target loudness
range to 11 LU. * tp=-1.5 sets the target maximum true peak
to -1.5 dBTP.
Two-Pass Normalization
For the highest audio quality and most precise targeting, a two-pass
approach is recommended. In the first pass, you analyze the audio to get
its current measurements. In the second pass, you apply the
normalization using those measured values while keeping your target
tp the same.
Pass 1 (Analysis):
ffmpeg -i input.wav -af loudnorm=I=-16:LRA=11:tp=-1.5:print_format=json -f null -This outputs a JSON block in the terminal containing values like
input_i, input_lra, input_tp, and
input_thresh.
Pass 2 (Application): Using the measured values from the first pass, run the second pass to render the final file:
ffmpeg -i input.wav -af loudnorm=I=-16:LRA=11:tp=-1.5:measured_I=-21.4:measured_LRA=12.2:measured_tp=-0.8:measured_thresh=-31.5:linear=true output.wavEnsure that the tp value in the second pass matches the
target tp from your first pass to prevent the limiter from
causing unwanted distortion.