Screen sharing for an AI colleague
Helix needed a way for the digital employee to show its work in a Teams meeting. I decided it should share a real screen: a headless Linux desktop with a virtual display, a window manager, Chromium and a terminal, captured by FFmpeg's X11 grabber and encoded to H.264. I tuned the encoder for slides and terminal text, and for the viewer who joins late.
Full-HD capture, a low output frame rate, the fastest preset with zero-latency tuning, main profile, scene-cut detection off.
FFmpeg serves the raw H.264 stream on a local socket. The Rust voice engine frames each access unit into a small versioned contract and hands it to the Windows media bridge, which publishes it into the call as Teams screen sharing. Terminal text is typed at a pace people can read, and the pace speeds up for long outputs so a large update does not time out: short commands look human and long outputs still finish. The full meeting surface is the story A meeting attendee that will not fake it.
A media studio's edit path
FAFOHive publishes the tools of a media studio I built for agents, and FFmpeg is its edit path. Agents run on different machines and want narration muxed onto video, clips joined, frames resized and audio levelled. I did not want any of them building a shell command. The studio's Rust controller offers a fixed set of transforms as typed enums in the tool contract, and writes the FFmpeg arguments itself, which closes the injection path an agent-facing media tool would otherwise open.
- Mux narration onto videotyped
- Concatenate clipstyped
- Resize or crop, contain or covertyped
- Transcode to MP4, WebM, WAV or MP3typed
- Normalise audiotyped
- Burn subtitlestyped
- Read metadata with FFprobetyped
- Codec, filter or shell text from the agentno such field
I treat an agent-facing tool as an attack surface first and a convenience second.
Inputs and outputs are explicit host-and-path references, staged onto the machine that runs the job and delivered with a hash check at the destination, because a silently truncated video is worse than a failed job.
If the strips differ, the job fails.
I drive FFmpeg as a process with arguments generated by typed code and keep the binary unmodified, which keeps upgrades trivial. I did not write codecs or filters.