CLI tool for streaming video file to Chromecast
Project description
ccastplayer
This is a simple CLI tool for streaming a video file to a Chromecast device. It is implemented in Python and requires PyChromecast library for communicating with the Chromecast device.
This is somewhat similar to Mkchromecast but simpler. The intention is to enable simple viewing of video files on a Chromecast device from a Linux command line. It might work on some other OSes too.
This script does not do any conversion. It expects the video file to already be already in a format that is accepted by the Chromecast device.
There are no controls for playback. The assumption is that it is used with "Chromecast with Google TV" type device that can be controlled with a remote control. However playback can be gracefully stopped by pressing Ctrl-C.
Subtitles can be supplied using a separate VTT file.
By default the first Chromecast device discovered on the local network is used.
Installation
Install from PyPI with pip:
pip install ccastplayer
Install from PyPI with pipx:
pipx install ccastplayer
Install from PyPI with uv:
uv tool install ccastplayer
Install directly from the GitHub repository:
pip install "ccastplayer @ git+https://github.com/snabb/ccastplayer.git"
pipx install git+https://github.com/snabb/ccastplayer.git
uv tool install git+https://github.com/snabb/ccastplayer.git
Example usage with a local video file:
ccastplayer myvideo.mp4
Example usage with a local video and subtitles file:
ccastplayer myvideo.mp4 --subs mysubs.vtt
Example usage with a remote video file:
ccastplayer http://example.org/videos/myvideo.mp4
If the script is unable to auto-discover the device in your local network,
you can supply the IP address with the --chromecast-ip option:
ccastplayer --chromecast-ip 192.0.2.123 example.mkv
More help on command line options:
ccastplayer --help
Run the test suite with:
python3 -m unittest discover -s tests -v
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccastplayer-1.0.1.tar.gz.
File metadata
- Download URL: ccastplayer-1.0.1.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c035b0a3dbb4af96a7b51bee746ee050a2683b0f4b145ec775f9703dcde3e46
|
|
| MD5 |
072e8b59cb3fd3f1b605d40e1586a373
|
|
| BLAKE2b-256 |
735b287065835d8a1791d28b6dd5a671fe4ae61f8d293023e9d550b32889c302
|
File details
Details for the file ccastplayer-1.0.1-py3-none-any.whl.
File metadata
- Download URL: ccastplayer-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50819f8b3832fd43bc3b855a1f9bfc1333d35ad99db5d451ad96f249c04bf41b
|
|
| MD5 |
53c29f424520151be9a2c8f9b612dfe6
|
|
| BLAKE2b-256 |
aec9ef24c7d2101529d65b6a54f4c124bde6c9fd9228980e7b0838a7f0aa8391
|