jiixyj/libebur128

FR: Optional pure 1770-1 scan

AironAudio opened this issue · 6 comments

Hello there,
my request is this : A way to scan without the relative gates and everything else that the 1770-4 standard does that the 1770-1 (first version from 2006) does not do.

This is for a project in which folks around the SWS Extension ( https://sws-extension.org and https://github.com/Jeff0S/sws/ ) and myself are attempting to implement an offline loudness scanning specification that is based around the 1770-1 method of loudness measurement.

I've been an user of this library for many years, via Foobar2000's replaygain scanner and the SWS Reaper extension with its loudness functions. I'm also one of those people that mix shows and dubs for TV, DVD/Blueray, cinema , anime streaming platforms and the Netflix streaming platform.

Netflix introduced a new specification for delivery a few months ago, and part of that is the 1770-1 loudness measurement. Instead of the relative gates of later 1770-2/3/4 standards, it asks to use the Dolby Dialogue Intelligence Gate instead. The source to that is free(as in beer), which I'll try to compile in to a DLL/Dylib to use in the SWS extension. I'm an amateur, but I'll have some help here and there, notably from Nofish of the SWS project in particular. He suggested we make this request in the first place.

So there's the reason I'm asking for a pure 1770-1 scanning method. Thank you for reading this far.
Is this a possibility ?

Disclaimer : this is my personal opinion and does not represent libebur128's authors opinion.
I see several issues in your feature request.

  • EBU has been a major actor in pushing the relative gating algorithm into the ITU BS 1770 standard. Offering a non relative gated measurement would sort of be in contradiction with the lib name.
  • The parts of the current version of the library that would be used for a non gated measurement are essentially the pre filtering parts. A large part of the library is the management of the momentary or short-term blocks, and the relative gating computing.
  • You would still have to implement the Dialog Intelligence gating on your input audio data before feeding the data to the not gated measurement library. Once you're there, I feel that the pre filtering and computation of the not gated loudness might be more efficiently achieved by a dedicated implementation than by calling a third party library.
  • I am not in favor of trying to distribute a binary release of a proprietary software as a part of an open source project. The license (https://www.dolby.com/us/en/technologies/speech-gating-reference-code/agreement.html) only allows distribute a loudness meter in object code form for Professional use. Although I am not a lawyer, I see two options there : maintaining a set of builds for all your target platforms, or ask the end user to sign on the Dolby's website to download and build the proprietary code.

There's obviously an interesting debate about the pertinence of netflix's choice, but this is not the place.

Thank you. That's very helpful.

I do not intend to distribute the proprietary DLL/Dylib with any open source project, and neither does anyone else I've talked to. Users who need this kind of functionality will have no problem bringing this stuff together themselves, so the Dolby stuff will stay separate because of the license and the principles. I lamented the fact that the code is not fully free in other places, as Dolby could just yank it away at any time. That's unlikely though, since the backlash from large parts of their primary professional user community would be significant.

Thanks for confirming what I suspected about the signal flow. Dialog gate -> 1770-1 measurement. That's it.

Are you recommending that we create a fork ourselves to skip the gates in the code ? Everything else is fine, but the gate and whatever else got added in the jump from 1770-3 to 1770-4 could really be that simple ?

The idea of the Netflix folks is to have the dialogue be the hook of any project. That's what needs to be at a reasonably consistent loudness. The response of Netflix to an article by pro-tools-expert.com on the new delivery requirement is here if you're interested: https://www.pro-tools-expert.com/home-page/2018/9/18/netflix-respond-to-our-article-on-their-new-loudness-delivery-specs

If the amount of meddling in the code for such a niche requirement is too big a deal, possibly producing bugs and requiring effort better spent elsewhere, then that's alright. We'll try another way, likely forkin the code, which is already the case for the SWS extension which just had some commits to bring in the new updated version of libebur128. There's always a way :) .

I'm not sure this FR should be closed before other parties involved in the libebur128 development and maintenance have a chance to express themselves. (Therefore my initial disclaimer).

Sorry, that was by mistake, not intention. Fast clickery on a busy work day.

Hi,
I'm the one who suggested doing this FR.
Just to emphasize, the Dolby code is not directly involved here. The request is only for an API function (or similar means, like e.g. setting a flag) to optionally disable the gating (which should of course still be enabled by default).

We know that we'd still have to incorporate the actual Dialog Intelligence Gating ourselves, but the reasoning to ask for this here is as we're using libebur128 anyway already for Loudness measurement in REAPER it'd probably make sense to reuse it for a future Netflix compliance scanning (as the one part in the chain as mentioned above).

Though I also do see it's probably indeed a niche request. :)

I don't think it's too niche. It'd be nice to have a way to explicitly signal gating.