Opus files distort/clip in peaks

Just use the RG2 normalization for the Replay gain in the settings ?

Yes but when I listen in the car and switch from my replaygain tracks to lets say Spotify, I often times get blasted by volume jump :slightly_smiling_face:

Yes i’m using replay gain 2.0. Set to - 18 LUFS. It is quieter than other apps. My ā€œsolutionā€ is that i’m not using spotify or other streaming services at all. On my samsung phone, i have sound assistant installed through good lock. It allows me to mix the volume of each app i use. So if i had that problem that’s what i would do use to lower the volume of other streaming apps. OT but also allows multiple apps to play audio at the same time which is nice.

@Celorien Interesting. What happens when the original file is in flac? For me rsgain runs on the source files, then afterwards navidrome transcodes. Not sure if any additional RG tagging is done at that point. I haven’t looked into it properly but i have not noticed a drop in volume when switching from direct streaming flac and transcoding opus.

If the source is FLAC, that means the replay gain values are written for a FLAC file. So it makes sense to me that there would be no change in volume.

The change only happens because the tags are written differently. Some players assume that OPUS files are written with the lowered LUFS-target, and will automatically add +5db to try to keep everything at the same level. (Seems like that is not enabled in your setup, else the OPUS transcoding would actually be louder than the FLAC.)

I see, thanks for that. So is the flac RG tag being translated to ā€˜R128_*****_GAIN’ when the transcoding happens? Or can opus instead transfer and store the ā€˜REPLAYGAIN_****_GAIN’ tag if the source (flac) already has it?

Your link says the two methods are incompatible with each other put not quite sure what that means yet.

I can’t say for certain, but my understanding is that none of the tags should change when transcoding the file. (I would hope the metadata in-general is handled separately from the audio stream anyway.)

At the end of the day, Replay Gain is just another tag–not really different from Title and Artist. The value of the field is just something that probably isn’t human-readable.

OPUS can indeed hold the standard REPLAYGAIN format tags–and the rsgain2.0 software supports the option to write them as such.

Assuming both format of replay gain tags are written with the same LUFS target, I think the resulting audio should be the same. The only difference would occur if, as I said earlier, the player is set to add +5db gain compensation for the R128 format tags.

(But again, I haven’t messed with this stuff too much myself, so don’t trust everything I say :laughing: )

1 Like

Incompatible in the sense that, if your player supported only ā€œReplay Gain,ā€ the OPUS’s format-specific R128 tags would not be used at all.

The idea is the same, but it’s executed completely separately from standard Replay Gain. (At least, that’s how I understand it.)

1 Like

@Celorien Thanks for the clarifications. Good to know how it functions even though i wasn’t having a problem with it. :slight_smile:

1 Like

They are 2 different methods. R128 uses LUFS model for normalization which also takes into account perceptual loudness vs Repalygain which looks at a target db and measures from there.

From my experience, you can have either tags for FLAC and symfonium will pick them up even when trasncoding because all it looks for is the tag there, yes = apply value no = continue, just dont have both tags there like I did for some files. :smiley:

Here is that issue I had with double tags if you want to do some more reading :slight_smile:

Nice. Now I remember a problem I had months ago where my opus (source) files would play back way quieter than my flac files. Must have been playing back 5 dB quieter. They were flac originally, so I bet they had double tags as well. I ended up just replacing all opus files with flac when I built my server.

I’m a sound engineer, so im aware of R128 /LUFS and perceptual loudness. But really great to get some more insight into how different codecs handle these tags! Thanks!

1 Like

Nice. Being a sound engineer definitely explains the good taste in Music :wink:

Btw. If you haven’t listened already. Clark is also great artist for weird electronic music.

1 Like

Haha thanks. Yes I listen to Clark too. Haven’t listened to his new album yet but was planning to soon, maybe today. Clarence Park is great.

I also write music, and ofc aphex twin, boards of canada, autechre etc are huge inspirations. But also do my research and in turn listen to their Inspirations :slight_smile:, and other stuff. The goal has always been to have my own sound.

1 Like