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:
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.MillisecondsHH:MM:SS:FF
- Hours:Minutes:Seconds:Frames12.5s
- Seconds with decimal fraction750ms
- Direct milliseconds30f
- Frame-based timing2.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 selectiontts:fontSize
- Font sizetts:fontWeight
- Bold stylingtts:fontStyle
- Italic stylingtts:textDecoration
- Underline/strikethrough
Colors and Effects
tts:color
- Text colortts:backgroundColor
- Background colortts:textOutline
- Text outlinetts:textShadow
- Drop shadowtts:opacity
- Transparency
Layout and Positioning
tts:textAlign
- Text alignmenttts:displayAlign
- Vertical alignmenttts:origin
- Region positioningtts:extent
- Region dimensionstts:padding
- Internal spacing
Animation & Transitions
tts:visibility
- Show/hide elementstts:showBackground
- Background transitionstts:wrapOption
- Text wrapping behaviortts:unicodeBidi
- Text directiontts: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:
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
Streaming Platforms
Authoring Tools
Web Players & Browsers
Compatibility Legend
TTML Tools and Utilities
Explore our comprehensive collection of TTML tools to create, convert, validate, and work with Timed Text Markup Language files.