Another year, another trip to Kraków for RTC.ON, and once again Software Mansion put on a brilliant event. This year there were two of us on the agenda from Nimble Ape: Marco did a lightning talk on how we live-streamed CommCon 2026 using MOQ, and I did a full talk and a lightning talk. The lightning talk was mostly to prove that the demo from my main talk really did work - because it didn't during my actual talk.
Yes, I know: RTC.ON was back in September, and I'm only writing it up now. Sorry it's taken so long. The upside is that a couple of things I was waiting on have landed in the meantime, so there's an update on that near the end.
If you missed Marco's lightning talk, he's written it all up in much more detail in Live-streaming CommCon 2026 with MOQ: a guide and a cautionary tale. It's well worth a read if you're thinking about using MOQ today.
My talk was The LLM in the Gallery: No Director Required, and it wasn't about MOQ. Everyone else was already doing that.

Photo: Software Mansion
The why
Any multi-camera event needs a director: someone watching every feed and deciding what goes out. The main stage of a big conference has one. The smaller room down the hall, the community track, the panel and the local meetup usually don't. What those events get is either one camera, locked off, or one overworked volunteer switching by hand while also trying to keep the stream alive.
So I wondered what would happen if the switcher had a brain. Not a script or a fixed table of rules, but actual judgement: something that watches the feeds, understands what it's watching, and cuts accordingly.
The how
It comes down to three pieces.
Smelter is the mixer. It's Software Mansion's real-time video and audio compositor, written in Rust, and it's driven by an HTTP API: you register your inputs and outputs, push a scene as JSON, and it composites it. You can change that scene mid-stream whenever you like. Each layout is just a Go function that builds a tree of views. Here's picture-in-picture, trimmed:
func PictureInPicture(primary, secondary string) map[string]any {
pipW, pipH := float64(Width)*0.28, float64(Height)*0.28
main := inputStream("pip_main", primary, Width, Height)
overlay := map[string]any{
"type": "view",
"width": pipW,
"height": pipH,
"right": 24,
"bottom": 24,
"border_radius": 12,
"border_width": 3,
"border_color": "#FFFFFFFF",
"overflow": "hidden",
"children": []map[string]any{
inputStream("pip_overlay", secondary, pipW, pipH),
},
}
return view(main, overlay)
}Smelter already does the hard part. It just needed something to tell it what to show.
Pion is the eyes. A Go app runs a WHIP server, and Smelter pushes it a multiview grid with every camera on it: the same wall of monitors a human director would be looking at. The Go app pulls a frame from that every second.
Kronk, from Ardan Labs, runs the model. It's an SDK for running LLMs locally from Go, entirely on the device. There's no API key, no cloud, and no reliance on conference wifi, which matters more than anything else when you're doing a live demo. The model I used was Qwen3.5 0.8B, a small vision model that runs on a laptop in real time, and swapping it is one environment variable.
To be clear: Qwen3.5 is the director. Kronk is the plumbing that lets us run it locally.
A division of labour
This is the bit I'm happiest with, because it's exactly how a real gallery works.
The LLM is the director. It watches, it reasons, and it decides what happens next: "cut to camera two", "bring up the lower third". It never touches Smelter. The Go app is the vision mixer. It takes the director's call and makes it happen. Neither one does the other's job.
What passes between them isn't code or raw API calls. It's a constrained vocabulary. Every second, the model gets a frame and one question: what should be on screen right now, and why? The answer has to fit this, and that's the entire interface:
type modelDecision struct {
Reason string `json:"reason"`
Layout string `json:"layout"` // "solo" | "pip" | "split"
Primary string `json:"primary"` // input id, e.g. "input_1"
Secondary string `json:"secondary"` // input id, only for pip/split
}Keeping that vocabulary small is what makes the system dependable, and the reason field is what makes it watchable, because you can see why it made every cut.
Every director needs a brief
Even a human one. So the director gets a brief: a JSON file describing what kind of show this is and what each camera is for, written in plain English. Here are two of the four cameras from the conference-talk brief:
{
"cameras": [
{
"id": "input_1",
"purpose": "Presentation slides / screen share. Normally static -- any change means a new slide or a build/animation step, which is usually worth cutting to or holding on so the audience can read it.",
"min_hold_seconds": 15,
"max_hold_seconds": 30,
"change_threshold": 1.5
},
{
"id": "input_3",
"purpose": "Wide shot of the audience. An occasional cutaway, rarely the main shot even if people are moving around in it.",
"min_hold_seconds": 4,
"max_hold_seconds": 9,
"change_threshold": 6.0
}
],
"editorial_notes": "Prefer a single decisive solo shot. Only pair slides with the presenter (pip/split) when the presenter is actively pointing at or clearly referencing something on the slide."
}The model reads the brief directly. Swap the brief and the same binary directs a completely different show. I ran a conference talk and then a panel discussion back to back, with no code changes, and the model's reasoning followed whichever brief was loaded. It's a brain, not a rule table.
Measure, don't guess
A small vision model looking at one still frame can only tell you so much, so the director gets some help. Motion scoring is a real pixel diff per camera, so "the slide just changed" is something we measure, not a guess. Audio activity decides when each mic joins the mix. Transcription, with Kronk's whisper.cpp bindings, means the director also hears "...and now I'll hand over to...", context that the picture alone doesn't give you.
Then there's pacing. The model decides what to show, and deterministic Go code decides when it's allowed to change: a minimum hold, a maximum hold, and a cooldown before cutting back to the same camera. Without that, the model would flip between two near-equal choices every second. Here's the idea, simplified from the real thing:
// Cooldown: the model wants a camera we only just cut away from.
if until, cooling := l.cooldownUntil[decision.Primary]; cooling && now.Before(until) {
return solo(l.pickAlternative(decision.Primary, now), "just shown, giving it a rest")
}
// MaxHold: the model wants to stay put, but we've been here too long.
maxHold := l.holdFor(l.lastPrimary).Max
if decision.Primary == l.lastPrimary && now.Sub(l.primarySince) >= maxHold {
return solo(l.pickAlternative(l.lastPrimary, now), "been here a while, mixing it up")
}Judgement comes from the model and discipline comes from the code.
The numbers
A director that's slow to react isn't a director, so we measured everything: prompt tokens, completion tokens, tokens per second and wall-clock time on every single cycle, all of it into Prometheus and Grafana, which I showed live on stage.
That's where I was wrong. Twice.
Hypothesis one: downscale the frame we send the model, and latency drops. It made no difference at all. Prompt processing, image included, took around 0.4–0.7s. The real cost was generation: the model was writing 80–200 tokens of reasoning before it got to the JSON. The cost was in how much the model was asked to say, not how much it was asked to look at.
Hypothesis two: give the model a looser, 15-word reason and it'll write something better. It was slower and worse. The model used the extra room to ramble, blew straight past the word limit, and sometimes contradicted itself within one sentence. I reverted it.
What actually worked:
- Turning off thinking. Qwen3.5 is a "thinking" model, and it was happily using its whole token budget on reasoning before it ever decided anything.
enable_thinking: false, because this is a low-latency control loop, not a maths exam. - A tighter, more literal reason format. An 8-word reason and a 100-token cap, pitched below what the model can actually do rather than above it. That got decisions from around 2–3.4 seconds down to about 0.6–1.1 seconds on my M1 Max.
The whole call to Kronk, with both of those in it:
d := model.D{
"messages": model.ImageMessage(question, frame, "jpg"),
"enable_thinking": false, // a control loop, not a maths exam
"temperature": 0.2,
"top_p": 0.9,
"max_tokens": 100, // also a hard stop if it ignores the 8-word limit
}
ch, err := krn.ChatStreaming(ctx, d)I documented both of those negative results instead of hiding them. Honestly, they were the most useful part of the whole project.
Did it work?
Yes (mostly), from end to end. Real cameras fed into Smelter, composited H.264 went over WHIP into Go, real frames were analysed, and scene updates went back into Smelter. The model gave reasons that matched what was actually in the shot it picked. It cut to the slides when they changed, stayed on me while I was waving my arms about, and mostly left the audience alone. I say mostly... it worked much better in the lightning talk... the demo in the actual talk mostly crashed and burned.
What's next: stop asking an LLM to write
Look back at the numbers above. Almost all of the time went on the model generating text. Then I had to parse that text, patch it when a small model forgot a comma between two JSON fields, and argue with it in the prompt when it copied my instructions back to me as its "reason". That patch, by the way, is a regex:
// A closing string value followed by the next key's opening quote, with no comma between.
var missingCommaBetweenFields = regexp.MustCompile(`"(\r?\n\s*)"`)
func fixMissingCommas(s string) string {
return missingCommaBetweenFields.ReplaceAllString(s, "\",$1\"")
}All of that comes from one thing: I'm asking a generative model to write an answer to a question that's really a multiple-choice question. Which camera should be on screen? One of four. Which layout? Solo, PiP or split. That isn't prose. It's a decision.
That's exactly what the new wave of "decision" models is for. Jev, from TypeSafe AI, and Cloudflare's Clef (along with its smaller, faster sibling, Clef-Flash) don't generate text at all. You give them a state and a set of typed questions (a choice between named options, a score, or a true/false), and they give you back a probability for every option of every question in a single forward pass. There's no token-by-token generation, no JSON to parse, and nothing to ramble.
For the director, that changes quite a lot:
- Latency. The thing that cost us the most simply goes away. There's no reply to generate, so you're left with roughly the prompt-processing cost.
- No parsing. The answer is already structured.
- Confidence comes for free. Every answer has a probability attached. Right now, the pacing rules in Go are what stop the director flip-flopping between two near-equal shots. With a decision model, I can also say "only cut if you're more than 80% sure", which is a much more honest way of handling a near-tie.
- Both can see, and there are local options. Clef takes images, and TypeSafe AI's Jev API accepts them from Jev 1.13 (it's opt-in for now, and the docs warn the format may change), so either could look at the same multiview grid Qwen3.5 does today, and Kronk can now hand a decision model one. Clef is open-weight under Apache 2.0, and a growing crop of open-weight, Jev-style decision models has appeared on Hugging Face too, including multimodal ones like Jev-Omni. So the "runs on a laptop, no cloud" idea isn't limited to one model any more.
The trade-off is the reason field. A decision model tells you what and how sure, not why, and the "why" is a big part of what made the judge view fun to watch. I suspect the answer is the same split we already have: a fast decision model calls the shots every second, and a generative model is only asked to explain itself every so often.
The timing is good, too. Kronk added initial support for decision models, including Jev, OpenJEV and Clef protocols, in v1.32.9. Since I wrote my slides it has gone further: as of v1.33.1 it supports image input for decision models, and the issue I'd been watching for Clef vision input is closed. So the thing I was waiting for has landed, and swapping the director for a decision model should mostly be a change to how the vision mixer asks the question, not a rewrite. I haven't tried it yet, but it's very much next on my list.
Is this the future?
Not for the Super Bowl. A human director isn't going anywhere at the top end. There's nuance, lightning-quick thinking and real humanity in those split-second decisions, and a faster machine doesn't change that.
But that's not who this is for. It's for the events that never had a director in the first place: the meetup with four cameras and no budget, the conference track that isn't the main stage, the podcast recorded by whoever showed up. Cheap compositors already exist. Cheap judgement didn't. Local models make it affordable, with no API bill per cut and no dependence on a flaky venue network.
So I'm not saying AI replaces the director. I'm saying AI makes direction available where there wasn't any. Can we get close enough to give a digital director to everyone who couldn't otherwise afford one? Quite probably, and I think that's the future worth building.
Thank you, Software Mansion
As always, a huge thank you to Software Mansion for putting on RTC.ON, and for building Smelter, which made this whole project possible. Thanks also to Bill Kennedy and the Ardan Labs team for Kronk. Marco came back from GopherCon UK buzzing about running models locally in Go, and this project is what happens when that rubs off on me.
They've also gone and taken the idea further themselves. Software Mansion turned it into a Smelter workshop demo, and the video is well worth a watch: Claude directs a live TV show (it writes its own rules and logs every cut). It's lovely to see an idea from a conference talk come back as something other people can build on.
All the RTC.ON 2026 talks will be on Software Mansion's YouTube channel. I'll link mine here once it's up.
Need help?
Nimble Ape has been consulting on real-time media projects for over a decade. We build products, including in Go, for clients big and small all over the globe. If you're working on live video, WebRTC, or want to put a local model in your media pipeline, we're happy to help.
Why not drop us a line on contact@nimblea.pe?
- Dan and the Nimble Ape team
