catt

Cast All The Things allows you to send videos from many, many online sources to your Chromecast.

  • 所有者: skorokithakis/catt
  • 平台:
  • 許可證: BSD 2-Clause "Simplified" License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖







===============================
Cast All The Things

.. image:: https://img.shields.io/pypi/v/catt.svg
:target: https://pypi.python.org/pypi/catt

.. image:: https://img.shields.io/travis/skorokithakis/catt.svg
:target: https://travis-ci.org/skorokithakis/catt

.. image:: https://badges.gitter.im/Join%20Chat.svg
:target: 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 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 <https://github.com/ytdl-org/youtube-dl/blob/master/youtube_dl/__init__.py#L317>, rather
than its command-line name.

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
  • From many, many online sources <http://rg3.github.io/youtube-dl/supportedsites.html>_
  • 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
  • youtube-dl <https://github.com/ytdl-org/youtube-dl>_ - Command-line program to download videos from YouTube.com and other video sites
  • casttube <https://github.com/ur1katz/casttube>_ - YouTube Chromecast API

主要指標

概覽
名稱與所有者skorokithakis/catt
主編程語言Python
編程語言Python (語言數: 2)
平台
許可證BSD 2-Clause "Simplified" License
所有者活动
創建於2016-04-24 23:10:20
推送於2025-06-29 00:36:32
最后一次提交2025-06-29 00:36:31
發布數55
最新版本名稱v0.12.13 (發布於 )
第一版名稱v0.0.1 (發布於 2016-04-25 03:58:51)
用户参与
星數3.5k
關注者數39
派生數163
提交數409
已啟用問題?
問題數258
打開的問題數50
拉請求數193
打開的拉請求數4
關閉的拉請求數11
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?
ORM系统

goatfish

由SQLite支持的小型无架构Python ORM。(A small, schemaless Python ORM th...
Python

shortuuid

A generator library for concise, unambiguous and URL-safe UU...