All Projects → plietar → Librespot

plietar / Librespot

Licence: mit
Open Source Spotify client library

Programming Languages

rust
11053 projects

Labels

Projects that are alternatives of or similar to Librespot

Clinet
Official repository for Clinet, a Discord bot intended for assistance and control within your guilds.
Stars: ✭ 28 (-97.41%)
Mutual labels:  spotify
Scplayer
Open source client of Spotify Connect closed library developed in Java
Stars: ✭ 41 (-96.21%)
Mutual labels:  spotify
Mbspotify
MusicBrainz Spotify integration hack for SF Music Hack Day 2014
Stars: ✭ 50 (-95.38%)
Mutual labels:  spotify
Shoutoutplay
The mobile app that allows you to create and record personal dedications using your favorite music playlists for corporate events, parties, weddings and get togethers.
Stars: ✭ 28 (-97.41%)
Mutual labels:  spotify
Spotify Discord
Combine Discord and Spotify into one
Stars: ✭ 36 (-96.68%)
Mutual labels:  spotify
Homebrew Public
Homebrew formula for open-source software developed by Spotify
Stars: ✭ 45 (-95.84%)
Mutual labels:  spotify
Spotty Features
Show trends about your music listening habits over time. Create playlists from a given seed and specified audio features.
Stars: ✭ 20 (-98.15%)
Mutual labels:  spotify
Forked Daapd
Linux/FreeBSD DAAP (iTunes) and MPD media server with support for AirPlay devices (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
Stars: ✭ 1,073 (-0.92%)
Mutual labels:  spotify
Spotify Lyrics
Shows lyrics from the song you're playing in Spotify.
Stars: ✭ 40 (-96.31%)
Mutual labels:  spotify
Tmux Spotify
🎧 Spotify plugin for tmux
Stars: ✭ 49 (-95.48%)
Mutual labels:  spotify
Youtubetospotify
A Python script to fetch tracks of music channels on Youtube, find them on Spotify and add them to a playlist
Stars: ✭ 33 (-96.95%)
Mutual labels:  spotify
Spotify Shortcuts Ios12
This repository contains a list of all available Shortcuts to control Spotify as well as an update mechanism.
Stars: ✭ 34 (-96.86%)
Mutual labels:  spotify
Counsel Spotify
Control Spotify App through Emacs
Stars: ✭ 49 (-95.48%)
Mutual labels:  spotify
Spotify Linux Installer
Install latest Spotify on Linux
Stars: ✭ 28 (-97.41%)
Mutual labels:  spotify
Spocon
SpoCon - A Spotify Connect Client for Debian , Ubuntu and Raspberry Pi based on librespot-java
Stars: ✭ 51 (-95.29%)
Mutual labels:  spotify
Exsp
Export/import your Spotify playlists, albums, songs and artists.
Stars: ✭ 21 (-98.06%)
Mutual labels:  spotify
Mitsuhaxi
Universal iOS 11 audio visualizer
Stars: ✭ 44 (-95.94%)
Mutual labels:  spotify
A Pop
🎶 HD Music Streaming and Sharing Web App
Stars: ✭ 55 (-94.92%)
Mutual labels:  spotify
Swspotify
Cross-platform library to get the currently playing song and artist from Spotify w/o using the API or the internet. Very fast.
Stars: ✭ 54 (-95.01%)
Mutual labels:  spotify
Lyrics Crawler
Get the lyrics for the song currently playing on Spotify
Stars: ✭ 49 (-95.48%)
Mutual labels:  spotify

librespot

librespot is an open source client library for Spotify. It enables applications to use Spotify's service, without using the official but closed-source libspotify. Additionally, it will provide extra features which are not available in the official library.

Note: librespot only works with Spotify Premium.

Unmaintained

Unfortunately I am unable to maintain librespot anymore. It should still work, but issues and Pull requests will be ignored. Feel free to fork it and continue development there. If a fork gains traction I will happily point to it from the README.

Building

Rust 1.17.0 or later is required to build librespot.

If you are building librespot on macOS, the homebrew provided rust may fail due to the way in which homebrew installs rust. In this case, uninstall the homebrew version of rust and use rustup, and librespot should then build.

It also requires a C, with portaudio.

On debian / ubuntu, the following command will install these dependencies :

sudo apt-get install build-essential portaudio19-dev

On Fedora systems, the following command will install these dependencies :

sudo dnf install portaudio-devel make gcc

On macOS, using homebrew :

brew install portaudio

Once you've cloned this repository you can build librespot using cargo.

cargo build --release

Usage

A sample program implementing a headless Spotify Connect receiver is provided. Once you've built librespot, run it using :

target/release/librespot --username USERNAME --cache CACHEDIR --name DEVICENAME

Discovery mode

librespot can be run in discovery mode, in which case no password is required at startup. For that, simply omit the --username argument.

Audio Backends

librespot supports various audio backends. Multiple backends can be enabled at compile time by enabling the corresponding cargo feature. By default, only PortAudio is enabled.

A specific backend can selected at runtime using the --backend switch.

cargo build --features portaudio-backend
target/release/librespot [...] --backend portaudio

The following backends are currently available :

  • ALSA
  • PortAudio
  • PulseAudio

Cross-compiling

A cross compilation environment is provided as a docker image. Build the image from the root of the project with the following command :

$ docker build -t librespot-cross -f contrib/Dockerfile .

The resulting image can be used to build librespot for linux x86_64, armhf (compatible e. g. with Raspberry Pi 2 or 3, but not with Raspberry Pi 1 or Zero) and armel. The compiled binaries will be located in /tmp/librespot-build

docker run -v /tmp/librespot-build:/build librespot-cross

If only one architecture is desired, cargo can be invoked directly with the appropriate options :

docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --no-default-features --features alsa-backend
docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features alsa-backend
docker run -v /tmp/librespot-build:/build librespot-cross cargo build --release --target arm-unknown-linux-gnueabi --no-default-features --features alsa-backend

Don't forget to set the with-tremor feature flag if your target device does not have floating-point capabilities.

Development

When developing librespot, it is preferable to use Rust nightly, and build it using the following :

cargo build --no-default-features --features "nightly portaudio-backend"

This produces better compilation error messages than with the default configuration.

Disclaimer

Using this code to connect to Spotify's API is probably forbidden by them. Use at your own risk.

Contact

Come and hang out on gitter if you need help or want to offer some. https://gitter.im/sashahilton00/spotify-connect-resources

License

Everything in this repository is licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].