HH:MM:SS:FF expressions in IMSC1

IMSC1 requires the use of ttp:timeBase="media". As a result, time expressions of the form:

hours ":" minutes ":" seconds ":" frames

are neither SMPTE ST 12 time labels nor related to any timecode or frame rate of the related video object.

Instead they express an offset in seconds, given by the following formula (see Annex N.2 in TTML):

3600 * hours + 60 * minutes + seconds + (frames / (ttp:frameRate * ttp:frameRateMultipler))

Note that the offset depends on the value of ttp:frameRate and ttp:frameRateMultipler, which are not necessarily equal to the Composition Edit Rate.

For example , the time expression 00:00:02:22 corresponds to an offset of:

  • 2 + 22 / (24 * 1000/1001) = 2.9175833… seconds if ttp:frameRate="24" and ttp:frameRateMultiplier="1000 1001"
  • 2 + 22 / (30 * 1000/1001) = 2.734066… seconds if ttp:frameRate="30" and ttp:frameRateMultiplier="1000 1001"

To avoid ambiguities, one can always use offset-time, e.g. 2.9175833s, or clock-time with fraction , e.g. 00:00:02.9175833, neither of which use frames.

Positioning in TTML and IMSC1

Positioning of elements in IMSC1 uses the tts:origin and tts:extent attributes defined in TTML.

These attributes apply to region elements only (see 8.2.7 and 8.2.14 at 2) and have no effect when used on a p or div element.

For example, <p begin="1s" end="2s" tts:origin="47.59% 84.67%" tts:extent="auto">hello</p> will not position the p element at "47.59% 84.67%".

In order to position p or div elements, a separate region element has to be defined for each target position.

For example, the following positions each of the two p elements at different locations:

<?xml version="1.0" encoding="UTF-8"?>
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling">
<head>
<layout>
<region xml:id="pop1" tts:origin="20% 80%" tts:extent="50% 15%"/>
<region xml:id="pop2" tts:origin="50% 80%" tts:extent="30% 15%"/>
</layout>
</head>
<body>
<div>
<p region="pop1" begin="1s" end="2s" >One</p>
<p region="pop2" begin="3s" end="4s" >Two</p>
</div>
</body>
</tt>