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

Marvin Scholz epirat07 at gmail.com
Mon Aug 20 16:16:53 EEST 2018



On 20 Aug 2018, at 7:30, Gyan Doshi wrote:

> 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.

Oh indeed, thanks.

>
> 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

Sure but this is already mentioned in the documentation so I thought it 
would make the example needlessly complex
as I wanted to focus it on the two-pass aspect. But I can add that.

>
> *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.
>
>
> Gyan
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list