And if you set "wait for network" in Settings/LibreELEC/Network?
Posts by awiouy
-
-
I have tested 109b (from your link) as well as version 110 from libreelec-repo on my fresh installed LE9 Milhouse build (from april 1st and april 2nd). Each combination doesn't work for me: my spotify-app doesn't see the device. The dependencies-section says: os.libreelec.tv is unavailable.
I have activated logging and then uninstalled and reinstalled the plugin. Hopefully the log is useful. (In the log, os.libreelec.tv is shown as loaded.)
Please provide a log produced with "journalctl -u service.librespot"
-
Hey,
after I reinstalled the Raspberry Pi 3 and installed Librespot, I am not able to select the device. I got an other Spotify Connect Add On already, but its not that good like the Librespot.
I hope that you can help me with that problem.
edit: on mobile it says "connecting" and than it diappears.
Best regards
Please provide a log produced with "journalctl -u service.librespot"
-
I've been looking and I did not find any environment variable that defines the location of alsa plugins either. That's unfortunate.
I thought there was a possibility to specify plugin locations via asoundrc or asound.conf but I misremembered. While you can set the location of LADSPA plugins in asound.conf and specify their location via a variable called LADSPA_PATH there is no way to do this for alsa plugins.
Having the alsa plugins in LibreELEC would be really cool though. We'd be able to use alsa's 'file' plugin to write audio to the snapserver fifo instead of using pulseaudio. For playback we could use the alsa 'dmix' plugin to have snapclient play through alsa while at the same time not blocking the output device for Kodi. We'd be using snapcast as it is intended to be used by badaix, running on alsa. As there is no native pulseaudio support snapcast can manage latency for raw alsa devices but not for pulseaudio.
A benefit of using alsa directly would be that we would not have to set the snapclient's '--latency=xy' parameter to offset the latency that is introduced by pulseaudio (which is a unique value for every output device and cannot be statically defined for all systems and devices).
The drawback would be that pulseaudio would still be required for playout of snapclient to bluetooth devices. Also setting the latency parameter would be required for synchronous playback. But since bluetooth playback itself introduces considerable latency, the latency parameter would have to be used to account for this anyway.
I have reworked the alsa-plugin package to only build pulse in less than 100KB. I will submit a PR when it is ready.
I will think about how to go forward with Snapcast and Librespot during the next days, and propose it here.
At a glance, output to pulse and being able to control Snapserver via RPC from Kodi, at least to select a stream and set volume would allow to simplify a lot of things.
-
Hi Awiouy, I'm using Libreelec 7 because Kodi 17+ is too slow on my Pi 2. How could I get this addon, since it's not in the repository?
Thanks.
Backport and build it.
-
meh... with the above Alsa creates the device but cannot open it, due to : (snd1_dlobj_cache_get) Cannot open shared library /usr/lib/alsa/libasound_module_pcm_pulse.so.
No idea if it is possible to have Alsa search plugins in LD_LIBRARY_PATH.
-
-
Amazing progress guys!
There is no need to add the libraries to the image. Simply add them to a directory in LD_LIBRARY_PATH and edit /storage/.config/asound.conf to use them.
I will add pulse to Snapclient, because there is a use case. I let someone else add all or the rest to the audio-tools addon.
Please discuss the pulse with Snapclient use case in the Snapcast thread, so that everyone can share without searching much.
Thanks
-
on PC it works just fine - here I have a output like this:
snapclient -l
0: default
Playback/recording through the PulseAudio sound server
1: null
Discard all samples (playback) or generate zero samples (capture)
2: pulse
PulseAudio Sound Server
If I select 0 here, snapclient just routes the audio to pulseaudio like any other client on the pc.I think there's probably the pulseaudio library missing in the snapclient addon for libreelec, so that it doesn't find the pulseaudio of libreelec?
Also - of course kodi "holds" the pulseaudio speaker, but there is running a pulseaudio server which is used by kodi - snapclient should just output to that pulseaudio server as a source - just like it does on a desktop
Or maybe - if for some reason that's not possible - is it possible that snapclient just outputs to "kodi" - like librespot does? that way it would just use whatever source is used in kodi, or is that not possible due to the syncing?
By default there is no asound.conf in LibreELEC. You could try to create /storage/.config/asound.conf to create a pulse output. You will have to reboot LibreELEC for ALSA to pick up that asound.conf.
According to what I found /storage/.config/asound.conf should be:
Let me know if it works
-
Hi,
I have a bluetooth Receiver on one of my libreelec devices (milhouse 9 build) - How can I make snapclient on this device play to the bluetooth device? Everything else on this device plays to bluetooth without issues
System Audio is set to "PULSE: (SPEAKERNAME)"
"snapclient -l" on ssh also only delivers the ALSA devices, no pulseaudio device
Snapclient outputs to ALSA, not to Pulseaudio.
What you are trying to do is therefore not possible at the moment.
Moreover, I suspect that Kodi holds the Pulseaudio speaker, and that Snapclient will not be able to share it.
Maybe someone else here has an idea of how this could be implemented, and wants to give it a shot.
-
i have updated librelec and i got snapserver/snapclient in librelec addons and install in my librelec 8.2.4 .what is the next step could i do.
Use a mobile device to stream to Snapcast with Airplay
-
Hello awiouy! First of all thank you for the work you are doing to get snapcast integrated into LibreELEC. It's really awesome!
You mentioned that sound quality is inferior when using snapserver with Kodi and pulseaudio. I have been experimenting with snapcast a lot and I think I have a solution: In 'Settings' > 'System' you can set 'Output configuration' to 'Fixed'. Then set 'Limit sampling rate kHz' to '48.0'. Then set 'Resample quality' to 'High'.
Sound quality should be better now as Kodi handles resampling the audio to 48kHz in high quality instead of leaving this task to pulseaudio.
You could also leave the settings in Kodi alone and make pulseaudio use a better resampler:
With pulseaudio I usually set it to use the 'sox-vhq' resampler, this also sounds very good. I don't think there's a huge difference between Kodi's high quality resampler and pulseaudio's 'sox-vhq'.
About A/V sync: You can easily get perfect sync across all snapclients. Just play a video and then go into the settings menu, then choose 'Audio settings' and then select 'Audio offset'. Set this to 'Ahead by 1.000s' and all your snapclients will be in sync with the video playback. No further configuration is needed on the clients this way.
Thank you for this information:
1. resample-method = soxr-vhq in /storage/.config/pulse-daemon.conf.d/10-snapserver.conf improves sound quality
2. Setting Audio offset to Ahead by 1.000s easily achieves audio/video synchronisation
I will see if I can add both to snapserver (and librespot)
In the meantime both can be done manually
I attach updated previews for RPi2
-
I am simply streaming to kodi from my macbook running spotify and using spotify connect for it. I am mostly using playlists. There is no single track or anything that reproduces this.
This issue occurs seamingly randomly, sometimes after 1-2 tracks, sometimes after a whole day of playing.
Librespot is bad at handling network errors. It is being worked on.
-
Noone who can help me solving this? Should I try reverting Kodi version to a more stable one?
Nothing to do with Kodi.
Please explain what you are doing (from what device are you streaming? Are you streaming a playlist? Do you experience this with a single track? What track? etc)
-
Tested the preview version with LE9-Mihouse on RPi3:
Works on Audio, can't get A/V-sync with Videos or Live-TV
A/V-sync works with ALSA or Pi:HDMI sound-setting in Kodi-settings, but not with Pulse together with snapclient
Thx so far!
Will do further tests. Maybe I find a setting for A/V-sync
Edit:
Found "Audio Profiles" and JSON: enable/disable addon:
If this works, then you could have something like this: (with a python(?)-script)
-> Kodi plays Video, then Pi:HDMI or ALSA is used for perfect A/V-sync for e.g. LiveTV (Audio-profile 1)
-> Kodi plays Audio (mp3, stream, ...) then Kodi switches to Pulse (Audio-profile 2) and enables Snapclient to distribute audio in perfect sync to other Snapclients. On "Stop", the Audio-profile is reset to #1
This doesn't work for Musicvideos, but would be a beginning ...
Have you tried to set Latency to 600 in Snapclient settings? This somehow achieves a/V sync here.
-
Tested the preview version with LE9-Mihouse on RPi3:
Works on Audio, can't get A/V-sync with Videos or Live-TV
A/V-sync works with ALSA or Pi:HDMI sound-setting in Kodi-settings, but not with Pulse together with snapclient
Thx so far!
Will do further tests. Maybe I find a setting for A/V-sync
Is "Stop Snapclient on Kodi playback" set in the settings of the addon?
-
-
Update to LibreELEC 8.2.4 and install snapserver/snapclient