Skip to content

Behind the Stream

tommsehurra edited this page Sep 15, 2026 · 3 revisions

Behind the Stream ๐Ÿ”ง๐Ÿง 

Ever wondered what's actually happening between the plane and the overlay you see on stream? Here's the tour. ๐ŸŽฌ It's a little chain of small programs, each doing one job, and the whole thing boots from a single click so I'm not fumbling with windows before a flight. ๐Ÿ™…

This page is a peek under the hood of my setup โ€” it's not a build guide, and the relay/overlay/bridge aren't things I hand out. When I'm flying, you see my telemetry. That's the whole idea. ๐Ÿ“บ

โœˆ๏ธ  Aircraft (FC + GPS)
     โ”‚  ELRS
     โ–ผ
๐Ÿ“ป  TX16S (EdgeTX)  โ”€โ”€  USB "Telem Mirror"  โ”€โ”€โ–บ  raw CRSF stream
     โ”‚
     โ–ผ
๐Ÿ”€  CRSF relay      splits the one USB port so everything can read it at once
     โ”‚
     โ–ผ
๐Ÿ–ฅ๏ธ  overlay script  parses CRSF, draws the HUD   โ”€โ”€โ–บ  ๐Ÿ“บ OBS
     โ”‚
     โ–ผ
๐Ÿ›ก๏ธ  bridge          keeps only the flight data (speed, alt, battery, attitudeโ€ฆ)
     โ”‚
     โ”œโ”€โ”€โ–บ  ๐ŸŒ the live site
     โ””โ”€โ”€โ–บ  ๐Ÿค– Twitch agent  (chat, predictions, the drop gameโ€ฆ)

๐Ÿ“ป It starts at the radio

EdgeTX can mirror its telemetry out over USB โ€” so the moment the plane's talking to the radio, that whole CRSF stream is available to the laptop. GPS, speed, altitude, battery, link, attitude: it's all in there. ๐Ÿ›ฐ๏ธ


๐Ÿ”€ The CRSF relay

Here's the annoying bit: Windows hands out a COM port exclusively. One program grabs it and nobody else gets a look in. That's a problem the second I want the OBS overlay and something else reading the same telemetry.

So the relay opens the radio's port once, lines the byte stream up on CRSF frame boundaries, and fans it out to everything that wants it โ€” on the laptop and across my own network. It even runs at a low priority on purpose, so OBS and the encoder always get the CPU first. No dropped frames because a telemetry script got greedy. ๐Ÿข

The frame parsing follows the TBS CRSF spec โ€” sync byte, length, type, payload, CRC โ€” and it resyncs cleanly if a byte goes missing.


๐Ÿ–ฅ๏ธ The overlay script

This is the one OBS actually shows. It reads the CRSF stream, decodes the frames, and paints a transparent HUD. ๐ŸŽจ

  • ๐Ÿ“ The GPS frame carries position, groundspeed, heading, altitude and sat count. Distance to home isn't sent over the link โ€” so the script locks a home point on the first solid fix and does the maths itself. ๐Ÿงฎ
  • ๐Ÿงญ It also decodes attitude into roll/pitch, plus battery and link stats.

In OBS it's just a transparent browser overlay, with a little status dot so I can tell at a glance whether the feed's alive: ๐ŸŸข live, ๐ŸŸก stale, ๐Ÿ”ด down.


๐Ÿ›ก๏ธ The bridge

The website and the Twitch bot don't read the raw stream directly โ€” they go through a bridge that boils it down to just the handful of flight fields they actually use (speed, altitude, battery, attitude, link, sats). It also tallies the all-time records and the last-flight stats. Everything downstream is read-only off this, which keeps things tidy no matter what I bolt on later. ๐Ÿงฑ


๐Ÿค– The Twitch agent

This is the fun part โ€” the thing that makes the stream interactive. It reads the flight data from the bridge and bundles a bunch of stuff into one program, all driven from a local dashboard where I run everything:

  • ๐ŸŽฏ Predictions that resolve themselves from the telemetry (will it break 120 km/h? go past 300 m?), and polls on a timer.
  • ๐Ÿ’ฌ A chatbot โ€” commands reply to the actual viewer who ran them.
  • ๐Ÿช‚ The drop game โ€” type !drop in chat and a little parachutist comes down toward a target. Land on the bullseye for the most points, dodge the odd hazard, manage your fuel, and climb the leaderboard. !drophelp shows the commands, !leaderboard shows the standings. ๐ŸŽฎ
  • ๐Ÿ—ฃ๏ธ An optional AI commentator and a Spotify now-playing panel with music chat commands.
  • ๐ŸŽฌ An intro-video overlay for clip playback.

โš ๏ธ Fun fact: Twitch Predictions, Polls and Channel Points only exist once a channel is Affiliate. So some of these light up only when the channel qualifies โ€” the chatbot and the drop game run regardless.


๐Ÿš€ One click to start it all

The whole chain โ€” relay, overlay, bridge, agent โ€” comes up from a single batch file, in the right order, freeing its ports first so a leftover process from last time can't block it. The point: nothing extra to launch before a flight. ๐Ÿ›ซ More flying, less clicking.

Tango Kilo โœˆ๏ธ

Clone this wiki locally