Stream audio and video from the Linux desktop to your Google Chromecast? No problem!
MkChromeCast is a free, open source app to cast audio and video from your macOS, or Linux desktop to your Google Cast devices or Sonos speakers.
I’ve had a ChromeCast for a number of years now. Its inexpensive, but for its lack of cost, its still a widely supported platform means that its a near daily used $50 piece of kit in my house for both video and audio. Until now, casting content natively from both a Mac and Linux has been a little tricky. The only true way to do it was via the Google Chrome web browser, so that meant that any other app (such as Rhythmbox or VLC) was out, unless the app natively supported Google Casting.
A few things to note:
The software is young, its free and it seems like its only supported by one developer, so with that, a bit of latitude needs to be given for its current misgivings:
- Video casting support is a CLI feature only. There’s (currently) no GUI for it.
- The macOS client is less feature rich than its Linux equivalent, and it is currently quite a lot more buggier. Its GUI doesn’t seem to do a lot either!
- It can sometimes disconnect for no good reason and spout a whole bunch of gnarly python errors out at you.
All of this aside, it’s a really great app that solves a problem for a lot of people.
I want it now, dammit!
The latest version can be downloaded for Debian/Ubuntu from GitHub, however the version available in Ubuntu 17.04 and its derivatives is 0.37+git20170130, which is all but the second to last release, so the good news is that the Ubuntu version available in the Software Centre or via APT, is pretty much up to date.
To install via APT, simply type the following at the command prompt:
apt install mkchromecast pavucontrol
PavuControl is the pulseaudio volume control tool. Depending upon your distro, you may already have it installed.
What does it look like?
Glad you asked! I prepared a short video demonstrating it working on my Google ChromeCast, have a look!
Under the hood with mkchromecast
Mkchromecast is written in Python, and it streams via
avconv. Mkchromecast is capable of using lossy and lossless audio formats provided that
avconv (Linux), or
parec (Linux) are installed. It also supports Multi-room group playback, and 24-bits/96kHz high audio resolution.
Any more tips on how to use it?
All of the up to date info can be seen on the author’s website, However, here’s a few helpful hints to get you started if you are working from the command line:
mkchromecast --video -i "/path/to/file.mp4"
Casting video with subtitles? Simply pass the
--subtitles flag and point mkchromecast to a matching .srt file:
mkchromecast --video -i "~/Videos/Example.mkv" --subtitles ~/Videos/Example.srt
If you want to cast a video file available from an online source you can do use the
mkchromecast --source-url http://myvideowebsite.org/video.mp4 -c mp4 --volume --video
You can even cast YouTube Videos too — but be aware that this will download the YouTube video to your computer and then cast the local file to your TV:
mkchromecast -y https://www.youtube.com/watch?v=ABCDEfg --video
Don’t forget your FREE ULNG e-book!
Don’t forget to download your FREE copy of the Ultimate Linux Newbie Guide e-book! All of the chapters of the guide, plus our best tutorials and blog entries!