Cast ubuntu sound to chromecast

Ubuntu has the possibility to cast its sound to other devices like the chromecast-audio. Nice when you want to stream music to your living room. You need the program pulseaudio-dlna that is a lightweight streaming server that makes it easy to stream audio from a Linux computer that uses PulseAudio, to a DLNA / UPnP or Chromecast device in the same network.

The tool discovers all UPnP / DLNA / Chromecast renderers in the network and adds them as sinks to PulseAudio. You can then either select the sinks from the sound settings, or use pavucontrol to control which applications can stream to the UPnP / DLNA or Chromecast device.

Let's get started with installing and using pulseaudio-dlna.

For Ubuntu 16.04, 14.04, Linux Mint 17.x and derivatives, pulseaudio-dlna can be installed from a PPA. To add the PPA and install pluseaudio-dlna, use the following commands:

sudo add-apt-repository ppa:qos/pulseaudio-dlna sudo apt-get update sudo apt-get install pulseaudio-dlna

Now, to run it, type the following in a terminal:

pulseaudio-dlna

On the other end, make sure the DLNA / UPnP or Chromecast device is powered on.

Next, open the system sound settings. In Ubuntu (Unity), from the Sound Menu, select Sound Settings and your DLNA / UPnP and/or Chromecast device should show up in the output list:

Select the device you want to stream to and... that's it. chromecast should start streaming immediately. Chromecast needs the mp3 codec to play sound correctly.

f you want to send single audio streams to the device, you can use pavucontrol. To install it in Ubuntu, use the following command:

sudo apt-get install pavucontrol

Then launch pavucontrol (it shows up as PulseAudio Volume Control in the menu / Dash) and on the Playback tab, change the stream to the DNLA / Chromecast device, only for the apps you want to use for streaming.

source http://www.webupd8.org/2016/03/how-to-stream-audio-to-chromecast-or.html