Convert SRT subtitles to WebVTT and handle cue formatting differences

domain: w3.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Add the required 'WEBVTT' header line at the very top of the file — SRT files have no header and start directly with the first cue index
  2. Replace every comma millisecond separator in timestamps with a period: change '00:01:12,500 --> 00:01:15,000' to '00:01:12.500 --> 00:01:15.000' — this is the only timing change needed
  3. Decide whether to keep cue sequence numbers: WebVTT makes them optional, so you may strip them or replace them with meaningful cue identifiers (e.g., 'intro-1') for JavaScript cue events
  4. Add WebVTT cue settings if positioning is needed — append settings after the timestamp arrow on the same line, such as 'align:center position:50% size:80%'; SRT has no equivalent
  5. Validate the output with a WebVTT parser or the W3C Nu validator — common failures include missing WEBVTT header, BOM encoding issues, and stray Windows line endings (CRLF inside cue text)
  6. Serve WebVTT files with Content-Type 'text/vtt' and ensure CORS headers allow cross-origin fetch if the file is on a different domain from the video player

Known gotchas

Related routes

Translate SRT/VTT subtitle files while preserving cue timecodes using the Azure AI Translator Document Translation API
learn.microsoft.com · 5 steps · unrated
Choose and convert between WebVTT and TTML/IMSC caption formats to satisfy per-platform delivery requirements from a single auto-generated caption source
w3.org · 6 steps · unrated
Add WebVTT subtitle tracks to an HLS stream and reference them in the multivariant playlist
hls · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans