Subtitle files, as files
What is actually in an SRT
A subtitle file is plain text. Once you know the format you can write, edit, fix and generate them with any tool, which is far faster than clicking in a video editor.
1
00:00:02,150 --> 00:00:05,400
The first offset press arrived here
in 1974.
2
00:00:05,800 --> 00:00:08,900
Nobody in the district had seen one.Four parts per cue: an index number, a start and end timecode separated by -->, one or two lines of text, and a blank line. Timecodes are HH:MM:SS,mmm with a comma before the milliseconds.
WebVTT is nearly the same with three differences: the file begins with the line WEBVTT, timecodes use a full stop before milliseconds, and it supports styling and positioning. VTT is what browsers want; SRT is what most platforms accept.
Editing them as text
Because it is plain text, you can fix a whole file with find and replace. A recurring misheard proper noun — every instance of "Nashik" transcribed as "Nasik" — is one replacement rather than forty clicks.
For timing, Subtitle Edit is free, open source, and considerably better at this than any video editor. It shows the waveform, lets you drag cue boundaries against it, checks reading speed and line length, and flags overlaps and gaps. If you work with subtitles regularly, it is the tool to learn.
Aegisub is the other free option, more oriented toward styled subtitles.
Converting and shifting
FFmpeg converts between formats:
ffmpeg -i captions.srt captions.vttAnd shifts the whole file when the sync is off by a constant amount:
# delay every cue by 1.2 seconds
ffmpeg -itsoffset 1.2 -i captions.srt -c copy shifted.srtA constant offset usually means the transcription was made from a file with a different start point. A growing offset means the frame-rate problem from the first block, and shifting will not fix it — conform the video first.
Burning in
ffmpeg -i film.mp4 -vf "subtitles=captions.srt:force_style=\
'FontName=Arial,FontSize=28,PrimaryColour=&H00FFFFFF,\
OutlineColour=&H80000000,BorderStyle=3,Outline=2,MarginV=90'" \
-c:a copy burned.mp4BorderStyle=3 gives a box behind the text; Outline=2 gives a stroke. MarginV lifts the text off the bottom, which is what you need for vertical video.
This re-encodes the video, so do it from your master rather than from an already-compressed delivery file.
Quality checks that matter
Run through these before shipping any subtitle file:
- Reading speed under about 17 characters per second.
- Line length 37–42 characters maximum, two lines maximum.
- No overlapping cues. Two cues occupying the same moment renders unpredictably.
- Minimum duration of about one second, maximum of about seven.
- Line breaks at grammatical joins, not mid-phrase.
- Cues do not cross a shot change where avoidable — a subtitle that spans a cut is harder to read.
- Speaker changes marked with a dash at the start of each line where two people speak in one cue.
- Non-speech information in brackets where it matters:
[phone rings],[laughs]. This is what makes a caption track usable for a deaf viewer rather than merely a transcript.
Subtitle Edit checks the first five automatically.
Translation
A subtitle file is the unit of translation. Send the SRT, get back an SRT with the same timings and different text.
Two things to watch. Translated text is frequently longer — German and Hindi renderings of an English line commonly run 20–30% longer — so a cue that was at the reading-speed limit in English will exceed it after translation. The translator needs permission to condense, and should be told the character limit.
And machine translation of a subtitle file works reasonably for gist and badly for anything where tone, idiom or a technical term matters. It produces fluent, confident, wrong sentences in exactly the way automatic transcription does, and it should be read by somebody who speaks the language before it ships.
Naming
Platforms pick up language from the filename. film.en.srt, film.hi.srt, film.mr.srt, using ISO 639-1 codes. Get this right and uploads are automatic; get it wrong and your Hindi track is labelled English.
Today
Open an SRT in a text editor and fix one recurring misspelling with find and replace. Then run it through Subtitle Edit's reading-speed check and see how many cues are too fast.
The one thing to keep
A subtitle file is plain text with an index, two timecodes and up to two lines, which means find-and-replace fixes a recurring error in one action — and a constant sync offset can be shifted while a growing one means the video's frame rate needs conforming.
Before you move on
A subtitle file is in sync at the start of a film and roughly two seconds late by the end. An editor applies a constant offset to fix it. Why will that not work?
Pick the one you would defend. Nobody sees your answer.