Skip to content
All guides

How to Split or Merge SRT Files Without Breaking the Timing

Step-by-step guide to splitting an SRT file at a timestamp, merging several SRT parts into one, and combining two subtitle tracks — with the offset and renumbering rules that keep everything in sync.

  • srt
  • timing
  • workflow

Splitting and merging subtitle files sounds trivial: cut the text file in two, or paste one after the other. In practice, both break timing unless you adjust the timestamps — and a merged file with duplicate or out-of-order cue numbers can fail to load in stricter tools.

This guide covers the three jobs people usually mean:

  1. Splitting one SRT into parts that match a video cut into parts.
  2. Joining several SRT parts into one file for a joined video.
  3. Combining two tracks that cover the same time — for example, dialogue plus on-screen text, or two languages.

A quick refresher on SRT structure

Each SRT cue has a number, a timing line and text, separated by blank lines:

41
00:09:58,120 --> 00:10:01,400
And that's the end of part one.

42
00:10:03,000 --> 00:10:05,250
Welcome to part two.

Two properties matter for splitting and merging:

  • Timestamps are absolute — measured from the start of the video the file belongs to.
  • Cue numbers should be sequential, starting at 1.

Every split or merge is about keeping those two properties true for the new video. (For more on SRT syntax, see SRT vs VTT vs ASS.)

Splitting an SRT file

You split an SRT when you split the video: a long lecture becomes chapters, a podcast becomes clips, a stream becomes highlights.

The rule

For a part that starts at time S in the original video:

  1. Keep only cues that fall inside that part.
  2. Subtract S from every timestamp, so the part starts at zero.
  3. Renumber cues from 1.

Example

Say you split a 20-minute video at exactly 00:10:00,000. Part two’s first cue was:

42
00:10:03,000 --> 00:10:05,250
Welcome to part two.

In the part-two file it becomes:

1
00:00:03,000 --> 00:00:05,250
Welcome to part two.

Handle cues that cross the split point

If a cue starts before the split and ends after it, you have three options:

  • Move the split point to a gap between cues. This is the cleanest option, and choosing your video cut point in a pause makes it easy.
  • Keep the cue in the part where most of it falls, trimming its time to fit.
  • Duplicate it in both parts, trimmed at the boundary, if the line really spans the cut.

Never leave a cue with a negative start time or an end time past the end of the part.

Cutting out a section in the middle

Removing a section — an ad read, a mistake, a long pause — is a split plus a merge. If you remove the range from A to B:

  1. Delete all cues inside A–B.
  2. Subtract (B − A) from every cue that starts after B.
  3. Renumber.

This is also the fix when a video was trimmed after subtitles were made, and the subtitles suddenly fall out of sync from one point onwards. The out-of-sync subtitles guide covers how to diagnose that.

Merging SRT parts into one file

You merge SRT parts when you join video clips: a multi-part recording, an intro plus main video, or chapters assembled into one upload.

The rule

For each part after the first:

  1. Add the total duration of all preceding video parts to every timestamp.
  2. Append the cues after the previous part’s cues.
  3. Renumber everything from 1.

The key word is video duration. Use the length of the preceding video clip, not the end time of its last subtitle. If part one is 10:00 long but its last cue ends at 9:52, part two’s cues must still be offset by 10:00.

Example

PartVideo lengthOffset applied to its cues
Intro00:00:12,5000
Main00:14:03,000+00:00:12,500
Outro00:00:20,000+00:14:15,500

If your editor adds transitions that overlap clips, the effective offset is shorter than the sum of clip lengths. Check the real start time of each clip in the final timeline and use that.

Getting exact durations

Use the duration of the actual exported clips, not a rounded number from a file browser. FFmpeg’s ffprobe gives you the exact value:

ffprobe -v error -show_entries format=duration -of csv=p=0 part1.mp4

A script for merging SRT parts

If you merge files regularly, a small script avoids arithmetic mistakes. This Python example merges parts with known video durations, offsets each part and renumbers the result:

import re

def to_ms(ts):
    h, m, s, ms = map(int, re.split(r"[:,]", ts))
    return ((h * 60 + m) * 60 + s) * 1000 + ms

def to_ts(ms):
    h, ms = divmod(ms, 3_600_000)
    m, ms = divmod(ms, 60_000)
    s, ms = divmod(ms, 1000)
    return f"{h:02}:{m:02}:{s:02},{ms:03}"

def read_cues(path):
    text = open(path, encoding="utf-8-sig").read().replace("\r\n", "\n")
    for block in re.split(r"\n\s*\n", text.strip()):
        lines = block.split("\n")
        start, end = [t.strip() for t in lines[1].split("-->")]
        yield to_ms(start), to_ms(end), "\n".join(lines[2:])

# (subtitle file, duration of that video part in seconds)
parts = [("intro.srt", 12.5), ("main.srt", 843.0), ("outro.srt", 20.0)]

out, n, offset = [], 1, 0
for path, duration in parts:
    for start, end, text in read_cues(path):
        out.append(f"{n}\n{to_ts(start + offset)} --> {to_ts(end + offset)}\n{text}\n")
        n += 1
    offset += round(duration * 1000)

open("merged.srt", "w", encoding="utf-8").write("\n".join(out))

It reads files as utf-8-sig to strip a byte-order mark if present, normalises Windows line endings, and assumes each block has a number line followed by a timing line. Add validation if your inputs are messy.

Combining two tracks over the same video

Sometimes “merge” means something different: two subtitle files for the same video that you want shown together. Common cases:

  • Dialogue subtitles plus a separate file of on-screen text translations.
  • Two languages displayed at once, for language learners.

Here you don’t offset anything — both files already share the same timeline. You interleave cues by start time and renumber. The catch is overlap: SRT has no standard way to position two simultaneous cues, and many players show only one at a time or stack them unpredictably.

Better options:

  • Use ASS, with one style at the bottom and another at the top (alignment 2 and 8), so both tracks are placed deliberately.
  • Use WebVTT with line: cue settings, if it’s going on the web.
  • For bilingual SRT, put both languages in the same cue on separate lines, which every player can show.

Checklist after any split or merge

  • Cue numbers run from 1 with no gaps or duplicates.
  • No cue has a negative start or ends after the video ends.
  • Start times are in increasing order.
  • No unintended overlaps at the join points.
  • Spot-check the first and last cue of every part against the video.
  • The file is saved as UTF-8.

Splitting, trimming and merging SRT files with timings recalculated automatically is one of the core tools planned for CutMySub. It’s launching soon.

· subtitle formats

SRT vs VTT vs ASS: Subtitle Formats Explained

What SRT, WebVTT and ASS subtitle files are, how their syntax differs, what each supports for styling and positioning, and which one to use for YouTube, the web, video editors and burned-in captions.

Back to all guides