Skip to main content

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

Metadata

Release files for ccastplayer 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ccastplayer 1.0.1
File Size Uploaded
ccastplayer-1.0.1.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ccastplayer 1.0.1
File Interpreter ABI Platform
ccastplayer-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / ccastplayer-1.0.1.tar.gz

Download URL ccastplayer-1.0.1.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0c035b0a3dbb4af96a7b51bee746ee050a2683b0f4b145ec775f9703dcde3e46
BLAKE2b-256 checksum
How to use checksums
735b287065835d8a1791d28b6dd5a671fe4ae61f8d293023e9d550b32889c302
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / ccastplayer-1.0.1-py3-none-any.whl

Download URL ccastplayer-1.0.1-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50819f8b3832fd43bc3b855a1f9bfc1333d35ad99db5d451ad96f249c04bf41b
BLAKE2b-256 checksum
How to use checksums
aec9ef24c7d2101529d65b6a54f4c124bde6c9fd9228980e7b0838a7f0aa8391
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page