Pulseaudio-dlna as addition/extension/package for libreelec

  • Dear,

    I have been playing with LibreELEC for a bit, however for my need, 1 thing is failing: there is no way to get the sound from the box, over the network to a dlna output. But LibreELEC has most of the solution already built in: pulseaudio. Currently it seems this can only connect to bluetooth. However pulseaudio is fairly extendable: there is Pulsaudio-DLNA

    This small extension allows it to redirect all sound over network to any DLNA renderer. This is ideal to be able to get the sound not from tv-loudspeakers, but directly from your hifi set.

    Would it be possible to integrate this in LibreELEC?

    thank you,

    best regards,

    Hendrik-Jan

  • Ok, trying to scratch my own itch here:

    I'm setting up a build env and build this as a package myself.

    - Step 1: Make package file package.mk.pulseaudiodlna.txt

    Stuck here: what are the commands I need to make this build? (attached is my build file)

    - Step 2: How do I integrate this in the build env?

    - Step 3: How will I get this to build in teh build env

    - Step 4: ????

    - Step 5: Profit. (nah, just an additional package for Libreelec)

    Thanks.

    Hendrik-Jan

  • This Python package has many dependencies, in particular compiled ones (lxml). You will need to create a package.mk for each one of them, and then bundle them into an addon.

    Docker seems appropriate, especially since Python 2 (which is required by the package) will soon be replaced by Python 3 on LibreELEC.

  • Right,

    I have been messing about with docker on this.

    The "more ideal" route would be to have pulseaudio on libreelec available over DBus, so I can connect a docker container with only pulseaudio-dlna.

    However, this seems not to work, as I can not get access to pulseaudio-dbus on libreelec?

    So I am now looking at using pulseaudio over network to pulseaudio on the docker container, and then using pulseaudio-dlna to the docker container pulseaudio.

    I am trying to follow: this libreelec wiki page but my biggest issue with it so far is that I need to stop kodi, add a module to pulseaudio, start kodi and connect to the new module on docker. This can all be done, but it seems a bit of a pain to get this running automatically on boot, which is what I would need. Is there something I am not seeing here?

    thanks

  • PulseAudio DLNA will not work natively because pulseaudio runs as root on LibreELEC.

    You could use a pulse ALSA device to stream Kodi output to PulseAudio, and then stream that to a network or combined sink.

    To create a pulse ALSA device, install the Snapclient addon that ships the pulseaudio ALSA plugins (I will hopefully change that soon), then edit /storage/.config/asound.conf to include the following lines:

    Restart Kodi or reboot, then configure Kodi to use that device, which should remain available.

    Unless that device is configured otherwise, it will stream to a null PulseAudio sink. To fix this, you must create a PulseAudio configuration in /storage/.config/pulse-daemon.conf.d, eg 99-dlna.conf to create a network or combined sinks.

    I hope that this will help you forward.

  • Hi awiouy,

    thanks a lot. this does help me foreward as it confirms indeed that I would need to create some audio device on libreelec as network sink. This sink I should connect to on docker, and there I can have pulseaudio-dlna connect to it.

    After that I can again stream over network, and see (hear) what comes out.

    Let's hope the lag will not be too crazy..

    thanks again, I now know what I have to do,