Page 1 of 1

Per-file volume normalization (NOT volume ducking/compression!)

Posted: 15 Nov 2017 04:47
by RavenWorks
Does VLC have a feature to look at the maximum volume level of an entire file, and raise the playback volume if it's too quiet?

I'm not talking about "there's a loud explosion in this one scene, make it quieter at that part". I know it has features for that.

I'm talking about when you get a file, where if you were to open it in Audacity, you'd see that the wave never goes above 25% of the full height possible (for example). For whatever reason, it was either captured quiet or mastered quiet, and I want VLC to automatically raise the playback volume to compensate at the start, and leave it there. (It would have to scan the entire file in advance to determine that, which might take a second or two, but I'd be willing to accept that.)

Does VLC already have a feature for this that I've missed? Is it something that it would be possible to implement?

Re: Per-file volume normalization (NOT volume ducking/compression!)

Posted: 15 Nov 2017 11:41
by Lotesdelere
Not that I know, but you might be insterested by this:
https://github.com/lordmulder/DynamicAudioNormalizer

Re: Per-file volume normalization (NOT volume ducking/compression!)

Posted: 15 Nov 2017 16:03
by RavenWorks
That's doing exactly the kind of thing I tried to explain that I *don't* want :)

Re: Per-file volume normalization (NOT volume ducking/compression!)

Posted: 15 Nov 2017 17:54
by zhgutov
It is not correct to match the loudness using normalization by peak level.
Better way to do this is to match by RMS.
That's how ReplayGain works usually.
Even so, this will not work perfectly when your music is not just a beat and a melody mastered close to 0 dBFS.

Moreover, if you want to match quiet recordings with loud recordings, it is not correct to raise the volume in quiet recordings.
Because this will lead to clipping in peaks/culmination. Better way is to lower volume in loud recordings.
In this case you need some reference point. For example, you can match everything to -20 dBFS by RMS.
And because you make the volume lower you probably need to process and output everything at least in 24 bit, even if your source is 16 bit or lossy.

Re: Per-file volume normalization (NOT volume ducking/compression!)

Posted: 15 Nov 2017 20:56
by RavenWorks
Aha! ReplayGain looks like exactly what I'm looking for, thank you! I'll look into that :)