-
Notifications
You must be signed in to change notification settings - Fork 779
Description
Discussed in #1578
Originally posted by michaelherger September 10, 2025
https://newsroom.spotify.com/2025-09-10/lossless-listening-arrives-on-spotify-premium-with-a-richer-more-detailed-listening-experience/
(no pressure 😂)
I'm focusing on a few other things now, but depending on how Spotify implemented this it may actually not be difficult.
Clearly removing the bitrate command line limitations won't work, but some years ago (yeah) I already took care to pave the way for FLAC support in the decoder and audio file selection. If the FLACs and its decryption keys are served over the same way as the Ogg Vorbis files, then that could be quick work... any takers?
Originally posted by @roderickvd in #1578 (reply in thread)
It would be nice to have real files to check if there is anything to take into account, like with ogg (header) https://github.com/librespot-org/librespot/blob/dev/playback/src/player.rs#L1050 but yeah, it should be a pretty quick work
Originally posted by @SuisChan in #1578 (reply in thread)
Activity
roderickvd commentedon Sep 19, 2025
Appreciate all the offers for help, but please stick to the Spotify ToS: no sharing of files or accounts.
We'll need someone with time and access to lossless capabilities to propose a PR.
heinzgruber commentedon Sep 19, 2025
Maybe this is possible when librespot can play lossless:
https://community.spotify.com/t5/Live-Ideas/Add-Bit-Perfect-Playback-WASAPI-Exclusive-Mode-on-Windows/idi-p/7125179
guredora403 commentedon Sep 22, 2025
Hello! I think this is truly an amazing project. I'm currently using Spotify's Windows desktop client and am successfully achieving lossless playback, so I'd love to contribute. However, I've been unable to figure out how to read the encrypted communication in the control plane. My apologies for that. Once I know that, I could observe the communication flow during normal playback versus FLAC playback.
clepdn commentedon Sep 25, 2025
i have lossless working and enabled for my account
the devtools for my desktop client show an AAC_24 (24-bit?) file format from a GET
spclient.wg.spotify.com/metadata/4/track/{TRACK_GID}?market=from_tokenhere's the request response with a bit of junk and uuids removed.
my devtools don't show me any actually useful information, like if it's fetching the actual audio data differently from the way it fetches other audio qualities. i maybe need a proxy or some mitm to get what the local backend is fetching?
roderickvd commentedon Sep 25, 2025
For the
AAC_24part, probably it’s just the protobufs that need an update to map toFLAC_FLACor similar.Yes you can run a proxy to see where the desktop client is getting its files from.
kingosticks commentedon Sep 25, 2025
When you say "desktop client" do you mean desktop client or do you mean web browser? We want to know what the former is doing, not the latter.
clepdn commentedon Sep 27, 2025
SuisChan commentedon Sep 29, 2025
Hey, just a quick update on lossless.
AES-128-CTR, as is theIV(72e067fbddc...).0xA7byte header).Bitrate? Up to 24-bit (in my case, some files are up to 1800 kbps, if anyone's interested).
So, if there's a way to obtain keys through shannon, it would be easy to implement.
The other issue is that this won't be available to everyone, so some checks is needed to determine if the user is lossless-eligible (since this is a server-side restriction, different markets, etc.).
kingosticks commentedon Sep 29, 2025
It became available on my account today but I couldn't find where the fileid my desktop app is using is actually coming from. I see requests to https://gew1-spclient.spotify.com/storage-resolve/v2/files/audio/interactive_prefetch/16/d66a44eea7819cbce00e9c9e2abbe7f373bc60ed and then https://audio-fa-l.spotifycdn.com/audio/d66a44eea7819cbce00e9c9e2abbe7f373bc60ed but I don't see
fileidd66a44eea7819cbce00e9c9e2abbe7f373bc60ed anywhere in the response from https://spclient.wg.spotify.com/metadata/4/track/fb24dfb1ea0043f9afdd8633a3b75e1b Am I being dense?61 remaining items
roderickvd commentedon Nov 7, 2025
We've redacted this discussion to ensure librespot's continued existence, and are now locking it. We've received communication from Spotify that makes it clear we cannot pursue development that circumvents their technical protections. We appreciate your understanding.
[-]Spotify lossless support[/-][+]Spotify lossless - Not supported[/+][-]Spotify lossless - Not supported[/-][+]Spotify lossless will not be supported[/+]sashahilton00 commentedon Nov 9, 2025
This is a distinct possibility. What I would say is that it's possible that librespot needs to update some of it's client parameters to something more recent - it wouldn't be the first time we missed stuff because the version header we were sending was too old for a feature gate on the server side, or the proto requests we send are missing now required fields.
I think the first step would be to update the protobuf definitions to something a bit newer, though this will involve a fair bit of work as proto requests are all over the place. Once one then has a client that is more aligned with current spotify clients, I suspect it will become easier to inspect behaviour and improve functionality.
It would not surprise me if it were possible to retrieve lossless keys over shannon somehow - as many have pointed out Spotify don't want people poking around with their playplay DRM, and the best way to ensure that's the case is to have a means to pull the keys via shannon. Failing that I imagine that as more and more people want lossless, we'll see more hatchety approaches that have already been done, such as extracting the keys/compiled code and feeding the black box for decryption keys.