Skip to content
Michael Joel Hall
  • Journal
  • About
  • Press
  • Contact
  • Books
  • Shop
Michael Joel Hall

Better and Cheaper Than IPTV

← Mike Minded

Mike Minded · Hacker News: Front Page

Better and Cheaper Than IPTV

by xonery · github.com

July 18, 2026

Read the original ↗

Why I saved this

Castor is a CLI tool that extracts video streams from websites using headless Chrome, handles transcoding via ffmpeg, and casts to DLNA/UPnP TVs or Chromecast in real time. It solves the friction of screen mirroring and HDMI cables by automating stream capture, format compatibility, and optional subtitle generation, all controlled from the terminal.

Teaching

  • Use Castor's automation pipeline as a metaphor for practice sequencing: the tool clicks, navigates iframes, solves obstacles, then falls back—just as we cue entry, adjustment, fallback modifications when students meet resistance in a pose.
  • The headless browser that hides automation mirrors how we teach students to practice without performing: the work happens beneath the surface, invisible to external judgment, optimized for function not display.
  • Castor's modular config (device, sources, transcoding) models how we customize practice: same system architecture, different inputs—beginner vs advanced, injury vs full range, morning vs evening energy.
  • The tool's real-time stream handling parallels breath-synchronized movement: capture the input (inhale), transcode on the fly (transition), deliver seamlessly (exhale)—no buffering, no lag, continuous flow.

Writing seeds

  • Essay: 'Practice as Protocol'—compare Castor's Chrome DevTools listener to proprioception in Ashtanga; both systems monitor live data streams, detect obstacles (Cloudflare / tight hamstrings), and execute fallback actions without conscious intervention.
  • Shala Daily post: 'Your Practice Config File'—frame daily practice choices (time, sequence length, modifications) as a YAML you're constantly editing; some keys are required (breath, attention), others optional (handstands, chanting), and you overlay local overrides (injury, travel) onto the base template.
  • Essay: 'Headless Practice'—explore the idea of practice that runs without an audience, like Castor's headless Chrome; the automation is hidden, the fingerprint randomized, the work optimized for output not optics—what would your practice look like if no one could see it?
  • Post: 'Fallback Actions in Asana'—use Castor's click-then-iframe-then-solve-Turnstile-then-click-again pipeline as a teaching framework; when the first cue doesn't land, what's your next action, and the one after that, before you abandon the pose entirely?

Idea map

  • Systems literacy: Castor makes visible the hidden layers (network capture, transcoding, casting protocol) behind 'just play the video'—same way practice makes visible the systems (breath, bandha, drishti) behind 'just do the pose.'
  • Embodiment: The tool's real-time transcoding mirrors how the body translates intention into movement on the fly; you don't pre-render the pose, you adapt format and bandwidth (effort, range) to what the system (your body, the TV) can handle right now.
  • Attention: Castor's DevTools listener is pure attention—it watches all network activity, captures only what matters, ignores the rest; that's the same filter we train in practice, noticing sensation without getting lost in every signal.
  • Practice as method: The CLI's modular config and fallback pipeline are practice architecture—you define the method (sources, device, transcoding rules), then execute it repeatedly, refining the config as conditions change, never rewriting the whole system from scratch.
💬 Comment
Read the article here 4 min read

Castor

Latest Release Go Reference Homebrew License Build Status

Castor

Imagine buying a very nice TV and figuring out it doesn't allow casting from random websites...

  • Then you switch to the longest HDMI cable you can find.
  • Then you start doing screen mirroring: your computer lags, resolution tanks, nothing feels right.

Castor is a CLI that extracts video streams from websites, handles format compatibility, and casts to your TV in real time, with optional auto-generated subtitles burned directly into the video.

Browsing TMDB titles in the castor TUI
Run castor cast to browse trending titles, search TMDB, inspect posters and metadata, then cast — without leaving the terminal.

Note

How does extraction work?

Castor launches a headless Chrome with a randomized browser fingerprint and stealth scripts to hide automation. It listens to all network activity via Chrome DevTools Protocol, captures video streams, then runs an action pipeline: click the page, navigate into the largest iframe, solve Cloudflare Turnstile if detected, and click again as fallback.

This works on most streaming websites but won't beat sophisticated bot protection.

Installation

Homebrew and source build a native binary that needs Chrome/Chromium (headless extraction), ffmpeg (transcoding), and ffprobe (format detection) on your PATH. The Docker image bundles all three, so there you only supply a config.

Homebrew (macOS)

brew install --cask stupside/tap/castor

Docker

ghcr.io/stupside/castor ships with Chrome, ffmpeg and ffprobe baked in.

# Discover devices (no config required)
docker run --rm --network host ghcr.io/stupside/castor:latest scan

# Cast a movie by id, mounting config.yaml and a persistent model cache
docker run --rm --network host 
  -v "$PWD/config.yaml:/config.yaml" 
  -v castor-cache:/root/.cache 
  ghcr.io/stupside/castor:v1.4.0 
  cast movie tt12300742

The -v "$PWD/config.yaml:/config.yaml" mount is what makes this work: Castor reads your device and sources from config.yaml, which the container looks for at /config.yaml. cast movie tt12300742 builds the player URL from the sources proxies in that file — no URL on the command line — so run every command from the directory holding your config.yaml.

Warning

Streaming sites are volatile. cast movie resolves the id against the sources proxies in your config.yaml — here https://1embed.cc. Those point at third-party streaming sites that can go offline, change domains, or start blocking at any time. When one stops resolving, rotate it: swap in a working mirror/domain in the sources proxies list in your config.yaml.

Important

--network host is required: device discovery is SSDP multicast and the TV streams back from Castor's replay server — neither survives Docker's bridge network. Host networking is only real on Linux; on Docker Desktop (macOS/Windows) it won't reach your TV, so run the binary natively there instead.

The castor-cache volume keeps the auto-downloaded whisper models (~75 MB) between runs. Swap :v1.4.0 for :latest to track the newest build, or for any other tag to pin a release.

From source

Needs Go 1.26+ and cmake (the whisper.cpp bindings are cgo and link a locally built libwhisper.a):

git clone --recurse-submodules https://github.com/stupside/castor.git
cd castor
make          # builds libwhisper.a, then the castor binary

go install won't work: the vendored whisper.cpp bindings come in through a local replace and need that prebuilt static lib.

Supported devices

DLNA / UPnP

Any TV implementing the DLNA/UPnP MediaRenderer:1 profile works, which covers virtually every smart TV sold in the last decade: Samsung (tested), LG, Sony Bravia, Panasonic Viera, Philips, Hisense, TCL, VIZIO, Sharp. Networked players like Kodi, VLC, and Plex also work.

Run castor scan to discover devices on your network.

Chromecast

Warning

Experimental: implemented but untested. Contributions welcome.

Quick start

Castor requires a config.yaml in the current directory (or pass --config). Everything mechanical ships with working defaults, so the file only has to say which device to cast to, which sources to cast from, and a free TMDB API key for the browser.

# 1. Find your TV's exact name
castor scan

Create config.yaml with that name:

device:
  name: "Living Room TV"   # exact name from `castor scan`
  type: dlna

sources:
  - proxies: ["https://vidsrc-embed.ru"]
    templates:
      movie: "/embed/movie/{itemID}"
      episode: "/embed/tv/{itemID}/{season}-{episode}"

tmdb:
  api_key: "<YOUR_TMDB_API_KEY>"   # free from https://www.themoviedb.org/settings/api
# 2. Browse and cast from an interactive TUI
castor cast

castor cast first asks which device to cast to — every DLNA/UPnP renderer on your network, discovered on the fly and with your configured device pre-selected:

Selecting a cast target in the castor TUI

Then it opens a TMDB-backed browser — filter by genre, search, inspect posters and metadata, drill into a series' episodes, and cast the one you pick.

Tip

No TMDB key? You can skip the browser and cast a title straight from its id — castor cast movie tt33028778 — using the sources in your config. See Usage.

Usage

# Interactive TMDB browser: search, pick a movie/episode, cast (needs tmdb.api_key)
castor cast

# Cast from a streaming site's player page
castor cast player https://1embed.cc/embed/movie/tt12300742

# Cast by IMDB/TMDB id, using the sources in your config
castor cast movie   tt33028778
castor cast episode tt2699128 --season 1 --episode 3

# Cast a raw stream URL directly
castor cast url https://example.com/stream.m3u8

# Useful flags
castor cast movie --dry-run tt33028778   # print found URLs without casting
castor --debug cast player https://...   # verbose logging
castor scan                              # discover devices on the network
castor info                              # version / build info

Configuration

Quick start covers the required keys. Beyond those, everything mechanical (timeouts, probing, capture, transcoding, Chrome discovery) ships with working defaults. Override any of it in config.yaml, point at a different file with --config, drop secrets like your TMDB key into a git-ignored sibling config.local.yaml (it overlays config.yaml), or set CASTOR_SECTION__FIELD environment variables.

The one opt-in worth calling out is auto-generated subtitles, burned into the video:

whisper:
  enable: true             # off by default
  # language: "fr"         # default: English
  # model_path: ""         # default: ggml-tiny.en (~75 MB, auto-downloaded)

Contributing

See CONTRIBUTING.md.

Read the original on github.com ↗

More from Hacker News: Front Page

  • Just Imagining a Workout Can Make You StrongerOctober 26, 2026
  • Bring back crappy forumsOctober 22, 2026
  • Pattern Matching Beats Narrative ReasoningOctober 17, 2026
  • Make Claude your assistant in excalidrawSeptember 27, 2026

← Newer Why the World Cup half-time show may be a taste of things to comeOlder → Taylor Farms recalls lettuce shipped to 27 states over cyclospora risk

All Mike Minded →

Notes from the field

No notes yet · members & customers welcome

  1. No notes yet. Be the first to leave one.

Leave a note

Want more? (optional — commenting alone never subscribes you)
Comments are for members & customers. We’ll email a one-tap link to confirm it’s you.

© 2026 Michael Joel Hall

  • Journal
  • About
  • Press
  • Contact
  • Books
  • Shop
Comment

Journal entry

Comments here are for members & customers. We’ll email a one-tap link to confirm it’s you if needed. Not a member yet?