Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Replaygain Questions (Read 3263 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Replaygain Questions

Hello all,

I have read several threads about how Opus uses its own sort of "internal" type of loudness normalization. Not sure that I really have a grasp of how it works, so I still have two questions:

1) Using Foobar converter to encode Opus files from FLAC files that contain Replaygain tags, I am telling Foobar to Replaygain scan the Opus files after conversion, using the Album mode, and add Replaygain tags to the Opus files. The Opus files would be played only in Foobar for now, but possibly in some other player in the future. Is there any advantage/disadvantage to doing the conversion this way?

2) When replaying these files in Foobar, under the "Playback" preferences, should the "apply [Replay]gain" option be turned on or off to get the correct loudness? Does the Opus decoder automatically apply its own gain so that this switch doesn't need to be turned on?

Re: Replaygain Questions

Reply #1
Last time I looked foorbar2000 followed the old-ish draft Opus spec:
- in album mode, the album gain goes into the Opus output gain field and a delta between that and any track gain into the R128_TRACK_GAIN tag;
- in track mode, the track gain goes into the output gain field and zero goes into the R128_TRACK_GAIN tag.

Playback will then automatically apply either the album gain or the track gain, whichever is in the output gain field. You can optionally also apply a track gain if it is present. Beats me how you can control any of this at playback since it is almost impossible to know whether the output gain value is an album gain or a track gain.

Or maybe fb2000 has adopted the newer spec and R128_ALBUM_GAIN tag?

Re: Replaygain Questions

Reply #2
Since Version 1.3.11 Foobar2000 has a setting that lets the user choose how ReplayGain will be saved.

Advanced -> Tagging -> Opus -> Header Gain.

It defaults to the old behavior described above. When "Leave null" is selected, both album gain and track gain are saved relative to no adjustment in the header gain (Foobar itself reports that header gain is +5, when actually it is 0). R.128 gain tags are automatically translated into ReplayGain values by Foobar and used during playback.

Re: Replaygain Questions

Reply #3
Thank you both for responding. To quote j7n, "R.128 gain tags are automatically translated into ReplayGain values by Foobar and used during playback." Does this mean that the player will always apply the correct gain during playback, and the "apply [Replay]gain" option under Playback preferences can be left at "none"? I ask because this option definitely makes a difference in volume when playing the Opus files.

Re: Replaygain Questions

Reply #4
If processing is set to "none", Foobar shouldn't apply any gain. Opus specific normalization is only different in that it prescribes its own field names and reference level; the adjustment is enabled and disabled in the usual way.

If you want to use loudness normalization only in Foobar or other software that has support for the R128 tag fields, in my opinion the least confusing choice is to select "leave null" option. Then the adjustment will be written and read from from R128_ALBUM_GAIN and R128_TRACK_GAIN. To force normalization to be used in other players, select either of the other choices. The downside from doing this is that opus files will play quiet as a mouse in other software because the R128 reference level is 5 db lower, and the levels reported in the properties window won't reflect what other software sees.

To update the format in which ReplayGain values are stored, I think, the files need to be scanned again.

Re: Replaygain Questions

Reply #5
I agree. The new "leave null" option will work best for playback in conjunction with the options for album or track mode, at least for players that understand both the R128_ tags.