mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 00:05:55 +03:00
[GH-ISSUE #1643] [connect] Inconsistent volume normalisation in "album" mode #746
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#746
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jenzd42 on GitHub (Nov 17, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1643
Description
Using the options "--enable-volume-normalisation --normalisation-gain-type album" should play albums at a consistent volume level, i.e. prevent volume jumps between tracks. This does not seem to work, however. An example where this can clearly be noticed are the first two tracks of the album "Opeth - Sorceress":
Without volume normalisation, there is clean transition between "Persephone" and "... Sorceress" at a similar volume level. With volume normalisation turned on (album gain), the second track starts with a substantially lower volume.
Version
At least since version 0.6.0 up to the current version 0.8.0
How to reproduce
Steps to reproduce the behavior in librespot e.g.
librespotwith '--enable-volume-normalisation --normalisation-gain-type album'Host (what you are running
librespoton):@roderickvd commented on GitHub (Nov 17, 2025):
To diagnose, what happens if you set it to track mode or leave it at auto?
Also please provide a verbose log so we can see what it’s doing.
@jenzd42 commented on GitHub (Nov 17, 2025):
I have tried track and auto as well. All settings lead to the same volume jump between the tracks. I have also seen no obvious difference in the logs between theses settings. The interesting parts are probably:
Track 1 (Persephone):
[2025-11-17T22:14:43Z INFO librespot_playback::player] <Persephone> (112866 ms) loaded [2025-11-17T22:14:43Z WARN librespot_playback::player] This track may exceed dBFS by 2.42 dB and be subject to 4.42 dB of dynamic limiting at its peak. [2025-11-17T22:14:43Z DEBUG librespot_playback::player] Normalisation Data: NormalisationData { track_gain_db: 2.4226226806640625, track_peak: 0.68017578125, album_gain_db: 2.4226226806640625, album_peak: 0.68017578125 } [2025-11-17T22:14:43Z DEBUG librespot_playback::player] Calculated Normalisation Factor for Album: 132.17%Track 2 (Sorceress):
[2025-11-17T22:16:08Z INFO librespot_playback::player] <Sorceress> (349093 ms) loaded [2025-11-17T22:16:12Z TRACE librespot_core::dealer] Sent ping [2025-11-17T22:16:12Z TRACE librespot_core::dealer] Received pong [2025-11-17T22:16:37Z DEBUG librespot_connect::state::tracks] finished filling up next_tracks (14) [2025-11-17T22:16:37Z DEBUG librespot_playback::player] command=Load(SpotifyUri("spotify:track:5mY8mY7DSfuqVbY2psq3Cg"), true, 0) [2025-11-17T22:16:37Z DEBUG librespot_playback::player] Normalisation Data: NormalisationData { track_gain_db: -8.277918815612793, track_peak: 1.036327600479126, album_gain_db: -8.277918815612793, album_peak: 1.036327600479126 } [2025-11-17T22:16:37Z DEBUG librespot_playback::player] Calculated Normalisation Factor for Album: 38.56%So the album normalisation values are equal to the track values (and both differ between the tracks). Which is consistent to the audible volume jump. I would have expected different track values but the same album values for both tracks.
@roderickvd commented on GitHub (Nov 17, 2025):
Yes that also stands out for me. I’m traveling now so can’t check myself, but is it any different for you on other albums?
@jenzd42 commented on GitHub (Nov 17, 2025):
Now that I know what to look for: It's actually different between albums, e.g.:
Pink Floyd - The Division Bell => same album gain for all tracks => no volume jumps
Pink Floyd - The Dark Side Of The Moon => different album gain for each track => volume jumping between tracks
What's interesting, however: The Spotify app can play all these albums without volume jumps when normalisation is activated there (i.e. direct output, not using librespot),