What is Timed Text Markup Language?

Timed Text Markup Language (TTML) is an XML-based W3C format for captions and subtitles. It represents text timing, layout, styling, and placement in regions associated with media.

How Timed Text Markup Language works

TTML models a timed-text document as namespaced XML: a tt root whose head holds styling and layout declarations and whose body holds div, p, and span content elements that reference them. Those elements can carry begin, end, and dur attributes and act as parallel time containers by default, so a child’s times are offsets from the start of its nearest timed ancestor. Regions define the areas into which content is flowed. Because the full language is broad, profiles declare which features a document may use and a processor must support; IMSC defines a text profile and an image profile of TTML2 for subtitle and caption delivery. The W3C describes TTML as an interchange format among authoring systems that can also be used directly for distribution.

Key facts

  1. begin, end, and dur on a nested element are measured from the start of its nearest ancestor time container, which is parallel by default, not from the start of the media. A div with begin="10s" therefore shifts every paragraph inside it by ten seconds, and a converter that reads only each paragraph’s own attributes places those cues early.
  2. Time expressions that count frames depend on ttp:frameRate on the root element. When it is absent, TTML2 falls back to an application-defined rate or else 30 frames per second, so a file authored at 25 frames per second without the attribute is mistimed; IMSC requires the attribute whenever frame-based times are used.
  3. Profiles narrow the language, so a document that is valid TTML2 can still be rejected downstream. IMSC defines separate text and image profiles and prohibits some TTML2 features outright. HLS takes TTML only as IMSC1: the current HLS specification draft requires IMSC subtitle segments to be fragmented MP4 that complies with the IMSC1 Text Profile, signaled with a CODECS identifier such as stpp.ttml.im1t.
  4. MDN documents the HTML track element as taking WebVTT (.vtt) files, so plan on converting TTML or rendering it in script for browser playback. Players that support TTML do that work themselves: hls.js, for example, parses IMSC1 from fragmented MP4 segments and turns each timed element into a WebVTT cue object.

When Timed Text Markup Language matters

Choose TTML when a broadcast, player, or streaming workflow requires it and supports the needed profile. Browser playback often favors WebVTT, so direct TTML delivery may require conversion or player-specific support.

How Transloadit helps with Timed Text Markup Language

Transloadit’s subtitle-related Robots document SRT and WebVTT as their subtitle formats: /video/subtitle supports SRT and VTT subtitle files, and /speech/transcribe can output srt or webvtt.

The audio/video formats table lists ttml for writing only, not reading, on the FFmpeg stacks, so convert TTML sources to SRT or WebVTT before these Steps.

Explore Transloadit’s file formats & compression capabilities

Sources

Turn media knowledge into a working pipeline

Connect uploads, processing, AI, storage, and delivery through one declarative API — with the encoding stack, scaling, and format churn handled for you.

Try Transloadit for free