rsgain
rsgain copied to clipboard
Writing both opus tags
Hello,
Would it be possible to add support to writing both replay gain opus tags, so both ReplayGain tags (d mode) and R128_*_GAIN tags (r/s mode) would be written?
In my case, I want to play my music files on two different players, one supports one kind of tag on other supports the other kind of tag.
Thanks.
This is currently not possible. You have to pick one tag format or the other.
The third option is to write to the header gain. That will ensure that all players will apply the gain, but you don't have the option to dynamically switch between album gain and track gain.
Header gain is also not ideal for me, because fallback gain (for tracks without replay gain) is not working then (it considers all Opus tracks as not having replay gain data and it applies fallback gain). I'm using very low fallback gain to detect tracks in my collections that have missing replay gain data, so I would loose this ability.
Any chance this could be added in?
I'd like this too. It is pretty much the only way to get opus replaygain with all players. It is a bit hacky but IMO still more appealing than the header gain method.
Perhaps consider to have an option to not strip the conflicting replaygain tags? Then it would be a matter of running rsgain twice with the different opus tagging options for those that want to go this route.
That sounds more convenient than running two separate gain tagging tools to get both types of replaygain tags for opus.
This is currently not possible
Is this "not possible" as in "this isn't implemented, we'd accept a PR" or as in "there's some deeper reason why this can never work/is a bad idea"? Because I have two players which each support exactly one of the header formats, and I think I'd rather have both tags than messing with the header gain.
Hello,
This can be done. IMHO, this is indeed the better option to accommodate both players that respect strictly the OPUS RFC, using R128 tags at -23LUFS and other player that still stick to the RG headers. I’m not fond of hacking with the opus header gain too that brings other problems too.
I did a quick and dirty patch to test this: https://github.com/casta/rsgain/commit/f74dc0b0c1d4f00219391a1b5e6bd4b1bf9d03c4 I’m quite happy with it, even it’s taking some shortcuts. I’m using it with this profile:
[Global]
TagMode=i
Album=true
# keep a default of -18LUFS, R128 tags will be converted to -23LUFS with custom patch
TargetLoudness=-18
ClipMode=a
MaxPeakLevel=0
TruePeak=true
Lowercase=false
ID3v2Version=keep
OpusMode=r
PreserveMtimes=false
DualMono=false
It seems like having both tag formats would be nice. "easy" mode should be easy, but it doesn't work with MPD as is and may cause hours of confusion. I was especially confused as rsgain custom --opus-mode=s file.opus would not replace existing replay gain tags with the R128_TRACK_GAIN as I would have expected (maybe a bug?).
Would there be a drawback to having both tags?
See also https://github.com/MusicPlayerDaemon/MPD/issues/2055#issuecomment-2211164742 for the refusal from MPD's side to implement regular ReplayGain tags for Opus tags, because it's not standard.
I'd like a way to just write the R128_* tags without removing the REPLAYGAIN_* ones. I'm converting with gstreamer to opus and it keeps my FLACs replaygain tags and I would like rsgain to just write the R128 ones without deleting the REPLAYGAIN_* ones :/