slhck / ffmpeg-normalize

Audio Normalization for Python/ffmpeg
MIT License
1.25k stars 117 forks source link

Loudness range target limits #183

Closed markvesterskov closed 2 years ago

markvesterskov commented 2 years ago

Thanks for an awesome piece of software.

My use case is for a film festival, where we get films from all over the world who all have their own idea of what -23LUFS means, even though our specs state it very clearly. This year I've had submission from -7LUFS (!!) to -38LUFS making it hard to make a screening of multiple films a uniform volume level.

Now to my question: is there a practical reason for the loudness range target limits? I always want to do linear audio normalization, never dynamic, and some of the submitted films have +20dB of loudness range, forcing the normalization into dynamic mode. I'd like to be able to pass an argument to "--never-use-dynamic-loudness" or an increase in the loudness range limits.

Let me know if i can contribute in any way!

slhck commented 2 years ago

This is a good use-case — I understand why you'd want to change the defaults or limits. I cannot really say much about the underlying loudnorm filter in ffmpeg though, and why the option limits were chosen the way they are. As this tool is only a wrapper, I cannot change the way the filter behaves.

That said, I saw that apparently the loudness range target for the filter now allows for maximum values of 50, so I made a fix in ffmpeg-normalize: https://github.com/slhck/ffmpeg-normalize/commit/f316b2677c2283844cafbfe5f6a1e3c28b217d5f

Please check v1.23.1.

markvesterskov commented 2 years ago

Thank you so much Werner, for taking the time to look at this, and for the amazingly quick fix 🚀

slhck commented 2 years ago

You're welcome, let me know if you need anything else — and good luck with the festival!