When will 119 be available? Where can I find it?
When it is merged, built and pushed.
If you tell me what version of LibreELEC you are running on what hardware, I might provide you with a pre-release here.
When will 119 be available? Where can I find it?
When it is merged, built and pushed.
If you tell me what version of LibreELEC you are running on what hardware, I might provide you with a pre-release here.
Display MoreWell, I figured it out.
My goal: Use librespot on an RPi3 running the latest Kodi/libreelec combo playing via alsa (Cirrus audio card), since the TV I have is not that good for playing music, but good enough for films and series and I have a hifi system which I use for music only
How I got there:
0. Install Librespot via Addons on your RPi
I had done this way before I stumbled into the problem with the missing alsa option, so you also might have done this already. If not install the kodi nerds repository and install it from there.
1. Setup a fresh Ubuntu VM
For Windows users: download latest image from ubuntu website and use VMware Player with easy setup. Make sure Ubuntu has 30Gig disk space.
2. Install Docker
Follow the instructions here: Docker Install Guide
For a fresh machine you can directly go to step 3 of the guide:
Inside the ubuntu VM open a console (Win-key and type cmd)
3. Install Curl, Git and dependencies
You will need this for the next steps.
4. Install Rust
This is done via rustup.rs
Or use this code directly(could be outdated!):
5. Get the latest version of the librespot project from github
Make a new folder, maybe in your home directory and clone the git into it
This will make a new folder: /home/libspot/librespot
6. Make the docker image
Source: Cross-compiling
The last '.' is crucial!
7. Finally Cross-Compile
After following all preceding steps you should now be able to run following command:
Codedocker run -v /home/libspot/librespot-build:/build librespot-cross cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features alsa-backend
This will direct the output to /home/libspot/librespot-build/arm-unknown-linux-gnueabihf/release/
8. Transfer your new binary to your RPi
Locate the "old" binary of the librespot addon here: /storage/.kodi/addons/service.librespot/bin/
Use the "Files" app of your ubuntu system to transfer the file "librespot" to your RPi. Use "Other Locations" and type in the field on the bottom of the "Files" app:
User: root
Passphrase: libreelec
Then copy the file "librespot" to your RPi into /storage/downloads/
From there use a ssh shell and replace the old file with your new one.
9. Make it work...
Last thing on the list, edit the file: /storage/.kodi/addons/service.librespot/bin/librespot.start
Bash Display More#!/bin/sh # SPDX-License-Identifier: GPL-2.0 # Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv) . /etc/profile oe_setup_addon service.librespot PORT="6666" SINK_NAME="librespot_sink" if ! pactl list modules short | grep "sink_name=$SINK_NAME"; then pactl load-module module-null-sink sink_name="$SINK_NAME" > /dev/null fi if ! pactl list modules short | grep "source=$SINK_NAME"; then pactl load-module module-rtp-send source="$SINK_NAME.monitor" \ destination_ip=127.0.0.1 port="$PORT" source_ip=127.0.0.1 > /dev/null fi pactl suspend-sink "$SINK_NAME" 1 LIBRESPOT="librespot \ --bitrate 320 \ --name \"Kodi LibSpot\"" if [ "$ls_a" = "true" -a -n "$ls_p" -a -n "$ls_u" ]; then LIBRESPOT="$LIBRESPOT \ --password \"$ls_p\" \ --username \"$ls_u\"" fi eval $LIBRESPOT
I got rid of two or three options, which I don't need. Feel free to add them back in.
After this, librespot should be started automatically at systemstart. If not you can use following command to see what's going wrong:
Good luck and good night.
The Librespot addon is intended to play via Kodi.
However, revision 119 of the addon will bring back an ALSA backend to librespot.
It will then be possible to start librespot for ALSA with a separate custom system.d service, ie skip steps 2 to 8 of @muellersjan's hack.
This custom service will be able co-exist with the addon and to pick-up updates of librespot shipped with the addon.
Custom services will of course be discussed in this forum but not in this thread.
Display MoreWell, I figured it out.
My goal: Use librespot on an RPi3 running the latest Kodi/libreelec combo playing via alsa (Cirrus audio card), since the TV I have is not that good for playing music, but good enough for films and series and I have a hifi system which I use for music only
How I got there:
0. Install Librespot via Addons on your RPi
I had done this way before I stumbled into the problem with the missing alsa option, so you also might have done this already. If not install the kodi nerds repository and install it from there.
1. Setup a fresh Ubuntu VM
For Windows users: download latest image from ubuntu website and use VMware Player with easy setup. Make sure Ubuntu has 30Gig disk space.
2. Install Docker
Follow the instructions here: Docker Install Guide
For a fresh machine you can directly go to step 3 of the guide:
Inside the ubuntu VM open a console (Win-key and type cmd)
3. Install Curl, Git and dependencies
You will need this for the next steps.
4. Install Rust
This is done via rustup.rs
Or use this code directly(could be outdated!):
5. Get the latest version of the librespot project from github
Make a new folder, maybe in your home directory and clone the git into it
This will make a new folder: /home/libspot/librespot
6. Make the docker image
Source: Cross-compiling
The last '.' is crucial!
7. Finally Cross-Compile
After following all preceding steps you should now be able to run following command:
Codedocker run -v /home/libspot/librespot-build:/build librespot-cross cargo build --release --target arm-unknown-linux-gnueabihf --no-default-features --features alsa-backend
This will direct the output to /home/libspot/librespot-build/arm-unknown-linux-gnueabihf/release/
8. Transfer your new binary to your RPi
Locate the "old" binary of the librespot addon here: /storage/.kodi/addons/service.librespot/bin/
Use the "Files" app of your ubuntu system to transfer the file "librespot" to your RPi. Use "Other Locations" and type in the field on the bottom of the "Files" app:
User: root
Passphrase: libreelec
Then copy the file "librespot" to your RPi into /storage/downloads/
From there use a ssh shell and replace the old file with your new one.
9. Make it work...
Last thing on the list, edit the file: /storage/.kodi/addons/service.librespot/bin/librespot.start
Bash Display More#!/bin/sh # SPDX-License-Identifier: GPL-2.0 # Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv) . /etc/profile oe_setup_addon service.librespot PORT="6666" SINK_NAME="librespot_sink" if ! pactl list modules short | grep "sink_name=$SINK_NAME"; then pactl load-module module-null-sink sink_name="$SINK_NAME" > /dev/null fi if ! pactl list modules short | grep "source=$SINK_NAME"; then pactl load-module module-rtp-send source="$SINK_NAME.monitor" \ destination_ip=127.0.0.1 port="$PORT" source_ip=127.0.0.1 > /dev/null fi pactl suspend-sink "$SINK_NAME" 1 LIBRESPOT="librespot \ --bitrate 320 \ --name \"Kodi LibSpot\"" if [ "$ls_a" = "true" -a -n "$ls_p" -a -n "$ls_u" ]; then LIBRESPOT="$LIBRESPOT \ --password \"$ls_p\" \ --username \"$ls_u\"" fi eval $LIBRESPOT
I got rid of two or three options, which I don't need. Feel free to add them back in.
After this, librespot should be started automatically at systemstart. If not you can use following command to see what's going wrong:
Good luck and good night.
Woa!
It would certainly have been easier to wrap a system.d service around the binary you compiled.
I would prefer such hacks being discussed elsewhere than in this thread. After all, my idea of the addon is to play Spotify as simply as possible on a simple device.
Nevertheless, from revision 119 on, the addon will ship librespot with an alsa backend to support alternative uses, eg as a separate user defined system.d service.
It is complicated to write an addon that supports both playing through alsa and playing through kodi, so decided to support only playing through kodi.
Display MoreHi I am on wireless and there is nothing I can do about that ... however I doubt that this is the reason for the service executable crashing.
But I got an update on this:
I tried deinstalling and reinstalling the addon, but with no success, same issue as before. Then I went the the hard way:
- setup build environment within docker container on my libreelec machine
- got the librespots sources
- applied the patches from the Libreelec repo
- build everything
- and replaced the executable within the addon with the newly build one.
Now things are back to normal, everything works.
But some rather general questions reamain:
Why the addon installation process repeatedly installed a corrupt binary ?
Where is the binary coming from ?
Is it precompiled in the addon repo ? Or is it build while installing ?
What is the url of the libreelec official repo ?
The librespot binary is built with the LibreELEC toolchain and packaged in the addon that you download.
It could be that the addon cache (/storage/.kodi/addons/packages) contains a corrupt version of the addon.
You could try to remove it with rm /storage/.kodi/addons/packages/service.librespot* and then try to reinstall the addon.
Hi awioy, another ROCK64 user here (Rockchip rk3328) - I tried running the addon and I think I am still facing the issue that tattermunge was facing last year.
I would greatly appreciate it if you had the time to take a look at what is happening there!
For reference, my output from 'journalctl -u service.librespot':
Code Display MoreNov 16 11:11:51 LibreELEC systemd[1]: Started librespot. Nov 16 11:11:51 LibreELEC sh[3644]: Got SIGINT, exiting. Nov 16 11:11:51 LibreELEC systemd[1]: Stopping librespot... Nov 16 11:11:51 LibreELEC systemd[1]: service.librespot.service: Main process exited, code=killed, status=15/TERM Nov 16 11:11:51 LibreELEC pactl[3657]: Failure: No such entity Nov 16 11:11:51 LibreELEC systemd[1]: service.librespot.service: Succeeded. Nov 16 11:11:51 LibreELEC systemd[1]: Stopped librespot. Nov 16 11:11:52 LibreELEC systemd[1]: Started librespot. Nov 16 11:11:52 LibreELEC sh[3670]: Illegal instruction Nov 16 11:11:52 LibreELEC systemd[1]: service.librespot.service: Main process exited, code=exited, status=132/n/a Nov 16 11:11:52 LibreELEC systemd[1]: service.librespot.service: Failed with result 'exit-code'. Nov 16 11:11:52 LibreELEC systemd[1]: service.librespot.service: Service RestartSec=100ms expired, scheduling restart. Nov 16 11:11:52 LibreELEC systemd[1]: service.librespot.service: Scheduled restart job, restart counter is at 1. Nov 16 11:11:52 LibreELEC systemd[1]: Stopped librespot. Nov 16 11:11:52 LibreELEC systemd[1]: Started librespot. Nov 16 11:11:52 LibreELEC sh[3691]: 16 module-null-sink sink_name=librespot_sink Nov 16 11:11:52 LibreELEC sh[3691]: 17 module-rtp-send source=librespot_sink.monitor destination_ip=127.0.0.1 port=6666 source_ip=127.0.0.1 Nov 16 11:11:52 LibreELEC sh[3691]: Illegal instruction Nov 16 11:11:52 LibreELEC systemd[1]: service.librespot.service: Main process exited, code=exited, status=132/n/a Nov 16 11:11:52 LibreELEC systemd[1]: service.librespot.service: Failed with result 'exit-code'. Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Service RestartSec=100ms expired, scheduling restart. Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Scheduled restart job, restart counter is at 2. Nov 16 11:11:53 LibreELEC systemd[1]: Stopped librespot. Nov 16 11:11:53 LibreELEC systemd[1]: Started librespot. Nov 16 11:11:53 LibreELEC sh[3707]: 16 module-null-sink sink_name=librespot_sink Nov 16 11:11:53 LibreELEC sh[3707]: 17 module-rtp-send source=librespot_sink.monitor destination_ip=127.0.0.1 port=6666 source_ip=127.0.0.1 Nov 16 11:11:53 LibreELEC sh[3707]: Illegal instruction Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Main process exited, code=exited, status=132/n/a Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Failed with result 'exit-code'. Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Service RestartSec=100ms expired, scheduling restart. Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Scheduled restart job, restart counter is at 3. Nov 16 11:11:53 LibreELEC systemd[1]: Stopped librespot. Nov 16 11:11:53 LibreELEC systemd[1]: Started librespot. Nov 16 11:11:53 LibreELEC sh[3721]: 16 module-null-sink sink_name=librespot_sink Nov 16 11:11:53 LibreELEC sh[3721]: 17 module-rtp-send source=librespot_sink.monitor destination_ip=127.0.0.1 port=6666 source_ip=127.0.0.1 Nov 16 11:11:53 LibreELEC sh[3721]: Illegal instruction Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Main process exited, code=exited, status=132/n/a Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Failed with result 'exit-code'. Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Service RestartSec=100ms expired, scheduling restart. Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Scheduled restart job, restart counter is at 4. Nov 16 11:11:53 LibreELEC systemd[1]: Stopped librespot. Nov 16 11:11:53 LibreELEC systemd[1]: Started librespot. Nov 16 11:11:53 LibreELEC sh[3735]: 16 module-null-sink sink_name=librespot_sink Nov 16 11:11:53 LibreELEC sh[3735]: 17 module-rtp-send source=librespot_sink.monitor destination_ip=127.0.0.1 port=6666 source_ip=127.0.0.1 Nov 16 11:11:53 LibreELEC sh[3735]: Illegal instruction Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Main process exited, code=exited, status=132/n/a Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Failed with result 'exit-code'. Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Service RestartSec=100ms expired, scheduling restart. Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Scheduled restart job, restart counter is at 5. Nov 16 11:11:53 LibreELEC systemd[1]: Stopped librespot. Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Start request repeated too quickly. Nov 16 11:11:53 LibreELEC systemd[1]: service.librespot.service: Failed with result 'exit-code'. Nov 16 11:11:53 LibreELEC systemd[1]: Failed to start librespot.
Rockchip is hardly supported.
Can anyone try to build the addon for this platform?
It's the Milhouse build that is identical with LibreELEC 18.2
Code Display MoreNov 13 13:51:41 donpi systemd[1]: Started librespot. Nov 13 13:51:41 donpi sh[27120]: INFO:librespot: librespot e738c7bf75 (2019-03-08). Built on 2019-03-09. Build ID: Nov 13 13:51:41 donpi sh[27120]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntE Nov 13 13:51:41 donpi sh[27120]: stack backtrace: Nov 13 13:51:42 donpi sh[27120]: 0: 0x927d1b - <unknown> Nov 13 13:51:42 donpi sh[27120]: 1: 0x91c86b - <unknown> Nov 13 13:51:42 donpi sh[27120]: 2: 0x9155eb - <unknown> Nov 13 13:51:42 donpi sh[27120]: 3: 0x91524b - <unknown> Nov 13 13:51:42 donpi sh[27120]: 4: 0x915de7 - <unknown> Nov 13 13:51:42 donpi sh[27120]: 5: 0x9159ab - <unknown> Nov 13 13:51:42 donpi sh[27120]: 6: 0x915893 - <unknown> Nov 13 13:51:42 donpi sh[27120]: 7: 0x979be7 - <unknown> Nov 13 13:51:42 donpi sh[27120]: 8: 0x5c36c3 - <unknown> Nov 13 13:51:42 donpi sh[27120]: 9: 0x661b0f - <unknown> Nov 13 13:51:42 donpi sh[27120]: 10: 0x4e620f - <unknown> Nov 13 13:51:42 donpi sh[27120]: 11: 0x4bd7ff - <unknown> Nov 13 13:51:42 donpi sh[27120]: 12: 0x91580b - <unknown> Nov 13 13:51:42 donpi sh[27120]: 13: 0x93513b - <unknown> Nov 13 13:51:42 donpi sh[27120]: 14: 0x915757 - <unknown> Nov 13 13:51:42 donpi sh[27120]: 15: 0x910f67 - <unknown> Nov 13 13:51:42 donpi sh[27120]: 16: 0x4e7edb - main Nov 13 13:51:42 donpi sh[27120]: 17: 0x76d8f77b - __libc_start_main Nov 13 13:51:42 donpi sh[27120]: at /home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi2.a Nov 13 13:51:42 donpi systemd[1]: service.librespot.service: Main process exited, code=exited, status=101/n/a Nov 13 13:51:42 donpi systemd[1]: service.librespot.service: Failed with result 'exit-code'. Nov 13 13:51:42 donpi systemd[1]: service.librespot.service: Service RestartSec=100ms expired, scheduling restart. Nov 13 13:51:42 donpi systemd[1]: service.librespot.service: Scheduled restart job, restart counter is at 1. Nov 13 13:51:42 donpi systemd[1]: Stopped librespot.
The error keeps repeating until systemd stops restarting it.
Milhouse releases are beta.
Try to run Librespot run on a stable reelase.
Display MoreHi,
I encounter sudden issues with the librespot addon. I am running x64 build 9.2 (latest official), which comes with addon version 117.
After having worked for several months, suddenly the service will not start anymore
Code Display Morejournalctl -u service.librespot Nov 27 20:06:18 LibreELEC sh[762]: INFO:librespot: librespot 52c4987129 (2019-02-26). Built on 2019-02-27. Build ID: t6e1SU0g Nov 27 20:06:18 LibreELEC sh[762]: *** WARNING *** The program 'librespot' uses the Apple Bonjour compatibility layer of Avahi. Nov 27 20:06:18 LibreELEC sh[762]: *** WARNING *** Please fix your application to use the native API of Avahi! Nov 27 20:06:18 LibreELEC librespot[779]: *** WARNING *** The program 'librespot' uses the Apple Bonjour compatibility layer of Avahi. Nov 27 20:06:18 LibreELEC sh[762]: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html> Nov 27 20:06:18 LibreELEC librespot[779]: *** WARNING *** Please fix your application to use the native API of Avahi! Nov 27 20:06:18 LibreELEC librespot[779]: *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html> Nov 27 20:06:18 LibreELEC sh[762]: thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: DNSError(Unknown)', libcore/result.rs:1009:5 Nov 27 20:06:18 LibreELEC sh[762]: stack backtrace: Nov 27 20:06:19 LibreELEC sh[762]: 0: 0x55786260ff1f - <unknown> Nov 27 20:06:19 LibreELEC sh[762]: 1: 0x55786261cb87 - <unknown> Nov 27 20:06:19 LibreELEC sh[762]: 2: 0x55786261565f - <unknown> Nov 27 20:06:19 LibreELEC sh[762]: 3: 0x5578626153c4 - <unknown> Nov 27 20:06:19 LibreELEC sh[762]: 4: 0x557862615d3e - <unknown> Nov 27 20:06:19 LibreELEC sh[762]: 5: 0x5578626158e1 - <unknown> Nov 27 20:06:19 LibreELEC sh[762]: 6: 0x5578626157c5 - <unknown> Nov 27 20:06:19 LibreELEC sh[762]: 7: 0x55786265e8fc - <unknown> Nov 27 20:06:19 LibreELEC sh[762]: 8: 0x55786220636c - <unknown>
actually the same happens when I try to run the binary from the console:
Code Display More/storage/.kodi/addons/service.librespot/bin/librespot -n test INFO:librespot: librespot 52c4987129 (2019-02-26). Built on 2019-02-27. Build ID: t6e1SU0g *** WARNING *** The program 'librespot' uses the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see <http://0pointer.de/blog/projects/avahi-compat.html> thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: DNSError(Unknown)', libcore/result.rs:1009:5 stack backtrace: 0: 0x55a0a4f7cf1f - <unknown> 1: 0x55a0a4f89b87 - <unknown> 2: 0x55a0a4f8265f - <unknown> 3: 0x55a0a4f823c4 - <unknown> 4: 0x55a0a4f82d3e - <unknown> 5: 0x55a0a4f828e1 - <unknown> 6: 0x55a0a4f827c5 - <unknown> 7: 0x55a0a4fcb8fc - <unknown> ...
any thought what could be the reason for that ?
Best regards
sappi
How stable is your network connection?
Is it wired or wireless?
If it is wireless, then try to switch to wired.
Display MoreInteresting problem here.
tl;dr: audio playback is slowed down (maybe 90% of original speed) when playing through the 3.5mm port.
I have librespot add-on running on libreelec on my RPi2. Audio output is through the 3.5mm port to my receiver. Normally there is no tv connected asthis is only used to send spotify to my old receiver.
It used to work fine, but now songs are played slowed down. Maybe 80-90% of normal speed. This behaviour started about 2 months ago.
I just tried connecting the pi2 to my TV through the hdmi port and lo and behold, the playback is fine through hdmi.
Went back to 3.5mm, and it's still too slow.
Any idea what might be going on?
thanks
Please provide version of LibreELEC and version Librespot.
can you write me, short tutorial how i can do this
Bitrate is set to 320 by default since revision 117.
hello! is it possible for you to support podcasts? It was just recently implemented in volumio, dont know if you use the same stuff but here is git pr. [Volspotconnect2] Update `vollibrespot` to `0.1.8` by ashthespy · Pull Request #247 · balbuze/volumio-plugins · GitHub
I have submitted a pull request to update librespot to 0.1.0 with podcast support.
It should be available soon.
Hi there!
Librespot stopped working for me since 3 or 4 days ago. The system is not visible as a playback device in Spotify anymore. Neither on my smartphone, nor laptop, and even after several re-activations of the add-on as well as restarts of the whole system. I updated a few plug-ins, but didn't change anything else before that or since then. Maybe something on Spotify's side changed?
Thanks a lot for all the great work you put into this add-on!
Please describe your setup: version of LibreELEC and Librespot. The output of 'journalctl -u service.librespot' could also be useful.
Before, I used this:
[reader]
label = Mouse
description = Mouse
enable = 0
protocol = mouse
device = /dev/ttyUSB0
caid = ...
boxkey = ...
rsakey = ...
detect = cd
mhz = 600
cardmhz = 600
group = 1
emmcache = 1,3,2,0
Display More
Now, I use this:
[reader]
label = Smargo
description = Smargo
protocol = smargo
device = /dev/ttyUSB0
caid = ...
boxkey = ...
rsakey = ...
detect = cd
mhz = 600
cardmhz = 600
group = 1
emmcache = 1,3,2,0
Display More
I hope this helps you further
Librespot requires a Spotify premium account
Try with:
protocol = smargo
device = /dev/ttyUSB0
The configuration files are in /storage/.kodi/userdata/addon_data/service.softcam.oscam.
You can also access them via SMB at /userdata/addon_data/service.softcam.oscam.
Configuration depends on your card reader and your service provider.
Best would therefore be to get help from someone in a context similar to yours.
Google will probably guide you to a configuration that fits your needs.
Display MoreHi, i am new here.
how can I play spotify through Pulse on LibreElec 9.1,501?. I can not see _Librespot in the Spotify to Connect.Thank you
addon version 117
LE: 9.1.501
Raspberry Pi 4
Connection: Wifi
Yes, Spotify premium
Librespot for LibreELEC should be advertised as 'Kodi (LibreELEC)' or 'Kodi (the_name_you_gave_to_your_libreelec_system)'
Add-ons, install from repository, LibreELEC, services, Oscam ?