Streaming audio from Ubuntu Linux to a DLNA player (Blu Ray or PS3) using Rygel10 Jan 2012
This project started out of researching how to play sound from spotify or rhythmbox from my laptop running ubuntu 11.10 through my hifi. Initially I set out to see if an airport express would work using raop and pulseaudio but it seems that support for the new 802.11 version is flakey so I didn't wish to invest £80 in a device that might not work. During my research I found that DLNA supported streaming, DLNA is a protocol commonly used for sharing media files with devices such as networked dvd players, internet tvs and consoles like the ps3 so I explored further.
DLNA is supported in Ubuntu (and other modern linux distros) by Rygel, part of the Gnome project. Rygel provides a DLNA server which also has the capability to capture a pulseaudio sink (an input or output stream) and stream it to a DLNA enabled device.
Below are the steps I took to enable me to stream audio from my computer to my Sony BDP-S370, they should be applicable to any similar device: <!--more-->
- Install required packages:
- Find the name of the pulseaudio sink which you wish to capture:
To list the choices, use:
Then make a note of the name attribute (minus surrounding brackets), in my case it was:
I found that adding .monitor to this was required for the next stage, this can be achieved in one command:
- Edit /etc/rygel.conf:
Replace (or comment out)
replacing the device on the last line with the output from the previous stage.
- Start Rygel (type rygel in the terminal)
- Connect your player to the DLNA device which should have appeared (probably as GstLaunch) and you should hear any audio played on your computer through your DLNA device.
- If you wish (I don't) add rygel to run at startup.
- If you just wish to share audio and video files then something like mediatomb with be much more simple (although rygel also shares files).
- There is meant to be a simpler way to link rygel and pulseaudio where everything works out of the box and rygel appears as a separate audio out but it's currently broken with the supplied pulseaudio/rygel combination in ubuntu.