14

Spotify is a versatile and open platform for music worldwide. It is heavy on encryption and very high on CPU usage.

Anyone aware of a yum/apt-get Spotify version for RPI running raspbian? Even without GUI, just command player version will be fine.

I understand that as of May 2015 libspotify is officially deprecated by Spotify and is no longer actively maintained, Libspotify was the base for many products, and now Spotify look only to sdk iPhones (IOS) and Android.

fcm
  • 1,837
  • 2
  • 17
  • 30

4 Answers4

11

Thanks for the answers!

Really mopidy made the cut. As most packages is not just plug and play but is very close to that. I will make the installation as brief as possible and it will work fine.

Ingredients:

  • Raspberry PI running Wheezy (may also work with Jessie)
  • PuTTY or similar remote SSH client.
  • A paid Spotify account.
  • External speakers, perhaps an USB sound card.

Pre-Installation

Before going into the install, make sure the RPI is ready to play music.

First, activate ipv6.

modprobe ipv6
echo ipv6 | tee -a /etc/modules

if needed, you can force sound on the analog connector instead of HDMI

amixer cset numid=3 1

test the sound to confirm your setting is working.

aplay /usr/share/sounds/alsa/Front_Center.wav

Installation

Note: Either prefix your commands with sudo or just do a 'permanent' sudo -iE before you start.

first, get the KEY from mopidy

wget -q -O - https://apt.mopidy.com/mopidy.gpg | apt-key add -

Add the source list, this is on wheezy.

wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/wheezy.list

or this for Jessie

wget -q -O /etc/apt/sources.list.d/mopidy.list https://apt.mopidy.com/jessie.list

and now, add the new items, install mopidy and the Spotify extension

apt-get update
apt-get install mopidy
apt-get install mopidy-spotify

if you are working as root, use this .conf file

/root/.config/mopidy/mopidy.conf

Otherwise edit it on your home config. Search the '[Spotify]' section remove the '#' remarks from the line and edit a few items:

[spotify]
username = alice
password = mysecret

remove the comments also on the [mpd] section, make explicit that we are not using [local] and [files] adding 'enabled = false'.

you are done!!

to test, open a console version and install a client:

apt-get install ncmpcpp

then, form another puTTY run

ncmpcpp

Good listening!

techraf
  • 4,319
  • 10
  • 31
  • 42
fcm
  • 1,837
  • 2
  • 17
  • 30
3

Check out Volumio [Note: currently returning an empty page for me so they might have an issue on their servers, so you might have to check back later]. Volumio is a full OS with an audio playback server controlled via a web interface, and runs on the RPi. I use it on an RPi model B. It has a Spotify client, but you need a premium Spotify account for it (won't work with the "free" Spotify). I've written my own custom Pandora server for use in Volumio - but that code is not yet ready for primetime (needs a webUI :)).

On Second Thought: This might no longer work as per your libspotify comment .... I'm not a Spotify user myself so I cannot check.

Phil B.
  • 5,043
  • 15
  • 30
2

Mopidy with extensions allows you to stream from cloud services such as Spotify (and others as well as local files obviously). Packages should be available for Raspian including dependencies, but other than that it can be installed from source and is running on python2.7 (see here).

I take it that the developers are aware that libspotify is officially deprecated but worry not too much as it still works for now (see here). They seem to expect spotify to come up with a solution due to its use in numerous hardware platforms.

Ghanima
  • 15,855
  • 15
  • 61
  • 119
2

Spotify don't have client for Raspberry as well as for any Linux ARM device. But you can use x86 emulations to run original Spotify Client on RPi.

  1. Install ExaGear Desktop, which allow to run x86 software on Raspberry (note that ExaGear isn't free and you have to obtain the license)

    tar -xvzpf exagear-desktop-rpi2.tar.gz
    sudo ./install-exagear.sh ubuntu-1404
    
  2. Run ExaGear

    exagear
    
  3. Add the Spotify repository signing key

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
    
  4. Add the Spotify repository

    echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
    
  5. Install Spotify

     sudo apt-get update
     sudo apt-get install spotify-client
     sudo apt-get install libxss1
    
  6. Now you can run Spotify from Start Menu

Run Spotify on Raspberry Pi

Instruction is based on this post.

vadik_lyutiy
  • 147
  • 4
  • It costs 18€ and is tied to the SDCARD.. please reflect this in your post. Not a place for commercial software. – Max Mar 25 '18 at 21:26