Every element from body down can be timed. Its interval starts at
begin and ends just before end: the start is included, the end
is not. The parameters on the tt element say what the times are measured
against.
Timing attributes
| Attribute | Value | On | Meaning |
|---|---|---|---|
begin | time expression | body, div, p, span, region, set; in TTML2 also animate, image, audio | The start, relative to the parent’s start in a par container, or to the end of the previous sibling in a seq container. Default 0. |
end | time expression | as begin | The end, measured from the same point as begin. |
dur | time expression | as begin | The length. When both end and dur are given, the shorter result wins. A zero duration is allowed. |
timeContainer | par or seq | body, div, p, span, region; in TTML2 also image, audio | par (the default): children run in parallel, each timed from the parent’s start. seq: children run one after another. |
A child never outlasts its parent: its interval is cut to the parent’s. An element
with no end or dur takes an implicit duration: a
par container lasts until its last child ends, and a run of plain text in
a par parent lasts as long as the parent. Text that is not active is not
shown, and is not laid out.
Time expressions
| Form | Syntax | Example |
|---|---|---|
| Clock time | hours:minutes:seconds, optionally .fraction | 00:01:02.500 |
| Clock time with frames | hours:minutes:seconds:frames, optionally .sub-frames | 00:01:02:15, 00:01:02:15.1 |
| Offset time | a number, optionally with a fraction, then a metric | 62.5s, 1500ms |
| Wall-clock time (TTML2) | wallclock( a date and time, a time, or a date ) | wallclock("2026-11-12T19:30:00") |
| Metric | Unit |
|---|---|
h | hours |
m | minutes |
s | seconds |
ms | milliseconds |
f | frames, at the effective frame rate |
t | ticks, at ttp:tickRate |
Hours have at least two digits; minutes are 00 to 59; seconds 00 to 59, or 60 for a
leap second. Frames run from 0 to the frame rate minus one, and sub-frames from 0 to
the sub-frame rate minus one. Frames, sub-frames and the f metric are
errors in the clock time base, and a wall-clock time is an error unless
the time base is clock. In the smpte time base, TTML2
deprecates offset times and fractional seconds.
Timing parameters
All are attributes in the ttp: namespace, written on tt.
| Attribute | Values | Default | Meaning |
|---|---|---|---|
ttp:timeBase | media, smpte, clock | media | What times count: the media’s own timeline, SMPTE time codes in the media, or a real-world clock. |
ttp:clockMode | local, gps, utc | utc | For the clock time base: local time, GPS time (no leap seconds) or UTC. |
ttp:dropMode | dropNTSC, dropPAL, nonDrop | nonDrop | For the smpte time base: how frame numbers are dropped from the time code (below). |
ttp:markerMode | continuous, discontinuous | discontinuous | For the smpte time base: with continuous, time codes may be taken as linear and steadily rising or falling; with discontinuous, nothing may be assumed about their order or spacing. |
ttp:frameRate | whole number above 0 | set by the application, else 30 | Frames per second, before the multiplier. |
ttp:frameRateMultiplier | numerator denominator, both above 0 | 1 1 | Multiplies the frame rate; 1000 1001 turns 30 into 29.97. |
ttp:subFrameRate | whole number above 0 | 1 | Sub-frames per frame, such as the two fields of interlaced video. |
ttp:tickRate | whole number above 0 | frame rate × sub-frame rate if a frame rate is given, else 1 | Ticks per second, for the t metric. |
The effective frame rate is ttp:frameRate × numerator ÷ denominator.
Drop modes
| Value | Frame numbers skipped |
|---|---|
nonDrop | None: every frame number is used |
dropNTSC | Frames 0 and 1 at the start of every minute, except minutes divisible by 10 |
dropPAL | Frames 0 to 3 at the start of every even minute, except minutes 00, 20 and 40 |
Dropping frame numbers keeps a 30-frame time code in step with the clock when the real rate is 30 × 1000 ÷ 1001. No pictures are dropped, only numbers.
Worked example
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:ttp="http://www.w3.org/ns/ttml#parameter"
xml:lang="en" ttp:frameRate="30" ttp:frameRateMultiplier="1000 1001" ttp:tickRate="10000000">
<body>
<div>
<p begin="00:00:01:15" end="105f">Where are we going?</p>
<p begin="40000000t" end="62500000t">Somewhere we have never been.</p>
</div>
</body>
</tt>