chromecastplay is a modern, easy-to-use, full-featured yet simple command line application for streaming video to a ChromeCast.
- Embedded webserver for streaming local files to the ChromeCast.
- Supports streaming incomplete files. Useful for watching a video still being download by Torrent, MEGAsync or other means.
- Optional real-time video transcoding when you need to play a video codec not supported by ChromeCast.
- Supports subtitles supplied by an external file (e.g. SRT format) or embedded in a video file (e.g. MKV format). Automatically converts several subtitle formats to the WebVTT format supported by ChromeCast.
- Allows the user to control video playback (seek, volume, pause and resume).
Use Poetry:
poetry install
In order to use the subtitles and video transcoding features, you need to install FFmpeg:
sudo apt install ffmpeg
poetry run ./chromecastplay.py -v videofile.mp4
Note: If the video file was encoded with a codec not
supported by ChromeCast,
playback will abort before starting without any further notice. In this case,
try the -t
option presented below.
poetry run ./chromecastplay.py -t -v videofile.mkv
Note: When real-time transcoding is enabled, the video stream will be unseekable.
poetry run ./chromecastplay.py -v videofile.mkv
poetry run ./chromecastplay.py -v videofile.mp4 -s subtitles.srt
poetry run ./chromecastplay.py -c -v videofile.mkv
Note: When playing an incomplete file, the video stream will be unseekable.
Take a look at the full help message to learn about other command line options:
poetry run ./chromecastplay.py -h
Key | Purpose |
---|---|
Space bar | Pause/resume playback |
q | Stop playback and quit |
Left arrow | Seek back 10 seconds |
Right arrow | Seek forward 10 seconds |
Page down | Seek back 60 seconds |
Page up | Seek forward 60 seconds |
Up arrow | Increase volume |
Down arrow | Decrease volume |
The playback control feature was based on code from the chromecastplayer project by Stefano Rivera.