VideoBB
Upload Premium Sign in

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.

Abstract illustration of a wide frame with two horizontal text-like bars near its lower edge and a small bracketed shape, suggesting 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.

WebVTTSRT
HeaderRequired: WEBVTTNone
Timestamp separatorDot: 00:00:01.000Comma: 00:00:01,000
Cue identifiersOptional, any textRequired, sequential numbers
PositioningCue settings and CSSNone in the base format
StylingVoice, class, bold, italic, STYLE blockBasic tags supported by some players
Used byHTML tracks, HLS, most web playersEditing 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.

  1. Keep cues to two lines, and prefer breaks at natural phrase boundaries rather than at a character count.
  2. 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.
  3. 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.
  4. Sync to within a fraction of a second of the speech. Late captions feel wrong even when the text is perfect.
  5. Describe meaningful sound in square brackets and identify speakers when the picture does not make it obvious.
  6. Transcribe what was said, including slang and false starts where they carry meaning. Clean up filler that adds nothing.
  7. Move cues with the line setting 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

captionssubtitleswebvttaccessibilitysrt

Related guides