Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.


Go Back   Doom9's Forum > General > Audio encoding

Thread Tools Search this Thread Display Modes
Old 4th October 2018, 17:05   #1  |  Link
Registered User
datauser's Avatar
Join Date: Oct 2010
Posts: 101
Peak audio level vs average which should be higher?

I'm very curious to know that after normalizing a 5.1 ac-3 track to mp4 aac, should the peak audio level be always lower than the average level(after removing any clipping and having a target of 89db? I tend not to normalize during a video encoding as I see distortions often, but rather extract the audio mp3 or 2.0 or 5.1 aac, and then use aacGain later to up the gain using the replay gain method. Doing this I always see peak levels higher than average levels and within limits- no clipping.

I suppose it depends on the normalizing method, but I used some software method today for the hell of it,(Fairstars Audio Converter)which has the option of normalizing up to 100%(assume this method is peak normalization method which many thrown upon?) and then I checked it with Mp3Gain(using aacGain renamed to its .exe to remove 6db of clipping at Mp3Gain GUI default 89db. Then as a final check I went through Sound Normalizer 7.99.8 and unexpectedly saw that the peak audio levels: 85.4db L & R 85.7db were actual a couple of db lower more or less than the average 87.4 db registered L&R level equal weighting. Is this desirable? Thanks for any thoughts or insights?


Last edited by datauser; 4th October 2018 at 17:22. Reason: Links about peak normalization!
datauser is offline   Reply With Quote
Old 4th October 2018, 19:17   #2  |  Link
Registered User
manolito's Avatar
Join Date: Sep 2003
Posts: 2,291
Your post sounds like you are confusing PEAK normalizing with LOUDNESS normalizing.

The laws of physics say that it is absolutely impossible for any audio clip that the peak level is lower than the average (RMS = Root Mean Square) level. Period. Provided you measured the same thing.

ReplayGain normalizing falls under the category "Loudness normalzing". It uses an algorithm to determine the percieved loudness of an audio clip (the peak values do not correlate to the percieved loudness). The original ReplayGain method to measure the loudness is obsolete today, it has been superseded by the BS1770 or EBU R128 method. (The unofficial ReplayGain2 method uses the new analyzing method, but with a higher target level than EBU R128).

Neither Peak Normalizing nor Loudness Normalizing alter the dynamic range of the source, no compression or limiting is applied. For Loudness Normalizing this means that clipping is possible. Digital clipping is EVIL, it has to be avoided by any means. To avoid clipping in Loudness Normalizing you can either reduce the gain so no clipping will occur (but then you will not get an even perceived loudness). Or you can apply compression or limiting before Loudness Normalizing.

So before doing any of this you need to decide for yourself what you want to achieve. Peak Normalizing has gotten out of fashion during the last years, everybody uses Loudness Normalizing today. To avoid clipping you need to determine the peaks of your source first, and today you use the "True Peak" value instead of the "Sample Peak" value.

One software solution which does all this in 1 step is "LoudNorm" which is part of current FFmpeg versions. There also is a nice GUI for it called "WinLoud" by Muxson. Check it out...


Last edited by manolito; 4th October 2018 at 22:41.
manolito is offline   Reply With Quote
Old 4th October 2018, 20:26   #3  |  Link
Registered User
datauser's Avatar
Join Date: Oct 2010
Posts: 101
That's mostly the reason why I posted as the physics doesn't add up and wanted to get advice of people who know audio and its workings! Most odd. I re-entered the 224abr in the 7.99.8 version normalizer and get the same bizarre figures in Test Peak Level/Test Average Level.This software's calculating must be wrong or something is defying physics? Its calculation is buggy of course!

Thankyou for your informative reply(I'm always grateful to learn something new) and your suggestion of that useful tool. Will check that one out for sure. Much Appreciated.
datauser is offline   Reply With Quote
Old 4th October 2018, 22:24   #4  |  Link
Registered User
Join Date: Mar 2011
Posts: 3,681
I had a look at the Sound Normalizer program and the way it does things seems a bit odd. I scanned an MP3 with foobar2000 and then converted it to flac while adjusting the volume to ReplayGain's 89dB. I then scanned the flac file to determine it was correct, and the track gain shown was 0dB (which means it's exactly 89dB), and the peak value was 0.562433, which is basically a percentage and works out to -4.99858 dB below maximum (fb2k shows -5.0dB).

When I scanned with Sound Normalizer it showed an average volume of 88dB for the left channel and 89.6dB for the right channel, so I guess that's about right. It says I can increase the volume to 93.0dB for the left and 96dB for the right, for maximum volume without clipping, which is probably also correct.
For the peak levels though, it showed 85.3dB and 83.9dB.

When I switched to displaying a percentage, the average levels were 98.8% and 100.7% which makes sense for average values of 88dB and 89.6dB, assuming 89dB=100%. For the peak levels it shows 56% for the left channel and 48% for the right, which is in line with foobar2000's 0.562433 (56.24%)

So I think it's doing something retarded like changing the meaning of 89dB when displaying peak values, and the volumes of 85.3dB and 83.9dB as peak levels are relative to that. I can't quite get my head around what it's relative to though, as it shows the maximum peak volume for each channel as 90.3dB. ReplayGain's 89dB is confusing enough as it is without making it worse.

If you're interested, I posted some info on how to adjust the volume using foobar2000 and ReplayGain here. fb2k uses the newer R128 scanning algorithm, even though it still refers to everything in ReplayGain-speak, so it's results can sometimes be a little different to MP3Gain (the newer scanner is more accurate). It'll also adjust the volume of MP3s and AAC files losslessly as MP3Gain does, only it'll do so when the audio is inside a container such as MP4 or MKV. It doesn't mind if there's also video. It doesn't display the info in the same user friendly manner as MP3Gain though, but it's easy enough to adjust the volume when converting and scan the output files to check the peaks, or check the peak values after they've been adjusted losslessly.

Oh... and fb2k doesn't have an option for peak normalising as such, but when converting it can be achieved by selecting the "apply tack gain and prevent clipping according to the peak" option in the converter's ReplayGain section and setting the "with replay gain" pre-amp to +20dB. That'll increase the volume to 20dB above ReplayGain's 89dB target volume, or to the maximum volume without clipping, whichever comes first. I think the same applies when adjusting losslessly. You'd increase the target volume in preferences to something above 89dB and also check the "prevent clipping" option.

Last edited by hello_hello; 4th October 2018 at 22:51.
hello_hello is offline   Reply With Quote
Old 5th October 2018, 10:55   #5  |  Link
Registered User
datauser's Avatar
Join Date: Oct 2010
Posts: 101
Thanks hello_hello. Always interested in what you have to say and good to hear from you again. So you found some odd setting with the Sound Normalizer too as I did. It certainly has a bonkers way of doing it for sure.

I primarily just use it to get the channel L + R weightings, or to analyse He-aac which aacGain cannot do. It's good for that, but not for adding gain as it re-encodes the audio file to do it using faac. I use EZCD then for that as there is a prevent clipping function and you can set a slider for the desired range.

I inputted my audio into a previous version of Sound Normalizer 7.6 and got the same result as well as with its new 7.99.9 version. I must say though it is the first time I've ever seen results showing peak levels of audio actually lower than the average. I'll try and contact the developer to get feedback. Maybe it's a bug in the counter or math the software uses? Either way confusing as hell! Thanks.

I emailed the Sound Normalizer developer twice and as yet no reply.

Last edited by datauser; 15th October 2018 at 16:31. Reason: Info
datauser is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +1. The time now is 20:13.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.