# Difference between revisions of "TTML/changeProposal004"

(→Clarifications for Time Expression Semantics) |
(→Details: incremental update) |
||

Line 37: | Line 37: | ||

Without loss of generality, we will assume playRate is 1 (one) and realStartTime is 0 for the remainder of this document, which simplifies this relationship to R = M. | Without loss of generality, we will assume playRate is 1 (one) and realStartTime is 0 for the remainder of this document, which simplifies this relationship to R = M. | ||

+ | |||

+ | === Problem Example === | ||

+ | |||

+ | A number of common non-integral frame rates occurs in common use in the U.S., originally deriving from NTSC video formats. An example of this is a frame rate of 30 * 1000/1001 = 29.970029970029… frames per second, or 41.708333... milliseconds per frame. In TTML, this frame rate would be denoted as follows: | ||

+ | |||

+ | <blockquote> | ||

+ | <pre> | ||

+ | <tt ttp:frameRate='30' ttp:frameRateMulitiplier='1000 1001' ttp:timeBase='media' ...> | ||

+ | </pre> | ||

+ | </blockquote> | ||

+ | |||

+ | TTML time expressions allow specifying time using either a ''offset-time'' or ''clock-time'' format [http://www.w3.org/TR/ttaf1-dfxp/#timing-value-timeExpression]. In the case of offset time expressions, one can use a variety of representations, such as a fractional number of seconds, a fractional number of frames, etc. In the case of clock time expressions, one can use a COLON (<code>:</code>) separated expression that includes hours, minutes, seconds, and, optionally, fraction of seconds or frames and optional sub-frames. | ||

+ | |||

+ | Valid time expressions include: | ||

+ | |||

+ | <blockquote> | ||

+ | <pre> | ||

+ | 30f | ||

+ | 1s | ||

+ | 1.25125s | ||

+ | 00:00:01 | ||

+ | 00:00:01.25125 | ||

+ | 00:00:01:01 | ||

+ | </pre> | ||

+ | </blockquote> | ||

+ | |||

+ | In general, it should be possible to convert between the different time expression formats without loss of information. | ||

+ | |||

+ | === Interpretation #1 === | ||

+ | |||

+ | |||

+ | === Interpretation #2 === | ||

== Impact == | == Impact == | ||

== References == | == References == |

## Revision as of 00:13, 30 January 2013

# Clarifications for Time Expression Semantics

- The following is a Change Proposal for Issue 199
- Editor: Glenn Adams.
- Date: January 28, 2013.

## Summary

TTML does not adequately define how to relate a time expression to media time when the effective frame rate is not an integer.

## Details

TTML defines the `media`

time base as follows [1]:

If the time base is designated as media, then a time expression denotes a coordinate in some media object's time line, where the media object may be an external media object with which the content of a document instance is to be synchronized, or it may be the content of a document instance itself in a case where the timed text content is intended to establish an independent time line.

The media time base is related to local real time in accordance to the related media play rate and the related media real start time (i.e., the real time when the related media playback started), parameters not modeled by TTML itself. The relationship between media time (M) and local real time (R) is as follows:

R = playRate * M + realStartTime

where

M ∈ ℜ | 0 ≤ M < ∞ | M in seconds

playRate ∈ ℜ | −∞ < playRate < ∞ | playRate is unit-less

realStartTime ∈ ℜ | 0 ≤ realStartTime < ∞ | realStartTime in seconds, with 0 being start of epoch

Without loss of generality, we will assume playRate is 1 (one) and realStartTime is 0 for the remainder of this document, which simplifies this relationship to R = M.

### Problem Example

A number of common non-integral frame rates occurs in common use in the U.S., originally deriving from NTSC video formats. An example of this is a frame rate of 30 * 1000/1001 = 29.970029970029… frames per second, or 41.708333... milliseconds per frame. In TTML, this frame rate would be denoted as follows:

<tt ttp:frameRate='30' ttp:frameRateMulitiplier='1000 1001' ttp:timeBase='media' ...>

TTML time expressions allow specifying time using either a *offset-time* or *clock-time* format [2]. In the case of offset time expressions, one can use a variety of representations, such as a fractional number of seconds, a fractional number of frames, etc. In the case of clock time expressions, one can use a COLON (`:`

) separated expression that includes hours, minutes, seconds, and, optionally, fraction of seconds or frames and optional sub-frames.

Valid time expressions include:

30f 1s 1.25125s 00:00:01 00:00:01.25125 00:00:01:01

In general, it should be possible to convert between the different time expression formats without loss of information.