-
Notifications
You must be signed in to change notification settings - Fork 282
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
Update ReplayGain functionality #96
Comments
"R128GAIN is a FFmpeg and SoX based EBU R128 compliant loudness scanner." IMHO it's too heavy for flac / metaflac. Also, abandoned? (last update was in 2014). libebur128, on the other hand, looks compact enough. |
Since EBU R128/ITU-R BS.1770 are the better (and agreed-upon standard) algorithms for loudness calculation, and even ReplayGain v2 uses these nowadays, I’d propose to add these. Probably the old ReplayGain v1 algorithm (and the --add-replay-gain option) could be kept a while for backwards compatibility. Since bs1770gain and others re-use the "old ReplayGain tags" BUT add "LU"/"LUFS" as a unit (instead of "dB"), there should be a means to set the desired unit. We’d need a possibility to set the desired loudness target, too: EBU R128 (Europe) use -23 LUFS and gating, ATSC A/85 (USA) use -24 LUFS and no gating, and ReplayGain v2 uses -18 LUFS (for compatibility reasons, assumed to be about the same as the old 89 dB reference level). In theory, there could be 3 "modes" like "ebu", "atsc" and "replaygain" using the exact same loudness code and generating tags like these (example from my tests) — or just specify the intended loudness target (like -18.0, -23.0 or -24.0 LUFS). EBU: ATSC: REPLAYGAIN: If defaults are needed, I’d suggest using EBU 128 (BS.1770-2 or newer, -23 LUFS target, gating), because these turn out to be most widely used. ATSC A/85 was mainly intended for HD TV anyway, if I remember correctly. There have been some changes in the BS.1770 specs over the years, I’d recommend using at least BS.1770-2 (Gate 10) or BS.1770-3 (some filter added, I forgot which). Side note: EBU R128/ITU-R BS.1770 are clearly the better algorithms for loudness perception, and also use less computing power. They tend to "punish" modern overcompressed (mostly Pop/Metal/Rock) productions as well as overcompressed commercials. The overall experience is much more pleasing, although some might need to get used to the now "quieter" Pop/Rock/Metal albums. Eventually, this might end the notorious "loudness wars" (I hope) and stop producers from compressing everything to death just in order to be perceived "louder" than the competition (und thus losing beautiful detail!). So YES, I agree with the TO and very much hope this can be done. In the broadcasting world, we use it for so many years now, there are tools that support it alreday (bs1770gain, ffmpeg) and I strongly support the notion to also "have it in the original place" (FLAC, Xiph)! See also: http://bs1770gain.sourceforge.net/ |
And all existing players won't be able to recognize these tags. Why break backward compatibility? It's totally unnecessary IMHO. |
That’s actually not true—many are moving with the times. Professional broadcasters and playout systems use this STANDARD for a long time now. Software like Audacious, Foobar2000, ffmpeg and IDJC already support this, just to mention a few. It’s more a question like »Why use fb2k or bs1770gain instead of native tools?«. I strongly feel there IS a need to adopt newer standards (it can easily be done WITHOUT breaking backwards compatibility). Technological innovation (and worldwide standards) are important—had we been closing our eyes to progess forever, we wouldn’t have Linux, for instance, or even the beautiful FLAC format! :-) |
My post was not about algorithms, but about tags. |
That’s why I suggest having a "replaygainv2" mode that still uses "dB" instead of "LU"/"LUFS". I do agree that it’s still necessary to have a mode that uses the new algorithm but still keeps the old tag format (like, for instance, desbma’s r128gain). |
I made my own "loudgain" in the meantime (uses libebur128), maybe you want to pick up some ideas. It’s far from perfect but perfectly fits our needs. |
I've always felt like having replaygain scanning and tagging is a bit out of the scope of |
I support updating the algorithm, or at least adding R128 as an option, but don't see why the tag format should change. http://wiki.hydrogenaud.io/index.php?title=ReplayGain_2.0_specification says to keep the tag format as-is. |
Why waste time with Metaflac when you have such an amazing tool as Xrecode3, which, apart from converting anything to anything (audio), can analyse and tag (or apply to the audio samples) any output file (1–6 channels) with ReplayGain (album and/or track), EBU-R128, or (what he calls "Loudness Normalization") EBU-R128 with dynamic clip-limiting? [Some (mostly classical) multi-channel SACDs I've ripped, when scaled using EBU-R128 cause clipping, so I now always use the Loudness Normalization method for Mch SACDs.] [Not associated with Xrecode3; just a huge fan!] Daniel |
I agree Perhaps the simplest is to leverage libebur128 and add a parameter |
There is a tool to scan FLAC files here: https://pypi.org/project/r128gain/ and https://github.com/desbma/r128gain Anyone is welcome to supply a patch to implement this directly into |
The metaflac tool allows users to update their flac files with REPLAYGAIN_* tags. The support offered by metaflac is lacking:
Over time there have been advances in loudness algorithms and even a well-adopted standard has come about called "ITU BS.1770-4" a.k.a. "EBU R 128" and a few tools have been created that follow this standard.
I'm creating this issue to update metaflac because most users and even some software (Soundkonverter) uses metaflac's replay gain functionality. Updating it here will benefit everyone.
Would this project be willing to adopt an EBU R 128 library and switch metaflac to use it?
The text was updated successfully, but these errors were encountered: