Skip to content

snabb/ccastplayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

CLI tool for streaming video file to Chromecast device

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages