About this project
Castor is a Go-based command-line utility that turns any web page with embedded video into a castable stream for your TV. Unlike screen mirroring, it extracts the actual media stream, transcodes it to match your display's capabilities, and sends it in real time—preserving quality instead of compressing a screen capture.
It works by launching a headless Chrome instance, monitoring network traffic through the Chrome DevTools Protocol, and then executing an automated action pipeline: clicking the page, navigating into the largest iframe, and clicking again as a fallback to trigger playback. This approach works on pages that permit automated playback but may not succeed everywhere.
Supported casting protocols include DLNA/UPnP (widely compatible with Samsung, LG, Sony, Panasonic, Philips, Hisense, TCL, VIZIO, Sharp TVs, plus players like Kodi, VLC, and Plex), Chromecast (experimental), and Roku (via a sideloaded channel using Roku's External Control Protocol).
The tool provides both a direct command interface and an interactive TUI browser (`castor cast`). For the latter, a TMDB API key allows searching titles, which are then resolved against user-configured sources. Source templates let users plug in any embeddable video service they are authorized to use.
Additional features include auto-transcribed subtitles burned into the video using Whisper, resolution capping via `max_height`, and configurable delivery mode (relay vs. device-fetch). Hardware transcoding via VA-API on Intel is supported when running in Docker with GPU passthrough.
Installation is available via Homebrew on macOS, as a prebuilt Docker image (`ghcr.io/stupside/castor`), or built from source with Go 1.26+. Required dependencies are Chrome/Chromium, ffmpeg 7.1+, and ffprobe 7.1+. The project is MIT-licensed and explicitly disclaims DRM handling or copyrighted content distribution—it casts only what the user points it at.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.