Ubuntu – Stream Ubuntu audio to remote XMBC

pulseaudioraspberrypisoundstreaming

I have a Raspberry Pi set up with an XMBC media server that can accept Airplay or UPNP inputs over the local network. I'd like to push audio streams to the Pi. I have managed to make it work with Android phones, Windows PCs, but I'm really struggling with Ubuntu.

I tried setting up PulseAudio explained in a couple of threads here (e.g. this thread: How to stream music over the network to multiple computers?). PulseAudio can recognise the XMBC device, but when I try to change the playback device (playing music on Spotify or YouTube), it stops working. I also tried stream2ip, no luck. Just wondering if someone has a suggestion how to make this work.

Many thanks

Best Answer

Use rygel (sudo apt-get install rygel).


Configuration

Install necessary things: sudo apt-get install rygel rygel-preferences pavucontrol paprefs gupnp-tools

Due to bug #827030, we can't autostart rygel easily. But we can do this:

Install, start rygel-preferences, exit rygel preferences. Start Rygel preferences, untick the "Share Media through DLNA" button, exit Rygel preferences, then start Rygel preferences, tick the checkbox and exit it again and it should work.

Note: How to fix stolen from comments on the bug report

Now, enable the necessary PulseAudio module: pacmd load-module module-http-protocol-tcp

To do this automatically, add the line load-module module-http-protocol-tcp to /etc/pulse/default.pa, or do this: sudo su -c 'echo 'load-module module-http-protocol-tcp' >> /etc/pulse/default.pa

Run paprefs, select the "Network Server" tab and enable "Make local sound devices available as DLNA/UPnP Media Server".

Browse the DLNA network on a client device (Android phone, Smart TV, etc.). You will see "Audio on $hostname" -> Output Devices -> Built-in Audio Analogue Stereo (the device name will likely change depending on the audio hardware in your computer). You should hear on your client device whatever is currently being played via that sink.

Guide taken from, and full guide available, if that doesn't work here

Related Question