Lower Thirds & Titles

SRT Subtitles: What the File Is and How to Make One

SRT Subtitles: What the File Is and How to Make One
Image: Vipid

An SRT file is a plain-text list of captions. Each entry holds a number, a start and end time, and the words to show. You can write one in a basic text editor in five minutes, and YouTube will accept it as long as the encoding and timing syntax are right. This tutorial builds one by hand, checks it with a short Python script, makes a second copy in Subtitle Edit 5.4.0, then ships it three ways: a YouTube upload, a selectable MP4 track, and text burned into the picture.

If you only want words on a clip fast, the earlier walkthrough on making subtitles for a video, free and step by step covers the generator route. This guide goes one layer down. It covers the file itself, the format rules that break uploads, and a repeatable build you can keep in a folder beside each project.

The format is older than most editors. The Subtitle Edit documentation says SubRip was created by a French programmer known as Brain in 2000, for a program written in Borland Delphi. Nobody has published an official specification since, so SRT subtitles are defined by what players and platforms accept. That explains why a file can play fine in one app and fail on upload in another, and why the small details below matter.

What an SRT File Contains

Every SRT file repeats one pattern. A cue is four things stacked in order, and a blank line closes it. Learn this shape and you can read any SRT file in a text editor without special tools.

  • Cue number. A counter that starts at 1 and climbs by one for each cue.
  • Timing line. A start time, an arrow made of two hyphens and a greater-than sign, and an end time. Both times use HH:MM:SS,mmm.
  • Text. One or more lines of caption words, in plain text.
  • Blank line. It separates this cue from the next one.

Here is a three-cue file. Open a text editor, paste it, and save it as sample.srt to see how little there is to it.

1
00:00:04,500 --> 00:00:07,200
Welcome to the channel.

2
00:00:07,400 --> 00:00:10,900
Today we build a subtitle file
from nothing but a text editor.

3
00:00:11,100 --> 00:00:13,800
Let's start with the timing line.

The comma before the milliseconds is the detail that trips people up. Subtitle Edit’s SubRip reference lists a period in that position as wrong, so 00:00:01.000 is a broken timestamp in SRT even though it is valid in WebVTT. Many tools forgive the period, and some do not. Write the comma every time.

The file has no declared version, no header, and no style block. Documentation updated in November 2026 still describes SRT as a de facto format that has no published specification and no current version. No format-level change turned up in the research window from late August to late November 2026. The main developments were updated help pages and tool releases, not a revision of the format itself.

Timing in, hold and out. Think of each cue as an in point, a hold, and an out point. The in point is when the words appear. The hold is how long a viewer gets to read them. The out point is when they clear. Subtitle Edit’s reference advises allowing at least 1 to 1.5 seconds per subtitle, and longer when the text runs long.

SRT stores clock time, not frame numbers. That makes one file valid for a 24 fps master, a 30 fps cut, and a 60 fps screen recording. A millisecond is far finer than a frame (a frame at 30 fps lasts about 33 ms), so you never need to round a cue to a frame boundary. The one catch is a video whose speed or frame rate was conformed after the captions were timed. Then every cue drifts, and the fix is a time-stretch, covered in the troubleshooting section.

Finally, encoding. SRT does not declare one. UTF-8 is the safe modern choice, and YouTube states that it accepts basic SRT files saved as plain UTF-8. Accented letters, curly quotes, and non-Latin scripts survive in UTF-8. They turn into question marks or boxes in legacy encodings such as old Windows code pages.

Prerequisites and Versions

You need very little. The core build runs on a text editor and Python. The extras add a visual editor and the two delivery routes that need FFmpeg. Versions below come from the vendors’ own download and release pages as of November 26, 2026.

Illustrative: Open laptop on a dark desk showing a code editor with source code and a file tree, lit by pink and blue light
Photo: Daniil Komov / Pexels
ToolVersionCostUsed for
Plain-text editor (Notepad, TextEdit in plain-text mode, VS Code)Any current version$0Writing and fixing cues by hand
Subtitle EditNot listedFree, with no paid tiers, watermarks or trialVisual timing, plain-text import, SRT export
FFmpegAny recent release (see the note below the table)Free, open sourceMuxing a subtitle track, burning text in, converting formats
PythonAny current Python 3 release$0Building and checking the file with the project script
YouTube StudioWeb appNo charge for subtitle upload found in YouTube’s help pagesUploading the finished file
Your videoMP4 with H.264 video and AAC audio works bestn/aTiming reference and delivery

Subtitle Edit 5.4.0 followed 12 beta releases and 4 release candidates, according to the maintainer’s announcement. The download page lists a Windows installer of about 58.8 MB, a ZIP of about 111 MB, and a native DMG and tarball for macOS and Linux. A 5.5.0 beta series is in testing, and reportedly reached beta 14 on November 25. Stick to the stable build for client work.

According to FFmpeg‘s own news page, the newest stable release is 9.1 Gauss, published November 20, 2026, and the project says it ships a new major release roughly every six months. Check your FFmpeg install before you start. Any recent build handles every command in this guide, but the burn-in filter needs a build compiled with libass, which most full builds include.

ffmpeg -version
ffprobe -version
python3 --version

One naming trap to avoid. In FFmpeg documentation, SRT can also mean Secure Reliable Transport, a live-streaming protocol that has nothing to do with subtitles. If a search lands you on a page about SRT listeners and callers, you are in the wrong place.

SRT, WebVTT or Burned-In Text: Pick the Route

Decide how the words will reach the viewer before you write a cue. The file you build is the same either way, but the delivery changes what you do after it. Sidecar files stay separate from the picture and viewers can switch them off. Burned-in text becomes pixels and cannot be turned off.

RouteStylingViewer can switch offBest forWatch out for
SRT sidecar uploadNone (YouTube ignores style data in SRT)YesYouTube and other platforms with a caption upload fieldUTF-8 and comma timestamps
WebVTT sidecarCan carry style and position dataYesWeb players and HTML5 videoPeriod before milliseconds, WEBVTT header line
SRT muxed into MP4 as mov_textPlayer decidesYes, if the player lists subtitle tracksFiles you hand to a client or play locallySome players and social apps ignore the track
Burned-in (open) captionsFull control through the editor or FFmpegNoPlatforms with no caption upload, silent autoplay feedsRe-encodes the video and fixes the language
Platform auto captions, then reviewPlatform styleYesFirst drafts you will correctAccuracy depends on audio quality

WebVTT is the formally specified, W3C-oriented web format, while SRT stays a de facto standard. If your destination is a web page that plays HTML5 video, WebVTT is the better target, and the project script below converts SRT to VTT in one command. For uploads to YouTube and for hand-offs to other editors, SRT is the format everyone expects.

The wider question of what counts as a subtitle, a closed caption, or an open caption has its own write-up on subtitles versus closed captions, including how accessibility rules view each one. For this tutorial, treat the SRT file as the source of truth and decide on burn-in last. You can always burn in later from the same file, and you cannot easily go the other way.

The same logic applies to other delivery formats. When you pick between a transparent video, a Lottie file, and a GIF for a logo, the decision follows the destination, as laid out in animated logo formats compared by use. Captions work the same way: keep one clean master and export per destination.

Where a platform gives you no way to attach a caption file, burn the text in or use the app’s own caption tools.

Frame by Frame, Steps 1 to 4: Write the Cues by Hand

The first four steps need no software beyond a text editor. Doing one file by hand is the fastest way to understand every rule the later tools enforce.

Step 1. Make a project folder. Create a folder named srt-project and put a copy of your video inside it as input.mp4. Keep captions, cue sheets, and exports in the same folder. FFmpeg’s subtitle filter handles relative paths far better than long absolute ones, and you will thank yourself in step 12.

Step 2. Open a plain-text editor and set UTF-8. In Notepad, use Save As and pick UTF-8 in the Encoding menu. In TextEdit, switch to plain-text mode first with Format, Make Plain Text. In VS Code, the encoding sits in the status bar at the bottom right. If you can choose between UTF-8 and UTF-8 with BOM, take plain UTF-8. A byte-order mark at the start of the file is invisible and can make a strict parser reject the first cue.

Start each cue on the first syllable, or a few frames before it if the speaker is hard to hear. End it a beat after the last word, so the text does not vanish while the voice is still finishing. If the next phrase starts straight away, leave a gap of a tenth of a second or so between cues so the cue change reads as a change.

Step 4. Write the first cue, then the rest. Type the number, the timing line, and the text, and add a blank line. Here is a cue for a clip that opens half a second in. The text breaks across two lines because the sentence runs long.

1
00:00:00,500 --> 00:00:03,200
Welcome back to the channel.

2
00:00:03,400 --> 00:00:07,400
Today we build an SRT file by hand
and then check it with a script.

Save with the .srt extension and turn off any option that appends .txt to the name. Some systems hide extensions, so a file called captions.srt.txt looks right in the folder and fails on upload. Name it clearly. A pattern like captions.en.srt makes the language obvious once you start handling several.

Writing cues by hand works for a 30-second clip. It gets tedious at five minutes, because you must keep the numbers in order and every timestamp in the right shape. That is what the next section fixes.

Frame by Frame, Steps 5 to 7: Build and Check the File With a Script

A cue sheet is a shorter way to write the same information. Each line holds a start time, an end time, and the text, separated by a pipe character. The script numbers the cues and formats every timestamp for you, so the two most common hand-typing errors disappear.

Step 5. Write a cue sheet. Create cues.txt in the project folder. Clock values can be written as MM:SS.mmm or HH:MM:SS.mmm with a period, which is easier to type. Use a double slash for a line break inside a cue. Lines that start with a hash are comments.

# start | end | text   (use // for a line break)
00:00.500 | 00:03.200 | Welcome back to the channel.
00:03.400 | 00:06.800 | Today we build an SRT file by hand // and then check it with a script.
00:07.000 | 00:09.500 | Every cue needs a number, a time range, // and at least one line of text.
00:09.700 | 00:12.600 | Café, naïve, and "quoted" text // all survive in UTF-8.
00:13.000 | 00:15.400 | Save it, check it, then upload it.

Step 6. Build the SRT and run the checker. The full script appears in the working project section below. Save it as srttool.py and run these two commands.

python3 srttool.py build cues.txt captions.srt
python3 srttool.py check captions.srt

With the sheet above, the checker prints this. The file is valid, so there are zero errors, but three cues read too fast for the limits the script sets.

WARN  cue 2: 19.4 characters per second (limit 17)
WARN  cue 3: 27.6 characters per second (limit 17)
WARN  cue 4: 17.6 characters per second (limit 17)
5 cues, 0 errors, 3 warnings

The script treats problems in two tiers. An error means the file is broken, such as a wrong index or a malformed timing line, and the command exits with status 1 so a build script stops. A warning means the file is valid but a viewer may struggle to read it. The limits are 2 lines per cue, 42 characters per line, 17 characters per second, and 1 second on screen. Those are my editorial defaults, not a rule from any platform, and they sit in one line at the top of the script so you can change them.

Step 7. Fix the warnings by giving the text more time. Cue 3 is the worst. It packs 69 characters into 2.5 seconds, which is about 27 characters per second. Stretch it to 4.2 seconds and the rate falls to roughly 16. Adjust the tight cues, pushing later cues back to keep the gaps, and rebuild.

# start | end | text   (use // for a line break)
00:00.500 | 00:03.200 | Welcome back to the channel.
00:03.400 | 00:07.400 | Today we build an SRT file by hand // and then check it with a script.
00:07.600 | 00:11.800 | Every cue needs a number, a time range, // and at least one line of text.
00:12.000 | 00:15.200 | Café, naïve, and "quoted" text // all survive in UTF-8.
00:15.400 | 00:17.900 | Save it, check it, then upload it.
python3 srttool.py build cues_fixed.txt captions.srt
python3 srttool.py check captions.srt

Now the checker is clean.

5 cues, 0 errors, 0 warnings

That is a valid, tidy SRT file. Open captions.srt in a text editor and compare it with the hand-written version from step 4. They should look the same, except that the script wrote every timestamp in the right shape.

Frame by Frame, Steps 8 and 9: Make the File in Subtitle Edit or Your Editor

The script suits short projects and anything you want to keep in version control. For longer videos, a visual tool that shows the waveform saves time. Two routes follow. One uses Subtitle Edit, the other uses the editor you already cut in.

Step 8. Build the SRT in Subtitle Edit 5.4.0. Open the app and load your video through the Video menu. Add a new line, set its start and end by typing times or by tapping along with playback, and type the text. Menu labels shift slightly between releases, so check your own build, but the order stays the same: open video, create cues, fix timing, save.

  • Import a finished script as plain text and let the tool split it into cues, then time each one against the audio.
  • Run the common-errors fixer to clear overlaps, blank cues, and short durations in one pass.
  • Use the time-adjust tool to move every cue earlier or later when the whole file sits off by a constant amount.
  • Choose SubRip (.srt) when you save and confirm that the encoding is UTF-8.

Subtitle Edit is the tool the SRT reference documentation comes from, and it marks SubRip as the default format. Its documentation describes editing and validating the same elements the project script checks: cue numbers, timestamps, text, blank-line separation, UTF-8, and millisecond precision. Run its output through the script anyway. A second checker that you control catches settings you forgot.

Step 9. Export SRT from your video editor. Most major editors can both read and write SRT, which means you can keep captions inside the edit and export a sidecar copy at the end.

  • DaVinci Resolve. Import a subtitle file through the Media Pool or the File menu, place it on a subtitle track, and use the subtitle options on the Deliver page to export a separate SRT.
  • Adobe Premiere Pro. Import the SRT into the Project panel and drop it on the timeline to create a caption track. The captions export options in the export dialog write an SRT sidecar.
  • CapCut. Desktop and web builds have a caption import and export option. Treat the phone app as unsupported for SRT unless your version shows a file-import button in the captions panel.

Menu names change from release to release, so treat the lines above as a map rather than exact click paths. If an editor generates captions for you with speech recognition, export them as SRT right away and review the file in Subtitle Edit. The comparison on auto captions across five editors covers which editors draft captions for free and what each exports.

One rule holds across every tool. The SRT you export is plain. Colors, fonts, and positions you set inside the editor do not travel in the file. They only show if you burn the captions into the picture. Treat the exported SRT as a record of words and timing, not of design.

Frame by Frame, Steps 10 to 12: Upload, Mux or Burn In

A finished file is only half the job. These last three steps put it in front of viewers. Run the one that matches your destination, or all three if you ship the same video in several places.

Step 10. Upload the SRT to YouTube Studio

YouTube supports uploading subtitle and caption files through YouTube Studio, and its help pages describe the same workflow. The file must be basic SRT in plain UTF-8, and YouTube does not recognize styling or markup in it. A numbered path follows.

  1. Open YouTube Studio and choose Subtitles from the left menu.
  2. Click the video you want to caption.
  3. Choose Add language and pick the language of the file.
  4. Under Subtitles for that language, click Add.
  5. Choose Upload file, then With timing.
  6. Select your .srt file, check the preview, and publish.

If you have a transcript but no timing, YouTube offers an upload without timing and an auto-sync option that times the text against the audio. That route suits a script you wrote ahead of recording. It is usually less exact than your own cue timing, so review the result. Channels can also hand subtitle work to another person through a Subtitle Editor permission in YouTube Studio, according to YouTube’s help documentation.

Step 11. Mux the SRT into an MP4 as a selectable track

A muxed track travels inside the video file. Viewers can switch it on or off in a player that lists subtitle tracks, and you do not re-encode the picture. Start by listing the streams so you know what is in the file.

ffprobe -hide_banner input.mp4

Then copy the video and audio untouched and convert the SRT to the MP4 text format, called mov_text. The metadata flag tags the track as English so players label it correctly.

ffmpeg -i input.mp4 -i captions.srt \
  -map 0:v -map 0:a? -map 1:0 \
  -c:v copy -c:a copy -c:s mov_text \
  -metadata:s:s:0 language=eng \
  output_soft.mp4

Because both video and audio are copied, this finishes in about the time it takes to write the file. If the output is MKV instead of MP4, swap -c:s mov_text for -c:s srt. Matroska keeps SRT text as it is, and MP4 needs the mov_text conversion.

Step 12. Burn the captions into the picture

Burn-in draws the text onto every frame. It works anywhere a video plays, and nobody can turn it off. Use it for platforms with no caption upload, for silent autoplay feeds, and for any delivery where you need the exact look. The cost is a full re-encode, so pick the quality settings with care. The guide to reducing video file size explains the CRF and preset trade-offs behind the values below.

ffmpeg -i input.mp4 \
  -vf "subtitles=captions.srt:force_style='FontName=Arial,FontSize=22,PrimaryColour=&H00FFFFFF,OutlineColour=&H00000000,BorderStyle=1,Outline=2,Alignment=2,MarginV=40'" \
  -c:v libx264 -crf 18 -preset slow -c:a copy \
  output_burned.mp4

The force_style string overrides the defaults using the styling model of the ASS subtitle format. Alignment=2 sets bottom center, MarginV lifts the text off the bottom edge, and Outline=2 draws a dark edge around white letters so they stay readable over bright shots. Keep the file in the working folder and use a relative name as shown. On Windows, a path such as C:\clips\captions.srt breaks the filter because the colon is a separator, and escaping it is fiddly.

For help picking a typeface that stays legible at small sizes, see choosing a subtitle font. Match the font name in force_style to one installed on the machine that runs FFmpeg.

Render Settings and Timing Rules

Keep these values for SRT subtitles on a sticky note beside the project. The first four rows describe what the format and YouTube need. The last three are my script defaults, which you can change to fit your audience.

Illustrative: A laptop on a wooden desk showing a video editing timeline and colour panel
Photo: Muhammed Cetinkaya / Pexels
SettingValueSource or reason
File extension.srtThe conventional SubRip extension
EncodingPlain UTF-8, no byte-order markYouTube requires plain UTF-8 for SRT
Timing syntaxHH:MM:SS,mmm –> HH:MM:SS,mmm with a commaSubtitle Edit lists a period as wrong
Minimum time on screen1 to 1.5 seconds per cue, longer for more textSubtitle Edit reference
Lines per cue2 or fewerScript default (editorial)
Characters per line42 or fewerScript default (editorial)
Reading speed17 characters per second or lessScript default (editorial)
Burn-in exportMP4, H.264, same resolution and frame rate as the source, CRF 18Avoids a second scaling pass

The three script defaults are guardrails. Adult viewers read faster than children, a dense technical term needs longer than a greeting, and a language with long words may need more room per line. Raise or lower the limits to match your audience. What matters is that you pick numbers on purpose and let the checker hold every cue to them.

Line breaks deserve a word. Break a line where a speaker would pause, and keep a phrase together when you can. A split like an article on one line and its noun on the next reads badly. Aim for lines of similar length, with the top line a little shorter than the bottom one, so the block sits low and tidy over the picture.

From the Vipid archive: if you want a designed opening card to sit ahead of your captions, the epic titles theme is a smoke-style title sequence you can build on.

Silence needs a decision too. When a speaker stops for a few seconds, let the cue clear instead of holding it. A caption that stays up through a pause makes viewers wonder whether they missed something. A cue that clears on time tells them the speaker has stopped.

The Complete Working Project

This is the whole project in one place. It has four files, and the Python script uses only the standard library. Drop your own video in as input.mp4, edit cues.txt, and run the build script.

srt-project/
  input.mp4        your video
  cues.txt         the cue sheet you edit
  srttool.py       build, check, shift and vtt commands
  build.sh         one command that runs everything

The script has four commands. build turns a cue sheet into an SRT. check validates an SRT and exits with status 1 on errors. shift moves every cue by a number of milliseconds, positive or negative. vtt writes a WebVTT copy. It rejects files that are not valid UTF-8, flags a byte-order mark, and reports the cue number of every problem it finds.

#!/usr/bin/env python3
"""srttool.py: build, check, shift and convert SRT files."""
import argparse
import re
import sys
from pathlib import Path

TIMING = re.compile(r"^(\d{2}):(\d{2}):(\d{2}),(\d{3}) --> (\d{2}):(\d{2}):(\d{2}),(\d{3})$")
MAX_LINES, MAX_CHARS, MAX_CPS, MIN_MS = 2, 42, 17, 1000  # editorial defaults, change freely


def fmt(ms):
    ms = max(0, int(round(ms)))
    h, rest = divmod(ms, 3_600_000)
    m, rest = divmod(rest, 60_000)
    s, ms = divmod(rest, 1000)
    return f"{h:02}:{m:02}:{s:02},{ms:03}"


def parse_clock(text):
    parts = text.strip().replace(",", ".").split(":")
    secs = float(parts[-1])
    mins = int(parts[-2]) if len(parts) > 1 else 0
    hrs = int(parts[-3]) if len(parts) > 2 else 0
    return round(((hrs * 60 + mins) * 60 + secs) * 1000)


def read_cues(path):
    cues = []
    for n, line in enumerate(Path(path).read_text(encoding="utf-8").splitlines(), 1):
        line = line.strip()
        if not line or line.startswith("#"):
            continue
        try:
            start, end, text = [p.strip() for p in line.split("|", 2)]
            cues.append((parse_clock(start), parse_clock(end), text.replace("//", "\n").replace(" \n ", "\n")))
        except ValueError:
            sys.exit(f"cue sheet line {n} is not 'start | end | text': {line}")
    return cues


def write_srt(cues, path):
    blocks = [f"{i}\n{fmt(a)} --> {fmt(b)}\n{t}\n" for i, (a, b, t) in enumerate(cues, 1)]
    Path(path).write_text("\n".join(blocks), encoding="utf-8", newline="\n")


def read_srt(path):
    raw = Path(path).read_bytes()
    notes = []
    if raw.startswith(b"\xef\xbb\xbf"):
        notes.append("file starts with a UTF-8 BOM (strip it for YouTube)")
        raw = raw[3:]
    try:
        text = raw.decode("utf-8")
    except UnicodeDecodeError as err:
        sys.exit(f"ERROR not valid UTF-8: {err}")
    text = text.replace("\r\n", "\n").replace("\r", "\n").strip()
    cues = []
    for block in re.split(r"\n\s*\n", text):
        lines = block.split("\n")
        m = TIMING.match(lines[1]) if len(lines) > 1 else None
        cues.append((lines[0], m, lines[2:], lines[1] if len(lines) > 1 else ""))
    return cues, notes


def check(path):
    cues, notes = read_srt(path)
    errors, warns, prev_end = [], list(notes), 0
    for i, (num, m, text, raw_timing) in enumerate(cues, 1):
        if num.strip() != str(i):
            errors.append(f"cue {i}: index reads '{num}', expected {i}")
        if not m:
            errors.append(f"cue {i}: bad timing line '{raw_timing}' (need HH:MM:SS,mmm --> HH:MM:SS,mmm)")
            continue
        g = [int(x) for x in m.groups()]
        start = ((g[0] * 60 + g[1]) * 60 + g[2]) * 1000 + g[3]
        end = ((g[4] * 60 + g[5]) * 60 + g[6]) * 1000 + g[7]
        if end <= start:
            errors.append(f"cue {i}: end is not after start")
            continue
        if start < prev_end:
            warns.append(f"cue {i}: starts {prev_end - start} ms before cue {i - 1} ends")
        prev_end = end
        if not text:
            errors.append(f"cue {i}: no text")
            continue
        if len(text) > MAX_LINES:
            warns.append(f"cue {i}: {len(text)} lines (limit {MAX_LINES})")
        for line in text:
            if len(line) > MAX_CHARS:
                warns.append(f"cue {i}: line is {len(line)} characters (limit {MAX_CHARS})")
        dur = end - start
        cps = len("".join(text)) / (dur / 1000)
        if dur < MIN_MS:
            warns.append(f"cue {i}: on screen {dur} ms (under {MIN_MS})")
        if cps > MAX_CPS:
            warns.append(f"cue {i}: {cps:.1f} characters per second (limit {MAX_CPS})")
    for w in warns:
        print("WARN ", w)
    for e in errors:
        print("ERROR", e)
    print(f"{len(cues)} cues, {len(errors)} errors, {len(warns)} warnings")
    return 1 if errors else 0


def shift(src, dst, offset_ms):
    cues, _ = read_srt(src)
    out = []
    for num, m, text, _ in cues:
        g = [int(x) for x in m.groups()]
        a = ((g[0] * 60 + g[1]) * 60 + g[2]) * 1000 + g[3] + offset_ms
        b = ((g[4] * 60 + g[5]) * 60 + g[6]) * 1000 + g[7] + offset_ms
        out.append((a, b, "\n".join(text)))
    write_srt(out, dst)


def to_vtt(src, dst):
    cues, _ = read_srt(src)
    blocks = ["WEBVTT\n"]
    for num, m, text, raw in cues:
        blocks.append(f"{num}\n{raw.replace(',', '.')}\n" + "\n".join(text) + "\n")
    Path(dst).write_text("\n".join(blocks), encoding="utf-8", newline="\n")


if __name__ == "__main__":
    p = argparse.ArgumentParser(description=__doc__)
    sub = p.add_subparsers(dest="cmd", required=True)
    b = sub.add_parser("build"); b.add_argument("sheet"); b.add_argument("srt")
    c = sub.add_parser("check"); c.add_argument("srt")
    s = sub.add_parser("shift"); s.add_argument("src"); s.add_argument("dst"); s.add_argument("ms", type=int)
    v = sub.add_parser("vtt"); v.add_argument("src"); v.add_argument("dst")
    a = p.parse_args()
    if a.cmd == "build":
        write_srt(read_cues(a.sheet), a.srt)
    elif a.cmd == "check":
        sys.exit(check(a.srt))
    elif a.cmd == "shift":
        shift(a.src, a.dst, a.ms)
    elif a.cmd == "vtt":
        to_vtt(a.src, a.dst)

The build script ties the steps together. The set -e line makes it stop at the first failure, so a file with errors never reaches FFmpeg.

#!/bin/sh
set -e
python3 srttool.py build cues.txt captions.srt
python3 srttool.py check captions.srt
python3 srttool.py vtt captions.srt captions.vtt

ffmpeg -y -i input.mp4 -i captions.srt \
  -map 0:v -map 0:a? -map 1:0 \
  -c:v copy -c:a copy -c:s mov_text \
  -metadata:s:s:0 language=eng output_soft.mp4

ffmpeg -y -i input.mp4 \
  -vf "subtitles=captions.srt:force_style='FontName=Arial,FontSize=22,Outline=2,Alignment=2,MarginV=40'" \
  -c:v libx264 -crf 18 -preset slow -c:a copy output_burned.mp4

Run it with sh build.sh from the project folder. You end up with five deliverables from one cue sheet: captions.srt for YouTube and editors, captions.vtt for web players, output_soft.mp4 with a selectable track, and output_burned.mp4 with the text drawn in.

The shift command covers the most common repair. If a whole file sits 1.5 seconds late, this pulls every cue earlier. Negative values move cues earlier and positive values move them later.

python3 srttool.py shift captions.srt captions_fixed.srt -1500

A WebVTT copy looks like the SRT with two changes. A WEBVTT header line opens the file and the timing line uses a period before the milliseconds.

WEBVTT

1
00:00:00.500 --> 00:00:03.200
Welcome back to the channel.

2
00:00:03.400 --> 00:00:07.400
Today we build an SRT file by hand
and then check it with a script.

3
00:00:07.600 --> 00:00:11.8

Common Pitfalls With SRT Subtitles

Most failed uploads trace back to a short list of mistakes. Check this list first when a file misbehaves.

  • A period instead of a comma in the timestamp. Copying times from a WebVTT file or typing from habit gives 00:00:01.000, which Subtitle Edit’s reference marks as wrong for SRT. The checker flags it as a bad timing line.
  • The wrong encoding. A file saved in an old Windows code page turns accents into odd symbols, and YouTube expects plain UTF-8. Re-save as UTF-8 without a byte-order mark.
  • Cue numbers out of order. Deleting a cue and leaving a gap, such as 4 then 6, trips strict parsers. Renumber after every edit, or let the script do it.
  • No blank line between cues. Parsers split cues on blank lines. Without one, two cues merge into a single block of garbled text.
  • Overlapping cues. A cue that starts before the previous one ends makes two captions stack or flicker. The checker warns with the exact overlap in milliseconds.
  • Expecting styling to survive. Colors, fonts, and positions do not live in an SRT file, and YouTube ignores style markup. Style burned-in captions through the editor or FFmpeg instead.
  • Mixing up the two SRTs. Searching FFmpeg documentation for SRT can return the Secure Reliable Transport protocol. Add the word subtitles to your query.
  • Packing too much text into a short cue. A cue that is technically valid but unreadable is still a failure. Hold each cue to your characters-per-second limit.

A valid file that reads badly is the pitfall most guides skip. The checker catches format errors, but only you can judge whether a cue feels right at normal speed. Watch the finished video once with captions on and sound off, then once with sound on and captions off. Anything you cannot follow either way needs another pass.

Troubleshooting SRT Subtitles

When SRT subtitles fail, start with the checker. It confirms the file is well formed before you blame the platform or the player. Then match the symptom below.

  1. YouTube rejects the upload or shows an error. Run the checker, re-save as plain UTF-8, and confirm the extension is .srt, not .srt.txt. Remove any byte-order mark.
  2. Captions show up but run late or early from the start. The whole file has a constant offset. Use the shift command, or the time-adjust tool in Subtitle Edit, with the measured difference.
  3. Captions start in sync and drift further out as the video plays. The captions were timed against a different frame rate or speed than the final cut. Use the change-frame-rate tool in Subtitle Edit, or re-time against the final export.
  4. Accented letters appear as question marks or boxes. The file is not UTF-8. Re-save it as UTF-8. If the problem shows up only in burned-in captions, the chosen font lacks those glyphs, so set a different FontName.
  5. Two cues merge into one block. A blank line is missing, or the line has stray spaces so it is not truly blank. The checker reports a bad timing line at the merged cue.
  6. FFmpeg says it cannot use the subtitle codec for the container. You asked for mov_text in a container that wants something else. Use mov_text for MP4 and srt or copy for MKV.
  7. FFmpeg reports no such filter named subtitles. Your build was compiled without libass. Install a full build from your package manager or the project’s download page.
  8. Burn-in fails on a Windows path. The colon in a drive letter confuses the filter. Run FFmpeg from the project folder and pass a bare file name.
  9. The muxed MP4 plays with no caption option. Not every player or social app reads mov_text tracks. Test in a desktop player that lists subtitle tracks, and burn the captions in for destinations that do not. For short-form apps with their own caption tools, the guide on adding captions to a TikTok video shows the in-app path.
  10. Secondary-language upload controls are missing in Studio. A YouTube Community report in late October 2026 alleged that a new Studio layout hid the upload and edit controls for secondary-language SRT files. If you hit it, retry in a desktop browser and check the report for a fix before assuming your file is at fault.
  11. Burned-in text hugs the bottom edge or hides under platform buttons. Raise MarginV in the force_style string and keep text inside your safe area.

If none of these match, bisect the file. Cut it to its first three cues, upload that, and add cues back in blocks until it breaks. The last block you added holds the bad character or the bad timestamp. Subtitle Edit’s search can then find the exact spot.

Advanced Tips for Cleaner Caption Workflows

Once the basic build works, a few habits make the process faster and safer on longer projects.

Keep the cue sheet in version control. A plain-text cue sheet works well with git. A diff shows exactly which words and times changed between versions, which is far easier to review than comparing two exported files. Treat the SRT as a build output and the cue sheet as the source.

Start from the platform’s draft, then edit. YouTube generates automatic captions for uploaded videos and live streams, and creators can download an existing caption track, change it in a text editor, and upload the revised file, according to YouTube’s help documentation. Download the draft, correct names and jargon in Subtitle Edit, and re-upload. It is quicker than typing from nothing, as long as you review every cue.

Convert between formats with FFmpeg. FFmpeg reads and writes the common subtitle formats, so a one-line command converts SRT to WebVTT or the reverse.

ffmpeg -i captions.srt captions.vtt
ffmpeg -i captions.vtt captions_from_vtt.srt

Pull captions out of a finished file. If a client sends a video with a subtitle track and you need the text, extract the first subtitle stream.

ffprobe -hide_banner -show_entries stream=index,codec_name:stream_tags=language -select_streams s input.mkv
ffmpeg -i input.mkv -map 0:s:0 extracted.srt

Delay a track without editing it. The input offset option shifts a subtitle file by seconds at mux time, which helps when you only need a one-off adjustment.

ffmpeg -i input.mp4 -itsoffset 1.5 -i captions.srt \
  -map 0:v -map 0:a? -map 1:0 -c:v copy -c:a copy -c:s mov_text output_delayed.mp4

Batch a folder of videos. If every video in a folder has a matching SRT with the same base name, a short loop muxes them all.

for f in *.mp4; do
  base="${f%.mp4}"
  ffmpeg -y -i "$f" -i "$base.srt" -map 0:v -map 0:a? -map 1:0 \
    -c:v copy -c:a copy -c:s mov_text -metadata:s:s:0 language=eng "${base}_soft.mp4"
done

Name multilingual files by language. Keep captions.en.srt, captions.es.srt, and the rest side by side, one cue sheet per language. Translators then work on text while the timing stays yours. After translation, run the checker on each file, because a longer language often pushes a cue past the characters-per-second limit and needs a few extra frames of hold.

Pick the burn-in codec on purpose. A burned-in export re-encodes every frame, so the codec choice sets the file size and where the video will play. The trade-offs are laid out in the comparison of AV1 against H.264. H.264 is the safe default for captioned social uploads.

Use auto-sync for scripted videos. If you wrote a script before filming, YouTube can time a plain-text transcript against the audio. Use that for a first pass on long talks, then tighten the worst cues by hand. Your own cue sheet remains the better choice when exact phrasing and line breaks matter.

Watch with the sound off. Mute the video and read only the captions at normal speed. If you lose the thread, the cue timing or line breaks need work. This simple test catches more reading problems than any metric, and it takes only a minute per clip.

When SRT Is Not Enough: Styled Titles and Lower Thirds

SRT carries words and time and nothing else. It cannot hold a brand color, a drop shadow, a speaker label in a bar, or an animated entrance. Designed text belongs in the edit, where you control keyframes and safe areas, and then it goes out as part of the picture.

That split decides which job each tool does. Dialogue captions go in the SRT, so viewers can switch them off and platforms can index the words. Names, titles, and callouts go in motion graphics. A speaker’s name strip is a lower third, and the build is covered in making lower thirds. A film-style opening card belongs in the title layer too, never in the caption file.

Keep the two layers apart on screen. A lower third and a caption can collide in the bottom third of the frame. Decide which one owns that space at each moment. A common fix is to raise the caption block while a name strip is up, using MarginV for burned-in text or a second pass for the burn-in export. If you only ship sidecar captions, platforms place them for you, so keep your own graphics clear of the bottom edge of the frame.

Lower thirds, title cards, and caption styling all live in the same part of the site, and the hub for lower thirds and titles links the rest. Come back to this guide whenever you need the plain-text layer that all of those sit on top of.

Before You Render

Short answers to the questions people ask most about SRT subtitles.

What is an SRT file?
An SRT file is a plain-text subtitle file in the SubRip format. It holds numbered cues, each with a start time, an end time, and caption text, separated by blank lines. The file has the extension .srt and works with YouTube, most editors, and most players.

How do I create an SRT file without software?
Open a plain-text editor, type a cue number, a timing line such as 00:00:01,000 –> 00:00:03,500, and the caption text, then leave a blank line and repeat. Save the file as UTF-8 with the .srt extension. The step-by-step section above shows a complete example.

Can SRT subtitles have colors, fonts, or positions?
Not in any dependable way. YouTube says it does not recognize styling or markup in SRT files, and support elsewhere varies by player. For designed text, burn the captions into the video with an editor or with FFmpeg force_style.

Is SRT or WebVTT better?
It depends on the destination. SRT is the common choice for YouTube uploads and for moving captions between editors. WebVTT is the formally specified web format, which makes it the better pick for HTML5 video on your own site. Convert between them with one FFmpeg command.

Why does my SRT file fail to upload?
The usual causes are a wrong encoding, a period instead of a comma in the timestamps, missing blank lines, and an extension hidden by the operating system. Save as plain UTF-8, run the checker script, and confirm the file name ends in .srt.

How long should each caption stay on screen?
Subtitle Edit’s documentation advises at least 1 to 1.5 seconds per subtitle, and longer for more text. The script in this guide also warns above 17 characters per second, which is an editorial default you can change.

Do I need to burn in captions?
Only when the destination cannot take a caption file or when you need a fixed look. Burned-in captions cannot be switched off and force a re-encode. For YouTube, upload the SRT and let viewers choose.

More from the Vipid blog

Make it with Vipid

Ines Calder

Titles & Motion Editor · Vipid Team

Ines Calder is the Titles & Motion Editor at Vipid, covering lower thirds, title sequences, kinetic typography and logo animation across After Effects, Premiere Pro, DaVinci Resolve and Final Cut Pro. She writes her guides in frames and safe areas so they hold up on a phone as well as a TV, and every template she lists carries its editor version, plugin needs and licence.

All articles by Ines Calder ›   How we check tools ›

Keep reading

Title Sequence Tools: Resolve vs After Effects vs Jitter
Lower Thirds & Titles

Title Sequence Tools: Resolve vs After Effects vs Jitter

Ines Calder·22 Nov 2026
Lower Thirds Examples [2026]: 6 Styles, 5 Editors
Lower Thirds & Titles

Lower Thirds Examples [2026]: 6 Styles, 5 Editors

Ines Calder·18 Nov 2026
Title Card Maker [2026]: 6 Tools, $0 to $299.99
Lower Thirds & Titles

Title Card Maker [2026]: 6 Tools, $0 to $299.99

Ines Calder·8 Nov 2026

Blog

Intros & Templates
Titles & Motion
Streaming
Editing & Export
AI Video

Vipid

About Vipid
Themes
News archive 2011–2016
Vipid Team

Editorial

Editorial policy
How we check tools
Corrections

Legal

Privacy policy
Terms of service
Making video intros since 2010.
The Vipid blog covers the tools behind them.