Building AI-Powered Subtitles at Vimeo
Vimeo's AI subtitle system uses LLMs to translate video subtitles across 9+ languages. The core challenge: LLMs optimize for fluency and merge fragmented speech into clean sentences, breaking subtitle timing sync. Their fix is a three-phase "split-brain" pipeline that separates creative translation from structural line mapping, with a self-healing fallback chain that guarantees 100% of subtitle slots are filled.
Key takeaways
- LLMs produce fluent translations but break subtitle sync by merging lines — a “blank screen bug” where subtitles disappear mid-speech because the model consolidated multiple time slots into one.
- Different languages have fundamentally different “geometries”: German verb brackets, Hindi SOV reversal, and Japanese compression each break line-by-line sync in unique ways.
- The fix is a three-phase split-brain pipeline: (1) smart chunking into 3-5 line thought blocks, (2) unconstrained creative translation, (3) a separate LLM call for structural line mapping.
- ~95% of chunks map perfectly on first pass. The remaining 5% trigger a correction loop (fixes ~32%), then LLM fallback, then a deterministic rule-based splitter — guaranteeing 100% slot fill rate.
- Total overhead: 4-8% more processing time and 6-10% more tokens vs. single-pass translation. Tradeoff: zero blank screens and ~20 hours of manual QA saved per 1,000 videos.
Why this comes up in interviews
This post is a masterclass in designing ML pipelines that handle unpredictable model outputs gracefully. It covers task decomposition (splitting competing objectives into separate passes), graceful degradation (multi-tier fallback chains), and the real cost of “intelligence” in production systems. These are exactly the patterns interviewers probe when asking you to design any AI-powered feature.
The blank screen bug: when fluency breaks the product
Vimeo’s subtitle system expects every source line to have a corresponding translated line — if the speaker talks from 0:05 to 0:08, the system needs text in that specific slot. But LLMs are designed to be smart: when they detect filler words (“um”, “you know”) or fragmented speech, they merge everything into one clean, grammatically correct sentence. The translation is linguistically excellent, but now three subtitle time slots are empty. The viewer sees subtitles disappear mid-speech — a “blank screen bug.” This isn’t a translation failure; it’s a competence problem. The model is too good at its job.

Interview angle
This is a perfect example of the gap between “model quality” and “product quality.” In interviews, when designing AI features, always ask: what structural constraints does the downstream system impose? A model that scores perfectly on BLEU might still break the product. This applies broadly — code generation that ignores line limits, summarization that drops required fields, etc.
The geometry of language: why sync is harder than it looks
Different languages don’t just use different words — they organize thought in fundamentally different structures that break linear time-syncing. Vimeo identified three patterns: (1) German verb brackets (Satzklammer) place the main verb at the end of the clause, so splitting mid-sentence creates grammatically incomplete fragments the LLM resists producing. (2) Hindi SOV order reverses English structure — the end of the English thought maps to the middle of the Hindi sentence, breaking timestamp alignment. (3) Japanese compression — four lines of English filler genuinely condense into one tight Japanese sentence, leaving three empty slots. Romance languages like Spanish and Italian had ~99% clean pass rates, while Hindi had a 28.1% mismatch rate — 3-5x worse than Romance languages.

Interview angle
This is a data distribution problem in disguise. When an interviewer asks “how would you handle internationalization in an ML system?”, the strong answer acknowledges that languages have different structural properties that affect pipeline behavior unevenly. You need per-language error budgets and testing, not uniform assumptions. The 28.1% vs 1% mismatch rate shows why.
The split-brain architecture: separating creativity from structure
Vimeo abandoned single-prompt translation after finding that imposing format constraints on LLMs measurably degrades reasoning quality. Their solution splits the work into three phases. Phase 1 (Smart Chunking): a chunking algorithm scans for sentence boundaries across 10+ punctuation systems and groups lines into 3-5 line thought blocks — enough context to avoid hallucination but small enough to prevent drift. Phase 2 (Creative Translation): the LLM translates each chunk for meaning only — no line count enforcement. It handles German verb brackets naturally, reorders Hindi syntax correctly, and consolidates Japanese efficiently. Phase 3 (Line Mapping): a second LLM call performs purely structural work — “here are the original four English lines with timestamps, here is the translated block, break it back into four lines matching the source rhythm.” By decoupling these concerns, each pass does its job without compromise.

Interview angle
This is the single-responsibility principle applied to ML pipelines. When an interviewer asks you to design a system with competing objectives, the answer is almost never “one model that does both.” Task decomposition — splitting creative from structural work — is a production ML pattern that appears everywhere: retrieval vs. ranking in search, generation vs. filtering in content moderation, extraction vs. formatting in document processing.
The self-healing fallback chain
~95% of chunks map perfectly on the first pass. For the ~5% that fail, the system enters a tiered fallback chain. Tier 1 — LLM Correction Loop: retries with explicit feedback about what went wrong (“you returned 1 line, we need 2”). The model often finds a valid synonym or slightly less natural phrasing. This resolves ~32% of failures, adding ~2-3 seconds and ~25% more tokens per retry. Tier 2 — LLM Simplified Fallback: strips all semantic instructions. The prompt becomes “split this text into exactly N lines” — no translation quality checks, no clause boundary awareness. Tier 3 — Deterministic Rule-Based Splitter: when LLMs still fail, a pure algorithm fills empty slots with the last valid content, pads insufficient lines by duplication, and truncates excess lines. Zero tokens, instant execution. Result: 100% of chunks reach the user in a valid state.
Interview angle
This is the canonical graceful degradation pattern. Interviewers love asking “what happens when your model fails?” The weak answer is “retry.” The strong answer is a multi-tier fallback with progressively simpler strategies: first retry with feedback, then simplify the task, then fall back to deterministic rules. Each tier trades quality for reliability. This exact pattern applies to any AI feature — chatbots, recommendations, content generation.
Cost analysis: the infrastructure tax of intelligence
The multi-pass architecture adds 4-8% processing time and 6-10% token overhead versus single-call translation. Broken down: ~95% of chunks incur zero additional cost (first-pass success). The LLM correction loop adds ~2-3 seconds and ~25% more tokens per retry. The deterministic fallback (3-4% of chunks) is instant and free. The tradeoff: zero blank-screen bugs and approximately 20 hours of manual QA eliminated per 1,000 videos. Vimeo frames this as “the infrastructure tax of intelligence” — a dumb word-for-word translator never breaks sync, but a smart translator that merges, reorders, and condenses requires smart infrastructure around it to absorb the creative unpredictability.
Interview angle
Cost-benefit analysis of ML systems is a common interview topic. Know how to quantify the tradeoff: what does the extra infrastructure cost (tokens, latency, engineering time) vs. what does it save (manual QA hours, user experience). The “infrastructure tax” framing is powerful — smarter models don’t reduce system complexity, they shift it from the model layer to the orchestration layer.
Production results across 9 languages
Running the architecture against thousands of chunks across nine languages confirmed the design. Romance languages (Spanish, Italian) achieved ~99% clean pass rate on the line mapping phase — their structure is close enough to English that mismatches are rare. German and Hindi were the hardest: Hindi’s 28.1% mismatch rate meant heavy reliance on the correction loop and fallback chain. Japanese compression was frequent but more predictable and easier for the line mapper to handle. The key insight: error handling budget should be proportional to linguistic distance from the source language, not uniform across all targets.
Interview angle
When designing multi-language ML systems, interviewers expect you to recognize that performance varies by language pair. The strong answer includes per-language monitoring, differentiated SLAs, and proportional error handling investment. Mentioning specific metrics (99% vs 28.1%) shows you think quantitatively about language-specific behavior, not just in generalities.
Key concepts
Split-Brain Architecture
A pipeline design that separates competing objectives into independent passes. In Vimeo’s case: creative translation (optimizing for fluency) and structural mapping (optimizing for line count) run as separate LLM calls rather than a single prompt trying to do both.
Like having a novelist write the story and then a typesetter format it for the page — asking one person to write beautifully while counting characters per line produces worse results on both dimensions.
Graceful Degradation (Fallback Chain)
A multi-tier error handling strategy where each tier trades quality for reliability. Tier 1: retry with feedback. Tier 2: simplify the task. Tier 3: deterministic algorithm. Guarantees the system always produces output, even if imperfect.
Like a restaurant: if the chef can’t make the dish, the sous chef tries a simpler version. If that fails, you get a pre-made meal from the freezer. You always eat — quality varies, but no one goes hungry.
Smart Chunking
Grouping input text into logical thought blocks (typically 3-5 lines) by scanning for sentence boundaries across multiple punctuation systems. Prevents hallucination from processing too much context while avoiding the loss of meaning from processing too little.
Line Mapping
The structural pass that takes a fluent translated block and redistributes it back into the same number of lines as the source, preserving timestamp alignment. Purely structural — no concern for meaning, only line count.
Infrastructure Tax
The additional system complexity required when using intelligent (but unpredictable) models in production. Smarter models produce better output but require more sophisticated orchestration to handle their creative unpredictability — the cost shifts from the model layer to the infrastructure layer.
Like hiring a brilliant but unreliable artist vs. a predictable printer. The artist produces better work, but you need a project manager, revision cycles, and backup plans — the “tax” on your operations.
Language Geometry
The structural properties of a language that affect how it maps to a timeline — word order (SOV vs SVO), verb placement (German brackets), and information density (Japanese compression). These geometric differences cause systematic, predictable mismatches in subtitle sync.
Task Decomposition in ML Pipelines
Breaking a complex task with competing objectives into separate, focused steps. Each step optimizes for one dimension without compromising another. Common pattern in production ML: retrieval/ranking in search, generation/filtering in moderation, translation/formatting in subtitles.
Check your understanding
What is the “blank screen bug” that Vimeo discovered in their AI subtitle system?
- The LLM fails to generate any translation for certain languages, leaving all subtitle slots empty.
- The LLM merges fragmented speech into fewer, fluent sentences, leaving some time-synced subtitle slots with no text.
- The subtitle rendering engine crashes when processing non-Latin character sets like Japanese or Hindi.
- Network latency causes subtitles to load after the corresponding audio has already played.
Show answer
The LLM merges fragmented speech into fewer, fluent sentences, leaving some time-synced subtitle slots with no text.
LLMs optimize for fluency — when they see filler words or fragmented speech, they merge everything into one clean sentence. This means four time slots might get one sentence of text, with the other three going blank. The translation is linguistically correct, but the product experience breaks because subtitles disappear mid-speech.
Why did Vimeo abandon the single-prompt approach to subtitle translation?
- A single LLM call exceeded token limits for longer videos, causing truncated translations.
- Imposing structural constraints (line count) on the same prompt that handles creative translation measurably degrades quality on both dimensions.
- Single prompts could not handle right-to-left languages like Arabic and Hebrew.
- The latency of a single large prompt was too high for real-time subtitle display during video playback.
Show answer
Imposing structural constraints (line count) on the same prompt that handles creative translation measurably degrades quality on both dimensions.
When you ask one prompt to translate fluently AND preserve exact line count, the competing objectives degrade performance on both. The fluency suffers because the model is distracted by structural constraints, and the structure suffers because the model prioritizes meaning. Vimeo’s fix: separate the tasks into two focused LLM calls.
In Vimeo’s three-phase pipeline, what does Phase 2 (Creative Translation) explicitly NOT do?
- It does not translate idiomatic expressions or cultural references.
- It does not enforce line count — the LLM translates purely for meaning and fluency.
- It does not process languages with non-Latin scripts.
- It does not handle chunks longer than 3 lines to avoid context overflow.
Show answer
It does not enforce line count — the LLM translates purely for meaning and fluency.
Phase 2 has one job: translate for meaning with maximum linguistic quality. No line count enforcement, no structural constraints. The model is free to handle German verb brackets, Hindi syntax reordering, and Japanese compression naturally. Structural alignment is Phase 3’s job — the “split-brain” design ensures neither pass compromises.
Hindi had a 28.1% mismatch rate in Vimeo’s line mapping phase, while Spanish had ~1%. What is the primary cause of this difference?
- Hindi has a larger vocabulary than Spanish, causing the LLM to produce longer translations.
- Hindi uses SOV word order which reverses the mapping between English thought boundaries and Hindi sentence structure, making line-by-line sync much harder.
- The LLM was not fine-tuned on Hindi training data, resulting in lower translation quality.
- Hindi script requires more characters per word, exceeding the character limit per subtitle line.
Show answer
Hindi uses SOV word order which reverses the mapping between English thought boundaries and Hindi sentence structure, making line-by-line sync much harder.
Hindi follows Subject-Object-Verb order — effectively the reverse of English SVO. This means the end of an English thought maps to the middle of the Hindi sentence, and vice versa. Line boundaries that make sense in English create grammatically incomplete fragments in Hindi. Spanish, as a Romance language, has structure close enough to English that line-by-line mapping works naturally ~99% of the time.
What happens when Vimeo’s LLM correction loop AND simplified LLM fallback both fail to produce the correct line count?
- The chunk is flagged for human review and the subtitle slot is left empty until manually fixed.
- The system retries with a different LLM provider that may handle the language structure better.
- A deterministic rule-based algorithm fills empty slots with the last valid content, pads with duplication, or truncates excess lines.
- The original untranslated source text is displayed as a fallback to ensure no blank screens.
Show answer
A deterministic rule-based algorithm fills empty slots with the last valid content, pads with duplication, or truncates excess lines.
The final tier is a pure algorithm: empty slots get filled with the last valid content, too-few lines are padded by duplication, and excess lines are truncated. It’s instant, costs zero tokens, and guarantees 100% of slots are filled. The output may show repeated phrases, but the viewer never sees a blank screen. This handles ~3-4% of all chunks.
Vimeo’s smart chunking groups lines into blocks of 3-5 lines. What problem does this solve compared to feeding the full transcript?
- It reduces API costs by sending fewer tokens per request.
- It prevents the LLM from hallucinating or losing track of position, which happens when processing entire transcripts at once.
- It allows parallel processing of chunks across multiple GPU instances.
- It avoids exceeding the LLM’s maximum context window of 4,096 tokens.
Show answer
It prevents the LLM from hallucinating or losing track of position, which happens when processing entire transcripts at once.
Feeding the full transcript causes the LLM to hallucinate and lose track of where it is. Feeding single lines provides zero context. Smart chunking finds the middle ground by scanning for sentence boundaries across 10+ punctuation systems to create thought-complete blocks. The LLM always sees a complete thought before translating, without drowning in irrelevant context.
The German verb bracket (Satzklammer) causes subtitle sync issues because:
- German sentences are consistently longer than English, exceeding the character limit per subtitle line.
- German places the main verb at the end of the clause, so splitting mid-sentence creates grammatically incomplete fragments that the LLM resists producing.
- German requires special Unicode characters that the subtitle rendering engine cannot display.
- German compound words cause tokenization errors in the LLM, producing incorrect translations.
Show answer
German places the main verb at the end of the clause, so splitting mid-sentence creates grammatically incomplete fragments that the LLM resists producing.
In German, the conjugated verb sits in the second position but the infinitive or participle goes at the very end of the clause, creating a “bracket” around the whole thought. If you split at a line boundary mid-bracket, the first subtitle looks like a syntax error. The LLM instinctively avoids producing these fragments, preferring to merge lines instead — which breaks subtitle sync.
Vimeo reports 4-8% additional processing time and 6-10% additional token cost from their multi-pass architecture. What is the primary justification?
- The multi-pass approach produces translations that score higher on automated quality metrics like BLEU.
- It eliminates blank-screen bugs entirely and saves approximately 20 hours of manual QA per 1,000 videos.
- It allows Vimeo to use smaller, cheaper LLMs for each pass instead of one large model.
- The additional passes enable real-time subtitle rendering during live video streaming.
Show answer
It eliminates blank-screen bugs entirely and saves approximately 20 hours of manual QA per 1,000 videos.
The cost-benefit is clear: a small increase in processing time and tokens eliminates a product-breaking bug (blank screens) and removes ~20 hours of manual QA per 1,000 videos. At Vimeo’s scale, the infrastructure cost is far less than the human cost it replaces. This is the “infrastructure tax of intelligence” — paying a small automated cost to absorb the model’s creative unpredictability.
Which design principle does Vimeo’s split-brain architecture most directly embody?
- Eventual consistency — accepting that translations may temporarily differ from the source before converging.
- Task decomposition — splitting competing objectives (fluency vs. structure) into separate, focused passes so neither compromises the other.
- MapReduce — distributing translation work across parallel workers to minimize end-to-end latency.
- Feature flags — gradually rolling out the multi-pass pipeline to a subset of users before full deployment.
Show answer
Task decomposition — splitting competing objectives (fluency vs. structure) into separate, focused passes so neither compromises the other.
Task decomposition is the core principle. When a single model is asked to optimize for both fluency and line count, it performs worse on both. By separating the creative pass (Phase 2) from the structural pass (Phase 3), each operates at full capability. This pattern applies broadly in production ML: retrieval vs. ranking, generation vs. filtering, extraction vs. formatting.
Vimeo’s LLM correction loop resolves about 32% of first-pass failures. What technique does it use?
- It switches to a different LLM provider with better performance on the failing language.
- It retries with explicit feedback about the specific error (e.g., “you returned 1 line, we need 2”), and the model often finds a valid synonym or rephrasing that respects the line count.
- It increases the temperature parameter to encourage more diverse outputs on retry.
- It falls back to a dictionary-based word-for-word translation to guarantee correct line count.
Show answer
It retries with explicit feedback about the specific error (e.g., “you returned 1 line, we need 2”), and the model often finds a valid synonym or rephrasing that respects the line count.
The correction loop provides the model with explicit error feedback — telling it exactly what went wrong and what the expected output should look like. This is a form of constrained retry with error context, not random retry. The model can often find a valid synonym or slightly less natural phrasing that satisfies the line count. Each retry adds ~2-3 seconds and ~25% more tokens.
Liked this? Engineer's Codex sends one deep dive and a link roundup every week.
No spam. Unsubscribe anytime.