Comparison

SRT and VTT, and why one of them will not play in a browser

These two look nearly identical when opened in a text editor, which is exactly why a file that works in VLC fails silently on a web page. The differences are small and every one of them is a hard requirement somewhere.

4 related tools

Side by side

SRT and VTT, and why one of them will not play in a browser
SRTVTT
Header lineNoneWEBVTT, required
Milliseconds written as00:01:02,50000:01:02.500
Styling and positioningNoYes
Works in HTML5 videoNoYes
Accepted by YouTubeYesYes
CommentsNoYes

The short answer

The browser needs VTT and nothing else, so a track element pointed at an SRT shows no captions and reports no error. The conversion itself is nearly trivial, being a header line and a comma turned into a full stop, which is why a file that fails is usually a file nobody converted rather than one that converted badly.

In more detail

The browser needs VTT and says nothing when it does not get it

An HTML5 track element pointed at an SRT file displays no captions and logs no error, which makes it a difficult thing to debug. The conversion itself is close to trivial - a WEBVTT header line and commas turned into full stops - so a file that fails is usually one nobody converted rather than one that converted badly.

Timing drift comes from frame rate

Subtitles authored against a 23.976 fps master and played against a 25 fps conversion drift steadily apart, by about four per cent, which is several seconds by the end of a film. No reformatting fixes that; the timings have to be rescaled.

Positioning only exists in VTT

VTT can place a cue, style it and align it, which matters when burned-in text already occupies the lower third. SRT has no such facility, so converting from VTT to SRT silently discards every positioning instruction while the text itself survives.

Tools covered by this comparison

More comparisons