change/addition to volume amplification

Hello,
topic “volume amplification”: Cool
Of course it is good that Kodi offers something in this direction.
Often audio of movies is globally too low or there are disbalances or preferred user settings. With “volume amplification” the user has a little tool to influence that. In my opinion this option is implemented in a way that only covers the “user has personal preferences” part but NOT the in my opinion more important part of working against formerly made errors and keeping the originally intended balance.
What´s my point?
In a homecinema many people try to achieve firstly standard conditions (e.g. video calibration with 3DLUT, set the right contrast, master EQing audio,…) and then you can of course if you want realize personal preferences (maybe a certain video gamma value, more bass boost,…).
The “volume amplification” works in reality like a compressor. Loud parts stay loud (you can´t boost them without distortion), so they stay at the same volume. Quieter parts get amplified. So the dynamic range is lowered. At least this behavior of this option is seen when boost is set so high that there would be clipping.
A compressor is the tool for personal preferences (e.g. explosions seem to be too loud, voices seem to be too low…).
Of course it is good to cover that use-case.
What I am missing is an implementation in such a way that the dynamic range is not altered. And I want consistent volume. What I want is called peak volume normalization. And this is very cheap to achieve.
When e.g. making an audio cd you can normalize the audio files: Scan the file, detect the maximum volume, scale the volume so that the loudest part has 0dBFS.
Ok, we have video. We have not the time to scan whole files or we have internet streams and so we can´t scan the whole file at the beginning of playback.
No problem.
MPC HC has achieved this in a very simple, correct and working in reality way:
The boost setting means: “maximum allowed boost”. So let´s set this e.g. to 20dB. Now what does the implementation: Sound is coming, movie is starting. Sound has -40dB. +20dB is allowed, so the sound is boosted to -20dB. Now there comes a louder part, volume -20dB. -20dB + 20dB = 0 dB, everything fine. Now a sound is followed with -10dB. +20dB allowed, but -10+20 = 10 = clipping, so only 10dB applied -10+10 = 0. So when the movie is already rather loud, the applied boost is less compared to a vey quiet movie, that means “maximum allowed boost”.
What does this mean? This is in fact normalization (and certainly not compression), so the dynamic range is preserved. When you playback rather normal movies with different peak volume, you get consistent results by that. You can allow e.g. 40dB boost (should be sufficient for all cases), there is never clipping and the dynamic range is not altered. You will reach 0dBFS with every movie with this implementation without compressing the audio (when allowing sufficient boost).
There is only one disadvantage, which isn´t really one in practical use: The achieved effective volume is not right until the loudest part of the movie. Normally a movie doesn´t start wit a big explosion, so until the point, where normal/loud volume is present, the effective volume is too high. But that is not a restriction in practical use. Because you won´t have a movie, where you have extremely low sound level for an extended period of time at the beginning of the movie, and then you have to wait eternally for a loud part. Of course in a movie are quiet and loud parts (the dynamic range), but certainly not distributed polarized in a movie. So worst case you´ll have some too loud nature noises like wind or water sounds or whatever at the beginning of certain movies, but after a short time there is definitely normal loud sound like dialogues, technical sounds,….
MPC HC has additionally a checkbox named “regain volume”. This setting leads to the compressor, when checked the volume is boosted again after loud parts. But the advantage in MPC HC is, that you have the choice.
There is not much work to be done to achieve that in KODI, because half of the fuction (or more) is already implemented. In the GUI you would only need one additional checkbox, and the algorithm has to have additionally the variant of not compressing the audio.

This functionality is needed because movies don´t have consistent volume (especially stream ressources) and normalization is part of achieving standard conditions (so you can leave the volume knob of the amp in a defined place).
The problem here is that often these two approaches are totally mixed up. Compression or DRC or night mode or… is a matter of personal taste. Normalization is a feature of standard. In my opinion it seems a little strange to me to offer the setting for personal taste and not the one for standard conditions.
Kodi has a massive amount of “super special” features in my opinion, but such a basic one is missing…

I hope that someone will find the time to “fix” that.Nod

Hannes.