
A 40-minute episode carries roughly 600 cues. When a translated subtitle drifts out of sync, the usual fix is retiming: nudge the offsets until the lines look plausible. I have stopped doing that, but it took a while to see why. Retiming treats two separate failures as one. The words are right; the clock is wrong.
Two failures that look like one
A localized subtitle file has two independent inputs. One is the text, which a translator wrote against a specific cut of the film. The other is the clock, which was measured frame by frame on that same cut. They arrive from different people at different times, and they drift apart the moment the studio ships a re-edit.
The common repair is a constant offset. Pick the drift, shift all timings by it, ship. That holds while the drift stays constant. It breaks the moment the translation lost a line, merged two, or split one in half, because then no single shift aligns all of it. You keep nudging, and the middle of the file stays wrong no matter what number you pick.
A transplant splits the problem in the right place. One file supplies the clock, the other supplies the words, and you lift each from the file that owns it. The original track carries timings you can trust; the translation carries text you can read. Explore this tool at Elysia Tools — both inputs are pasted as plain SRT or WebVTT text.
Strict order is exact, and that is the whole trick
Order mode is the boring case, and the boring case is where the accuracy lives. It requires equal cue counts and refuses to guess when they differ. The refusal is explicit, not silent, and it arrives as this string: “order mode requires equal cue counts (timing 3 vs text 2); use nearest mode instead”.

When the counts match, cue one takes timing one, cue two takes timing two, and so on to the end. No gap arithmetic, no tolerance window, no accumulated drift. I ported the transplant function to Python and ran the documented example: three English timings at 02, 05 and 09 seconds zipped against three Chinese lines whose own clock ran at 00.1, 03.2 and 10.5 seconds. The output kept the English timestamps exactly and printed 你好 at 00:00:02,000, 你好吗 at 00:00:05,000, and 明天见 at 00:00:09,000. The Chinese timings were discarded completely, which is the point of the exercise.
Why this beats retiming: a translator works line by line against the picture, so line 57 of the translation corresponds to line 57 of the original. Index pairing encodes that assumption directly. A constant offset encodes a weaker one, namely that the two files are the same file with a clock error.
The trap is that equal counts do not prove equal segmentation. If the translation merged two short cues into one and split a long one in two, the totals still match while the boundaries do not. Order mode will zip it happily and stay silent, so the counts are a necessary check, not a sufficient one.
Nearest time: what happens when the counts drift
Nearest mode exists for the files that do not line up. It walks the text cues in file order. Each one claims the closest unused timing cue, measured as the absolute difference between start times. Walking the text side first matters, because each line gets its pick before the later lines do.
The documented case is a translation that lost its middle line, and the data below comes from running the shipped function on it. Three timing cues, two text cues, and the surviving Chinese lines both mis-timed. Isolating the same function reproduces the reported output exactly: two cues transplanted, one timing cue unmatched, three cues out. The middle timing cue keeps the English line “How are you?”, so the track never goes blank in the middle of a scene.
That fallback is the honest part of this design. Nothing disappears; the hole gets filled with source-language text. A viewer sees a sudden line of English, which is a visible defect but a recoverable one. Silence would have been worse, because a dropped line is invisible in the file and obvious on screen.
The greedy pass can cross wires
Here is where the mechanism deserves a closer look. The matcher compares start times and picks the closest unused slot, but it never checks that the assignments stay in order. For example, a straightforward test shows what that allows.

Take timings starting at 02, 05 and 09 seconds, and a translation starting at 04, 06 and 10 seconds. All counts agree, so nothing looks unusual. Run the function and the claim map comes back as timing 0 ← text 2, timing 1 ← text 0, timing 2 ← text 1. The output puts the last translated line at 00:00:02,000, the first line at 00:00:05,000, and the second line at 00:00:09,000.
The report for that run reads: three transplanted, zero unmatched timing, zero unmatched text. A full, green, entirely crossed result. My independent port produced the identical claim map, so this is the shipped behaviour, not a mistake in my reading of it. The option label promises “nearest time (monotonic assignment)”, and the second word is the one the code does not enforce.
Two details explain the crossing. Gaps are measured from start times only, so a cue that runs for eight seconds is judged by its first frame. And the scan is greedy per text cue with no lookahead, so an early line can consume the slot a later line needed. In practice, most translations keep their lines in picture order and the assignments come out monotonic; I have observed that failure shape mostly on re-cut files. When they do not, the counts stay perfect and the file is wrong.
Read the report line before the cue list
The tool returns seven numbers alongside the text: timing cues, text cues, mode, transplanted, unmatched timing, unmatched text, and output cues. Read them in that order, before you scroll to the transcript. The green run from the documented example reads transplanted: 3, unmatched timing: 0, unmatched text: 0.

Three shapes are worth memorising:
- Fully matched: transplanted equals both input counts, and both unmatched counts are zero. Order mode should always land here.
- Real drop: transplanted is below the timing count, unmatched timing is positive, and unmatched text is zero. Expect a fallback line in the output.
- Leftover text: unmatched text is positive, which means the translation has more lines than the clock can hold. Something upstream split cue boundaries.
In nearest mode, output cues always equal timing cues, because the output is built by walking the timing track. If those two numbers disagree, the run was not a transplant. And any report can be green while the ordering is crossed, so the numbers clear a file for counts only, never for sequence.
What the transplant drops on the way out
The graft carries timings and lines. The rest is decided by the serializer, and it is worth knowing what does not survive.
SRT output is rebuilt from scratch: cues are renumbered from one, milliseconds use the comma decimal, and original cue identifiers are gone. WebVTT output keeps more context, since the timing file’s REGION blocks and header note come through, but the tool passes an empty style list, so STYLE blocks do not cross over. Per-cue identifiers and per-cue settings do not survive either, because a transplanted cue is only a start time, an end time and lines of text.
The practical consequence: if your release depends on positioning or styling, apply it after the transplant and diff the WebVTT header before you ship. A transplant is a text operation, and it stays text on the way out.
A four-minute review pass that catches crossings
The counts clear a file quickly; ordering needs eyes. Four checks reduce a 600-cue file to four questions.
- First and last line: play the opening and closing cue. If either is off by more than a beat, the pairing crossed somewhere.
- Descending starts: scan the start times. Any cue that begins earlier than the cue above it is a crossing, and the file is wrong regardless of the report.
- Around the fallback: when unmatched timing is positive, read the line before and after the fallback. The neighbours reveal whether the drop was local or the whole tail shifted.
- Source-language tell: grep the output for words that appear only in the original track. Each hit is a place where the translation did not reach.
That is a manual pass on purpose. The transplant is deterministic, so the same inputs produce the same output, which means the checks are worth writing down once and repeating on each release.
When neither mode fits: the split-cue problem
The awkward middle case is a translation whose cue count is close but not equal, because the translator split one line into two or merged a pair. Nearest mode handles it without complaint. Add one extra text cue to the earlier example and the run reports three transplanted, zero unmatched timing, one unmatched text. The extra line is left behind, with no error and no warning.
The clean fix is upstream. Merge the split boundary in the text file until the counts match, then run order mode, which is exact. If the lines genuinely need to split (a two-line caption that reads better as two cues), handle that after the transplant, on text that already sits on the right clock. Do the timing first and the typography second; reversing that order is what forces people back into offset guessing.
Limits worth knowing before you paste: each input accepts up to 2,000,000 characters, both are required, and the tool reads plain SRT or WebVTT only. There is no global optimum alignment here, since the assignment is greedy, so a perfect matching is not promised. That is a real limitation, and the review pass above exists because of it. Explore more tools at elysiatools.com.
I used to call a mistimed subtitle a translation problem. It is not. The words sit where the translator put them; the clock ran on a different cut of the film. Once you name that split, the repair turns mechanical: take the clock from one file, keep the language from the other, then ask one question. Does the transplanted count match the cue count you started with?
本文有中文版:字幕时间轴移植:词对了,时钟错了