TTML Format Guide - Complete Documentation

Comprehensive guide to the TTML (Timed Text Markup Language) format - the W3C standard for professional broadcasting, streaming, and accessible subtitle delivery.

What is TTML Format?

TTML (Timed Text Markup Language) is an XML-based subtitle format standardized by the World Wide Web Consortium (W3C). Designed for professional broadcasting and streaming applications, TTML provides a comprehensive framework for subtitle delivery with advanced styling, positioning, and multi-language support capabilities.

TTML serves as the foundation for various subtitle profiles including DFXP (Distribution Format Exchange Profile) and IMSC1 (Internet Media Subtitles and Captions), making it essential for modern digital media distribution.

TTML Format Specification

XML Document Structure

A TTML document follows standard XML structure with specific namespaces and elements:

# Basic TTML structure
<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns="http://www.w3.org/ns/ttml">
<head>
<!-- Metadata and styling -->
</head>
<body>
<!-- Subtitle content -->
</body>
</tt>

Main Document Sections

<head>

Contains metadata, styling definitions, layout regions, and timing parameters for the entire document.

<body>

Contains the actual subtitle content organized in divisions and paragraphs with timing attributes.

<styling>

Defines reusable style sets for fonts, colors, positioning, and visual effects throughout the document.

<layout>

Specifies presentation regions and their positioning within the display coordinate system.

Time Expression Formats

TTML supports multiple time expression formats for maximum flexibility:

Supported time formats:

  • HH:MM:SS.mmm - Hours:Minutes:Seconds.Milliseconds
  • HH:MM:SS:FF - Hours:Minutes:Seconds:Frames
  • 12.5s - Seconds with decimal fraction
  • 750ms - Direct milliseconds
  • 30f - Frame-based timing
  • 2.5h - Hours with decimal fraction

Content Structure

TTML content is hierarchically organized:

<body> → <div> → <p> → <span>
  • <div> - Groups related subtitle blocks or scenes
  • <p> - Individual subtitle paragraph with timing
  • <span> - Inline styling and text fragments
  • <br/> - Line breaks within paragraphs

Advanced TTML Features

Styling and Formatting

TTML provides extensive styling capabilities through CSS-like attributes:

Typography

  • tts:fontFamily - Font selection
  • tts:fontSize - Font size
  • tts:fontWeight - Bold styling
  • tts:fontStyle - Italic styling
  • tts:textDecoration - Underline/strikethrough

Colors and Effects

  • tts:color - Text color
  • tts:backgroundColor - Background color
  • tts:textOutline - Text outline
  • tts:textShadow - Drop shadow
  • tts:opacity - Transparency

Layout and Positioning

  • tts:textAlign - Text alignment
  • tts:displayAlign - Vertical alignment
  • tts:origin - Region positioning
  • tts:extent - Region dimensions
  • tts:padding - Internal spacing

Animation & Transitions

  • tts:visibility - Show/hide elements
  • tts:showBackground - Background transitions
  • tts:wrapOption - Text wrapping behavior
  • tts:unicodeBidi - Text direction
  • tts:writingMode - Vertical text

Multi-language Support

TTML provides comprehensive internationalization features:

Language features:

  • xml:lang attribute for language tagging
  • Unicode bidirectional text support (Arabic, Hebrew)
  • Vertical text layout for Asian languages
  • Ruby annotations for pronunciation guides
  • Multiple subtitle tracks in single document
  • Region-specific styling and positioning

TTML Profiles

TTML defines several standardized profiles for different use cases:

DFXP (TTML1)

Distribution Format Exchange Profile - original TTML specification for subtitle exchange and distribution.

IMSC1

Internet Media Subtitles and Captions - modern profile for streaming and web-based subtitle delivery.

EBU-TT

European Broadcasting Union profile for broadcast subtitle exchange in professional television workflows.

CFF-TT

Common File Format for Timed Text - Netflix and streaming platform optimized profile for OTT delivery.

Complete TTML File Example

Here's a complete TTML document demonstrating key features:

# Complete TTML Document
<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns="http://www.w3.org/ns/ttml"
xmlns:tts="http://www.w3.org/ns/ttml#styling"
xml:lang="en">
# Document Head
<head>
<styling>
<style xml:id="defaultStyle"
tts:fontFamily="Arial, sans-serif"
tts:fontSize="24px"
tts:color="white"
tts:textAlign="center"/>
<style xml:id="titleStyle"
tts:fontFamily="Arial, sans-serif"
tts:fontSize="32px"
tts:color="yellow"
tts:fontWeight="bold"/>
</styling>
<layout>
<region xml:id="bottom"
tts:origin="10% 80%"
tts:extent="80% 15%"/>
</layout>
</head>
# Document Body
<body>
<div>
<p begin="00:00:01.200" end="00:00:04.500"
region="bottom" style="titleStyle">
Welcome to TTML Subtitles
</p>
<p begin="00:00:05.000" end="00:00:08.300"
region="bottom" style="defaultStyle">
This demonstrates basic subtitle timing
</p>
<p begin="00:00:09.100" end="00:00:12.800"
region="bottom" style="defaultStyle">
<span tts:fontStyle="italic">Styled text</span>
with multiple elements
</p>
</div>
</body>
</tt>

Use Cases and Applications

Broadcasting

Professional television and radio broadcasting systems use TTML for closed captions and subtitle delivery.

Streaming Platforms

Netflix, Amazon Prime, and other OTT services rely on TTML profiles for multilingual subtitle distribution.

Accessibility Services

Government and public sector content uses TTML for ADA and accessibility compliance requirements.

Corporate Training

Enterprise learning platforms use TTML for multilingual training content and instructional videos.

Digital Cinema

Movie theaters and digital cinema systems use TTML-based formats for subtitle projection systems.

Web Standards

HTML5 video players and web-based media applications implement TTML for standardized subtitle support.

Software Compatibility

TTML format is widely supported in professional broadcasting and streaming environments. Here's a comprehensive compatibility overview:

Broadcasting Systems

Avid MediaCentral
Grass Valley EDIUS
Harmonic VOS
Ross Video
Broadcast Solutions

Streaming Platforms

Netflix (IMSC1)
Amazon Prime Video
BBC iPlayer
Hulu
Disney+
Apple TV+

Authoring Tools

Adobe Premiere Pro
Avid Media Composer
DaVinci Resolve
EBU STL Editor
Subtitle Edit
Belle Nuit Subtitler

Web Players & Browsers

Chrome/Chromium (HTML5)
Firefox (HTML5)
Safari (HTML5)
Edge (HTML5)
Video.js
JW Player

Compatibility Legend

Full Support
Profile Dependent
Not Supported

TTML Tools and Utilities

Explore our comprehensive collection of TTML tools to create, convert, validate, and work with Timed Text Markup Language files.