Package: catt
Cast All The ThingsCast 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.InstallationYou can install Cast All The Things with pipx:pipx install cattOr with pip, but that's not as good:pip3 install cattcattis only compatible with Python 3. If you need a Python
2-compatible version, please install0.5.6, the last py2-compatible
release.UsageTo use Cast All The Things, just specify a URL:catt cast "https://www.youtube.com/watch?v=dQw4w9WgXcQ"cattsupports any service that yt-dlp supports, which includes most
online video hosting services.cattcan also cast local files (if they're in a format the Chromecast
supports natively):catt cast ./myvideo.mp4You can also control your Chromecast throughcattcommands, for
example withcatt pause. Try runningcatt --helpto see the full
list of commands.If you have subtitles and the name is similar to the name of the local
file,cattwill add them automatically. You can, of course, specify
any other subtitle if you want. Although Chromecast only supports
WEBVTT, TTML and Line 21 subtitles,cattconveniently converts SRTs to
WEBVTT for you on the fly. Here is how to use it:catt cast -s ./mysubtitle.srt /myvideo.mp4cattcan also tell your Chromecast to display any website:catt cast_site https://en.wikipedia.org/wiki/RickrollingPlease 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'sinternal 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.You can also runcattin Docker, if you prefer:docker run --net=host --rm -it python:3.7 /bin/bash -c "pip install catt; catt cast 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'"Configuration fileCATT can utilize a config-file stored at~/.config/catt/catt.cfg(%APPDATA%\catt\catt.cfgon Windows,~/Library/Application Support/catt/catt.cfgon macOS).The format is as following:[options]device=chromecast_one[aliases]one=chromecast_onetwo=chromecast_twoIn the[options]section,devicedenotes the default device that
will be selected, when you have not selected a device via the cli.You can write your choice of default device tocatt.cfgby doing:catt -d <name_of_chromecast> set_defaultIn the[aliases]section, you can specify aliases for the names of
your chromecasts. You can then select a device just by doing:catt -d <alias> <command>You can write an alias name for a device tocatt.cfgby doing:catt -d <name_of_chromecast> set_alias <alias>FirewallFor the casting of local files to work you need to allow in the port range 45000-47000 over tcp.ContributingIf you want to contribute a feature tocatt, please open an issue (or
comment on an existing one) first, to make sure it's something that the
maintainers are interested in. Afterwards, just clone the repository and
hack away!To runcattin development, you can use the following command:python -m catt.cli --helpBefore committing, please make sure you installpre-commitand install
its hooks:pip install pre-commit
pre-commit installThat's all, now you can commit and the hooks will run. Black (which is
used to format the code) requires Python 3.6 to run, but please make the
effort, as our CI will yell at you if the code is not formatted, and
nobody wants that.Thanks!InfoFree software: BSD licenseFeaturesCasts videos to ChromecastFrommany, many online
sourcesCasts local files (videos, photos and music)Casts any website to ChromecastThanksCatt would not be possible without these great projects:pychromecast- Library
for Python 3 to communicate with the Google Chromecastyt-dlp- Command-line program to
download videos from YouTube.com and other video sitescasttube- YouTube Chromecast
API