Captions and subtitles for video
Captions serve viewers who cannot hear; subtitles serve viewers who cannot understand. Both are plain text files with timestamps, and getting them right is mostly craft.
Captions write out speech and important sounds for viewers who cannot hear the audio. Subtitles translate the dialogue for viewers who do not speak the language. Both usually arrive as WebVTT or SRT text tracks that the player shows over the picture. Where a player has no track support, they are burned into the picture as open captions.
The text at the bottom of the frame does more work than it looks. It is the only way a deaf viewer can follow a talk. It lets a commuter watch without headphones. It helps a non-native speaker keep up with fast dialogue. More and more, it is how anyone watches in a shared room. On any video-heavy site, captions get switched on far more often than the accessibility case alone would suggest.
This guide sorts out the terms that get muddled and shows what a caption file contains. It explains how tracks travel from a file to a player through HTML and HLS. It sets out the habits that make captions easy to read, not just present. It also covers when to burn captions into the picture, and why automatic transcripts are a first draft. Captions are one of five topics in the player and embedding guides.
Captions or subtitles?
The words are used interchangeably in casual speech and mean different things in practice.
Captions
- Same language as the audio
- Include meaningful sound: [door slams], [laughter], [music]
- Identify who is speaking when it is not obvious
- Written for viewers who cannot hear the audio
Subtitles
- A translation of the dialogue
- Assume the viewer can hear sound effects and tone
- Rarely label speakers
- Written for viewers who cannot understand the language
WebVTT: the format the web uses
Web Video Text Tracks is the W3C format that HTML's <track> element and HLS both use. A file is plain UTF-8 text that begins with the line WEBVTT, a blank line, and then cues. Each cue is an optional identifier, a timing line, and one or more lines of text, separated from the next cue by a blank line:
WEBVTT
1
00:00:01.000 --> 00:00:03.500
Welcome back to the workshop.
2
00:00:03.500 --> 00:00:06.000
[applause]
Today we start with the encoder.
Timestamps use a dot before the milliseconds, and hours are optional. Cues can carry settings after the timing line. line moves text away from the bottom when a lower-third graphic is in the way. position and align set horizontal placement, and size limits width. Inline tags mark voices (<v Priya>), italics, bold and classes that a STYLE block or the page's CSS can address. NOTE blocks hold comments. The full grammar is in the W3C specification listed at the end.
WebVTT versus SRT
SRT is older, simpler and still what most editing tools export. Converting between them is largely a matter of the header and the timestamp separator.
| WebVTT | SRT | |
|---|---|---|
| Header | Required: WEBVTT | None |
| Timestamp separator | Dot: 00:00:01.000 | Comma: 00:00:01,000 |
| Cue identifiers | Optional, any text | Required, sequential numbers |
| Positioning | Cue settings and CSS | None in the base format |
| Styling | Voice, class, bold, italic, STYLE block | Basic tags supported by some players |
| Used by | HTML tracks, HLS, most web players | Editing software, media players, many upload forms |
Closed versus open
Closed captions are a separate track that the viewer can switch on, off, or between languages. Open captions are rendered into the pixels of the video itself; they cannot be turned off, resized or translated, and they are compressed along with the picture. Closed is better in every respect but one: it depends on the player supporting tracks. Where it does not, or where the video will be shared as a file on platforms that ignore track data, burn them in. With FFmpeg, ffmpeg -i in.mp4 -vf subtitles=captions.srt out.mp4 renders an SRT or VTT file into the picture; the filter takes styling options if the defaults look wrong. Burn in only as a last step and keep the clean master. Before you decide you need to, read how VideoBB's automatic captions work: they become a CC track that viewers can switch on and off.
How a track reaches the player
On a plain web page, captions are attached with a <track> child of the video element: <track kind="captions" src="en.vtt" srclang="en" label="English" default>. The kind attribute distinguishes captions, subtitles, descriptions, chapters and metadata tracks; browsers render the first three and expose all of them through the TextTrack API. The track file may sit on a different origin from the page. If so, it must be served with CORS headers, and the video element needs the crossorigin attribute. Otherwise the track loads silently as empty.
In HLS, the format VideoBB streams, subtitles are a separate media playlist of WebVTT segments, declared in the multivariant playlist with an EXT-X-MEDIA tag of type SUBTITLES. The player fetches the text segments in step with the video segments, which is why a caption track can be switched without reloading the stream. Broadcast-style CEA-608 and CEA-708 captions can also be carried inside the video segments themselves, though web delivery has largely standardised on WebVTT.
Writing captions people can read
These are working conventions from broadcast and accessibility practice, not hard limits. Reading speed is the constraint everything else serves.
- Keep cues to two lines, and prefer breaks at natural phrase boundaries rather than at a character count.
- Aim for roughly 32 to 42 characters per line as a rule of thumb; longer lines force the eye to travel and shorter ones flicker.
- Hold each cue on screen for about one to six seconds. A cue that flashes for half a second cannot be read. One that lingers past the next sentence confuses.
- Sync to within a fraction of a second of the speech. Late captions feel wrong even when the text is perfect.
- Describe meaningful sound in square brackets and identify speakers when the picture does not make it obvious.
- Transcribe what was said, including slang and false starts where they carry meaning. Clean up filler that adds nothing.
- Move cues with the
linesetting when they would cover on-screen text.
Automatic captions: a draft, not a deliverable
Speech recognition is now good enough that an automatic transcript is a sensible starting point. It is still weak at the things that matter, so it should never be the finished product. Names, product terms, homophones, numbers and anything said over music are where it fails, and it punctuates badly, which makes even a correct transcript hard to read. The efficient workflow is to generate, then edit against the audio in a caption editor, then export WebVTT. Budget roughly the running time of the video for the edit on clear speech, and more for interviews and accents the recogniser has not heard.
Captions, search and reuse
A caption track is not crawled as page content, but the transcript it contains is the most complete description of a video you will ever write. Publish it on the page, in full or as a summary with timestamps. That gives search engines text to index and viewers something to skim. VideoBB does this for you: published captions appear as a transcript under the video, and the player features guide covers the captions menu. The same file translates into subtitle tracks for other languages, feeds chapter markers, and becomes the script for a blog post. Of all the assets around a video, the caption file is the one that keeps paying back. Once your source file is ready, the preparation guide covers the rest of the export, and upload accepts files up to 4 GB with resumable transfers.
Frequently asked questions
Can I convert an SRT file to WebVTT by hand?
For a short file, yes. Add a line containing WEBVTT and a blank line at the top, then replace the comma before the milliseconds in each timestamp with a dot. Cue numbers can stay. For anything longer, FFmpeg does it in one command: ffmpeg -i captions.srt captions.vtt. Check the result for encoding problems if the source was not UTF-8.
Why do my captions not appear when the file is on another server?
Text tracks are subject to the same-origin policy. A track file hosted on a different domain must be served with an Access-Control-Allow-Origin header, and the video element must carry the crossorigin attribute. Without both, the browser fetches the file and then discards it, and the captions menu shows the track but nothing renders.
Should I caption music and sound effects?
In captions, yes, when the sound carries meaning: a phone ringing that a character reacts to, laughter that changes the tone of a scene, or music that sets the mood. Use square brackets and keep the description short. Subtitles, being translations for hearing viewers, generally leave these out unless the sound is in a language the viewer would not understand.
How accurate do captions need to be?
As accurate as the speech. Accessibility guidance treats captions as an equivalent to the audio, so paraphrasing that changes meaning or dropping content fails the purpose. Minor tidying of filler words is accepted practice. Names, figures and technical terms must be right, which is exactly where automatic recognition is weakest and where a human pass is needed.
Sources
- W3C: WebVTT: The Web Video Text Tracks Format — File structure, cue timings, settings and styling.
- MDN: WebVTT API — How browsers expose and render text tracks.
- MDN: <track> element — The kind, srclang, label and default attributes.
- IETF RFC 8216: HTTP Live Streaming — EXT-X-MEDIA and WebVTT subtitle renditions in HLS.
- W3C: Understanding Success Criterion 1.2.2 Captions (Prerecorded) — The Level A caption requirement.
Related guides

Video player features that matter
Adaptive quality, fast seeking, captions, keyboard control and picture-in-picture do more for viewers than any skin. Here is what to look for and why.

What is HLS streaming?
HTTP Live Streaming is a text playlist, a pile of short media files and a set of rules for a player. Here is how those pieces fit together and why it became the default way to deliver video.

Prepare video for upload
The right export is smaller, uploads faster, is accepted without complaint and transcodes cleanly. It is not the highest possible quality and it is not the smallest file. Here is the middle.