Better and Cheaper Than IPTV
Castor is a new command-line tool that extracts video streams from practically any website and casts them directly to your smart TV, solving common casting frustrations. It leverages headless Chrome, stealth techniques, and real-time transcoding to deliver a powerful, open-source media solution. This innovative approach offers tech enthusiasts precise control over their streaming experience, making it particularly appealing to the Hacker News community.
The Lowdown
Castor is a command-line interface (CLI) tool that provides a sophisticated solution for casting video streams from virtually any website directly to smart TVs. It aims to overcome the limitations of built-in smart TV casting functions and the inefficiencies of screen mirroring, offering a more robust and flexible way to consume web-based video content on a larger screen. The project highlights the common pain points of restricted casting from random sites and the poor experience of screen mirroring, presenting Castor as a superior alternative.
- Core Functionality: Castor extracts video streams from arbitrary websites, handles format compatibility, transcodes, and casts to DLNA/UPnP compatible TVs (and experimentally Chromecast) in real-time. It also offers optional auto-generated subtitles burned directly into the video.
- Technical Mechanism: It operates by launching a headless Chrome instance equipped with randomized browser fingerprints and stealth scripts to evade bot detection. It listens to all network activity via the Chrome DevTools Protocol, captures video streams, and can perform actions like clicking elements, navigating iframes, and attempting to solve Cloudflare Turnstile challenges.
- Key Features: Users can browse trending titles, search TMDB, and inspect metadata through an interactive terminal user interface (TUI). Subtitles are generated using
whisper.cppand are configurable. - Dependencies & Installation: Castor, written in Go, requires Chrome/Chromium,
ffmpeg, andffprobefor native installations (available via Homebrew for macOS or build from source). A Docker image is also provided, bundling these dependencies. - Usage: After discovering devices with
castor scanand configuringconfig.yamlwith a device name and optional TMDB API key, users can cast content directly via a streaming site's player page URL, by IMDB/TMDB ID, or from a raw stream URL, in addition to using the interactive TUI. - Device Support: It supports virtually all smart TVs implementing the DLNA/UPnP
MediaRenderer:1profile (e.g., Samsung, LG, Sony) and has experimental support for Chromecast.
By offering a command-line solution that meticulously handles stream extraction and casting, Castor empowers users with a highly customizable and technically robust method for enjoying web content on their televisions, directly addressing common tech frustrations with an elegant, open-source approach.