From W3C Wiki
Revision as of 12:15, 21 March 2012 by Shayes (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Clarify syncbase in SMPTE continuous mode

The intended use of the SMPTE timebase was for marker "metadata" to enable registration with media that is striped with a SMPTE timecode. In typical practice such timecodes are unusable for a presentation time base, they often start at a non zero time (e.g. 1 hour on the first frame), and may have discontinuous due to editing, gaps for interstitials, and also to accommodate drop frames. This behaviour is largely captured in TTML by using the set of parameters: ttp:dropMode, ttp:markerMode="discontinuous" and ttp:timeBase="smpte"

At some point we added the ttp:markerMode="continuous", however it is not clear what this was actually intended to mean. In particular how this differs (if at all) from the case ttp:timeBase="media".

The spec offers the following clues:

If the time base is designated as smpte, then a time expression denotes a [SMPTE 12M] time coordinate with which the content of a document instance is to be synchronized. In this case, the value of the ttp:markerMode and ttp:dropMode parameters apply

However this doesn't change the syntax of the allowed time expressions (for example one might expect in this mode that offset times would be illegal), so this allows exactly the same time expressions as in media mode. However some expressions may now be semantically meaningless (dependingon the drop mode)


[SMPTE 12M] time coordinates may be assumed to be linear and either monotonically increasing or decreasing;

This means that duration, and offset times are intended to work. As is the case with media, and we are not using the SMIL marker semantics.

The notion of marker discontinuity as captured by this parameter is logically independent from the method used to count frames as expressed by the ttp:dropMode parameter. In particular, even if the ttp:dropMode parameter is specified as dropNTSC or dropPAL, the marker mode may be specified as continuous, even in the presence of frame count discontinuities induced by the frame counting method, unless there were some other non-linearity or discontinuity in marker labeling, for example, two consecutive frames labeled as 10:00:00:00 and 10:00:01:00.

So, there is a difference here; if the content is marked with one of the drop modes, then the illegal 12M time expressions are expected to be dealt with. dropMode cannot be specified with media.

So from this we can currently deduce that the only difference in smpte-continuous mode, is that certain time expressions may be illegal (depending on the setting of ttp:dropMode), however we can expect that all legal frames will appear in the media, and that the processor will do the maths correctly, and thus the concept of a duration is well founded.

Another issue however arises. In smpte mode, one probably expects to use time codes exclusively. However the following example illustrates an oddity. In a document with timeBase='media'

     <p region='r' begin='00:00:27:00' end='00:00:38:00'>
        <span begin='00:00:01:00'>A</span>
        <span begin='00:00:02:00'>B</span>
        <span begin='00:00:03:00'>C</span>

the text A is timed to appear at 00:00:28:00. This is the normal interpretation under the media mode.

However under smpte-discontinuous mode, the frame marked with 00:00:01:00 is probably (but not necessarily) well before the frame marked with 00:00:27:00; in this mode it would be necessary to write:

     <p region='r' begin='00:00:27:00' end='00:00:38:00'>
        <span begin='00:00:28:00'>A</span>
        <span begin='00:00:29:00'>B</span>
        <span begin='00:00:30:00'>C</span>

in this case the begin time of text A is not subject to arithmetic, as we are using SMIL markers, text A will only appear once both markers 00:00:27:00 and 00:00:28:00 have been seen, the first to activate the container, and the second to activate the span.

Now an author that notices that their timecode is in fact continuous might reasonably decide to set ttp:markerMode='continuous', however this would be a mistake. As it would no longer be using the SMIL marker semantics (the spec is clear this only applies when ttp:markerMode='discontinuous'), thus the expression

     <p region='r' begin='00:00:27:00' end='00:00:38:00'>
        <span begin='00:00:28:00'>A</span>
        <span begin='00:00:29:00'>B</span>
        <span begin='00:00:30:00'>C</span>

Will no longer work. Because the syncbase in SMIL is now the parent container, and in continuous mode time arithmetic is intended to work, A is now timed to appear at 00:00:55:00, but by that time the parent container is inactive.


So at the very least ttp:markerMode is misleadingly named. One solution would be to define that for ttp:markerMode='continuous' an elements syncbase is the overall tt container (which is mapped to the media timeline), rather than its parent. This would allow the previous example to work as expected, without invoking the marker mode.

If this is not the intention, then possibly the continuous mode should be removed, and ttp:dropMode be allowed when the timebase='media' so that the illegal time expressions can be accounted for. This would remove the confusion over the non-marker marker mode, and would allow timebase=media to be used with content that is in fact striped with drop code without continually having to adjust between the two time coordinate systems.