Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add EBU R128 loudness/peak value tags #865

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

robUx4
Copy link
Contributor

@robUx4 robUx4 commented Oct 24, 2024

It seems for the ITU_BS_1770_LUFS we can just tell to normalize to -23, and for other sources the values should be shifted ? cc @bb010g

@robUx4 robUx4 added format addition spec_tags Tags Matroska spec document target labels Oct 24, 2024
@robUx4 robUx4 changed the title add EBU loudness/peak value tags add EBU R128 loudness/peak value tags Oct 25, 2024
@robUx4
Copy link
Contributor Author

robUx4 commented Oct 25, 2024

We could use a big-endian float storage as we the EBML reader already has support for it. Or we could use the Q7.8 integer value as a string, as in Opus.

@robUx4 robUx4 marked this pull request as ready for review October 26, 2024 11:03
@bb010g
Copy link

bb010g commented Oct 27, 2024

It seems for the ITU_BS_1770_LUFS we can just tell to normalize to -23, and for other sources the values should be shifted ? cc @bb010g

I would explicitly recommend against normalization to -23 LUFS. If that means using a fixed-point encoding over a floating-point encoding to avoid the drop in accuracy when further from 0, then I think that's a better alternative. If a ITU_BS_1770_LU is specified in loudness units relative to -23 LUFS instead, then I'm sure that people will start encoding relative to their chosen LUFS instead of properly configuring their players to normalize to a target LUFS, like what's happened with ReplayGain tags. Using LUFS won't ensure that non-compliant metadata will never happen, but it will hopefully reduce the number of cases because people will realize that they're shifting an absolute value.

Avoiding confusion by implementers and authors (compared to the ReplayGain tags that they're used to) is also why I proposed including the units in the tag titles. Any change in units would require new tags anyways, and it makes it clearer when the tags are used wrong.

@t-rapp
Copy link
Contributor

t-rapp commented Oct 28, 2024

I agree that storing the absolute (integrated) loudness value in LUFS sounds less error-prone, rather than a gain value relative to some reference value.

I'm open to whether the tag names should start with something like "ITU_BS_1770", or the maybe more widely known "EBU_R128". Also I have no preference regarding the value format, but using a binary float seems to be fine.

@robUx4
Copy link
Contributor Author

robUx4 commented Nov 3, 2024

I would explicitly recommend against normalization to -23 LUFS. If that means using a fixed-point encoding over a floating-point encoding to avoid the drop in accuracy when further from 0, then I think that's a better alternative.

No it's a floating point number (binary) value.

Using LUFS won't ensure that non-compliant metadata will never happen, but it will hopefully reduce the number of cases because people will realize that they're shifting an absolute value.

But if the reference is floating that means we have to also store the reference so we can match different loudness levels. In the end the source value translated means the same thing as -6 / -29 stored separately. If the playback is targetting a general loudness of -18 it's the same amplication (or compression?) to apply regardless of the original loudness. Or am I missing something ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format addition spec_tags Tags Matroska spec document target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants