Subtitle formats

The .ass subtitle file, and when to use it instead of SRT.

An .ass file is an Advanced SubStation Alpha subtitle: plain text, like an SRT, but it carries the look as well as the timing — font, size, colour, an outline or a box, exact position, fades and per-word effects. Use ASS when the captions have to look a particular way, above all when you burn them into the picture. Use SRT when you need a file that every upload form and editor accepts. suubbs exports both from the same timings, so you never have to choose before you start.

Get the Mac app — $9.99 → Try it free in your browser
SRT vs VTT vs ASS

What each format can carry.

From what suubbs' own exporters write, and what they warn you they had to leave out.

SubRip (.srt) WebVTT (.vtt) ASS (.ass)
Timing precisionMillisecondsMillisecondsCentiseconds
Colour, font, size, bold, italicYes, through inline tags many players honourYes, through a CSS style blockYes
Upper or title caseYes — it is in the lettersYesYes
Box, outline or shadowNoYesYes
Top, middle or bottom placementNoYesYes
A caption dragged to an exact spotNoNoYes
Letter spacingNoYesYes
Fade in and outNoNoYes
Word-by-word highlightingNoNoYes

ASS holds far more of the look than either of the others, which is why it is the format for a burn-in. Not quite all of it: the preview can round the corners of a caption's box, and ASS has no way to say that — and the box itself currently needs an override at burn-in time, explained under BorderStyle below. When you export a styled document to SRT or VTT, suubbs names what that format had to leave out — "SRT cannot carry the outline", say — rather than letting you find out later.

The trade-off runs the other way for compatibility. SRT is the format upload forms and video editors most commonly ask for, and an SRT nobody styled is exported as the bare file every tool expects. ASS is a richer format with fewer places that accept it. The SRT generator guide covers the simple format in detail, and SRT to VTT covers the web one.

Inside the file

Three sections, all readable.

Here is a real export from a 1080p video, trimmed of two header lines. The style is suubbs' default look; the caption is shown with Word highlight set to Off, so it is a single line.

[Script Info]
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
PlayResX: 1920
PlayResY: 1080

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Inter,56,&H00FFFFFF,&H003DD9FF,&H001A1617,&H14100B0C,-1,0,0,0,100,100,0,0,3,0,0,2,134,134,65,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:01.20,0:00:02.90,Default,,0,0,0,,Welcome back to the show.

[Script Info]: the canvas

PlayResX and PlayResY set the resolution every size and margin in the file is measured against. suubbs writes the video's own dimensions there, so the numbers below are literal pixels: a 56-pixel font on a 1080-pixel-tall frame, which is the default 5.2% of the height. A renderer is expected to scale that canvas to whatever size the video is actually shown at.

[V4+ Styles]: the look

The Format line names the columns and each Style line fills them in. A few that are easy to misread:

[Events]: the lines

Each Dialogue line is one caption: a start and end time in h:mm:ss.cc, the style it uses, and the text. Anything inside curly braces is an override tag that changes the look from that point on: {\c&H003DD9FF} recolours, {\fad(150,150)} fades in and out over 150 ms, {\an5\pos(960,540)} pins the centre of a caption to an exact pixel. \N is a line break.

The first field, Layer, is the one to watch when two lines share a moment. suubbs writes each line's timeline row there, and lines on different layers are not moved apart when they collide, so a burn-in can print one over the other. The fix is on overlapping subtitles.

Style it once. Export it both ways.

[.srt and .ass]

The social look

How word highlighting is written into ASS.

One line per word, rather than the format's karaoke tags.

ASS has karaoke tags (\k), but they colour words as already sung — the highlight sweeps along and stays. The modern caption look picks out only the word being spoken. So when highlighting is on — which it is by default — suubbs writes one Dialogue line per word, each showing the whole caption with just that word recoloured:

Dialogue: 0,0:00:01.20,0:00:01.60,Default,,0,0,0,,{\c&H003DD9FF}Welcome{\c&H00FFFFFF} back to the show.
Dialogue: 0,0:00:01.60,0:00:01.90,Default,,0,0,0,,Welcome {\c&H003DD9FF}back{\c&H00FFFFFF} to the show.
Dialogue: 0,0:00:01.90,0:00:02.00,Default,,0,0,0,,Welcome back {\c&H003DD9FF}to{\c&H00FFFFFF} the show.

It makes a longer file and it renders exactly what the editor showed. The "Grow" mode adds a 112% scale to the active word and "Box" thickens a coloured border into a chip behind it. Fades are left off in this mode, because fading every one of those per-word lines would flicker rather than read soft. The timing that drives this is covered in word-by-word captions.

Using the file

What to do with an .ass once you have it.

Three common destinations, and one it cannot go to.

Burn it into the video

This is what ASS is for. ffmpeg's subtitles filter renders an ASS file onto every frame, so the captions are part of the picture and look the same on every platform: ffmpeg -i video.mp4 -vf "subtitles=captions.ass" -c:a copy out.mp4. The burn-in guide covers quality settings and the problems people hit.

Make sure the font is there

An ASS file names its font; it does not contain it. Whatever renders the file looks that name up among the installed fonts, and if it is missing, quietly substitutes another one. If a burn-in comes out in the wrong typeface, install the font, or point ffmpeg at a folder of fonts with fontsdir.

Play it beside the video

Some media players can load an .ass next to the video and render it with its styling. Support varies by player and version, so test yours before relying on it — and for a platform upload or a video editor's caption track, export SRT or VTT, which is what those generally expect.

Edit it by hand

Because it is plain text, small changes are easy in any text editor. To make every caption bigger, change the Fontsize column of the Style line. To change the colour, write the new one in &HAABBGGRR order. For anything more than that, change it in the studio and export again, so the preview and the file stay in step.

What it cannot do: come back into suubbs

The studio imports SRT, VTT and its own word-level JSON — not ASS. If you might want to re-edit a styled project later, export the JSON as well. It is lossless: it keeps every word's timing and the document's whole look, so it opens again exactly as you left it.

The details

What people ask about ASS.

Short answers to the follow-ups.

What is an .ass file?

A subtitle file in the Advanced SubStation Alpha format. It is plain text, like an SRT, and holds the timing of every caption plus its styling: font, size, colours, an outline or box, position, fades and per-word effects.

Should I use SRT or ASS?

Use SRT when you need a file an upload form or video editor will accept, or when the player should decide the look. Use ASS when the captions must look a particular way — above all when you burn them into the video.

How do I open an .ass file?

Any text editor will open it, because it is plain text. To see it rendered over the video, load it in a player that supports ASS styling, or burn it in with ffmpeg's subtitles filter.

Can I convert ASS to SRT?

You can, but the styling is lost, because SRT has nowhere to keep most of it. If you made the captions in suubbs, export SRT from the same project instead of converting — the timings are identical and SRT keeps the colour, font and size it can hold.

Why does my ASS file show the wrong font?

The file names the font but does not contain it. If the font is not installed where the file is rendered, a substitute is used. Install it, or point ffmpeg at a fonts folder with fontsdir when burning in.

What does &H00FFFFFF mean?

It is an ASS colour: &H then transparency, blue, green and red as hex bytes. 00 means fully opaque, so &H00FFFFFF is solid white, and the CSS colour #FFD93D is written &H003DD9FF.

Can I import an .ass file into suubbs?

No. suubbs imports SRT, VTT and its own word-level JSON. Export the JSON alongside the ASS if you want to re-edit a styled project later.

Keep reading

Related

The look you designed, in the file you ship.

[styled, not stripped]