SBV to VTT converter (YouTube captions)
YouTube Studio downloads captions as .sbv, which Chromecast, Google TV and most web players don't read. Open or drop an .sbv file. This page converts it to WebVTT (.vtt), keeps line breaks, checks every caption, shifts the timing if you need it and saves the result. Everything happens in this page; the file isn't uploaded.
SBV and WebVTT
- SBV is YouTube's simple caption format: a line with start and end time separated by a comma, then the text. It has no styling, so nothing is lost.
[br]inside a caption becomes a line break.- To upload the result back to YouTube, .vtt works too, and it also plays on Chromecast and in HTML5 players.
What the converter fixes and checks
- Encoding. Many .srt files aren't UTF-8. Turkish, Polish, Russian, Greek, Arabic, Hebrew, Chinese, Japanese and Korean files are often saved in an older encoding, and the TV then shows broken letters. The page guesses the encoding from the bytes. If letters still look wrong, pick another one from the list. The .vtt is always saved as UTF-8.
- Tags. WebVTT keeps
<i>,<b>and<u>.<font>tags are removed, because WebVTT has no font tag. ASS position codes such as{\an8}become "show at the top"; other{\…}codes are removed. A bare&or<in the text is escaped so it doesn't break the file. - Cues. It reports blocks without a valid time line, cues that end before they start, empty cues, cues out of order (they're sorted) and overlapping cues (kept; that's allowed). Line numbers point to your original file.
- It doesn't translate, fix spelling or sync subtitles that drift slowly over the film.
Hosting the .vtt for Chromecast
The TV downloads the subtitle file itself, from its own player page on www.gstatic.com. Three things have to be right on the server that hosts the file:
- CORS: the response needs
Access-Control-Allow-Origin: *(or the receiver's origin). Without it the TV silently shows no subtitles. - Content type:
text/vttis the right type for WebVTT. Some players refuse files served astext/plainorapplication/octet-stream. - HTTPS: the TV's player page is https, so a subtitle file on plain http is blocked.
nginx
location ~* \.vtt$ {
types { text/vtt vtt; }
add_header Access-Control-Allow-Origin "*" always;
}Apache (.htaccess, needs mod_headers)
AddType text/vtt .vtt
<FilesMatch "\.vtt$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>Amazon S3
Bucket → Permissions → Cross-origin resource sharing (CORS):
[
{
"AllowedOrigins": ["*"],
"AllowedMethods": ["GET", "HEAD"],
"AllowedHeaders": ["*"],
"MaxAgeSeconds": 3000
}
]
Upload with the right type:
aws s3 cp subtitles.vtt s3://YOUR-BUCKET/subtitles.vtt --content-type text/vtt
Cloudflare R2
Bucket → Settings → CORS policy:
[
{
"AllowedOrigins": ["*"],
"AllowedMethods": ["GET", "HEAD"],
"AllowedHeaders": ["*"],
"MaxAgeSeconds": 3600
}
]
Upload with the right type:
npx wrangler r2 object put YOUR-BUCKET/subtitles.vtt --file subtitles.vtt --content-type text/vtt --remote
Cloudflare Pages (_headers file)
/*.vtt Access-Control-Allow-Origin: *
Pages already serves .vtt files as text/vtt.
Check a hosted .vtt
Paste the file's address. This page fetches it without cookies, from a different site than the one hosting it, the way the TV does, and checks the type and the content.
No file at hand? Check our sample file.
Have an .srt file? Use the SRT to VTT converter. Castmate for Chrome sends a page's subtitles to the TV and converts SRT automatically. For a whole stream, use the Chromecast stream checker. If subtitles still don't show, see subtitles not showing on the TV. Add Castmate to Chrome