Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccastplayer-1.0.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccastplayer-1.0.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file ccastplayer-1.0.0.tar.gz.

File metadata

  • Download URL: ccastplayer-1.0.0.tar.gz
  • Upload date:
  • Size: 7.6 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

Hashes for ccastplayer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e116b63de0366ff4bb91edc13817d922b39a953e699eb69aa40b3dfc7fde27ea
MD5 de8828469605dc1a8cea131a5a8b78ff
BLAKE2b-256 ed191487035bfee378b877eda0a15623cc3b887c57ef35dbc4ba1bde2578c1b3

See more details on using hashes here.

File details

Details for the file ccastplayer-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ccastplayer-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 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

Hashes for ccastplayer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39c2fc1dff7f59dcd8b4c8fa3e149abdd6460eba1a5353e2cfeaa9322333a972
MD5 a25f0acc115f5c0b806444ad24d3b5e6
BLAKE2b-256 7a3f57102e5ed987d1d6cc758eba7f58cf97065392387e61f857eaa31bbde12a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page