|
| 1 | +# Castor |
| 2 | + |
| 3 | +Castor is a command-line tool that lets you cast online videos to your TV or any networked media device (DLNA, Chromecast) directly from your terminal. |
| 4 | + |
| 5 | +My TV doesn't allow casting from most websites, so I had to find alternatives: |
| 6 | + |
| 7 | +- I tried **screen mirroring**, but it introduced lag and audio/video sync issues. |
| 8 | +- I switched to an **HDMI cable**, but it made my computer unusable during playback. |
| 9 | + |
| 10 | +Castor solves this by extracting the video stream, handling format compatibility, and casting directly to the device. |
| 11 | + |
| 12 | +## Requirements |
| 13 | + |
| 14 | +- **Chrome / Chromium** for headless stream extraction |
| 15 | +- **ffmpeg** and **ffprobe** for transcoding and format detection |
| 16 | + |
| 17 | +## Usage |
| 18 | + |
| 19 | +### Discover devices on your network |
| 20 | + |
| 21 | +``` |
| 22 | +castor scan |
| 23 | +``` |
| 24 | + |
| 25 | +Lists all available casting devices (name, type, address). |
| 26 | + |
| 27 | +Once you find the device you want to cast to, update the `device.name` and `device.type` properties in your `config.yaml`. |
| 28 | + |
| 29 | +Note that DLNA has been tested but Chromecast support is experimental. |
| 30 | + |
| 31 | +### Cast a video URL |
| 32 | + |
| 33 | +``` |
| 34 | +castor cast url https://example.com/stream.m3u8 |
| 35 | +``` |
| 36 | + |
| 37 | +Castor will resolve the stream (picking the best HLS variant if applicable), transcode if needed, and send it to your configured device. |
| 38 | + |
| 39 | +### Cast a movie or episode using a source |
| 40 | + |
| 41 | +``` |
| 42 | +castor cast movie --source example tt1234567 |
| 43 | +castor cast episode --source example tt1234567 --season 1 --episode 3 |
| 44 | +``` |
| 45 | + |
| 46 | +Uses a configured source to find and cast content by ID. |
| 47 | + |
| 48 | +### Cast from a direct page URL |
| 49 | + |
| 50 | +``` |
| 51 | +castor cast page https://example.com/some-page |
| 52 | +``` |
| 53 | + |
| 54 | +Extracts streams from a direct URL using the top-level capture config. |
| 55 | + |
| 56 | +## Configuration |
| 57 | + |
| 58 | +Castor uses a simple YAML config file (`config.yaml`) where you define: |
| 59 | + |
| 60 | +- Video sources (proxies, templates, capture patterns) |
| 61 | +- Transcoding preferences |
| 62 | +- Network and browser settings |
| 63 | +- Your target device (name and type) |
| 64 | + |
| 65 | +## Missing features |
| 66 | + |
| 67 | +- Subtitles support |
| 68 | +- Seek actions on the TV |
| 69 | + |
| 70 | +## Contributing |
| 71 | + |
| 72 | +Castor might be unstable but work for simple use cases. If you want to help make it better, feel free to open a PR. |
0 commit comments