MPD icon indicating copy to clipboard operation
MPD copied to clipboard

Better Opus ReplayGain support

Open nullobsi opened this issue 1 year ago • 2 comments
trafficstars

Feature request

Hi,

Currently the support for ReplayGain for OPUS files is limited to the ReplayGain tags and OGG headers from the OPUS spec. For various reasons, I decide not to use those tags and instead use the generic REPLAYGAIN_ tags.

I would like to be able to use these tags for my library, which can probably be done by prioritizing one tag over the other and falling back when needed. I've attached a shitty little hacky patch I made that seems to make it work just with REPLAYGAIN_ tags.

Thank you replaygain.patch

nullobsi avatar May 31 '24 06:05 nullobsi

I'm not convinced that this is a good idea or even useful.

MaxKellermann avatar May 31 '24 07:05 MaxKellermann

https://github.com/complexlogic/rsgain?tab=readme-ov-file#opus-files

The RSgain utility has some reasoning behind why you might prefer REPLAYGAIN_ tags over the R128_ tags for Opus (by default it writes REPLAYGAIN_ tags). I think a sane decision would be to prefer the R128_ and OutputGain over the traditional REPLAYGAIN_ tags to preserve the previous behavior, but also make it better for those (like me) who have Opus libraries with REPLAYGAIN_ tags.

I can draft a PR with better code quality than the hacky patch I made sometime soon.

nullobsi avatar May 31 '24 17:05 nullobsi

Just use RFC mode if you insist on using that tool.

MaxKellermann avatar Jul 05 '24 16:07 MaxKellermann