← all projects

project

WebRTC conferencing built for teleoperation

Generic video call tools hide the controls teleoperation needs. This one exposes audio delay, jitter buffer depth and forced resync directly to the operator.

Date
Jul 2025
Role
Solo build — signaling server, browser client
Status
shipped
Built with
WebRTC, Python 3, aiohttp, Tailscale, H.264 / Opus

Generic video call tools fail for teleoperation in a specific way: they don’t give you the controls you need. Latency is managed by the browser, audio sync is automatic-but-wrong, and none of it integrates with the rest of the robot’s stack.

The system runs a Python aiohttp signaling server on the Pi and establishes a direct peer-to-peer connection to the operator’s browser. Most of the effort went into sync tooling. Audio and video drift in WebRTC is a composite of capture latency, encode time, network jitter, jitter buffer depth and decode time — no algorithm fixes it reliably, because any of those can dominate depending on conditions. So the controls are exposed directly: a manual audio delay slider (±500ms), a force-resync button that requests a fresh keyframe and resets timestamps, and a configurable jitter buffer with presets from low-latency to smooth.

Tailscale handles networking, so the Pi and the browser connect through the mesh whatever network either is on — no port forwarding, no firewall rules, SSL included.

What I took away

Exposing knobs to the operator is more robust than automating everything. The operator can see the video and knows whether it looks acceptable; the algorithm cannot.

getStats() should be wired up in the first working build. Debugging a latency or sync problem without live timing data takes ten times as long.

Forcing H.264 through SDP manipulation is necessary for reliable Safari performance — leaving codec selection to browser defaults produces inconsistent results across versions.

RoboticsReal-Time Media