Cast All The Things allows you to send videos from many, many online sources to your Chromecast.
Maintained. Last release 2 months ago, commits in 4 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install cattCast All The Things
Cast All The Things allows you to send videos from many, many online sources (YouTube, Vimeo, and a few hundred others) to your Chromecast. It also allows you to cast local files or render websites.
Installation
You can run Cast All The Things with uv without installing:
uvx catt
You can install Cast All The Things with pipx:
pipx install catt
Or with pip, but that's not as good:
pip3 install catt
catt requires Python 3.11 or higher. For older Python versions,
you can install catt version 0.12.x which supports Python 3.7+.
Usage
To use Cast All The Things, just specify a URL:
catt cast "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
catt supports any service that yt-dlp supports, which includes most
online video hosting services.
catt can also cast local files (if they're in a format the Chromecast
supports natively):
catt cast ./myvideo.mp4
You can also control your Chromecast through catt commands, for
example with catt pause. Try running catt --help to see the full
list of commands.
If you have subtitles and the name is similar to the name of the local
file, catt will add them automatically. You can, of course, specify
any other subtitle if you want. Although Chromecast only supports
WEBVTT, TTML and Line 21 subtitles, catt conveniently converts SRTs to
WEBVTT for you on the fly. Here is how to use it:
catt cast -s ./mysubtitle.srt /myvideo.mp4
catt can also tell your Chromecast to display any website:
catt cast_site https://en.wikipedia.org/wiki/Rickrolling
Please note that the Chromecast has a slow CPU but a reasonably recent version of Google Chrome. The display resolution is 1280x720.
If you want to pass yt-dlp options to catt through the [-y]{.title-ref} command-line flag, you need to use yt-dlp's internal option name, rather than its command-line name.
If you notice that catt stops working with video sites (YouTube, Vimeo, etc), just upgrade yt-dlp with [pip install -U yt-dlp]{.title-ref} and that will probably fix it. This is because sites keep changing and yt-dlp is updated very regularly to keep them all working.