A new command-line utility called Castor is making it possible to stream virtually any web video directly to a smart TV, bypassing the latency and quality degradation common with traditional screen mirroring. The MIT-licensed, open-source tool requires no built-in Chromecast or AirPlay functionality to operate. Instead, it isolates and extracts the source video stream from a webpage and handles the rest locally.
How Castor Identifies and Processes a Stream
Written in Go by developer "stupside," Castor works by launching a headless instance of Chrome equipped with a randomized browser fingerprint, a measure designed to evade bot detection. It then observes network traffic through the Chrome DevTools Protocol to pinpoint the direct media URL. Once located, the stream is transcoded on the fly using ffmpeg and cast to the target display. Users can input a standard webpage URL, a direct link to a stream, or an IMDB/TMDB title ID. An optional capability brings in auto-generated subtitles through an integrated whisper.cpp model.
Broad Device Compatibility and Simple Configuration
Castor targets any television or media player that conforms to the DLNA/UPnP MediaRenderer standard, covering most smart TVs released in the last decade from brands including Samsung, LG, Sony Bravia, Panasonic, Philips, Hisense, TCL, Vizio, and Sharp. It also works with software players such as Kodi, VLC, and Plex. While experimental Chromecast support is included, it is not required. Setup involves a straightforward configuration file containing the target device’s name and content sources. A TMDB API key is optional, but adding one unlocks an interactive terminal browser that lets users select titles based on poster art and metadata.
Availability and Technical Requirements
On macOS, Castor can be installed via Homebrew and depends on Chrome, ffmpeg, and ffprobe. A Docker image is provided for Linux hosts; however, macOS and Windows users running Docker Desktop may encounter networking limitations that prevent access to local devices. The project is currently at version 1.4.1 and is available on GitHub. The developer notes that Castor hosts no content itself and reminds users that they bear responsibility for adhering to applicable laws and the terms of service of any website they use.
Sources: github.com, unsplash.com, unsplash.com