Voltar ao ranking

keredson/gnomecast

Python

Chromecast local files from Linux - supports MKV, subtitles, 5.1 sound and 4K!

chromecastcastpythonchromecast-audiogoogle-castvideo4k
Crescimento de estrelas
Estrelas
1.4k
Forks
53
Crescimento semanal
Issues
66
8001k1.2k1.4k
fev. de 2018nov. de 2020set. de 2023jul. de 2026
ArtefatosPyPIpip install gnomecast
README

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!

What's New

  • 1.9: Multi video/audio stream support.
  • 1.8: 5.1/7.1 surround sound E/AC3 support.
  • 1.7: Drag and drop files into the main UI.
  • 1.6: Mutiple file / queuing support.

Install

Please run:

$ sudo apt install ffmpeg python3-pip python3-gi
$ 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.

Run

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

Or:

$ python3 -m gnomecast

You can also configure the port used for the HTTP server via the environment variable GNOMECAST_HTTP_PORT:

$ GNOMECAST_HTTP_PORT=8010 python3 -m gnomecast

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

Tests

Run the tests from the commandline:

$ python3 test_gnomecast.py

My File Won't Play!

Chromecasts are picky, and the built in media receiver doesn't give any feedback regarding why it won't play something. (It just flashes and quits on the main TV.) If your file won't play, please click the info button:

image

And then the "Report File Doesn't Play" button:

image

So I can fix it!

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

Transcoding

Chromecasts only support a handful of media formats. See: https://developers.google.com/cast/docs/media

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!

Subtitles

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.

Repositórios relacionados
dmunozv04/iSponsorBlockTV

SponsorBlock client for all YouTube TV clients.

PythonPyPIGNU General Public License v3.0pythonappletv
5.9k250
philippe44/AirConnect

Use AirPlay to stream to UPnP/Sonos & Chromecast devices

COtherupnpchromecast
4.1k246
home-assistant-libs/pychromecast

Library for Python 3 to communicate with the Google Chromecast.

PythonPyPIMIT Licensecastchromecast
2.7k388
muammar/mkchromecast

Cast macOS and Linux Audio/Video to your Google Cast and Sonos Devices

PythonPyPIOthermacosaudio
mkchromecast.com
2.3k149
hensm/fx_cast

Chromecast Web Sender SDK implementation for Firefox

TypeScriptnpmMIT Licensefirefoxwebextension
hensm.github.io/fx_cast/
2k74
1hakr/AnExplorer

📁 Another Android Explorer ( File Manager ) is an All-in-One Open source file manager. AnExplorer File Manager (File Explorer) is designed for all android devices including Phones, Phablets, Tablets, Chromecast, Wear OS, Android TV and Chromebooks. It's a fully designed with Material guidelines by Google.

JavaMavenApache License 2.0storageusb-devices
anexplorer.io
2k628
tizonia/tizonia-openmax-il

Command-line cloud music player for Linux with support for Spotify, Google Play Music, YouTube, SoundCloud, TuneIn, iHeartRadio, Plex servers and Chromecast devices.

CGNU Lesser General Public License v3.0openmax-ilmusic-player
tizonia.org
1.7k90
stupside/castor

Point it at any web page and it finds the video, extracts the stream, transcodes it and casts in real time to your TV. It even burns subtitles….

GoGo ModulesMIT Licensestreamingvideo
1.6k42
vitalets/awesome-smart-tv

:zap:A curated list of awesome resources for building Smart TV apps

smart-tvsmarttv
1.4k107
trynoice/android-app

The Android app for Noice.

KotlinGNU General Public License v3.0kotlinandroid
trynoice.com
1k100
PRProd/HA-Firemote

Apple TV, Amazon Fire TV, Chromecast, Homatics, NVIDIA Shield, onn., Roku, Xiaomi Mi, and Android TV remote control card for Home Assistant

GNU General Public License v3.0amazon-firehome-assistant
1k100
theothernt/AerialViews

A screensaver for Android TV devices including Google TV, Nvidia Shield, and Fire TV. Inspired by Apple TV's video screensaver.

KotlinOtherandroid-tvscreensaver
1k64