mopidy / mopidy-spotify

Mopidy extension for playing music from Spotify
https://mopidy.com/ext/spotify/
Apache License 2.0
934 stars 108 forks source link

Volume normalization not working #326

Closed PhilippJust closed 2 years ago

PhilippJust commented 2 years ago

Hello,

I am running mopidy with this extension on a raspberry pi with raspbian. The extension was installed using the package manager. My version is 4.1.1-0mopidy1 Although sudo mopidyctl config shows me that volume_normalization is enabled, there are still drastic differences in perceived loudness when playing playlists that contain various albums.

It would be really nice to have normalized volume especially when you have playlists that span decades where different mastering approaches were dominating music industry.

Best regards

Philipp

kingosticks commented 2 years ago

Does volume_normalization do anything at all? I can't say I have ever used it myself. We pass that option straight through to libspotify which is supposed to handle it. It's not a surprise it does a bad job, sadly. However, I know Spotify have changed their algorithm/settings over the years so if libspotify is expecting the old one it could explain why it sounds bad.

With non-Spotify tracks the gain data would be available in the track metadata tags and in theory (never tried) you could use the dedicated GStreamer element(s) to do this. Unofrtunately that data is not available for Spotify tracks, libspotify simply doesn't expose it. So I don't think there's anything we can do about this other than maybe try something like this. The 3s lookahead doesn't sound great but if that helps at all please report back and let us know.