ASS to VTT converter for Chromecast
Chromecast, Google TV and web players read WebVTT (.vtt), not ASS or SSA. Open or drop an .ass or .ssa file. This page reads the [Events] section, keeps italics, bold, underline, line breaks and top-of-screen lines, removes styling the TV can't show, checks every subtitle and saves a .vtt. Everything happens in this page; the file isn't uploaded.
What happens to ASS styling
- Kept:
{\i1}italics,{\b1}bold,{\u1}underline,\Nline breaks, and{\an7}–{\an9}(or{\a5}–{\a7}) top positions, which become WebVTT'sline:0. - Dropped: fonts, colours, outlines, sizes, exact positions (
{\pos}), moves, fades and karaoke timing. A TV's WebVTT renderer has no way to draw them, and Chromecast's player uses its own font. - Skipped:
Comment:lines and vector drawings ({\p1}), which are shapes rather than text. - Signs and songs typeset on screen in the original become plain lines. If a release has a separate "full" and "signs" track, convert the full one.
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