Urgent.News

What's breaking now, across thousands of outlets.

Tech

Subtitle File Formats: SRT, VTT and ASS Explained

A subtitle file is a plain text file: lines of dialogue, each with a start and an end time. The format decides how much more than that it can carry — styling, positioning, word timing — and which players will accept it. Three formats cover almost everything you'll meet: SRT , VTT and ASS . SRT — the one everything accepts SubRip ( .srt ) is the oldest and the most widely supported. A cue is a…

Subtitle files are plain text documents that contain dialogue lines with start and end times. The format of these files determines the additional information they can hold, such as styling, positioning, and word timings, as well as which media players can play them. The three most common formats are SRT, VTT, and ASS.

SRT, which stands for SubRip, is the oldest and most widely supported format. Each cue consists of a number, a time range, and the dialogue text. For instance, "1 00:01:42,300 -- 00:01:45,120 Thanks for watching, see you next week." The format only includes basic information, without colors, fonts, or positions, leaving the player to decide how the text should appear. SRT files work with desktop players, video editors, TV boxes, and most upload forms.

VTT, or WebVTT, is the format designed specifically for web browsers. It uses a different syntax than SRT, with the file starting with "WEBVTT" and milliseconds following a period. Cue numbers are optional in VTT. This format can also carry cue settings, such as position, line, and alignment, and even incorporate simple styling through CSS in the page. VTT is the format of choice when subtitles will be displayed in a web browser, as it allows for greater customization and styling options.

ASS, or Advanced SubStation Alpha, is a more advanced format that can carry both dialogue and styling information. It includes a style table, which specifies various attributes like font, size, colors, outlines, and shadows. Every line in an ASS file points to a style, enabling the subtitle renderer to apply the correct formatting.

ASS is commonly used for rendering subtitles directly onto video during the encoding process and is also favored by fansubbing and karaoke tools. It supports word-level timing, which allows for word-by-word highlighting, and positioning information. However, not all players support ASS, and those that do may have varying levels of compatibility.

When deciding which format to use, consider the platform where the subtitles will be used. SRT is generally the safest default, as it is widely supported by platforms like YouTube, Vimeo, and various social media sites. If the subtitles will be displayed on a web page and you want to maintain control over the styling, use VTT. If the styling needs to be preserved and the player supports it, such as with VLC or mpv, ASS might be the best choice.

For editors or colleagues who may need to work with the subtitles, SRT is a good option, along with a note specifying any desired styling.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Apple Watch Series 12 and Ultra 4 review: More personal than ever before

The Apple Watch Series 12 and Apple Watch Ultra 4 are all about what’s happening underneath. Headlined by a new Health Sensing System, they bring some of the biggest improvements to Apple Watch health tracking in years. I’ve spent the last week with the Apple Watch Series 12 and Ultra 4. Here’s everything you need to know.

More from Thursday 17 September →