Batch Loudness Normalizer tool

I hope that this is useful for peeps who need to normalize audio files either before entering the DAW or for distribution afterwards. There are two scripts: ebu-norm and tp-norm, for integrated loudness and true peak targeting respectively. ebu-norm will apply limiting if there would be true-peak overage due to added gain with a SoX compand chain translated and adapted from @mhartzel’s FreeLCS project (thank you!).

Feedback very welcome as long as you understand that I’m relatively new to both scripting and Github :stuck_out_tongue: .

1 Like

@mhartzel, I changed the equivalent of your audio_peaks_absolute_ceiling to - 1 dBTP versus -2 dBTP as in your project. I haven’t managed to send the peaks above -1 dBTP as yet…

Also, I didn’t use the incremental drop by 0.5dB based on initial integrated level as it feels like the peak would end up unnecessarily low. Am I missing something? Am I just not using enough problematic music/speech/fx files? :confused:

Hey this looks super useful, thank you. Welcome to the Ardour community!

@BethHarmon I chose those values after testing some 30 GB of audio from out company archives. There are some extreme examples there, one radio drama had very low overall loudness and suddenly a full scale explosion. You probably will get away with more moderate values with better behaving audio. I tried to prevent overshooting in these extreme cases.

I also found out that it’s often impossible to hear any distortion if 0 dBFS is exceed for a sample or two, very short periods of overshooting won’t really matter much if nobody can hear them.

1 Like

Thanks, @mhartzel. For what it’s worth, I’m also experimenting with running an oversampling limiter via SoX’s LADSPA function. So far I’ve been getting great results with both Loudmax and LSP Limiter but perhaps the major issue with this route is that channels have to match the channels in the limiter label and also I doubt the sound would be as transparent as the setup you created with the 4 x compand chain.

That is very interesting, let us know how it goes. I tested various Ladspa limiters when writing FreeLCS but did not have any luck with them and settled for the sox compander-chain. Maybe there are better limiters available now.

Maybe Loudmax could be used after the sox compander-chain as a final hard limiter. The sox compander chain is more or less a soft limiter and peak level may be higher than the level set for peaks. However the resulting peak level is not important, it is just important that peaks stay below 0 dBTP (4x oversampled truepeak) and that’s why it’s ok to set the limiter level to -2 dBTP.

Sox allows for loading one mono plugin for each input channel (option -r) and this would allow using Louxmax(Mono) as a final brickwall limiter. Then you would not have to worry about channel order.

I found out in my tests that using a high target level (for example -12 LUFS) could be very problematic if the audio had large loudness variations in it. In one extreme case it was not possible to process a file correctly since limiting peaks lowered overall loudness and you had to adjust loudness again and then the peaks overshot again and limiting lowered overall loudness again, etc.

I’ve pushed loudmax-norm to main branch: GitHub - ElizabethHarmon/ebu-norm: An advanced, professional batch normalizer and scanner for EBU R 128 and other target levels.

Obvious prerequisite is loudmax ladspa installed in /usr/lib/ladspa. I’m using -r flag with ldmx_mono as suggested by @mhartzel so it should work with any channel count!

Basically it works as it would in the DAW with gain pushed into the TP limiter. In terms of potential for true peak overage, Loudmax uses a slightly less aggressive/ more transparent algorithm so author recommends changing Loudmax output to “-1.2 or even -1.5” to completely avoid overage in the most problematic files. I’ve added the LMO (LoudMax Output) variable near the top of the script to make this easy for users to change as they see fit.

Give it a whirl and let me know what you think!

1 Like

Just a quick update: I’ve added an LSP limiter version now too. So now there is the original ebu-norm (using compand chain), tp-norm (true-peak normalization therefore no limiter required), loudmax-norm, lsp-norm and the standalone scanner ebu-scan (TP, int, short-term, momentary and LRA). I suspect that the most transparent will still be the compand chain but it will be fun to test the various options. Feedback very welcome!

More changes afoot. x42-norm now uses sound-gambit (GitHub - x42/sound-gambit: Audio File Peak Limiter) which removes the need for lv2file and allows for up to 64 channels. Thanks @x42!

Bigger changes afoot (and last time I bump, I promise gov’ner):

ebu-norm – target LUFS integrated level (defaults to -23 LUFS). Now using Robin Gareus’ sound-gambit true-peak limiter
tp-norm – target true peak levels (defaults to -1 dBTP)
ebu-scan – standalone scanner module which now includes -a flag for treating files as an album for additional whole-project loudness analysis
ebu-plot – Generate loudness graphs in PNG format e.g. (note especially the new red true-peak over “blobs”)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.