-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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: R128_{TRACK,ALBUM}_GAIN in Opus #2557
Comments
Hi! That plugin in meant to work in a backend-agnostic way: it computes gain adjustments using any analysis tool and stores normalization results in a common format. I guess I don't quite understand why the Ogg Opus encapsulation standard's recommendation forbids other gain formats working also—is there a general reference for that idea aside from the MPD behavior? If it make sense, we could consider using the R128 name too to maximize compatibility. |
To quote the linked RFC:
There's also this message on the mailing list:
I'm not sure if you mean adding both for every format or just Opus. I think the R128_ tags are Opus specific (again taking MPD as a reference and some light research) and thus make no sense in any other format. On the other hand adding both to Opus could potentially confuse badly written players (or just not following the spec) that accept both tags (as warned in the RFC). |
Ah; thank you for pulling out both of those! About dealing with this specific recommendation: Our tagging formats don't currently have any sensitivity to the underlying audio codec. That is, anything that uses Vorbis Comments gets tagged the same way. I get the sense that this would preclude implementing the right RFC-recommended policy here, yes? It's also worth considering tools that do support Finally, the plugin can use multiple backends to compute normalization values. Would we be breaking the spec if we used |
Again, quote from the RFC:
which leads me to believe that using a replaygain backend and the values it produces indeed breaks the spec. It is also worth noting that the
I do not know how other popular players besides MPD handle the Opus tags, but seeing as they are a fairly recent addition to the spec I'd expect at least some of the players to support Maybe a solution would be to create a new |
Got it; thanks! This really clarifies what we should do. In general, I think we should probably pay closer attention in the plugin to the various standards and their corresponding tag storage formats. If this means separating the RG tags from new R128 tags everywhere in the beets interface, we should do that—and code choose which they want to fill. I lean toward accomplishing this in one plugin, since I imagine that most of the infrastructure will be shared… but I definitely see why the two-plugin arrangement might make sense too, given the mounting stack of special cases. |
Also ignore peak tags since Opus does not support them. See also: - https://datatracker.ietf.org/doc/html/rfc7845#section-5.2.1 - https://github.com/orgs/audacious-media-player/discussions/101 - audacious-media-player/audacious#1138 - https://github.com/Moonbase59/loudgain?tab=readme-ov-file#how-i-handle-opus-opus-audio-files - beetbox/beets#2557 Co-authored-by: Almoped <[email protected]>
The replaygain plugin using the bs1770gain backend with EBU method produces four REPLAYGAIN_ tags with Opus files. This is wrong, as it should only add two tags, R128_TRACK_GAIN and R128_ALBUM_GAIN, as described in the RFC. For example MPD only looks for the track gain tag and ignores any REPLAYGAIN_ tags (as it should). This obviously makes the replaygain plugin broken when used with Opus.
The text was updated successfully, but these errors were encountered: