How to translate an SRT file without breaking the timing
· 5 min read
An SRT file is a list of numbered cues, each with a start time, an end time and a line or two of text. Translating one sounds like a text problem, but the part that usually breaks is the timing, and it breaks in a way that is easy to miss until the video is playing.
Why copy, translate, paste goes wrong
The quick route is to copy the text out, run it through a translator as one block, and paste the result back. A translator reorders clauses, merges short sentences and splits long ones, because that is what good translation does. The result no longer has the same number of lines, so the lines slide against the timecodes: cue twelve ends up showing the sentence that belongs to cue eleven, and the error grows toward the end of the file.
Translating the whole file as raw SRT text has a different failure. The timecodes and cue numbers go through the translator too, and a stray reformat of a comma or an arrow is enough to make the file fail to import.
Translate one cue at a time
The reliable approach is to treat each cue as its own unit. Send only the text, one entry per cue, keep a numbered reference for every line, and write each translation back onto the cue it came from. The start and end times never pass through the translator at all, so they cannot change.
The cost is a little context: a sentence that runs across two cues is translated as two halves. In practice subtitles are already broken at natural pauses, and a language model given the neighbouring lines in the same request keeps the halves consistent. It is a much smaller problem than a file that drifts.
Cues with two lines
A cue split over two lines is one thought laid out for the screen. Joining the lines before translating, and letting the player or your editor wrap the result, gives a better translation than translating each line separately and hoping they still fit together.
Changing format on the way
Because the timing is untouched, the translated cues can be written in any format, not only the one you started with. An SRT can come back as WebVTT for a web player, SubViewer for YouTube, FCPXML for Final Cut Pro or DaVinci Resolve, or Premiere marker XML. The XML formats address frames, so set the frame rate of the timeline you are importing into, or every caption lands slightly off.
Before you publish
- Translated text is usually longer. Check the longest cues for reading speed.
- Names, product names and technical terms are the most common mistakes. Search for them.
- Jokes and idioms rarely survive. Rewrite those lines by hand.
The CaptionsThis subtitle translator does all of this cue by cue: upload an SRT, VTT or SBV file, pick a language and a format, and download it on the original timing. Every account gets a few free translations to try it.