Learn How to Send Your Linux Desktop Audio to a Chromecast

Are you interested in streaming audio from VLC, Rhythmbox, or another Linux app to your TV via Chromecast? Mkchromecast is the Linux tool with which you can do exactly that.

Mkchromecast is a small tool build using python with which you can stream all your computer’s audio through your Chromecast without any need to rely on apps that add individual support.

The open-source app streams Linux audio using parac and mp3 at a sample rate of 44100Hz and an average bitrate of 192k (it is also available for macOS).

The settings that come as default can be easily reconfigured to make the app use lossy or lossless audio formats using ffmpeg, a higher bitrate or a completely different audio encoder and all these settings can be made from a single preferences window.

mkchromecast-preferences

Mkchromecast might have an awkward name but it makes casting audio from your Linux desktop to your TV, Cast ready speakers, set-top box, etc, very easy via the use of Google Cast. All you need do is launch the app, select your Chromecast from the system tray applet, and your audio will be waiting to get streamed.

Installing and Using Mkchromecast

Mkchromecast has support for Ubuntu 16.04 LTS but it requires python-pychromecast,  which is a library available only in Ubuntu 16.10 Yakkety Yak at the moment.

Thankfully, we can effortlessly install the Yakkety package for this library on Xenial from here, and you can install it using your preferred method.

Next, download the latest version of mkchromecast for Ubuntu from the project’s GitHub page and again, install it using your preferred method.

If after installing any of the above packages you find difficulty running the app, just enter the following command in the terminal:

sudo apt -f install

Alternatively, manually install all of mkchromecast’s dependencies by entering the following command:

sudo apt install python-pip python-flask python-psutil python-setuptools python-mutagen python-gi vorbis-tools sox lame flac faac opus-tools

If you are interested in using the app entirely from the command line refer to the GitHub project wiki page for more details.

But if like many users we know of, you’d rather use the app with the tray applet and a GUI you need to install python-pyqt5.

Launch the app from your app launcher and you will see a black Chromecast icon appear in the system tray area:

mkchromecast tray applet

From here things are straightforward:

  • Click tray icon > ‘Search for Google Cast devices’
  • Click tray icon > click the name of Cast device you wish to stream to

Next:

  • Open Ubuntu System Settings > Sound > Output
  • Select ‘mkchromecast’

And That’s all – your Linux desktop audio is ready to be streamed to your TV.

Casting the Audio of a Single App

Casting all of your desktop’s audio means you will also hear audio from other apps, system sounds, etc so it might not be ideal.

If you need to send a specific application’s audio to Chromecast you will need to make use of an advanced sound control app like PulseAudio Volume Control which allows you to select an audio application from a list and switch the sound output for it to ‘mkchromecast’.

We hope this guide was helpful to you. Do let us know if you have any issues, suggestions and/or comments in the comments section below.

About The Author
Okoi Martins Jr.

Computer Science enthusiasts with a passion for learning new things. In my spare time, I listen to music, read like a compiler, and learn like an A.I algorithm.

Leave a Response