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: Opus ReplayGain/Normalization on fb2k iOS mobile 1.5.2 (Read 1284 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Opus ReplayGain/Normalization on fb2k iOS mobile 1.5.2

Running foobar2000 mobile 1.5.2 on iOS 17.5.1 and have opusenc encoded files, which means that the files have:
-RG REPLAYGAIN_ALBUM_GAIN converted to Opus internal playback gain
-RG REPLAYGAIN_TRACK_GAIN converted to R128_TRACK_GAIN
-RG peak data discarded (?)
as per opusenc default behavior if you pass it a RG-tagged FLAC.

Unfortunately, it seems like since fb2k iOS 1.5.x this behavior has switched to "apply R128_TRACK_GAIN no matter what setting" if ReplayGain normalization is turned on, so the default "Source mode: Album/Processing: Gain" settings yields effectively Track Gain being applied, not Album Gain. Also, if RG is turned off, it ignores the Opus internal playback gain, yielding the original volume of the track (is this intended behavior?).

Unfortunately, this means that there is no way to apply opusenc encoded opus files' default "album gain even if player is not RG-aware" as any RG setting will yield track gain - is there a way the behavior could be returned to the old "Album gain for opusenc encoded opus files if Album gain is selected"? Thanks.  :D

Re: Opus ReplayGain/Normalization on fb2k iOS mobile 1.5.2

Reply #1
Quick summary: Currently, setting ReplayGain ON for any setting on foobar2000 mobile applies Track Gain only, and ReplayGain OFF disables normalization including opus' internal one, no way to get Album Gain applied.

The only workaround I've found so far was to use ffmpeg to transcode Opus (as it ignores input file RG tags), then write normal RG tags onto the encoded file, however that comes with its own caveats (e.g. ffmpeg doesn't support embedding album art into opus files)

Reading the following threads:
http://www.hydrogenaud.io/forums/index.php?showtopic=104878
http://www.hydrogenaud.io/forums/index.php?showtopic=108311

It seems that the default opusenc behavior w.r.t. RG turned into R128 is intentional but different RG by default. Setting Album Gain for opus files managed to work fine in earlier versions, can this be fixed for current foobar2000 mobile? Thanks  :D

Re: Opus ReplayGain/Normalization on fb2k iOS mobile 1.5.2

Reply #2
This is not foobar2000 mobile related. Your files are missing Album based gain tag, which should be stored in tag field R128_ALBUM_GAIN. If you look at your files for example with desktop foobar2000 you'll see that ReplayGain album gain field is empty.
ReplayGain specs state that if the other gain field is empty the correct behavior is to use the other gain value, so ReplayGain-wise things work exactly as expected.

Back in the super early Opus days before there was R128_ALBUM_GAIN tag the header gain worked as an album gain fallback in this scenario. But not anymore as there is a proper tag for it now.

It is intentional that when ReplayGain is off the header gain is ignored against the specs. The user has to have the power to get the original signal level out from any audio format.

Easiest fix for you issues, if you insist on using Opus, is to ReplayGain scan the files in foobar2000 so they get all the gain related tags.