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
replaygain_reference_loudness additions #1928
Conversation
Add support for mp4 ReplayGain tags in the format used by foobar2000 and deadbeef.
remove trailing whitespace; add test for replaygain tag support in mp4
* store reference-level from scanner in replaygain_reference_loudness tag like flac * replaygain_reference_loudness support for mp4
Original replaygain switched to 89db in 2003. Why do you want this? |
I noticed that foobar2000's ReplayGain scanner gives different results to flac/QL/gstreamer etc, and I found out that it uses a different formula to calculate the values, one based on a relatively new standard for volume normalization called (ITU-R BS.1770 or EBU R128 (Europe) or A/85 (USA)), and those all specify a different reference loudness. I was wondering if they were still using the same reference loudness from ReplayGain or the new specified level, but there was no way to know from the tags themselves. I did eventually find out they were still using 89 dB, but I think just using this tag would make things easier. It is a informational tag, like "encoded by" that tells about the settings of the ReplayGain scanner when it was scanned. It is not supposed to be used by any player. The alternative is to use some kind of tag specifying the formula used to calculate loudness or something, but this tag already exists, so why not use it? If there was ever an alternative scanner for QL based on say, libebur128, it would be nice to have this tag to tell what the reference level was. |
New additions: |
*add user option to store reference loudness *complete an existing TODO for an option to never overwrite existing tags
Completed the addition of a plugin preference for storing the reference level, so now it is completely optional. The preference defaults to False, so as not to change existing behavior. |
Sorry, but I'm not convinced. Taking into account the extra options etc this doesn't add much besides confusing users:
And that for no real gain... |
What about just adding a little explanation next to the option? Anyway in the case that it exists already, shouldn't the scanner update it and make sure it is correct? |
What would be the reason that it exists already? Which application writes/adds them? |
As far as I know, only flac. |
OK, passing "--replay-gain" creates "89.0 dB" which is hardcoded in the flac source. So, there is one source of the tag which always writes the same value which happens to be the default and isn't used by anything else. Maybe delete it in the replaygain plugin if it exists? |
I thought it could be useful if an alternate scanner (bs.1770/r128/a85/rg2.0) was implemented, supporting and using this existing tag rather than making something new. |
bs1770 is tracked here: #1609 |
There is a scanner tool called bs1770gain that also writes REPLAYGAIN_REFERENCE_LOUDNESS, as well as another tag REPLAYGAIN_REFERENCE_ALGORITHM, and they are variable. So I guess it isn't just flac. |
Thanks Example tags for bs1770gain with
default tags:
I guess we should delete REPLAYGAIN_REFERENCE_LOUDNESS and REPLAYGAIN_ALGORITHM in the replaygain plugin for now. |
I've opened #1942 |
At least for eading/writing. We don't use it for gain adjustment.
Get the reference-level from gstreamer replaygain scanner and store it in the replaygain_reference_loudness tag in the same way that flac does.
Also supports that tag in mp4.
Original ReplayGain used 83 dB, but ReplayGain 1.0 uses 89 dB. There are now other loudness measuring standards that specify different levels, and I think it is a good idea to store it.