Gemma Captioner: Four Voices, One Truth

Vercel
application badge
Created by team Tripod on July 10, 2026
Video Captioning

Most video captioning agents write all four styles in a single pass, so one visual mistake poisons every caption. And the funnier a caption tries to be, the more it tends to invent: a tech joke reaches for packets and uptime that were never there, a sarcastic line flips what actually happened. Track 2 scores both accuracy and tone, so a caption that reads well can still be wrong. We built it the other way around. Instead of adding style at the end, the agent uses Google Gemma-4-31B to look at the video once. It turns sampled frames into a grounded record of what is actually there: it reads clearly legible on-screen text like signs and logos, names concrete colors and counts, and flags whatever it cannot be sure of. Any detail a caption asserts that the frozen facts do not support is rejected and rewritten, so unsupported claims never survive. Only then do four parallel Gemma-4 text passes turn the same verified facts into formal, sarcastic, humorous-tech, and humorous-non-tech voices. A joke can change the tone but never the events, because the humor voice has to map its metaphor onto a real visible detail. The other hard part is speed. Long UHD clips are the trap, because a clip that finishes too late is graded as a placeholder. So the agent decodes only about ten frames per clip, aligned to the exact timestamps the judge samples for accuracy, rather than the whole video, and it captions multiple clips concurrently. A complete results.json sits on disk from the first moment and each clip upgrades its own entry as it finishes, so a slow or failed call degrades to a grounded fallback instead of a zero. The full set of clips finishes well inside the 10-minute budget. Gemma does the real work. Every scene fact and every caption comes from Gemma-4-31B: take it out and there is no product. It ships as a public linux/amd64 Docker image that runs headless, reading /input/tasks.json and writing /output/results.json.

Category tags: