Implement a simple normalization mode using loudnorm
stats and the audio volume
filter
#274
Labels
loudnorm
stats and the audio volume
filter
#274
I've been trying to make ffmpeg's
loudnorm
filter fit into my music processing pipeline viaffmpeg-normalize
(like many people did, as evident by the various issues) but it seems thatloudnorm
is not designed for music, where preserving the dynamic range / linearity is more important than achieving the desired loudness metrics. (podcasts, realtime audio, etc.)I have created a yet another option for making
loudnorm
behave linearly in #273 but this is more of a band-aid fix than a true solution, made necessary byloudnorm
not allowing true peaks to be higher than 0 for some stupid reason.What I propose instead is a very straightforward feature where we get loudness stats from the first
loudnorm
pass and just do a linear volume adjustment using ffmpeg'svolume
filter.How does this work?
First of, I'm far from anything close to being an audio expert, but what I've gathered from my web research is that LUFS and dB are closely related metrics such that e.g. a -4dB change in volume will result in -4 LUFS change (approx).
Please inform me if my understanding is incorrect.
So the code is basically this:
input_i
from first pass.vol_change = target_level - input_i
.f"volume={vol_change}dB"
@slhck Let me know what do you think about the feature request and whether you are willing to work on this. I might get to it myself (or not depending on how life goes).
The text was updated successfully, but these errors were encountered: