Audio normalization with ffmpeg using loudnorm (ebur128) filter

Source: https://developers.google.com/actions/tools/audio-loudness
Source: http://k.ylo.ph/2016/04/04/loudnorm.html (Credits: k@ylo.ph | Source discovered by Mulvya)

 

  • ./ffmpeg -i /path/to/input.wav -af loudnorm=I=-16:TP=-1.5:LRA=11:print_format=summary -f null -
    

    This instructs FFmpeg to measure the audio values of your media file without creating an output file. You will get a series of values presented as follows:

    Input Integrated:    -27.2 LUFS
    Input True Peak:     -14.4 dBTP
    Input LRA:             0.1 LU
    Input Threshold:     -37.7 LUFS
    
    Output Integrated:   -15.5 LUFS
    Output True Peak:     -2.7 dBTP
    Output LRA:            0.0 LU
    Output Threshold:    -26.2 LUFS
    
    Normalization Type:   Dynamic
    Target Offset:        -0.5 LU
    

    The sample values above indicate important information about the incoming media. For instance, the Input Integrated value shown indicates audio that is too loud. The Output Integrated value is much closer to -16.0. Both the Input True Peak and Input LRA, or loudness range, values are higher than our provided ceilings and will be reduced in the normalized version. Finally, the Target Offset represents the offset gain used in the output.

  • Run a second pass of the loudnorm filter, supplying the values from step 1 as “measured” values in the loudnorm options.
    ./ffmpeg -i /path/to/input.wav -af loudnorm=I=-16:TP=-1.5:LRA=11:measured_I=-27.2:measured_TP=-14.4:measured_LRA=0.1:measured_thresh=-37.7:offset=-0.7:linear=true:print_format=summary output.wav

 

4 thoughts on “Audio normalization with ffmpeg using loudnorm (ebur128) filter

  1. Hi, first of all thanks for this guide. It has become a reference for me when I started using ffmpeg to control the loudness of my mixes from video productions to music mixes. It has been a great reference during my research.
    Just a short correction though; you do not need to type in the target levels on first pass… loudnorm=print_format=summary works exactly the same. I have tried and tested that this morning.
    I have seen it that way on the Google developer’s page as well and I honestly don’t know why they wrote the unnecessary options, but they lack a “suggest” feature on their site (weird, right?) so here I am. Thanks to update so Noobs like me don’t waste their time on that first line at least, lol.

    1. Huge thx for your comment! I really appreciate your contribution, it’s very useful for me. And it feels good to share some hardly collected knowledge. :) Wish you good luck in normalizing your environment. :)))

      Axel

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.