Back

Blog details

SRT vs VTT Subtitle Formats and When to Use Each One

AIOZ Network
6 min readNovember 10, 2026
aioz-stream
AIOZ Stream knowledge hub cover with the headline SRT vs VTT Subtitle Formats and When to Use Each

SRT vs VTT comes down to where your subtitles will play. SRT (SubRip) is the plain, numbered format that desktop players and upload forms like YouTube's read. VTT (WebVTT) is the web standard that the HTML5 video element and HLS streams expect, and it adds positioning and styling.

TL;DR:

  • SRT numbers every cue and writes times with a comma (00:00:01,000), with no header and no official spec.
  • VTT opens with a WEBVTT line, writes times with a period (00:00:01.000), and adds positioning, CSS and comments.
  • Use VTT for browsers and HLS, and SRT for desktop players, editors and upload forms that ask for it.
  • A clean SRT file becomes VTT with two edits. AIOZ Stream's transcript and chapter APIs take .vtt files.

What is the difference between SRT and VTT?

Both are plain-text sidecar files holding a list of cues, where each cue has a start time, an end time and the text to show. SRT comes from SubRip, a program that pulled subtitles out of DVDs, and the Library of Congress calls the format "not well standardized." WebVTT is a W3C specification from the Timed Text Working Group, which credits SubRip's SRT format as its starting point.

Either format can hold plain subtitles or SDH, as our guide to SDH subtitles and closed captions explains. What differs is the set of file rules:

SRT (.srt)VTT (.vtt)
First lineCue number 1WEBVTT
Timestamp00:00:01,000 (comma, hours always written)00:00:01.000 or 00:01.000 (period, hours optional)
Cue numbersRequired, counting up from 1Optional identifiers
StylingUnofficial <b>, <i>, <u>, <font color><b>, <i>, <u>, class and voice tags, CSS
PositioningNoneCue settings and regions
CommentsNoneNOTE blocks
EncodingNo official encodingUTF-8 only
Diagram: the same two subtitle cues written as SRT and as VTT, marking the SRT cue number and comma timestamps, and the VTT WEBVTT header, NOTE block, period timestamps and line cue setting, with the players and services that read each format
The same cues in both formats, with the parts that differ numbered.

You'll feel this first in the browser. MDN says track elements use WebVTT, and the W3C parser gives up on any file that doesn't begin with WEBVTT, so an SRT file in a track element shows no captions.

Inside an SRT file

An SRT cue has a counter, a time line with an arrow between start and end, one or more lines of text, and a blank line:

1
00:00:01,000 --> 00:00:03,500
Welcome back to the channel.

2
00:00:03,600 --> 00:00:06,200
Today we compare two subtitle formats.

Times always carry hours, minutes, seconds and milliseconds, with a comma before the milliseconds, and that's the whole format. Tags like <i> are an unofficial extra that a player either renders or shows as text, and YouTube reads no style markup in SRT uploads at all. Encoding is the other weak spot: SubRip's own output defaulted to Windows-1252, so if your file has accented letters, save it as UTF-8 before you share it.

What VTT adds on top

A VTT file must open with WEBVTT, and every block after that header is separated by a blank line. The same cues can carry much more:

WEBVTT

STYLE
::cue(v[voice="Sam"]) {
  color: yellow;
}

NOTE Cue 2 sits near the top of the frame.

1
00:00:01.000 --> 00:00:03.500
<v Sam>Welcome back to the channel.

00:03.600 --> 00:06.200 line:10%
Today we compare two subtitle formats.

The period replaced the comma, and the second cue drops its hours and its number because both are optional. The STYLE block colors one speaker's lines through the ::cue pseudo-element, while the NOTE block is a comment that players skip.

The line:10% after the second timestamp is a cue setting. MDN lists five of them (vertical, line, position, size and align), and the spec adds regions that group cues into one area of the frame. Support for these extras varies, though: YouTube says it supports VTT positioning but limits styling to <b>, <i> and <u>, so test your STYLE rules in the player you ship.

Which subtitle format should you use?

Pick by destination, and keep one master file you convert from, so a timing fix only happens once.

  • Your own site with the HTML5 video element: VTT, because the track element takes WebVTT only.
  • HLS streams: VTT. RFC 8216 makes WebVTT the subtitle segment format, with an X-TIMESTAMP-MAP header that lines cue times up with the video (our M3U8 and HLS segmentation explainer covers the playlist side).
  • YouTube: either, since its help page lists SubRip as a basic format and WebVTT as an advanced one.
  • Desktop players and subtitle editors: SRT, the format almost every tool can open.

Accessibility rules won't pick for you. WCAG requires captions for prerecorded video, as our WCAG video requirements guide explains, but it doesn't name a file format.

How do you convert SRT to VTT?

For a clean SRT file, add a WEBVTT line and a blank line at the top, then change the comma before the milliseconds to a period on every time line. The cue numbers can stay, because VTT reads them as cue identifiers. This Python script does both edits:

import re
import sys

src = open(sys.argv[1], encoding="utf-8-sig").read()
body = re.sub(r"(\d{2}:\d{2}:\d{2}),(\d{3})", r"\1.\2", src)
open(sys.argv[2], "w", encoding="utf-8").write("WEBVTT\n\n" + body.strip() + "\n")

We ran it with Python 3 on the SRT sample above (python3 srt2vtt.py talk-en.srt talk-en.vtt), and it wrote this file:

WEBVTT

1
00:00:01.000 --> 00:00:03.500
Welcome back to the channel.

2
00:00:03.600 --> 00:00:06.200
Today we compare two subtitle formats.

FFmpeg's docs show conversion by output file name, as in ffmpeg -i talk-en.srt talk-en.vtt. We didn't run it here, and slim builds can leave subtitle formats out, so check ffmpeg -muxers first. Converting VTT back to SRT loses the positioning and CSS.

Watch for these conversion mistakes:

  • Renaming .srt to .vtt without editing it, so the parser rejects the whole file for its missing header.
  • Leaving a comma on one time line, so the W3C parser drops that cue and one line of dialogue goes missing.
  • Converting a file that isn't UTF-8, which VTT requires, so re-save old Windows-1252 SRT files first.

How AIOZ Stream handles it

AIOZ Stream takes both formats, depending on where you upload. The dashboard walkthrough tells you to upload caption files "(e.g. .srt, .vtt)" for different languages. The API is stricter, since the Media transcript reference asks for a "Transcript file in .vtt format" and the Media chapter reference allows only .vtt, so convert SRT first if you script your uploads.

Each media holds at most one transcript per language, tagged with a BCP 47 code such as en or fr-CA. One transcript can be the default, which the docs describe as the one the player loads by default, and our multi-language captions guide shows how that default meets each viewer's language settings. Chapters use VTT too, through their own endpoint, as the Chapter vs Transcript API comparison shows.

Here is the docs' cURL upload sample, using the API key headers the docs offer instead of a bearer token:

curl --location --request POST 'https://api.aiozstream.network/api/media/media_id/transcripts/en' \
--header 'stream-public-key: your_public_key_here' \
--header 'stream-secret-key: your_secret_key_here' \
--form 'file=@"/path/to/your/transcript.vtt"'

The documented 201 response returns a media_transcript object whose url ends in en.vtt. On the player side, the docs list a Caption Color setting, which our player customization guide covers. What the docs don't cover yet:

  • whether the dashboard stores an uploaded .srt as is or converts it to .vtt;
  • a size limit for transcript and chapter files;
  • whether the player applies VTT cue settings and STYLE blocks.

To add your first track, start with the Media transcript reference in the AIOZ Stream docs.

Frequently Asked Questions

Is VTT better than SRT?

For the web, yes, because browsers and HLS read VTT natively. SRT wins when a desktop player or upload form asks for it.

Can I just rename a .srt file to .vtt?

No, because a VTT file must start with WEBVTT and use periods in its timestamps, so add the header and swap the commas first.

Does YouTube accept SRT and VTT files?

Yes, YouTube's help page lists SubRip (.srt) as a basic format and WebVTT (.vtt) as an advanced one with positioning support.

Is WebVTT the same as VTT?

Yes, WebVTT is the format's name and .vtt is its extension, and it began in 2010 as WebSRT, a draft based on parts of SubRip.

Does AIOZ Stream accept SRT files?

In the dashboard yes, since the docs list .srt and .vtt as example caption files, but transcript and chapter uploads through the API take .vtt only.

References

We only send updates when meaningful changes ship, and you can unsubscribe anytime

Related Content

blog thumbnail

How Does Live Streaming Work? From Encoder to Viewer

How does live streaming work? Video is captured, encoded, sent over RTMP, transcoded, cut into HLS segments and served to players. See each stage end to end.

aioz-streamguide
7 min readNovember 12, 2026
blog thumbnail

How Web Video Players Work: HTML5 Video, MSE and EME

How web video players work: the HTML5 video element plays media, MSE lets JavaScript feed it HLS and DASH segments, and EME unlocks DRM-protected streams.

aioz-streamguide
7 min readNovember 11, 2026
blog thumbnail

SRT vs VTT Subtitle Formats and When to Use Each One

SRT vs VTT explained: how the two subtitle formats differ in timestamps, headers and styling, which one browsers, HLS and YouTube expect, and how to convert.

aioz-stream
6 min readNovember 10, 2026
blog thumbnail

What Is Live to VOD? Saving a Livestream as a Video

Live to VOD records a livestream and turns it into an on-demand video viewers can replay. Here's how the conversion works and how AIOZ Stream saves a broadcast.

aioz-streamguide
6 min readNovember 06, 2026
blog thumbnail

What Is Video Encoding? Codecs, Containers and Bitrate

Video encoding compresses raw video with a codec, then a container packages it for playback. See how codecs, containers, bitrate and rate control fit together.

aioz-streamguide
8 min readNovember 05, 2026
blog thumbnail

Video Streaming Protocols: HLS, DASH, WebRTC, RTMP and SRT

Video streaming protocols move video from encoder to viewer. See how RTMP, SRT, HLS, DASH and WebRTC differ in latency, transport and where each one fits.

aioz-streamguide
7 min readNovember 04, 2026