devgianlu / go-librespot

Yet another open source Spotify client, written in Go.
GNU General Public License v3.0
52 stars 7 forks source link

remove shannon approach #23

Open 3052 opened 5 months ago

3052 commented 5 months ago

neither the current web client or android client use the shannon code any more:

https://github.com/devgianlu/go-librespot/blob/master/ap/shannon.go

web client uses websocket, and Android uses normal HTTP

devgianlu commented 5 months ago

The Shannon code is there purely to support the retrieval of decryption keys for audio streams. Using the new playplay protocol is an open problem because of reverse engineering and aggressiveness of Spotify to cease and desist everything that uses it.

3052 commented 5 months ago

the web client doesn't use playplay, it uses Widevine L3:

https://guc3-spclient.spotify.com/widevine-license/v1/audio/license

which has been publicly reversed (by me) for nearly two years now

https://github.com/glomatico/spotify-aac-downloader/blob/main/spotify_aac_downloader/downloader.py

devgianlu commented 4 months ago

Oh nice, that would work, but I don't really see the benefit of doing it since the current implementation works file for now. If they ever shut it down or we are forced to move out of it to implement some new fancy features, then we might consider other opportunities, such as Widevine (or playplay).

3052 commented 4 months ago

actually, it seems for the web client widevine only works for these:

MP4_256_DUAL MP4_128_DUAL MP4_256 MP4_128

while these are protected with something else:

OGG_VORBIS_320 OGG_VORBIS_160 OGG_VORBIS_96 AAC_24

has anyone researched this? I am not even sure if you can change the format with the web client, maybe with a premium account? hm checking more, it seems yes:

https://open.spotify.com/premium

devgianlu commented 4 months ago

go-librespot supports OGG_VORBIS only for now. I am not an audiophile or nowhere near an audio expert, but it seems OGG provides the best quality so far.