Librespot addon

  • Only an update on what I ended up doing: I removed LibreELEC just to have more control,

    and ended up installing Rocky Linux 8, Kodi (using flatpak) and librespot.

    I set Kodi and librespot as "startup applications", and they work nicely together now

    (they can also play simultaneously, for example).

  • Hi, I've installed latest librespot (2023-05-14) kodi plugin, version 11.80.1.1 by awiouy (Anton Voyl) on latest kodi nightly on RPI4.

    The plugin works with default options, in my case backend alsa and device hw:2,0

    #librespot -d ? gives my device:

    Code
    iec958:CARD=sndrpihifiberry,DEV=0
    Description:
    snd_rpi_hifiberry_digi, HiFiBerry Digi+ Pro HiFi wm8804-spdif-0
    IEC958 (S/PDIF) Digital Audio Output
    Supported Format(s):
    S16 S24

    I have found you can enter certain unconfigured options, since some are preconfigured by the python scripts that load the daemon (there is no systemctl service any longer to manage as audiobobo pointed out). The python acripts that load the daemon are here:

    /storage/.kodi/addons/service.librespot

    By default, cache is disabled and bitrate is set at 320 by, as default soundcard selected by kodi config.

    You can enter extra options in the librespot kodi addon config interface, I entered -f S24 and it seems to work.


    Note: apart from this client addon, I have found another Kodi .zip wrapper manual plugin for Spotify. (https://github.com/jhjdekker98/plugin.audio.spotifyd-client), and it has a link for a armhf binary on https://github.com/Spotifyd/spotifyd/releases, but I haven't tried installing it since it requires Spotify Developer account settings and copying binaries to a specific path: /resources/lib/spotifyd/spotifyd. It is an alternative to the 'official' librespot kodi plugin, and it lets you customize all options to your liking.

    Edited 11 times, last by wyup (July 22, 2023 at 11:07 AM).

  • I don't have a suggestion, but I can second your impression. My guess before was that Librespot stops working when I don't explicitly disconnect from it but just leave the network.

    Is there a different version to install or can the plugin be restarted over a cron job or something? What can I do to help?
    Thanks for your help!

  • I don't have a suggestion, but I can second your impression. My guess before was that Librespot stops working when I don't explicitly disconnect from it but just leave the network.

    Is there a different version to install or can the plugin be restarted over a cron job or something? What can I do to help?
    Thanks for your help!

    Librespot used to stop working after it lost connection to Spotify
    Restarting librespot used to solve the issue, switching from wifi to wired network used to prevent it

    This may have been solved with the latest version of librespot

  • I'm used to librespot installed on Raspbian Lite. Now, on LibreELEC config in options is limited and I'm not sure how to edit settings file.

    I want to set this:

    Code
    LIBRESPOT_BITRATE="320"
    LIBRESPOT_FORMAT="S32"
    LIBRESPOT_INITIAL_VOLUME="100"
    LIBRESPOT_NORMALISATION_PREGAIN="-6.0"
    LIBRESPOT_VOLUME_CTRL="log"

    Not sure if LIBRESPOT_BACKEND="alsa" is needed to work with Kodi. Also, credentials are not required for high quality streaming?

    Please, how can I set up this config on librespot in LibreELEC? Thanks.

  • I'm used to librespot installed on Raspbian Lite. Now, on LibreELEC config in options is limited and I'm not sure how to edit settings file.

    I want to set this:

    Code
    LIBRESPOT_BITRATE="320"
    LIBRESPOT_FORMAT="S32"
    LIBRESPOT_INITIAL_VOLUME="100"
    LIBRESPOT_NORMALISATION_PREGAIN="-6.0"
    LIBRESPOT_VOLUME_CTRL="log"

    Not sure if LIBRESPOT_BACKEND="alsa" is needed to work with Kodi. Also, credentials are not required for high quality streaming?

    Please, how can I set up this config on librespot in LibreELEC? Thanks.

    The librespot addon works fine with the default settings. Use a Spotify app to control it.

    With backend pulseaudio_rtp, librespot plays through Kodi.

    With backend alsa, librespot plays independently of Kodi but requires an audio device that Kodi does not use.

    If you really need to set extra options, use the options parameter to specify them.

    You can also call librespot from the command line or from a script.

  • If you really need to set extra options, use the options parameter to specify them.

    You can also call librespot from the command line or from a script.

    Please, can you elaborate on this? Is there any guide about it? I use USB DAC with studio monitors, so those settings are important for me. Thanks.

  • Please, can you elaborate on this? Is there any guide about it? I use USB DAC with studio monitors, so those settings are important for me. Thanks.

    If you use the USB DAC for Kodi playback, then set the backend setting to pulseaudio_rtp

    Otherwise, set the backend setting to alsa and set the alsa_device setting to specify the USB DAC (the 'aplay -l' or 'aplay -L' terminal commands will help you finding available alsa devices, for instance hw:2,0).

    If you cannot make it work, then provide more details about your setup (the outputs of 'aplay -l' and 'aplay -L', and explain what uses the USB DAC).

    This link lists librespot options, but you should not need them: https://github.com/librespot-org/librespot/wiki/Options.