ttml

How to compute implicit durations for par and seq timeContainers in TTML?


I have the following excerpt from a TTML test suite at http://www.w3.org/2008/12/dfxp-testsuite/web-framework/START.html (MediaSeqTiming002):

<body timeContainer="par">
  <div timeContainer="seq" dur="40s">
    <div timeContainer="seq" dur="20s">
      <metadata>
        <ttm:desc>default duration for elements in this context is 0</ttm:desc>
      </metadata>
      <p begin="00:00:05:00" dur="5s">This text must appear at 5 seconds<br/>and be remain visible to 10 seconds,</p>
      <p begin="00:00:05:00">This text must not appear.</p>
      <p  dur="00:00:05:00">This text must appear at 15 seconds<br/>and be remain visible to 20 seconds,</p>
    </div>
    [...]
  </div>
</body>

Is the requirement that the second <p> element's text (line 8) not appear correct? I analyzed the TTML spec (http://www.w3.org/TR/ttaf1-dfxp/) and found the following:

From that I reason that "This text must not appear" should start at 15s and end at 20s, and the third <p> should never become active.

The test seems to suggest that the implicit duration of the second <p> should be 0.

Where am I wrong?


Solution

  • You're not wrong; I agree with your conclusion - see also my explanation at Explanation of W3C TTML timing attributes

    The example you've given I believe resolves to:

    The metadata description appears to be incorrect.

    Analysis

    TTML1 §10.4 Timing intervals says:

    • The implicit duration of a body, div, p, or span element is determined in accordance to (1) whether the element is a parallel or sequential time container, (2) the default endsync semantics defined above by 10.2.4 timeContainer, and (3) the semantics of [SMIL 2.1] as applied to these time containers.

    In this case the div elements are (explicitly) seq time containers and the p elements are (implicitly) par time containers. The implicit duration of a par timeContainer is defined in SMIL 2.1 as

    Implicit duration of par

    The implicit duration of a par is controlled by endsync. By default, the implicit duration of a par is defined by the endsync="last" semantics. The implicit duration ends with the last active end of the child elements.

    However TTML1 specifies that the applicable value of endsync is "all", which means that the implicit duration of a par timeContainer is effectively 'until its parent timeContainer ends'.

    For completeness, the implicit dur of a seq timeContainer is defined in SMIL 2.1 as

    Implicit duration of seq containers

    • The implicit duration of a seq ends with the active end of the last child of the seq.
    • If any child of a seq has an indefinite active duration, the implicit duration of the seq is also indefinite.

    This of course doesn't apply here because all of the seq timeContainers have explicitly specified durations.

    Addressing the faulty test

    I have added this test as a 'bad' one to the catch-all issue for bad tests at https://www.w3.org/AudioVideo/TT/tracker/issues/265