Cast local videos to your chromecast
Project description
Terminalcast
Command line tool to cast local video files to your chromecast.
Inspired by https://github.com/keredson/gnomecast
Supported media types
Checkout https://developers.google.com/cast/docs/media for your Chromecast model.
Use ffmpeg to convert unsupported files to a supported format:
ffmpeg -i '{input_file}' -metadata title="{title}" -map 0 -c:v {video_codec} -c:a {audio_codec} -c:s copy '{output_file}'
Supported Chromecast versions
In principle this should work with any Chromecast which is supported by https://github.com/home-assistant-libs/pychromecast.
In practice, I discovered that a Chromecast with Google TV enables you to control the player via the remote control, which is very nice.
Installation
pip install terminalcast
Usage
Basic Usage
terminalcast my_video.mp4
Known Hosts
If network discovery fails (e.g. due to network restrictions), you can specify known Chromecast IPs:
terminalcast my_video.mp4 --known-hosts 192.168.1.50,192.168.1.51
Alternatively, set the environment variable TERMINALCAST_KNOWN_HOSTS:
export TERMINALCAST_KNOWN_HOSTS="192.168.1.50,192.168.1.51"
terminalcast my_video.mp4
How is it working?
Terminalcast creates a little HTTP Server at your current machine and serves your media file there. Then it tells the Chromecast the play the stream served at your IP with the corresponding path. That's it! (The devil is in the details.)
Terminalcast uses Bottle to create a small app providing the media file. This app is served by Waitress.
On the other hand Terminalcast detects and plays the media via PyChromecast.
For file information and conversion ffmpeg-python is used.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file terminalcast-1.1.0.tar.gz.
File metadata
- Download URL: terminalcast-1.1.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9fce068a3582dd74c1451c9427b411c95172b1d782b2a8573e949421be8855c
|
|
| MD5 |
55ad2172152b18e6b0e5de14bc491f3a
|
|
| BLAKE2b-256 |
e7d0f5dc10d3ccfb3387d1ed5aae709050d974ab41e11b114577eb652234e1f3
|
File details
Details for the file terminalcast-1.1.0-py3-none-any.whl.
File metadata
- Download URL: terminalcast-1.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e562acfdf2e9e657835d94000ace10cc058f046f9f748cdd9c4dfc7bf6a2eba
|
|
| MD5 |
8968fca120ced1636059c5be49124b53
|
|
| BLAKE2b-256 |
5fa8440a085398695f589243b365fd390376daa2347f863231fdf45db4b749eb
|