Giter Site home page Giter Site logo

dtrw / gnomecast Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keredson/gnomecast

0.0 1.0 0.0 1.45 MB

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

License: GNU General Public License v3.0

Python 99.12% HTML 0.41% CSS 0.46%

gnomecast's Introduction

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

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

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.

gnomecast's People

Contributors

keredson avatar sdushantha avatar fiendish avatar rgegriff avatar overkillguy avatar fbartels avatar yahe avatar 0x85dotdev avatar k3ck3c avatar meonwax avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.