librespot-org /librespot

Open Source Spotify client library

★ 7,364⑂ 968👁 60⑃ 741● 774▤ 11
RustCreated 2017-11-15
7,364
stars
+0+3+102
968
forks
60
watchers
741
prs
774
issues
11
releases
–
discussions

README

Current maintainers are listed on GitHub.

 [!WARNING]
 Spotify account compatibility

 Spotify has changed its audio DRM/key delivery mechanism. Accounts created after an apparent cutoff date can no longer obtain the audio decryption keys required by librespot. This affects all librespot versions, and playback will fail with audio key error 0 1. No workaround is currently known.

 This is a Spotify-side restriction, not a librespot configuration issue. See issue 1649 for details (locked).

 librespot
librespot is an open source client library for Spotify. It enables applications to use Spotify's service to control and play music via various backends, and to act as a Spotify Connect receiver. It is an alternative to the official and now deprecated closed-source libspotify. Additionally, it will provide extra features which are not available in the official library.

_Note: librespot only works with Spotify Premium. This will remain the case. We will not support any features to make librespot compatible with free accounts, such as limited skips and adverts._

 Quick start
We're available on crates.io as the _librespot_ package. Simply run cargo install librespot to install librespot on your system. Check the wiki for more info and possible usage options.

After installation, you can run librespot from the CLI using a command such as librespot -n "Librespot Speaker" -b 160 to create a speaker called _Librespot Speaker_ serving 160 kbps audio.

 This fork
As the origin by plietar is no longer actively maintained, this organisation and repository have been set up so that the project may be maintained and upgraded in the future.

 Documentation
Documentation is currently a work in progress, contributions are welcome!

There is some brief documentation on how the protocol works in the docs folder.

COMPILING.md contains detailed instructions on setting up a development environment, and compiling librespot. More general usage and compilation information is available on the wiki.
CONTRIBUTING.md also contains our contributing guidelines.

If you wish to learn more about how librespot works overall, the best way is to simply read the code, and ask any questions you have in our Gitter Room.

 Issues & Discussions
We have recently started using Github discussions for general questions and feature requests, as they are a more natural medium for such cases, and allow for upvoting to prioritize feature development. Check them out here. Bugs and issues with the underlying library should still be reported as issues.

If you run into a bug when using librespot, please search the existing issues before opening a new one. Chances are, we've encountered it before, and have provided a resolution. If not, please open a new one, and where possible, include the backtrace librespot generates on crashing, along with anything we can use to reproduce the issue, e.g. the Spotify URI of the song that caused the crash.

 Building
A quick walkthrough of the build process is out

Snapshot: 2026-11-04T14:00:00Z · Data license Apache-2.0 · JSON