Chromecast local files from Linux - supports MKV, subtitles and 4K!
Clone or download
Latest commit 03c0350 Sep 27, 2018
Failed to load latest commit information.
icons desktop file Feb 16, 2018
www - Mar 29, 2018
.gitignore Initial commit Feb 15, 2018
LICENSE Initial commit Feb 15, 2018 Update Mar 29, 2018
gnomecast.desktop Add categories Feb 22, 2018 ui improvements Sep 27, 2018
launcher.png - Feb 17, 2018
receiver.html Create receiver.html Mar 28, 2018
requirements.txt added dep for #45 Jul 10, 2018
screenshot.png - Feb 24, 2018 added dep re #60 Jul 10, 2018
trending.png - Feb 16, 2018

alt text

Gnomecast logo

This is a native Linux GUI for casting local files to Chromecast devices. It supports:

  • Both audio and video files (anything ffmpeg can read)
  • Realtime transcoding (only when needed)
  • Subtitles (embedded and external SRT files)
  • Fast scrubbing (waiting 20s for buffering to skip 30s ahead is wrong!)
  • 4K videos on the Chromecast Ultra!


Please run:

$ sudo pip3 install gnomecast

If installing in a mkvirtualenv built virtual environment, make sure you include the --system-site-packages parameter to get the GTK bindings.


After installing, log out and log back in. It will be in your launcher:

alt text

You can also run it from the command line:

$ gnomecast

If you ran pip3 without sudo when installing, and $ gnomecast doesn't work due to your local path setup, you can also run it as:

$ python3 -m gnomecast

Please report bugs, including video files that don't work for you!

Thanks To...

And everyone who made this project hit HN's front page and #2 on GitHub's trending list! That's so awesome!!!

alt text


Chromecasts only support a handful of media formats. See:

So some amount of transcoding is necessary if your video files don't conform. But we're smart about it. If you have an .mkv file with h264 video and AAC audio, we use ffmpeg to simply rewrite the container (to .mp4) without touching the underlying streams, which my XPS 13 can at around 100x realtime (it's fully IO bound).

Now if you have that same .mkv file with and A3C audio stream (which Chromecast doesn't support) we'll rewrite the container, copy the h264 stream as is and only transcode the audio (at about 20x).

If neither your file's audio or video streams are supported, then it'll do a full transcode (at around 5x).

We write the entire transcoded file to your /tmp directory in order to make scrubbing fast and glitch-free, a good trade-off IMO. Hopefully you're not running your drive at less than one video's worth of free space!


Chromecast only supports a handful of subtitle formats, .srt not included. But it does support WebVTT. So we extract whatever subtitles are in your video, convert them to WebVTT, and then reattach them to the video through Chomecast's API.