SpotifyConnect-Librespot

The current upstream version supports gapless.

Librespot require premium spotiy accaunt

Of default librespot uses the CARD0 as audio output.

If there are more than one audiocard on the system, you have to edit the configuration file.

Locate your audiocard:

aplay -L

use nano to edit the spotifyd configuration file

the librespot configuration file can be found in /etc/conf.d/

nano /etc/conf.d/librespot

configuration example without specifying the device

LS_OPTS="-n "GentooPlayer" -b 320 --initial-volume=100"

with specified device

LS_OPTS="-n "GentooPlayer" -b 320 --initial-volume=100 --device default:CARD=J20"


other options:

Options:

-c, --cache CACHE Path to a directory where files will be cached.

--disable-audio-cache

Disable caching of the audio data.

-n, --name NAME Device name

--device-type DEVICE_TYPE

Displayed device type

-b, --bitrate BITRATE

Bitrate (96, 160 or 320). Defaults to 160

--onevent PROGRAM

Run PROGRAM when playback is about to begin.

-v, --verbose Enable verbose output

-u, --username USERNAME

Username to sign in with

-p, --password PASSWORD

Password

--proxy PROXY HTTP proxy to use when connecting

--ap-port AP_PORT

Connect to AP with specified port. If no AP with that

port are present fallback AP will be used. Available

ports are usually 80, 443 and 4070

--disable-discovery

Disable discovery mode

--backend BACKEND

Audio backend to use. Use '?' to list options

--device DEVICE Audio device to use. Use '?' to list options if using

portaudio or alsa

--mixer MIXER Mixer to use (alsa or softmixer)

-m, --mixer-name MIXER_NAME

Alsa mixer name, e.g "PCM" or "Master". Defaults to

'PCM'

--mixer-card MIXER_CARD

Alsa mixer card, e.g "hw:0" or similar from `aplay

-l`. Defaults to 'default'

--mixer-index MIXER_INDEX

Alsa mixer index, Index of the cards mixer. Defaults

to 0

--initial-volume VOLUME

Initial volume in %, once connected (must be from 0 to

100)

--zeroconf-port ZEROCONF_PORT

The port the internal server advertised over zeroconf

uses.

--enable-volume-normalisation

Play all tracks at the same volume

--normalisation-pregain PREGAIN

Pregain (dB) applied by volume normalisation

--linear-volume

increase volume linear instead of logarithmic.

--autoplay autoplay similar songs when your music ends.

--disable-gapless

disable gapless playback.

if you use the dhcp for the network you have to add to the file

nano /etc/dhcpcd.conf

waitip

Open your spotify application and you will find among GentooPlayer devices

librespot require premium spotiy accaunt