[FFmpeg-devel] [PATCH v2] doc/filters: Add double-pass example for loudnorm

Gyan Doshi gyandoshi at gmail.com
Mon Aug 20 08:30:09 EEST 2018

On 20-08-2018 03:27 AM, Marvin Scholz wrote:

> + at example
> +$ ffmpeg -i input -map 0:a -af loudnorm=I=-23:TP=-1:print_format=summary -f null -
> +
> +[...]
> +Input Integrated:     -9.0 LUFS
> +Input True Peak:      +1.5 dBTP
> +Input LRA:             9.4 LU
> +Input Threshold:     -19.5 LUFS
> + at end example
> +
> +Then pass the input measurements to the next run that produces the result:
> +
> + at example
> +ffmpeg -i input -af loudnorm=I=-23:TP=-1:measured_I=-9.0:measured_TP=1.5:measured_LRA=9.4:measured_thresh=-19.5:print_format=summary output

a) Your first pass command will run the filter for all audio streams in 
the input, but your 2nd pass command won't. Suggest you remove the mapping.

b) Except for a particular set of conditions*, loudnorm will resample 
the audio to 192 kHz. ffmpeg may then resample the result to the highest 
supported rate by the encoder. For native AAC, this will be 96 kHz; for 
PCM, it will remain to 192kHz. Some (many ?) players, especially web 
ones, don't support these sampling rates. It's advised to insert 
aresample afterwards e.g. aresample=48000

*if all of these conditions are met: linear is true and enabled; target 
LRA is equal or greater than input LRA; target TP is equal or greater 
than input LRA after adjusting for integrated loudness change.


More information about the ffmpeg-devel mailing list