Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.
This document specifies the Simple Online Delivery Profile (US) of the Timed Text Markup Language (TTML).
The primary goal of the profile defined herein is to establish a minimum level of interoperability between [TTML10] and legacy caption formats employed in US markets, such as [CEA608] and [CEA708]. This is accomplished by (1) defining a set of constraints that apply to TTML document instances that claim adherence to this profile, and (2) defining a set of mandatory features and behaviors that must be supported by implementations of a TTML Presentation Processor that claim adherence to this profile.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This document applies the following guiding principles for online delivery of closed captions originated in the United States:
This document was published by the Timed Text Working Group as a W3C Working Group Note. If you wish to make comments regarding this document, please send them to public-tt@w3.org (subscribe, archives). All comments are welcome.
Publication as a Working Group Note does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
TTML 1.0 [TTML10] provides many features to satisfy captioning and subtitling requirements, not all of which are intended for end user display. Requirements have been identified by key video and content communities to define an interoperable delivery profile using the core features specifically designed for online presentation of TTML. Such a profile allows the community of TTML users to construct constrained presentation engines for TTML. This document defines the behavior expected of a TTML content player using the presentation processor constraints for such an online delivery profile.
At the time of publication, this profile normatively refers to [TTML10], and informatively refers to [TTML10SE]. The most recently published version of TTML should take precedence as the definitive reference.
The Simple Online Delivery profile is focused on streamlined delivery of closed captions on the Internet. This interoperability profile supports core TTML features to deliver legacy formats such as [CEA608] and [CEA708] content, and, as such, is targeted primarily for use in US markets.
The Simple Delivery Profile for Closed Captions focuses on interoperability using [TTML10] to support delivery of closed captions for video content. Other profiles based on [TTML10] may target other types of subtitles such as on-screen text or graphics. This interoperability profile is a proper subset of [TTML10] intended to support features required for US Government closed captioning requirements for online presentation.
The terms and definitions in [TTML10] serve as the basis for this interoperability profile. The following terms supplant those found in [TTML10].
Name | Definition |
---|---|
a document | A TTML document that is intended to conform to this profile. |
a presentation processor | A TTML presentation processor that is intended to conform to this profile. |
When this document refers to a TTML element type and no namespace prefix is specified, then the tt
namespace prefix is implied. This prefix and other explicit namespace prefixes used herein correspond to those
TTML namespaces defined in [TTML10] Section 5.1.
In the examples in this document, standard TTML namespace prefixes are abbreviated for brevity, without loss of generality.
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words must, must not, required, should, should not, recommended, may, and optional in this specification are to be interpreted as described in [RFC2119].
This profile defines (1) constraints on documents and (2) minimum requirements for a TTML presentation processor capable of presenting such constrained documents.
A document conforms to this profile if it:
A conformant document is said to be strictly conformant if it does not contain any feature that is not explicitly specified as included in this profile.
A TTML presentation processor conforms to this profile if it:
The semantics defined in [TTML10] apply unless otherwise constrained in this profile.
Claims of document conformance must make use of the following profile URI, identified with the indicated profile name:
Profile Name | Profile Designator |
---|---|
SDP US |
http://www.w3.org/ns/ttml/profile/sdp-us |
Conformance to this profile does not preclude:
Error handling behavior is described in Error Handling.
tt
element.head
and body
element.styling
and a layout
element.div
element which has a descendant div
element.span
element which has a descendant span
element.<span style="s1">A</span> <span style="s3">B</span> <span style="s1">C</span>
This constraint is intended to limit the lexical order of elements to match the temporal order of the active duration of these elements.
tt
head
styling
style
layout
region
body
div
p
span
br
set
ttp:profile
ttp:features
ttp:feature
ttp:extensions
ttp:extension
ttp:profile
element where the use
attribute of that element is specified as http://www.w3.org/ns/ttml/profile/sdp-us
.http://www.w3.org/ns/ttml/profile/sdp-us
as defined by Features in TTML 1.0 Used in This Profile.See also Conformance. [TTML10] allows zero or more profiles (ttp:profile
in the head
element) to be specified and used simultaneously.
tts:backgroundColor
attribute that does not conform to the #rrggbbaa
expression format as defined by
[TTML10], Section 8.3.2.tts:backgroundColor
attribute.These colors are identical to those identified in the CEA708-D, Section 8.8 [RBG resolution of 4 bits for each primary].
region
element where the value of the alpha component of the region's computed value for the
tts:backgroundColor
property is not zero (0).tts:backgroundColor
is specified distinctly for a region, a paragraph selected into
that region, and a span of text in that paragraph.<region xml:id="r1" tts:backgroundColor="#00000000"/> ... <p region="r1" tts:backgroundColor="#1049edff"> Twinkle, twinkle, little bat!<br/> How <span tts:backgroundColor="#ed1078ff">I wonder</span> where you're at! </p>
tts:color
attribute that does not conform to the #rrggbbaa
expression format as defined by
[TTML10], Section 8.3.2.tts:color
attribute.These colors are identical to those identified in the CEA708-D, Section 8.8 [RBG resolution of 4 bits for each primary].
region
element where the computed values of the tts:origin
and
tts:extent
properties would result in the region extending outside of the root container.In the context of this document, the related media object [TTML10SE] is assumed to be video media, and, therefore, have an associated origin and extent on some display device.
This section is non-normative.
This profile supports the following caption styles:
Pop-up style captions are typically characterized by small blocks of text that appear all at once.
Roll-up style captions are typically characterized by words (or small groups of letters) appearing sequentially, so that a line fills up incrementally, and then as new lines are added the upper lines are scrolled out of view.
A Paint-on caption typically appears on the screen one character at a time and is displayed like a Pop-up caption.
These caption styles are further elucidated by examples below and by [TTML10SE] Appendix N, Common Caption Style Examples.
<?xml version="1.0" encoding="utf-8"?> <tt xml:lang="en-us" xmlns="http://www.w3.org/ns/ttml" xmlns:s="http://www.w3.org/ns/ttml#styling" xmlns:p="http://www.w3.org/ns/ttml#parameter"> <head> <p:profile use="http://www.w3.org/ns/ttml/profile/sdp-us"/> <styling> <!-- A typical transparent region with centered text that has an outline --> <style xml:id="bottomMidStyle" s:textAlign="center" s:textOutline="#000000ff 5%" s:backgroundColor="#00000000" s:color="#ffffffff" s:origin='20% 58%' s:extent='60% 18%'/> </styling> <layout> <!-- typical 'Pop-up' type region --> <region xml:id="bottomMid" style="bottomMidStyle" /> </layout> </head> <body> <div style="defaultFont"> <p region="bottomMid" begin='00:00:00.101' end='00:00:03.000'> This is a Pop-up caption. </p> </div> </body> </tt>
<style xml:id="bottomMidStyle" s:textAlign="center" s:textOutline="black 1px" s:backgroundColor="transparent" s:color="#ffffffff" s:origin='20% 58%' s:extent='60% 18%'/> <style xml:id="topMidStyle" s:textAlign="center" s:textOutline="black 1px" s:backgroundColor="transparent" s:color="#ffffffff" s:origin='20% 10%' s:extent='60% 18%'/>
<?xml version="1.0" encoding="utf-8"?> <tt xml:lang="en-us" xmlns="http://www.w3.org/ns/ttml" xmlns:s="http://www.w3.org/ns/ttml#styling" xmlns:p="http://www.w3.org/ns/ttml#parameter"> <head> <p:profile use="http://www.w3.org/ns/ttml/profile/sdp-us"/> <styling> <style xml:id="s1" s:display="none" s:extent='40% 18%'/> </styling> <layout> <region xml:id="r1" style="s1"> <set begin='00:00:10.000' end='00:00:10.330' s:display='auto'/> <set begin='00:00:10.000' end='00:00:10.330' s:origin='10% 10%'/> <set begin='00:00:11.670' end='00:00:12.000' s:display='auto'/> <set begin='00:00:11.670' end='00:00:12.000' s:origin='10% 10%'/> </region> <region xml:id="r2" style="s1"> <set begin='00:00:10.330' end='00:00:10.670' s:display='auto'/> <set begin='00:00:10.330' end='00:00:10.670' s:origin='50% 10%'/> <set begin='00:00:11.670' end='00:00:12.000' s:display='auto'/> <set begin='00:00:11.670' end='00:00:12.000' s:origin='50% 10%'/> </region> <region xml:id="r3" style="s1"> <set begin='00:00:10.670' end='00:00:11.000' s:display='auto'/> <set begin='00:00:10.670' end='00:00:11.000' s:origin='10% 78%'/> <set begin='00:00:11.670' end='00:00:12.000' s:display='auto'/> <set begin='00:00:11.670' end='00:00:12.000' s:origin='10% 78%'/> </region> <region xml:id="r4" style="s1"> <set begin='00:00:11.000' end='00:00:11.330' s:display='auto'/> <set begin='00:00:11.000' end='00:00:11.330' s:origin='50% 78%'/> <set begin='00:00:11.670' end='00:00:12.000' s:display='auto'/> <set begin='00:00:11.670' end='00:00:12.000' s:origin='50% 78%'/> </region> </layout> </head> <body> <div> <!--four speakers count off, and then all call 'Jump' together --> <p begin='00:00:10.000' end='00:00:10.330' region="r1" >One</p> <p begin='00:00:10.330' end='00:00:10.670' region="r2" >Two</p> <p begin='00:00:10.670' end='00:00:11.000' region="r3">Three</p> <p begin='00:00:11.000' end='00:00:11.330' region="r4" >Four</p> <p begin='00:00:11.670' end='00:00:12.000' region="r1" >Jump!</p> <p begin='00:00:11.670' end='00:00:12.000' region="r2" >Jump!</p> <p begin='00:00:11.670' end='00:00:12.000' region="r3">Jump!</p> <p begin='00:00:11.670' end='00:00:12.000' region="r4" >Jump!</p> </div> </body> </tt>
tts:fontFamily
attribute whose value is not one of the following:default
monospaceSerif
proportionalSerif
monospaceSansSerif
proportionalSansSerif
casual
cursive
smallCaps
Values of tts:fontFamily
that do not not correspond to generic font family names in [TTML10], such as casual
, cursive
and smallCaps
, may be used. These are to be interpreted as local font names, which, if not available, the default
font family is to be used.
tts:fontSize
attribute using a value that is not one of the
following values: 50%
, 75%
, 100%
, 150%
or 200%
.Use of a font size of less than 75%, e.g., 50%, may result in unreadable content for the end user.
If a specific font size is not supported, then follow the semantics for a presentation processor defined in [TTML10], Section 8.2.9.
Constraining the root container extent to the active video area means that the default font size of 1c and the default cell grid of 32 x 15 (as specified in TTML 1.0) implies an initial font height of 6.67% of the video height.
region
element which has a descendant style
element.The constraints in this section result in a document that contains style blocks that are complete and self-contained.
These requirements accommodate content originated in Europe but displayed in the US, as well as content displayed using 16:9 format.
p
element would be selected into the
same region in a given synchronic intermediate document.The style properties of a region and the content selected into the region impact how selected text flows into a region, e.g., selected text may flow outside of the region such as on a mobile device.
Constraining a region to select no more than one p
element logically places content from two different speakers into different region(s).
<p>I always get the fuzzy end<br/>of the lollipop.</p>
When a document author wants to construct a single phrase for a speaker with more than one line of text in a region, a br
element may be used within a p
element. See the previous example for one speaker with more than one line.
clock-time
that matches either of the following patterns: hh:mm:ss.mss
or hh:mm:ss:ff
,
where hh
denotes hours (00-23), mm
denotes minutes (00-59), ss
denotes seconds (00-59),
mss
denotes milliseconds (000-999), and ff
denotes frames (00-frameRate - 1).hh:mm:ss.mss
format, the following constraints apply:The phrase milliseconds component above refers to a particular use of the fraction
of a clock-time
time expression as defined by [TTML10] Section 10.3.1.
<p begin='00:00:01.000' end='00:00:11.123' region="r1" >Test</p>
hh:mm:ss:ff
format, the following constraints apply:ttp:frameRate
attribute must be present on the tt
element.ttp:frameRateMultiplier
attribute may be present on the tt
element.<tt p:frameRate='30' p:frameRateMultiplier='1000 1001' ...> ... <p begin='00:00:01:00' end='00:00:11:22' region="r1" >Test</p>
dur
attribute is specified that is not a p
or span
element.set
element that is not a child of a region
or span
element.set
child element of a region
element that specifies a property to be
animated other than: tts:display
, tts:origin
, or tts:extent
.set
child element of a span
element that specifies a property to be
animated other than: tts:color
.set
child elements.Content Authors must adhere to and presentation processors must support the following constraints:
Constraints on reduced or simplified content are outside of this profile. External labeling can be used to support the end user's capability to select and use captions when available for:
For example, external labeling can be used to identify simplified, reduced, or other language supported content on a text track in HTML5. Such labeling can also be used to identify when large font size is applied to content. Requirements to support user preview and retention of default or user defined settings of selected text are outside of the scope of this profile. These requirements are relevant in the environment to which the captions are deployed.
Presentation processors must support the ability of the end user to:
An end user override of background color is applied to the value of the tts:backgroundColor
property
in the applicable computed style set.
An end user override of foreground color is applied to the value of the tts:color
property
in the applicable computed style set.
default
, monospace
, monospaceSansSerif
, proportionalSerif
,
proportionalSansSerif
.An end user override of font family is applied to the value of the tts:fontFamily
property
in the applicable computed style set.
An end user override of font style is applied to the value of the tts:fontStyle
property
in the applicable computed style set.
An end user override of font size is applied to the value of the tts:fontSize
property
in the applicable computed style set.
An end user override of text decoration effects is applied to the value of the tts:textDecoration
and/or
tts:textOutline
properties in the applicable computed style set.
Style overrides must be applied to the result of step 2 [resolve computed styles] of [TTML10], Section 8.4.4.4, Style Resolution Process.
Other details of support for end user overrides, including the means by which overrides are presented to and performed by the end user, are not specified by this profile. Similarly, the sets of choices of values for end user overrides are not specified by this profile.
A presentation processor may allow an end user to select override styles that are not explicitly supported by TTML. For example, it may allow for text decoration effects, font styles, and font families to be selected that are not defined by TTML itself.
An implementer of a presentation processor is advised to consult [CEA708] to obtain additional information about override styles.
The following TTML profile definition formally defines the SDP US profile, designated by the profile designator
http://www.w3.org/ns/ttml/profile/sdp-us
.
<?xml version="1.0" encoding="utf-8"?> <profile xmlns="http://www.w3.org/ns/ttml#parameter"> <features xml:base="http://www.w3.org/ns/ttml/feature/"> <!-- required (mandatory) feature support --> <feature value="required">#animation</feature> <feature value="required">#backgroundColor-block</feature> <feature value="required">#backgroundColor-inline</feature> <feature value="required">#color</feature> <feature value="required">#content</feature> <feature value="required">#core</feature> <feature value="required">#display-region</feature> <feature value="required">#displayAlign</feature> <feature value="required">#extent-region</feature> <feature value="required">#fontFamily-generic</feature> <feature value="required">#fontSize</feature> <feature value="required">#fontStyle-italic</feature> <feature value="required">#frameRate</feature> <feature value="required">#frameRateMultiplier</feature> <feature value="required">#layout</feature> <feature value="required">#length-percentage</feature> <feature value="required">#length-positive</feature> <feature value="required">#lineBreak-uax14</feature> <feature value="required">#presentation</feature> <feature value="required">#profile</feature> <feature value="required">#structure</feature> <feature value="required">#styling</feature> <feature value="required">#styling-inheritance-content</feature> <feature value="required">#styling-inheritance-region</feature> <feature value="required">#styling-inline</feature> <feature value="required">#styling-referential</feature> <feature value="required">#textAlign-absolute</feature> <feature value="required">#textDecoration-under</feature> <feature value="required">#textOutline-unblurred</feature> <feature value="required">#time-offset</feature> <feature value="required">#timing</feature> <feature value="required">#writingMode-horizontal-lr</feature> </features> </profile>
The semantics defined by [TTML10] Section 6.1.1 apply with regard to the presence of a reference to other standard or non-standard profiles. In particular, if an additional, non-standard profile is specified for use by a document and is not dereferencable by the presentation processor, then the document must not be further processed without an explicit override from the end user.
The semantics defined by [TTML10] Section 6.1.3 apply if some standard or non-standard feature is required, the feature is present in the document, and the presentation processor does not support that feature. In this case also, the document must not be further processed without an explicit override from the end user.
If a feature is present in a document and support for that feature is not required by the profile(s) referenced (or defined) by the document, and if the presentation processor does not support or otherwise recognize that feature, then the feature must be ignored.
The casual, cursive and smallCaps generic font families are suggested for consideration in a future version of TTML.
Additional character edge features for raised, depressed, and drop shadowed edges are suggested for consideration in a future version of TTML.
Consideration may be given to defining a rendering model that accounts for drawing performance.
A key is provided that maps the US Government technical requirements for closed captions to the constrained features of this profile.
Presentation | #animation (set) #display-region #displayAlign #extent-region #frameRate #frameRateMultiplier #layout #length-percentage #length-positive #lineBreak-uax14 #textAlign-absolute #time-offset #timing #writingMode-horizontal-lr |
Character color | #animation #color |
Character opacity | #color |
Character size | #fontSize #fontStyle-italic #textDecoration-underline |
Fonts | #fontFamily-generic #fontStyle-italic |
Caption background color and opacity | #backgroundColor-* |
Character edge attributes | #textOutline-unblurred |
Caption window color | #backgroundColor-* |
Language | #profile |
Preview setting and retention | See Other Constraints, |
A presentation processor follows the semantics expected for use of Unicode code points as stated in this section. The exact glyph is presentation processor dependent.
_0 | _1 | _2 | _3 | _4 | _5 | _6 | _7 | _8 | _9 | _A | _B | _C | _D | _E | _F | |
! | " | # | $ | % | & | ' | ( | ) | * | + | , | - | . | / | ||
U+002_ | 0020 | 0021 | 0022 | 0023 | 0024 | 0025 | 0026 | 0027 | 0028 | 0029 | 002A | 002B | 002C | 002D | 002E | 002F |
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | : | ; | < | = | > | ? | |
U+003_ | 0030 | 0031 | 0032 | 0033 | 0034 | 0035 | 0036 | 0037 | 0038 | 0039 | 003A | 003B | 003C | 003D | 003E | 003F |
@ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | |
U+004_ | 0040 | 0041 | 0042 | 0043 | 0044 | 0045 | 0046 | 0047 | 0048 | 0049 | 004A | 004B | 004C | 004D | 004E | 004F |
P | Q | R | S | T | U | V | W | X | Y | Z | [ | \ | ] | ^ | _ | |
U+005_ | 0050 | 0051 | 0052 | 0053 | 0054 | 0055 | 0056 | 0057 | 0058 | 0059 | 005A | 005B | 005C | 005D | 005E | 005F |
` | a | b | c | d | e | f | g | h | i | j | k | l | m | n | o | |
U+006_ | 0060 | 0061 | 0062 | 0063 | 0064 | 0065 | 0066 | 0067 | 0068 | 0069 | 006A | 006B | 006C | 006D | 006E | 006F |
p | q | r | s | t | u | v | w | x | y | z | { | | | } | ~ | ♪ | |
U+007_ | 0070 | 0071 | 0072 | 0073 | 0074 | 0075 | 0076 | 0077 | 0078 | 0079 | 007A | 007B | 007C | 007D | 007E | 007F |
¡ | ¢ | £ | ¤ | ¥ | ¦ | § | ¨ | © | ª | « | ¬ | | ® | ¯ | ||
U+00A_ | 00A0 | 00A1 | 00A2 | 00A3 | 00A4 | 00A5 | 00A6 | 00A7 | 00A8 | 00A9 | 00AA | 00AB | 00AC | 00AD | 00AE | 00AF |
° | ± | ² | ³ | ´ | µ | ¶ | · | ¸ | ¹ | º | » | ¼ | ½ | ¾ | ¿ | |
U+00B_ | 00B0 | 00B1 | 00B2 | 00B3 | 00B4 | 00B5 | 00B6 | 00B7 | 00B8 | 00B9 | 00BA | 00BB | 00BC | 00BD | 00BE | 00BF |
À | Á | Â | Ã | Ä | Å | Æ | Ç | È | É | Ê | Ë | Ì | Í | Î | Ï | |
U+00C_ | 00C0 | 00C1 | 00C2 | 00C3 | 00C4 | 00C5 | 00C6 | 00C7 | 00C8 | 00C9 | 00CA | 00CB | 00CC | 00CD | 00CE | 00CF |
Ð | Ñ | Ò | Ó | Ô | Õ | Ö | × | Ø | Ù | Ú | Û | Ü | Ý | Þ | ß | |
U+00D_ | 00D0 | 00D1 | 00D2 | 00D3 | 00D4 | 00D5 | 00D6 | 00D7 | 00D8 | 00D9 | 00DA | 00DB | 00DC | 00DD | 00DE | 00DF |
à | á | â | ã | ä | å | æ | ç | è | é | ê | ë | ì | í | î | ï | |
U+00E_ | 00E0 | 00E1 | 00E2 | 00E3 | 00E4 | 00E5 | 00E6 | 00E7 | 00E8 | 00E9 | 00EA | 00EB | 00EC | 00ED | 00EE | 00EF |
ð | ñ | ò | ó | ô | õ | ö | ÷ | ø | ù | ú | û | ü | ý | þ | ÿ | |
U+00F_ | 00F0 | 00F1 | 00F2 | 00F3 | 00F4 | 00F5 | 00F6 | 00F7 | 00F8 | 00F9 | 00FA | 00FB | 00FC | 00FD | 00FE | 00FF |
Œ | œ | |||||||||||||||
U+015_ | 0152 | 0153 | ||||||||||||||
Š | š | |||||||||||||||
U+016_ | 0160 | 0161 | ||||||||||||||
Ÿ | Ž | ž | ||||||||||||||
U+017_ | 0178 | 017D | 017E | |||||||||||||
ƒ | ||||||||||||||||
U+019_ | 0192 | |||||||||||||||
˜ | ||||||||||||||||
U+02D_ | 02DC | |||||||||||||||
‐ | ― | ‖ | ||||||||||||||
U+201_ | 2010 | 2015 | 2016 | |||||||||||||
‧ | ||||||||||||||||
U+202_ | 2027 | |||||||||||||||
‰ | › | |||||||||||||||
U+203_ | 2030 | 203A | ||||||||||||||
₡ | ₢ | € | ||||||||||||||
U+20A_ | 20A1 | 20A2 | 20AC | |||||||||||||
₳ | ||||||||||||||||
U+20B_ | 20B3 | |||||||||||||||
°C | °F | |||||||||||||||
U+210_ | 2103 | 2109 | ||||||||||||||
⅓ | ⅟ | |||||||||||||||
U+215_ | 2153 | 215F | ||||||||||||||
□ | ||||||||||||||||
U+25A_ | 25A1 | |||||||||||||||
♩ | ♫ | |||||||||||||||
U+266_ | 2669 | 266B |
Presentation processors may also provide glyph coverage for additional Unicode code points.
For color values of the form #rrggbbaa
, presentation processors must support combinations where the red, green, and blue components are either 00
or FF
; and the alpha component are 00
, 54
, A8
or FF
, e.g, #00FFFF54. Additionally, presentation processors should support values for red, green, and blue of 54
or A8
, and may support all possible values between 00
and FF
.
Color | Value |
---|---|
Black | #000000ff |
White | #fffffffff |
Red | #ff0000ff |
Green | #00ff00ff |
Blue | #0000ffff |
Yellow | #ffff00ff |
Magenta | #ff00ffff |
Cyan | #00ffffff |
Many thanks to Robin Berjon for providing the respec.js tool used to format this document.