BookTranslator
BookTranslator

How to Translate an SRT File Without Changing the Timestamps

Translate subtitle text while locking cue numbers and timecodes, then validate sequence, encoding, and playback before delivery.

BookTranslator

BookTranslator Team

7 min read

Fast Answer: Translate Cue Text, Lock IDs and Timecodes

An SRT file is a timed data file, not a transcript with decorative timestamps. Translate only the subtitle text. Keep every cue number, timestamp, blank separator line, and supported formatting tag in place, then compare the source and target cue structures before watching the video.

For a file-aware workflow, upload the original file to the SRT Translator instead of copying captions into an unstructured text box. File awareness reduces structural risk, but you should still validate the output against the source and the video.

The non-obvious rule is this: timecode preservation is necessary, but it is not sufficient. A target cue can keep the exact timestamps and still fail because the translated sentence is too long to read, breaks at the wrong phrase, or refers to a speaker who has not appeared yet.

How an SRT File Is Structured

A typical cue contains four parts:

17
00:00:41,500 --> 00:00:44,200
<i>MAYA:</i> The total is €1,249.50.

  1. 17 is the cue number.
  2. 00:00:41,500 is the start time.
  3. 00:00:44,200 is the end time.
  4. The remaining line or lines are the displayed text.

SRT commonly uses a comma between seconds and milliseconds and --> between start and end. A blank line separates one cue from the next. Some players tolerate variations; a reliable translation workflow does not depend on that tolerance.

Download the synthetic SRT translation stress test. It includes dialogue, italics, a speaker label, a date, currency, CJK text, Arabic, Cyrillic, and accented Latin characters. The content is fictional, so it is safe to use for parser and encoding tests.

Why Copy-Paste Translation Breaks SRT Files

General-purpose text workflows can mistake structure for content. Common failures include:

  • translating or renumbering cue IDs;
  • changing the timestamp separator or decimal comma;
  • merging two short cues into one paragraph;
  • dropping a repeated or apparently empty cue;
  • returning Markdown fences around the file;
  • rewriting speaker labels as prose;
  • deleting <i> tags or emitting unsupported rich-text markup;
  • replacing blank cue separators with wrapped lines.

Even a linguistically good translation is unusable when the player can no longer parse it.

Step-by-Step Translation Workflow

1. Preserve the original

Keep the source SRT unchanged. Work on a language-labeled copy such as interview.en.srt → interview.es.srt.

2. Confirm the source parses

Open the source in a subtitle editor or player before translating it. If the source already has overlapping timecodes, missing separators, or the wrong video offset, fix or document those defects first.

3. Detect the encoding

Use UTF-8 for multilingual output unless the delivery specification explicitly requires something else. YouTube's transcript guidance says non-English transcript files should be UTF-8 encoded, which is a sensible baseline for international subtitle files (YouTube Help).

4. Freeze structural fields

Treat cue numbers and timestamp lines as protected content. If a tool cannot lock them, translate in small batches and validate after every batch.

5. Translate complete cues with neighboring context

Translate the displayed text, but provide the previous and next cue for context. Subtitles frequently split one sentence across multiple cues; isolated translation can change tense, pronouns, or word order inconsistently.

6. Re-segment for the target language

Keep the cue timing unless you are authorized to retime, but adjust the target line break within the cue. Break at natural phrase boundaries, not after articles, prepositions, names, or tightly connected verb phrases.

7. Run structural validation

Compare source and target cue counts, IDs, timestamps, order, tags, and blank separators. Do this before linguistic review so reviewers do not waste time on a file that cannot load.

8. Watch the full target track

Automated checks cannot tell whether a subtitle appears before the speaker talks, obscures essential on-screen text, or remains readable during a fast exchange.

Preserve Line Breaks, Italics, and Speaker Labels

Do not preserve source line breaks mechanically when the target syntax changes. Preserve the cue, then choose a readable target-language line break.

For example, this source break is poor:

We approved the proposal
after the final review.

If the target language places the condition first, the natural break may move. The correct objective is semantic grouping, not matching the source line pixel for pixel.

Retain meaningful italics only when the destination supports them and the style guide calls for them. Preserve speaker labels consistently. YouTube recommends cues such as [music] for sounds and >> to identify speakers in transcript workflows (YouTube Help); other clients may require a different convention.

Validate Cue Count and Timestamp Order

Use this invariant table:

CheckExpected resultBlocker?
Cue countSource and target counts matchYes, unless an approved retime changed the count
Cue IDsSame unique IDs in the same orderYes
Timestamp textByte-for-byte match when timing is lockedYes
Start before endEvery cue has positive durationYes
Sequence orderNo accidental backwards jumpYes
TagsBalanced and supportedUsually
Visible textEvery source cue has an intentional targetYes

Do not use file size as a proxy. Translation expansion makes the target larger; a similar byte count proves nothing.

Check the Subtitles Against the Video

Review at normal playback speed and include these difficult moments:

  • the fastest dialogue;
  • two speakers alternating quickly;
  • names, dates, currencies, and measurements;
  • dialogue crossing a scene cut;
  • text that competes with signs or lower thirds;
  • songs, sound effects, and off-screen voices;
  • the first and last cue;
  • at least one section containing each supported formatting tag.

Use the subtitle translation QA checklist to evaluate readability and segmentation after structural validation.

Common SRT Errors and Fixes

SymptomLikely causeFix
Player rejects the fileBroken timestamp syntax or cue separatorsCompare the first failing cue against the source
Captions drift but timecodes matchWrong source track or video editAlign the source file to the exact video version
Text appears as boxes or mojibakeEncoding or font supportSave as UTF-8 and test the playback environment
A sentence appears under the wrong speakerCue merge or context-free translationRestore cue boundaries and review neighboring cues
Two-line cues become walls of textTarget expansionCondense, rephrase, or obtain permission to retime
Italics remain open for later cuesUnbalanced tagsValidate tags per cue and close them locally

When Not to Keep Every Timestamp

Do not promise timestamp preservation when the source timing is defective, the translated language needs materially different segmentation, or the video itself has been re-edited. In those cases, preserve the source as an audit reference and create an explicitly retimed target track.

Timestamp locking is a translation constraint, not a substitute for subtitle authorship.

FAQ

Can I translate only the text in an SRT file?

Yes. Translate the text lines while protecting cue numbers, timestamps, and separators. Then validate that every source cue still has one intentional target cue.

Should translated subtitles have the same number of cues?

When timing is locked, yes. A different count is a strong signal that cues were merged, lost, or split. A professional retiming workflow may change the count deliberately, but that should be documented.

Can I change line breaks without changing timestamps?

Yes. Line breaks are part of the displayed text, not the cue timing. Move them to natural phrase boundaries in the target language.

What encoding should I use for translated SRT files?

UTF-8 is the safest default for multilingual text. Use a legacy encoding only when a documented delivery system requires it.

Why does my translated SRT load but still look wrong?

Parsing and viewing are different tests. The file may be structurally valid while its cues are too long, poorly segmented, mistimed for the video version, or unsupported by the player's font stack.

Related Posts