One of the best ways to experience seamless music is by streaming it via a DLNA / UPnP devices such as Chromecast, Roku, Amazon Fire Stick, and etc… Smartphone is the first obvious choice to start streaming music due to its portability. How about using your Ubuntu PC to stream music when you are working on it? Seems like a handy idea!
Check out “Pulseaudio-DLNA” utility for Linux. It is lightweight streaming server which brings DLNA / UPNP and Chromecast support to PulseAudio and Linux. It can stream your current PulseAudio playback to different UPNP devices in your network. The utility is easy to use, and easy to configure.
Installing Pulseaudio-DLNA in Ubuntu
I have tested it on Ubuntu 17.10, but should work on older Ubuntu versions, Linux Mint, elementary OS, and derivatives without hassles.
Step 1) Launch 'Terminal'.
Step 2) Enter the following command and press return to add PPA.
sudo apt-add-repository ppa:qos/pulseaudio-dlna
Step 3) Update the repositories in your computer.
sudo apt update
Step 4) Install Pulseaudio-DLNA using apt command:
sudo apt install pulseaudio-dlna
Step 5) Now run this command to start scanning for available Chromecast devices on your Wi-Fi network. Make sure to have the Chromecast power ON and connected to same Wi-Fi network as your Ubuntu PC.
pulseaudio-dlna
Step 6) You can close and terminal after a minute or so, and then go to “Settings”.
Step 7) Click “Sound” in the left pane. You should see Chromecast devices listed. To start streaming, simply select the device and then start playing music!