Cast All The Things allows you to send videos from many, many online sources to your Chromecast.
Project description
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 install Cast All The Things with pip:
pip3 install catt
catt is only compatible with Python 3. If you need a Python 2-compatible version, please install 0.5.6, the last py2-compatible release.
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 youtube-dl 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 youtube-dl options to catt through the -y command-line flag, you need to use youtube-dl’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 youtube-dl with pip install -U youtube-dl and that will probably fix it. This is because sites keep changing and youtube-dl is updated very regularly to keep them all working.
You can also run catt in 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 file
CATT can utilize a config-file stored at ~/.config/catt/catt.cfg (%APPDATA%\catt\catt.cfg on Windows).
The format is as following:
[options] device = chromecast_one [aliases] one = chromecast_one two = chromecast_two
In the [options] section, device denotes 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 to catt.cfg by doing:
catt -d <name_of_chromecast> set_default
In 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 to catt.cfg by doing:
catt -d <name_of_chromecast> set_alias <alias>
Contributing
If you want to contribute a feature to catt, 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 run catt in development, you can use the following command:
python -m catt.cli --help
Before committing, please make sure you install pre-commit and install its hooks:
pip install pre-commit pre-commit install
That’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!
Info
Free software: BSD license
Features
Casts videos to Chromecast
Casts local files (videos, photos and music)
Casts any website to Chromecast
Thanks
Catt would not be possible without these great projects:
pychromecast - Library for Python 3 to communicate with the Google Chromecast
youtube-dl - Command-line program to download videos from YouTube.com and other video sites
casttube - YouTube Chromecast API
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file catt-0.12.1.tar.gz
.
File metadata
- Download URL: catt-0.12.1.tar.gz
- Upload date:
- Size: 28.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fef58bf7a8ebaba98399d1077cc4615f53d0196aab2a989df369a66f7111963b |
|
MD5 | fea328054a6883e4459ed31f2251361a |
|
BLAKE2b-256 | d5fdd1732ba5ec1c21d2f99f9924a62fcce4278f3f5c9998ce8a24749a6bd07e |
File details
Details for the file catt-0.12.1-py2.py3-none-any.whl
.
File metadata
- Download URL: catt-0.12.1-py2.py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1350a7e580fa130bcfacec3a52884d6a94d66fbbfd245855b0ff303b51715d5 |
|
MD5 | 844cc8f174f16f2be2cd596e472a3663 |
|
BLAKE2b-256 | a853734651a213a502a5b0880e6cb0133cbc026e03a9ff3436a4db339c6d0b96 |