Sub topic 14
Caption style: line length and reading speed
This chapter assumes you can read an SRT file (cue index, time range, text) and run a Python 3 script from a terminal. It covers the style rules that decide whether viewers can read your captions comfortably. Those rules are line length, number of lines, reading speed, cue duration, and where lines break.
Why style rules exist
A correct transcript with correct timestamps can still be unreadable. A cue that holds 90 characters for 2 seconds is accurate, but the viewer cannot read it before it vanishes. Style rules turn "the text matches the speech" into "the text can be read while the speech happens".
Viewers read captions while also looking at slides, code, or a zoomed screen region. Every extra second spent reading is a second not spent looking at the lecture. Good caption style keeps that cost low.
The core numbers
Broadcast and streaming style guides differ in detail, but they agree on ranges. Use these as defaults for lectures and adjust for your audience.
| Rule | Common target | Why |
|---|---|---|
| Characters per line | 37 to 42 | Longer lines force the eye to travel far and cover the picture |
| Lines per cue | 1 or 2 | Three lines hide too much of the frame |
| Reading speed | 15 to 17 characters per second (CPS) | Most adults can follow this comfortably |
| Slower reading speed | 12 to 13 CPS | Use for technical content, children, or non-native viewers |
| Minimum cue duration | about 1 second | Shorter cues flash and are missed |
| Maximum cue duration | about 6 seconds | Longer cues feel frozen and invite re-reading |
| Gap between cues | at least 2 frames (about 80 ms) | A visible gap lets the eye register a new caption |
Characters per second is the number of characters in the cue, spaces included, divided by the cue's duration in seconds. Line breaks do not count as characters. A cue with 52 characters shown for 3.5 seconds runs at about 14.9 CPS.
Lecture speech is often faster than 17 CPS of text, especially when the speaker lists terms. You cannot slow the speaker down, so you have three options. You can shorten the text, split the cue so each part gets its own time, or extend the cue's end time into silence that follows it.
Condensing versus verbatim
For lectures, prefer near-verbatim captions. Learners use captions to study, and rewording technical terms can change their meaning. You may still remove stutters, false starts, and fillers such as "um". If you cut those from the video, remove them from the captions as well. Otherwise the text no longer matches the audio.
Keep these exactly as spoken: terms, names, numbers, units, and code identifiers. Check spelling against the slides.
Line breaks
When a cue has two lines, the break position affects how easily it reads. Follow these rules in order of importance:
- Break at a natural phrase boundary, such as after a comma, before a conjunction, or between clauses.
- Do not split a tightly bound group across lines. Examples are an article and its noun, a preposition and its object, an auxiliary verb and its main verb, or a first and last name.
- Prefer a bottom-heavy pyramid (a shorter top line, a longer bottom line) over a top-heavy one, because it keeps the picture clearer. Balanced lines are also fine.
- Never leave a single short word, such as "a" or "to", alone at the end of a line.
Compare these two breaks of the same sentence:
1
00:00:10,000 --> 00:00:13,500
We will remove the mistake and then
add a zoom to the code1
00:00:10,000 --> 00:00:13,500
We will remove the mistake
and then add a zoom to the codeThe second version breaks before the conjunction "and", so each line carries a complete idea.
Break cues too, not only lines. End a cue at the end of a sentence or clause where possible. A sentence split across cues should break at a pause in the speech, so the text change matches what the viewer hears.
Checking the rules with a script
Checking hundreds of cues by eye is slow. The script below parses an SRT file and reports cues that break the limits in the table. It uses only the Python standard library.
import re
import sys
MAX_CHARS = 42
MAX_LINES = 2
MAX_CPS = 17.0
MIN_DUR = 1.0
MAX_DUR = 6.0
MIN_GAP = 0.08
TIME = re.compile(r"(\d+):(\d\d):(\d\d),(\d{3}) --> (\d+):(\d\d):(\d\d),(\d{3})")
def to_seconds(h, m, s, ms):
return int(h) * 3600 + int(m) * 60 + int(s) + int(ms) / 1000
def parse_srt(text):
cues = []
text = text.lstrip("\ufeff").replace("\r\n", "\n").strip()
for block in re.split(r"\n\s*\n", text):
lines = block.split("\n")
if len(lines) < 3:
continue
match = TIME.match(lines[1])
if not match:
continue
groups = match.groups()
start = to_seconds(*groups[:4])
end = to_seconds(*groups[4:])
cues.append((lines[0].strip(), start, end, lines[2:]))
return cues
def check(cues):
problems = []
previous_end = None
for index, start, end, lines in cues:
duration = end - start
chars = len(" ".join(lines))
if len(lines) > MAX_LINES:
problems.append(f"cue {index}: {len(lines)} lines (max {MAX_LINES})")
for line in lines:
if len(line) > MAX_CHARS:
problems.append(f"cue {index}: line of {len(line)} characters")
if duration <= 0:
problems.append(f"cue {index}: end is not after start")
continue
cps = chars / duration
if cps > MAX_CPS:
problems.append(f"cue {index}: {cps:.1f} CPS (max {MAX_CPS})")
if duration < MIN_DUR:
problems.append(f"cue {index}: only {duration:.2f} s long")
if duration > MAX_DUR:
problems.append(f"cue {index}: {duration:.2f} s long")
if previous_end is not None and start - previous_end < MIN_GAP:
problems.append(f"cue {index}: gap to previous cue under {MIN_GAP} s")
previous_end = end
return problems
if __name__ == "__main__":
with open(sys.argv[1], encoding="utf-8") as handle:
found = check(parse_srt(handle.read()))
print("\n".join(found) if found else "No problems found.")Save it as check_srt.py and run python check_srt.py captions.srt. The sample file from the SRT chapter passes. Its two cues run at about 11.7 and 14.9 CPS, and the second has two lines, each under 42 characters.
The script reports problems but does not fix them. Deciding between shortening, splitting, or extending needs judgement about the speech, so keep that step manual.
Fixing a cue that is too fast
Suppose the checker reports cue 7: 30.0 CPS. The cue below holds 60 characters for 2 seconds:
7
00:00:31,000 --> 00:00:33,000
Next we open the settings panel and choose the export preset.Two fixes follow, both keeping every word.
First, check whether silence follows the cue. If the speaker pauses until 00:00:35,000, extend the end time to 00:00:34,920 (keeping the 80 ms gap). The duration becomes 3.92 s and the speed about 15.3 CPS.
Second, if the next speech starts right away, split at the natural break and share the time:
7
00:00:31,000 --> 00:00:32,100
Next we open the settings panel
8
00:00:32,180 --> 00:00:33,500
and choose the export preset.This gives 31 characters in 1.1 s (about 28 CPS) and 29 characters in 1.32 s (about 22 CPS). Both are still too fast, so the split alone is not enough. In this case the speech itself is too dense for the limit, and you must condense the text (for example "Open the settings panel and choose the export preset.") or accept a temporary overshoot. Accepting an overshoot is a judgement call. A brief overshoot on short, familiar words is tolerable. A long run of fast cues is not.
Where style meets delivery
How the captions are delivered changes which style controls you have.
- With a separate track, such as the
mov_texttrack from the delivery chapter, the player chooses font, size, and position. Viewers can change them. Your control is limited to line length, line breaks, and timing, so those rules matter even more. - With burned-in captions, you set the look yourself, and viewers cannot change it. The
force_styleoption of the ffmpegsubtitlesfilter accepts ASS style fields:
ffmpeg -i lecture_cut.mp4 \
-vf "subtitles=captions.srt:force_style='FontName=Arial,FontSize=18,Outline=2,MarginV=30'" \
-c:a copy lecture_burned.mp4Font size in force_style is measured against a 288-pixel-high reference frame for SRT files, not against your real resolution. FontSize=18 therefore scales to about 6% of the frame height at any resolution. Test with a real frame before you render the whole lecture. Keep the captions away from where you zoomed or where slide content sits, using MarginV to move them up or down.
Whatever method you pick, keep the style the same across the whole lecture. Changing size or position between sections looks like an error.
Decision flow for one cue
Common errors
- Counting characters per cue, not per line. The 42-character limit applies to each line. The CPS limit applies to the whole cue.
- Timing to the transcript, not the audio. After you cut mistakes, re-check cue times against the edited video. Cues placed on the old timeline drift out of sync.
- Ignoring numbers and code. A line such as
ffmpeg -i lecture.mp4 -vf "select=..."is long and cannot be broken freely. Quote the short part that matters and let the screen show the rest. - Using a fixed duration for every cue. Time each cue to the speech, then apply the minimum and maximum limits.
Exercise
A cue contains "The select filter drops frames whose timestamp falls inside the range" (70 characters including spaces) and is displayed for 3.5 seconds. Compute its reading speed. Is it within a 17 CPS limit? Suggest two fixes, one that changes only the layout and one that changes the timing or text.
Show answer
70 characters / 3.5 s = 20 CPS, which is above 17 CPS. Also, as a single line it exceeds 42 characters, so it needs two lines, for example "The select filter drops frames" and "whose timestamp falls inside the range". Layout fix: break it into those two lines. That fixes line length but not speed. Timing or text fix: extend the cue to at least 70 / 17 = about 4.1 s if silence follows, or condense the text, for example "The select filter drops frames inside the range" (47 characters, about 13.4 CPS at 3.5 s).
Exercise
Your checker reports a cue lasting 0.6 seconds that contains one word, "Right." What are two reasonable ways to handle it?
Show answer
Merge it into the neighbouring cue if the speech runs on, for example "Right. Now open the file.", which gives it a readable duration. Alternatively, extend its end time to reach at least about 1 second if there is silence after it, keeping the 80 ms gap before the next cue. If the word is a filler and you cut it from the video, delete the cue.