All posts

Who Said What 5 min read

SRT vs VTT: which subtitle file format should you use?

SRT and VTT are both plain-text subtitle files: each subtitle gets a time range and its words, and the player shows them over the video. The difference in SRT vs VTT is that SRT is the bare minimum and works almost everywhere, while VTT, short for WebVTT, is the web's standard and adds a header, screen positions, styling and speaker tags. Use SRT unless you need what VTT adds, or you're putting subtitles on your own website.

I made Who Said What, which turns a recording into a transcript with speaker labels and saves it in either format, so I've had to get both right.

What an SRT file looks like

1
00:00:01,000 --> 00:00:04,200
Priya: Shall we start with the budget?

2
00:00:04,500 --> 00:00:07,000
Arjun: Yes, the numbers came in this morning.

Each subtitle has a number, a start and end time with a comma before the milliseconds, one or more lines of text, and a blank line. The format comes from SubRip, a program that read subtitles off DVDs, and it was never formally standardized (Library of Congress). It doesn't fix a character encoding either, so save SRT files as UTF-8, which YouTube requires (YouTube).

What a VTT file looks like

WEBVTT

00:00:01.000 --> 00:00:04.200
<v Priya>Shall we start with the budget?

00:00:04.500 --> 00:00:07.000
<v Arjun>Yes, the numbers came in this morning.

A VTT file starts with the word WEBVTT, uses a full stop before the milliseconds, and can leave out the hours and the subtitle numbers. On top of SRT's basics, it can mark who is speaking with voice tags like <v Priya>, place a subtitle on screen with settings such as line, position and align, keep comments in NOTE blocks and style text with CSS in a STYLE block. Its specification comes from the W3C (W3C), which used SRT as the basis for it (Library of Congress).

SRT vs VTT, side by side

SRT VTT
First line 1, the first subtitle's number WEBVTT
Times 00:00:01,000 00:00:01.000, hours optional
Subtitle numbers Required Optional
Speaker names Written in the text Voice tags, like <v Priya>
Position on screen No Yes
Styling Basic tags, if the player reads them Bold, italic, underline and CSS
Comments No NOTE blocks
Web pages, through <track> No Yes
Encoding Not fixed, use UTF-8 Always UTF-8
Specification None W3C

Which format to use where

  1. YouTube takes both. It reads SRT without any styling, and keeps a VTT file's positions, bold, italic and underline (YouTube).
  2. Vimeo takes both SRT and WebVTT (Vimeo).
  3. Facebook takes SRT, named with the language and country code, like video.en_US.srt (Facebook).
  4. LinkedIn takes SRT, added from the desktop site (LinkedIn).
  5. On your own website, use VTT. It's the format the HTML <track> element reads (MDN).

Convert SRT to VTT, and back

By hand, SRT to VTT takes two changes: add a line saying WEBVTT and a blank line at the top, and change the comma before the milliseconds to a full stop in every time. The subtitle numbers can stay, since VTT reads them as labels.

Going back, delete the WEBVTT line and any NOTE or STYLE blocks, number every subtitle from 1, and turn the full stops in the times back into commas. Remove anything after the end time on the time lines, and any tags in angle brackets.

With ffmpeg, one command does each direction:

ffmpeg -i subtitles.srt subtitles.vtt
ffmpeg -i subtitles.vtt subtitles.srt

Watch the speaker names when you go from VTT to SRT. In my test with ffmpeg 9.0.2, the conversion dropped the voice tags and the names with them: <v Priya>Shall we start with the budget? came out as just the words. If your names live only in voice tags, write them into the text first, or export SRT straight from the tool that made the subtitles. Who Said What's SRT files put each speaker's name at the start of the line.

How long a subtitle should be

Netflix's style guide for English allows 42 characters per line, at most two lines per subtitle, and a reading speed of up to 20 characters a second for adult programs (Netflix). Who Said What splits long lines into subtitles of up to 84 characters, two lines' worth at that limit.

Making subtitles from a recording

Who Said What writes both files from a recording. Drop an audio file onto the page, or drag in an MP4 video clip and it reads the sound from it. It transcribes the speech in 99 languages, tells the speakers apart, and saves SRT with each speaker's name at the start of the line and VTT with voice tags. If you drop the video itself, the times match it. Nothing is uploaded: it all runs in Chrome or Edge on your computer.

For a meeting, this post shows the steps with a Zoom recording. For voice notes in other languages, see how to turn a WhatsApp voice note into text.

Questions

Is VTT better than SRT?

It does more, and SRT works in more places. For a plain upload to a video site, SRT is the safe choice. For subtitles on your own website, or ones that need a position on screen, use VTT.

Can I rename an .srt file to .vtt?

Not on its own. A VTT file has to start with WEBVTT, and its times use full stops, so make the two changes above as well. Vimeo's caption specifications list the WEBVTT line as a requirement, for example.

What's the difference between SRT, VTT and TXT?

A TXT transcript has the words but no times, so a player can't show it as subtitles. It's the one to read, print or paste into a document.

Which encoding should subtitle files use?

UTF-8. A WebVTT file must be UTF-8 by its specification, and YouTube asks for UTF-8 SRT files.

Make SRT and VTT subtitles with speaker names at who-said-what.tukka.dev.

Read next