AirPlay / Spotify by Snapcast

  • run 'pactl list sinks' and look at 'Latency'. You'll see a value in usec displayed for your currently active output. Take this value, devide by 1000 and pass it to snapclient as the latency parameter, e.g. for a value of 30000 usec in your pulseaudio playback latency you run 'snapclient --latency=30' and everything will be in sync again.

    Hi,

    thanks for that, unfortunately it just says 0 usec in the pactl list sinks command:


    Latency: 0 usec, configured 48219 usec - setting it to 48 is too little, I have put it up to the maximum of 100 and it's almost in sync now, although not 100%. I guess some more msec would be necessary

    Edited once, last by Catscrash (April 3, 2018 at 12:43 PM).

  • Latency: 0 usec, configured 48219 usec - setting it to 48 is too little, I have put it up to the maximum of 100 and it's almost in sync now, although not 100%. I guess some more msec would be necessary

    You need to play audio via the sink for pulseaudio to actually specify the current latency. As long as there is no audio playing the first value will be zero.

    This is from my laptop:

    No audio playing:

    Code
    pactl list sinks
    Sink #0
           State: SUSPENDED
           Name: alsa_output.pci-0000_00_1b.0.analog-stereo
    [...]
            Latency: 0 usec, configured 0 usec
    [...]

    Audio playing:

    Code
    pactl list sinks
    Sink #0
           State: RUNNING
           Name: alsa_output.pci-0000_00_1b.0.analog-stereo
    [...]
            Latency: 61212 usec, configured 90000 usec
    [...]

    Hope this helps.

    Don't know whether it makes a difference but I specifically use snapclient for playback and then run pactl list sinks to get the latency value. Maybe a different latency value is reported when Kodi plays audio, I have not looked into that.

  • Hi awiouy,

    I run the snapcast server on a different RPi with Rapsbian. If I want to use LibreELEC as a Snapcast Client I always have to ssh "snapclient -h 192.168.188.46"

    Can you tell me how I can configure the client to use this Snapcast server permanent?

  • Hi awiouy,

    I run the snapcast server on a different RPi with Rapsbian. If I want to use LibreELEC as a Snapcast Client I always have to ssh "snapclient -h 192.168.188.46"

    Can you tell me how I can configure the client to use this Snapcast server permanent?

    Which version of LibreELEC/Snapclient are you using?

    What does the log say (journalctl -u service.snapclient)?

    Here, Snapclient starts with LibreELEC.

  • Which version of LibreELEC/Snapclient are you using?

    What does the log say (journalctl -u service.snapclient)?

    Here, Snapclient starts with LibreELEC.

    I am using LE9 Milhouse Built #405 with Snapclient 9.0.100b

    Yes, the Snapclient starts with LibreELEC but I manually have to set the ip to my own snapcast server (I don't run your LibreELEC Snapserver). My question is how to change the Snapcast Server IP within the LE Snapcast Client permanent.

  • Is there any help on how to setup this? I think I don't quite get it.

    As long as librespot isn't working I'm trying to archive the same it did:

    Have my mediaplayer with CoreElec show up in Spotify as a Spotify Connect device and play back music.

    In this case, do I have to install both server and client addon on my mediaplayer? Or do I have an error in reasoning?

    • Official Post

    Is there any help on how to setup this? I think I don't quite get it.

    As long as librespot isn't working I'm trying to archive the same it did:

    Have my mediaplayer with CoreElec show up in Spotify as a Spotify Connect device and play back music.

    In this case, do I have to install both server and client addon on my mediaplayer? Or do I have an error in reasoning?

    snapcast: add streaming from kodi by awiouy · Pull Request #2597 · LibreELEC/LibreELEC.tv · GitHub

  • I just tried to install the addon through Kodi, I get no audio. I set `hdparam` in `config.txt` and my sound cards show up in aplay -L, I tried setting every index but nothing will produce sound.

    I am running snapcast server on a different computer, but It can see the client and shows that it is sending to it, but nothing comes out of the speakers.

    I can run snapcast client from docker (using the kodi docker addon), and it *does* play audio, so I think this plugin is not being configured correctly. Any ideas?

  • I just tried to install the addon through Kodi, I get no audio. I set `hdparam` in `config.txt` and my sound cards show up in aplay -L, I tried setting every index but nothing will produce sound.

    I am running snapcast server on a different computer, but It can see the client and shows that it is sending to it, but nothing comes out of the speakers.

    I can run snapcast client from docker (using the kodi docker addon), and it *does* play audio, so I think this plugin is not being configured correctly. Any ideas?

    Please provide the output of the following command:

    aplay -L

    and specify which device you intend to use

  • Since updating to Kodi 18, I no longer can select Snapserver for audio output device, I have PULSE: Null Output, Null Output (PULSEAUDIO) in its place. It worked fine on RC4

    After rebooting several times, it now works

    Edited once, last by grint (February 3, 2019 at 3:04 PM).

  • Hi

    I'm installed LibreELEC-RPi2.arm-9.0.1.img.gz on my raspberry pi 3.

    after that I installed snapserver add-on.

    I want to sync music from kodi to every snapclient device.

    but when I setting audio output device on snapserver I have "PULSE: Null Output, Null Output (PULSEAUDIO)".

    How do I able to fix this issue?

    Edited 2 times, last by mikeyen98793 (March 8, 2019 at 9:12 AM).

  • Hi

    I am trying this add-on but do not get any result yet.

    I have got 2 raspberry pi 3, both running kodi 18.1 on libreelec 9.0.1.

    PI1 has got snapserver and PI2 had got snapclient (both version 9.0.102).

    I configure the IP of PI1 in the snapclient config of PI2, and hit OK, but nothing happens (PI1 is playing music from a local MP3).

    How can I see that PI2 (the snapclient) is actually connected to PI1?

    How do I debug this setup?

    Hans

  • Hi awiouy,

    I run the snapcast server on a different RPi with Rapsbian. If I want to use LibreELEC as a Snapcast Client I always have to ssh "snapclient -h 192.168.188.46"

    Can you tell me how I can configure the client to use this Snapcast server permanent?

    I just troubleshot this and the problem is that the host is specified using the wrong argument when snapclient is started.

    After changing '--hostID' to '--host' in the startup script and rebooting, it now works for me with no manual intervention:

    Code
    # pwd
    /storage/.kodi/addons/service.snapclient/bin
    
    # diff snapclient.start.ORIG snapclient.start
    29c29,30
    < [ -n "$sc_h" ] && sc_H="--hostID $sc_h"
    ---
    > #[ -n "$sc_h" ] && sc_H="--hostID $sc_h"
    > [ -n "$sc_h" ] && sc_H="--host $sc_h"

    @awiouy, can you please update this script when you get a chance.

    Thanks,

    Ambidex

  • ambidex the --hostID setting is for setting ... the hostID of the machine running the snapclient. At the moment, there is no setting for the hostname or IP address of the machine running the snapserver.

    There are a number of cases where being able to set a hostname or IP address for the snapserver would be useful (eg. where machines are on different subnets).

    I've created a pull request to add such a setting: Addon - Snapclient - Add snapserver hostname/IP setting by natumbri · Pull Request #3875 · LibreELEC/LibreELEC.tv · GitHub

    Cheers,

    Nik.

  • Hi,

    Is there a way to get snapclient working under libreELEC 9? I installed the addon, but it does not connect to the snapserver, even thogh i provided the IP of the server.

    Any help would be appreciated.

  • Hi,

    Is there a way to get snapclient working under libreELEC 9? I installed the addon, but it does not connect to the snapserver, even thogh i provided the IP of the server.

    Any help would be appreciated.

    You're hitting the same issue I was. Please see my previous comment for how I got it working.

    According to dtugviogn what I did might not have been correct, but I don't understand why they're saying we should be setting the hostID of the machine running the snapclient.

    We're configuring the libreelec snapclient. So I would think we'd need to tell it about the snapserver by configuring the snapserver IP / HostID. Unless snapcast is doing some sort of discovery.

    In any case, this was my first experience with snapcast and what I did above got it working.

  • Hi,

    Having installed the GameStarter repository with Emulation Station, RetroArch, etc, I'm curious if it is possible to stream the audio from one of these for gaming with snapcast audio ..

    At the moment the option is for default or Kodi .. will a default option allow for the gaming audio to work with Snapcast?

    Thanks,

    Lawrence

    Edited 2 times, last by donkeykin (January 9, 2020 at 9:21 AM).