https://github.com/thotypous/chromecastplay
Full-featured yet simple command line ChromeCast video player
https://github.com/thotypous/chromecastplay
chromecast embedded-webserver subtitles transcoding video-player
Last synced: 5 months ago
JSON representation
Full-featured yet simple command line ChromeCast video player
- Host: GitHub
- URL: https://github.com/thotypous/chromecastplay
- Owner: thotypous
- License: isc
- Created: 2017-07-23T06:31:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-05-20T14:33:37.000Z (9 months ago)
- Last Synced: 2025-07-14T20:10:27.482Z (7 months ago)
- Topics: chromecast, embedded-webserver, subtitles, transcoding, video-player
- Language: Python
- Homepage:
- Size: 47.9 KB
- Stars: 6
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Command Line ChromeCast media player
chromecastplay is a modern, easy-to-use, full-featured yet simple command line
application for streaming video to a ChromeCast.
# Features
* 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](https://developers.google.com/cast/docs/media).
* 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](https://trac.ffmpeg.org/wiki/ExtractSubtitles) to the WebVTT format supported by ChromeCast.
* Allows the user to control video playback (seek, volume, pause and resume).
# Prerequisites
Use [Poetry](https://python-poetry.org):
```bash
poetry install
```
In order to use the subtitles and video transcoding features, you need to install [FFmpeg](http://www.ffmpeg.org):
```bash
sudo apt install ffmpeg
```
# Common use cases
## Play a video file
```bash
poetry run ./chromecastplay.py -v videofile.mp4
```
**Note**: If the video file was encoded with a codec not
[supported by ChromeCast](https://developers.google.com/cast/docs/media),
playback will abort before starting without any further notice. In this case,
try the `-t` option presented below.
## Play a video file encoded with a codec not supported by ChromeCast
```bash
poetry run ./chromecastplay.py -t -v videofile.mkv
```
**Note**: When real-time transcoding is enabled, the video stream will
be unseekable.
## Play a video file with embedded subtitles
```bash
poetry run ./chromecastplay.py -v videofile.mkv
```
## Play a video file with external subtitles
```bash
poetry run ./chromecastplay.py -v videofile.mp4 -s subtitles.srt
```
## Play an incomplete video file (still being downloaded)
```bash
poetry run ./chromecastplay.py -c -v videofile.mkv
```
**Note**: When playing an incomplete file, the video stream will
be unseekable.
## Full help message
Take a look at the full help message to learn about other command line options:
```bash
poetry run ./chromecastplay.py -h
```
# Keyboard shortcuts
| 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 |
# Acknowledges
The playback control feature was based on code from the
[chromecastplayer](https://github.com/stefanor/chromecastplayer/)
project by Stefano Rivera.