slimserver icon indicating copy to clipboard operation
slimserver copied to clipboard

Support for pre-gain for files with ReplayGain tags

Open thenktor opened this issue 1 year ago • 0 comments

Hi,

most audio players can set a pre-gain to files with ReplayGain tags. This basically changes the desired target loudness without retagging the files.

For infos on ReplayGain and target loudness you can have a look at rsgain's documentation, especially on the target loudness part.

ReplayGain uses a default target loudness of -18 LUFS, which compared to other streaming services or radio stations is quite low. This happily blows you ears when switching from Lyrion playback to e.g. Youtube set to 100% volume in the browser.

As a side effect there are issues with integrated playback hardware, e.g. TWS ear phones or bluetooth speakers. The maximum volume just misses a few dB because this stuff is engineered for target loudnesses of -14 or -12 LUFS. On a traditional amp you just turn up the volume knob a bit more and you're done. On the bluetooth stuff that is not possible.

To get around those issues you can:

  1. Recalculate ReplayGain tags for the whole library with a new target loudness
  2. Use a pre-gain setting in the player to change ReplayGain tags "on the fly" at playback
  3. Some tag tools set a REPLAYGAIN_REFERENCE_LOUDNESS tag. Value e.g. -18 LUFS. So a player even could have a target loudness setting (e.g. -14 LUFS) and recalculate the applied loudness based on existing tags.

For reference, here is a link to mpd's ReplayGain settings: https://mpd.readthedocs.io/en/latest/user.html#replay-gain

If ReplayGain is enabled, then the setting replaygain_preamp is set to a value (in dB) between -15 and 15. This is the gain applied to songs with ReplayGain tags.

And foobar2000 settings: 40-Screenshot_ReplayGain

thenktor avatar Dec 10 '24 07:12 thenktor