catt


Namecatt JSON
Version 0.12.12 PyPI version JSON
download
home_pagehttps://github.com/skorokithakis/catt
SummaryCast All The Things allows you to send videos from many, many online sources to your Chromecast.
upload_time2024-01-28 22:01:40
maintainer
docs_urlNone
authorStavros Korokithakis
requires_python>=3.7
licenseBSD
keywords chromecast cast catt cast_all_the_things
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Cast All The Things
===================

[![image](https://img.shields.io/pypi/v/catt.svg)](https://pypi.python.org/pypi/catt)
[![image](https://img.shields.io/travis/skorokithakis/catt.svg)](https://travis-ci.org/skorokithakis/catt)
[![image](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/skorokithakis/catt)

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 pipx:

    pipx install catt

Or with pip, but that's not as good:

    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 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](https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/__init__.py#L620),
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 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, `~/Library/Application Support/catt/catt.cfg` on macOS).

The format is as following:

```ini
[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>

Firewall
--------

For the casting of local files to work you need to allow in the port range 45000-47000 over tcp.

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
- From [many, many online
  sources](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)
- Casts local files (videos, photos and music)
- Casts any website to Chromecast

Thanks
------

Catt would not be possible without these great projects:

- [pychromecast](https://github.com/balloob/pychromecast) - Library
  for Python 3 to communicate with the Google Chromecast
- [yt-dlp](https://github.com/yt-dlp/yt-dlp) - Command-line program to
  download videos from YouTube.com and other video sites
- [casttube](https://github.com/ur1katz/casttube) - YouTube Chromecast
  API


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/skorokithakis/catt",
    "name": "catt",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "chromecast,cast,catt,cast_all_the_things",
    "author": "Stavros Korokithakis",
    "author_email": "hi@stavros.io",
    "download_url": "https://files.pythonhosted.org/packages/0a/f1/f13cead4a1911fe9a5186a6f2bcb1eecd9cf72e8c25644e9e7811404e008/catt-0.12.12.tar.gz",
    "platform": null,
    "description": "Cast All The Things\n===================\n\n[![image](https://img.shields.io/pypi/v/catt.svg)](https://pypi.python.org/pypi/catt)\n[![image](https://img.shields.io/travis/skorokithakis/catt.svg)](https://travis-ci.org/skorokithakis/catt)\n[![image](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/skorokithakis/catt)\n\nCast All The Things allows you to send videos from many, many online\nsources (YouTube, Vimeo, and a few hundred others) to your Chromecast.\nIt also allows you to cast local files or render websites.\n\nInstallation\n------------\n\nYou can install Cast All The Things with pipx:\n\n    pipx install catt\n\nOr with pip, but that's not as good:\n\n    pip3 install catt\n\n`catt` is only compatible with Python 3. If you need a Python\n2-compatible version, please install `0.5.6`, the last py2-compatible\nrelease.\n\nUsage\n-----\n\nTo use Cast All The Things, just specify a URL:\n\n    catt cast \"https://www.youtube.com/watch?v=dQw4w9WgXcQ\"\n\n`catt` supports any service that yt-dlp supports, which includes most\nonline video hosting services.\n\n`catt` can also cast local files (if they're in a format the Chromecast\nsupports natively):\n\n    catt cast ./myvideo.mp4\n\nYou can also control your Chromecast through `catt` commands, for\nexample with `catt pause`. Try running `catt --help` to see the full\nlist of commands.\n\nIf you have subtitles and the name is similar to the name of the local\nfile, `catt` will add them automatically. You can, of course, specify\nany other subtitle if you want. Although Chromecast only supports\nWEBVTT, TTML and Line 21 subtitles, `catt` conveniently converts SRTs to\nWEBVTT for you on the fly. Here is how to use it:\n\n    catt cast -s ./mysubtitle.srt /myvideo.mp4\n\n`catt` can also tell your Chromecast to display any website:\n\n    catt cast_site https://en.wikipedia.org/wiki/Rickrolling\n\nPlease note that the Chromecast has a slow CPU but a reasonably recent\nversion of Google Chrome. The display resolution is 1280x720.\n\nIf you want to pass yt-dlp options to catt through the [-y]{.title-ref}\ncommand-line flag, you need to use yt-dlp's [internal option\nname](https://github.com/yt-dlp/yt-dlp/blob/master/yt_dlp/__init__.py#L620),\nrather than its command-line name.\n\nIf you notice that catt stops working with video sites (YouTube, Vimeo,\netc), just upgrade yt-dlp with [pip install -U yt-dlp]{.title-ref} and\nthat will probably fix it. This is because sites keep changing and\nyt-dlp is updated very regularly to keep them all working.\n\nYou can also run `catt` in Docker, if you prefer:\n\n    docker run --net=host --rm -it python:3.7 /bin/bash -c \"pip install catt; catt cast 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'\"\n\n### Configuration file\n\nCATT can utilize a config-file stored at `~/.config/catt/catt.cfg`\n(`%APPDATA%\\catt\\catt.cfg` on Windows, `~/Library/Application Support/catt/catt.cfg` on macOS).\n\nThe format is as following:\n\n```ini\n[options]\ndevice = chromecast_one\n\n[aliases]\none = chromecast_one\ntwo = chromecast_two\n```\n\nIn the `[options]` section, `device` denotes the default device that\nwill be selected, when you have not selected a device via the cli.\n\nYou can write your choice of default device to `catt.cfg` by doing:\n\n    catt -d <name_of_chromecast> set_default\n\nIn the `[aliases]` section, you can specify aliases for the names of\nyour chromecasts. You can then select a device just by doing:\n\n    catt -d <alias> <command>\n\nYou can write an alias name for a device to `catt.cfg` by doing:\n\n    catt -d <name_of_chromecast> set_alias <alias>\n\nFirewall\n--------\n\nFor the casting of local files to work you need to allow in the port range 45000-47000 over tcp.\n\nContributing\n------------\n\nIf you want to contribute a feature to `catt`, please open an issue (or\ncomment on an existing one) first, to make sure it's something that the\nmaintainers are interested in. Afterwards, just clone the repository and\nhack away!\n\nTo run `catt` in development, you can use the following command:\n\n    python -m catt.cli --help\n\nBefore committing, please make sure you install `pre-commit` and install\nits hooks:\n\n    pip install pre-commit\n    pre-commit install\n\nThat's all, now you can commit and the hooks will run. Black (which is\nused to format the code) requires Python 3.6 to run, but please make the\neffort, as our CI will yell at you if the code is not formatted, and\nnobody wants that.\n\nThanks!\n\nInfo\n----\n\n-   Free software: BSD license\n\nFeatures\n--------\n\n- Casts videos to Chromecast\n- From [many, many online\n  sources](https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md)\n- Casts local files (videos, photos and music)\n- Casts any website to Chromecast\n\nThanks\n------\n\nCatt would not be possible without these great projects:\n\n- [pychromecast](https://github.com/balloob/pychromecast) - Library\n  for Python 3 to communicate with the Google Chromecast\n- [yt-dlp](https://github.com/yt-dlp/yt-dlp) - Command-line program to\n  download videos from YouTube.com and other video sites\n- [casttube](https://github.com/ur1katz/casttube) - YouTube Chromecast\n  API\n\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Cast All The Things allows you to send videos from many, many online sources to your Chromecast.",
    "version": "0.12.12",
    "project_urls": {
        "Homepage": "https://github.com/skorokithakis/catt"
    },
    "split_keywords": [
        "chromecast",
        "cast",
        "catt",
        "cast_all_the_things"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c26057733545c5046b658e95006e8bf191367197bb70e53a6a8184a327911bae",
                "md5": "6a939d953f56547d01808567896300e9",
                "sha256": "da37c3ebf1af4894d768a6eac7546209a3da8fd170e2c4cf8e16af17208d7d8b"
            },
            "downloads": -1,
            "filename": "catt-0.12.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6a939d953f56547d01808567896300e9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 26664,
            "upload_time": "2024-01-28T22:01:37",
            "upload_time_iso_8601": "2024-01-28T22:01:37.979957Z",
            "url": "https://files.pythonhosted.org/packages/c2/60/57733545c5046b658e95006e8bf191367197bb70e53a6a8184a327911bae/catt-0.12.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0af1f13cead4a1911fe9a5186a6f2bcb1eecd9cf72e8c25644e9e7811404e008",
                "md5": "e292d153210bf62483cd4ca4c46d7f94",
                "sha256": "dbb024a1ed37705596db1f957bdeb99123eff26e724082fce23357367c458b73"
            },
            "downloads": -1,
            "filename": "catt-0.12.12.tar.gz",
            "has_sig": false,
            "md5_digest": "e292d153210bf62483cd4ca4c46d7f94",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 25164,
            "upload_time": "2024-01-28T22:01:40",
            "upload_time_iso_8601": "2024-01-28T22:01:40.080793Z",
            "url": "https://files.pythonhosted.org/packages/0a/f1/f13cead4a1911fe9a5186a6f2bcb1eecd9cf72e8c25644e9e7811404e008/catt-0.12.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-28 22:01:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "skorokithakis",
    "github_project": "catt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "catt"
}
        
Elapsed time: 0.17799s