ARGUS fuses live camera feeds with ads-b flight data and ais ship tracking into one webgl view. the idea is simple on a whiteboard. the actual ingest pipeline is where all the time went.

rtsp streams from real cameras are inconsistent. some send h264, some send weird proprietary mp4 fragments, some just drop frames when the network hiccups. i wrote a worker that reconnects on failure and re-muxes whatever comes in into something the browser can actually decode, instead of trusting the stream to behave.

ads-b and ais are the opposite problem: not video, just a firehose of small packets from planes and ships. easy to parse, hard to keep in sync with the video timestamp so a plane doesn't appear five seconds after it flew through frame.

chrome gc was the sneaky bottleneck. every frame decode was allocating new buffers, and after a few minutes of a live feed the garbage collector would pause long enough to visibly stutter the render. switched to reusing typed arrays instead of allocating per frame and the stutter went away.

none of this is glamorous. just workers, buffers, and reconnect logic. but it's the difference between a demo that looks good for thirty seconds and a feed that stays up.

← All writing