HydrogenAudio

Lossy Audio Compression => Opus => Topic started by: tousealypo on 2021-10-21 01:37:36

Title: Android music players that support Opus and R128 gain
Post by: tousealypo on 2021-10-21 01:37:36
As far as I'm aware, there aren't any. I know PowerAmp doesn't apply album gain[1] and Vanilla music doesn't apply it if the gain is negative[2].

[1]: https://forum.powerampapp.com/topic/19629-album-gain-not-being-applied-with-opus-files/
[2]: https://github.com/vanilla-music/vanilla/issues/982
Title: Re: Android music players that support Opus and R128 gain
Post by: marc2k3 on 2021-10-21 05:39:30
You might look at gonemad. It mentions r128 support being added in an old changelog.

http://gonemadmusicplayer.blogspot.com/2018/12/its-been-awhile-since-ive-posted-update.html

https://play.google.com/store/apps/details?id=gonemad.gmmp&hl=en_GB&gl=US
Title: Re: Android music players that support Opus and R128 gain
Post by: kC_ on 2021-10-21 11:20:17
not sure if it does or not, but my fav android audio player is musicolet very slick... free.. no ads.... advanced...
you could try emailing the dev musicolet {at} krosbits.in

https://krosbits.in/musicolet/

https://play.google.com/store/apps/details?id=in.krosbits.musicolet&hl=en_GB&gl=US
Title: Re: Android music players that support Opus and R128 gain
Post by: bilbo on 2021-10-21 15:52:18
I also recommend GoneMadMusicPlayer. If you are into customized playlists, GMMP has the most extensive list op options that I Have Found So Far!
Title: Re: Android music players that support Opus and R128 gain
Post by: amariami on 2021-10-21 18:05:14
Neutron Music PlayerSpoiler (click to show/hide)
If you are aware of compatibility and bored about changing configuration settings in every music player, just want to play you could use EZ CD paid/trial version

Title: Re: Android music players that support Opus and R128 gain
Post by: For Serious on 2021-10-22 17:45:43
Here's another recommendation for GoneMAD Music Player. I haven't used the R128 gain personally on it, but that's because I do it with dBpoweramp when converting my music to opus for the android player. That being said. I have a list of songs that need to have the gain applied by album instead of song, and I have to manually do them different.
GoneMAD has the option to prefer album replay gain, and it does its own scan to find replay gain levels.
Title: Re: Android music players that support Opus and R128 gain
Post by: dutch109 on 2021-10-23 11:00:15
GoneMAD Music Player and Foobar2000 Mobile both support R128 gain tags in Opus files.
Title: Re: Android music players that support Opus and R128 gain
Post by: tousealypo on 2021-12-03 07:19:56
GoneMAD Music Player and Foobar2000 Mobile both support R128 gain tags in Opus files.
After some preliminary tests with GoneMAD, I think you're right. This is great news. I will try Foobar2000 mobile too, though I never liked the interface.
Title: Re: Android music players that support Opus and R128 gain
Post by: Musique-Rabbit on 2021-12-03 10:25:36
Both PC and Android versions of foobar2000 are the top choices in my opinion.
Title: Re: Android music players that support Opus and R128 gain
Post by: Coreda on 2023-08-27 12:37:52
Since this topic appears in search results just thought I'd add that Auxio (https://f-droid.org/en/packages/org.oxycblt.auxio/) (open source) supports Opus with R128. Only caveat currently is an upstream issue with ExoPlayer (Android's native framework) that parses Opus gain at 5dB less than the spec but the dev is working on an independent fix (https://github.com/OxygenCobalt/Auxio/issues/521).
Title: Re: Android music players that support Opus and R128 gain
Post by: ChristianK on 2024-01-27 11:09:25
It is kinda insane that it is now 2024 and still the only major player I can think of that does Opus R128 replaygain right is Foobar2000.
Foobar2000 for android is great for listening but there is no search in playlists so I would prefer VLC to support Opus replaygain properly.

The problem is not confined to just mobile, the desktop too still is lacking.
On the Linux desktop I think the only major player that does it right is... Foobar2000 in Wine.
Maybe some other smaller player also can do it, like Deadbeaf, but I have not checked that one lately.

For Linux more or less everything is based on Gstreamer, which of course does not properly do EBU-R128. Fixing that would fix a lot of players.
Strawberry (Clementine fork) now even has an internal EBU-R128 normalization feature, I guess to workaround the issue of libraries and codecs doing their own things in slightly different ways. But it needs to scan all the files in the library which is too slow and ridiculous because we should have working replaygain tags for that.

Opus is a great codec and standard, but I'm starting to feel that coupling EBU-R128 with Opus replaygain was a big mistake.
Unfortunately another example of how the technically inferior but simpler implementation often leads to better results if there are 2 or more competing options in the market.

So please lord, send someone competent to have a look into these bugs before RFC7845 turns 10 years old:
- https://code.videolan.org/videolan/vlc/-/issues/27176
- https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1645

Maybe another approach must be taken?
Like making EBU-R128 work for all codecs?
Or maybe taking a step back and making Opus support both the old replaygain method and the new EBU-R128?
I'm far from an expert and probably have not looked into the details thoroughly enough, and sorry for the rant but having replaygain work properly across all major codecs in all the major players should not be this difficult.
Title: Re: Android music players that support Opus and R128 gain
Post by: shadowking on 2024-01-27 14:09:55
You could use 'hard-wired' + tag based replaygain as i do with mp3 via the fb2k converter. This changes the volume directly vs only tag method.
Any RG un-aware players are supported this way. An aware player can still use tag metadata if present.

Using the album mode I can't find any issue so far.
Title: Re: Android music players that support Opus and R128 gain
Post by: ChristianK on 2024-04-14 19:08:20
Looks like the best workaround for players without R128 gain support is to violate the spec and also add the regular replaygain 2.0 tag.
That way native R128 gain is supported (foobar2000 and some others) but also replaygain 2.0 as a fall back (all the other players).

The way I  do it is to first add replaygain 2.0 tags with rsgain (that tool is pretty complex for its task and a pain for mass tagging though, so I have to couple it with gnu parallel to get multithreading.)
Afterwards I add the R128 tag using r128gain (because rsgain cannot ignore the conflicting replaygain tag and Foobar doesn't accept the 2.0 tag, beware though since r128gain is no longer supported).

That way replaygain works for VLC and Foobar2000 on Android, and also for Strawberry on Linux (or any other gstreamer based player), and Foobar desktop.

Info on rsgain: https://github.com/complexlogic/rsgain?tab=readme-ov-file#opus-files
Quote
In my opinion, the authors of RFC 7845 totally overstepped their authority by specifying a format-specific loudness normalization method. Particularly egregious is the specification of a target loudness level. There is no one-size-fits-all solution for target loudness. The best value depends on the dynamic range of your music, which tends to vary by genre. Moreover, most people do not have a music library comprised entirely of a single audio format, so format-specific loudness normalization methods are inappropriate. Having Opus files play back 5 dB quieter than all other file types defeats the purpose of applying ReplayGain.

Quoted for truth. Having special standards for special cases that hardly anyone gets right is way worse than having an unofficial less than ideal standard that happens to just works across the board. Looks like we won't get the former anytime soon and because the special treatment is mandated the latter also no longer holds.
It is really sad that there have been discussions on mailing lists about this exact issue going back to 2012.
Apparently no one cares enough to finally get this settled out.
Title: Re: Android music players that support Opus and R128 gain
Post by: jaybeee on 2024-04-14 19:39:38
The way I  do it is to first add replaygain 2.0 tags...
Afterwards I add the R128 tag using r128gain
or just add ReplayGain tags using foobar and apply the gain to the actual files. Only works with lossy files (afaik) and maybe only do this to files you use purely for portable listening usage.
Title: Re: Android music players that support Opus and R128 gain
Post by: shadowking on 2024-04-15 11:35:48
The way I  do it is to first add replaygain 2.0 tags...
Afterwards I add the R128 tag using r128gain
or just add ReplayGain tags using foobar and apply the gain to the actual files. Only works with lossy files (afaik) and maybe only do this to files you use purely for portable listening usage.
+1    Also works for lossless.  I do it on all lossy files not just for portable. album gain +  clip prevent. Can't find a fault yet and a reason to not do it (lossy).
Title: Re: Android music players that support Opus and R128 gain
Post by: john33 on 2024-04-15 12:35:42
+1    Also works for lossless.  I do it on all lossy files not just for portable. album gain +  clip prevent. Can't find a fault yet and a reason to not do it (lossy).

Exactly what I do, too.
Title: Re: Android music players that support Opus and R128 gain
Post by: jaybeee on 2024-04-15 15:05:53
or just add ReplayGain tags using foobar and apply the gain to the actual files. Only works with lossy files (afaik) and maybe only do this to files you use purely for portable listening usage.
+1    Also works for lossless.  I do it on all lossy files not just for portable. album gain +  clip prevent. Can't find a fault yet and a reason to not do it (lossy).
In foobar I don't see the option to Apply gain to file content ... with FLAC files. Should that option be there via the ReplayGain context menu?
Title: Re: Android music players that support Opus and R128 gain
Post by: Bogozo on 2024-04-15 16:02:53
In foobar I don't see the option to Apply gain to file content ... with FLAC files. Should that option be there via the ReplayGain context menu?
Applying gain to lossless is possible only on re-encoding. fb2k's converter has option to apply ReplayGain on conversion. It is irreversible, of course. Unlike "Apply gain to file content" for mp3 and m4a which can be losslessly (i.e bit-perfect) reverted.
Title: Re: Android music players that support Opus and R128 gain
Post by: shadowking on 2024-04-15 16:50:05
In foobar I don't see the option to Apply gain to file content ... with FLAC files. Should that option be there via the ReplayGain context menu?
Applying gain to lossless is possible only on re-encoding. fb2k's converter has option to apply ReplayGain on conversion. It is irreversible, of course. Unlike "Apply gain to file content" for mp3 and m4a which can be losslessly (i.e bit-perfect) reverted.

That's no problem IMO for lossy codecs. In fact its even better since any codec and any player in existence will work . In my case
album mode . But it can go even further; You can add RG tags that aware apps can use. Also with mp3 your not limited to 1.5db steps so more accurate .
Title: Re: Android music players that support Opus and R128 gain
Post by: jaybeee on 2024-04-15 17:50:43
ahhh thanks @Bogozo - I had never seen that option in the 20 years of using it lol
Title: Re: Android music players that support Opus and R128 gain
Post by: ChristianK on 2024-04-15 18:29:03
https://wiki.hydrogenaud.io/index.php?title=Foobar2000:ReplayGain_Scanner:Alter_File_Content
Quote
In foobar2000 v1.4, a similar feature to "alter file content" was introduced for Opus files. However, it does not alter the entire audio stream, it alters Opus header gain value

Right. Also should be a pretty nice workaround.
I thought this was changing the audio but for opus that is not the case.
However, I prefer not to use Foobar if possible because it is Windows-ish only (but rsgain could also do this), and using the header gain for this somehow feels a bit dirty.
But it would be spec compliant. Hmm.