Building a 24/7 AI Avatar Live Streaming System with Headless Chromium

I was working on a live streaming system where an AI avatar (a 3D VRM model) could speak, react to comments, and stream continuously—all without human intervention. The core of this system was a pipeline that rendered a 3D scene using headless Chromium, captured the video, and streamed it via RTMP.

This turned out to be a minefield of pitfalls. Even with a GPU installed, rendering would fall back to CPU. The "safety net" of reducing resolution didn’t work. GPU rendering would succeed, but the image would be broken. Capturing video that worked on CPU would turn black the moment it ran on GPU. All of these issues shared a common trait: no errors were thrown, and all metrics looked normal—making them especially tricky to debug.

This article walks through the sequence of stumbles I actually encountered while building this system. Here are the four key takeaways up front:

CPU rendering (SwiftShader) won’t cut it for 3D avatars — and the "fallback to lower resolution" safety net doesn’t work