110 likes | 258 Views
2/13/2013. TTML Aspect Ratio Issue. Positioning Example. <? xml version = " 1.0 " encoding = " utf-8 " ?> < tt xml:lang = " en " xmlns = " http://www.w3.org/ns/ttml " xmlns:tts = " http://www.w3.org/ns/ttml#styling " xmlns:ttm = " http://www.w3.org/ns/ttml#metadata "
E N D
2/13/2013 TTML Aspect Ratio Issue
Positioning Example <?xmlversion="1.0"encoding="utf-8"?> <ttxml:lang="en" xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:ttp="http://www.w3.org/ns/ttml#parameter" tts:extent="320px 240px" ttp:pixelAspectRatio="1 1"> <head> <layout> <regionxml:id="topLeft"> <styletts:origin="0% 0%"tts:extent="100% 100%"tts:displayAlign="before"tts:textAlign="start"/> </region> <regionxml:id="middleCenter"> <styletts:origin="0% 0%"tts:extent="100% 100%"tts:displayAlign="center"tts:textAlign="center"/> </region> <regionxml:id="bottomRight"> <styletts:origin="0% 0%"tts:extent="100% 100%"tts:displayAlign="after"tts:textAlign="end"/> </region> </layout> </head> <body> <div> <pbegin="0s"end="1s"region="topLeft">Top Left</p> <pbegin="0s"end="1s"region="middleCenter">Middle Center</p> <pbegin="0s"end="1s"region="bottomRight">Bottom Right</p> </div> </body> </tt>
Authoring Intent (4x3 aspect ratio) Top Left Middle Center 240px Bottom Right 320px
Authoring Constraints • The final aspect ratio of the video is not known at the time the captions are authored. • The captions are authored in the 4x3 space to be conservative. • In addition, the authored captions may be used on different aspect ratio videos in different markets. • Ex: 4x3 video in Latin America, 16x9 video in US for the same movie • Ideally, the captions would not need to be re-authored or transformed for the different aspect ratio videos.
Sample Player Render • 16x9 720p version of the same video (1280x720) • Rendered with green letterboxing on a 16x10 display (1280x800)
Possible Rendering Interpretations • Scale authored pixels to video resolution • Scale authored pixels to display resolution • Preserve authored pixels and render inside the video resolution • Preserve authored aspect ratio (4x3) and scale to the video resolution
1. Scale authored pixels to video resolution Top Left Middle Center Bottom Right
2. Scale authored pixels to display resolution Top Left Middle Center Bottom Right
3. Preserve authored pixels and render them inside the video resolution Top Left Middle Center Bottom Right 320x240px
4. Preserve authored aspect ratio (4x3) and scale to the video resolution Top Left Middle Center 4x3 320x240px Bottom Right
Resolving the Specification Ambiguity • Proposal #1: Use extent and pixelAspectRatio on TT element to describe this behavior • Specify that the aspect ratio of the root container region is defined by the extent and the pixelAspectRatio placed on the TT element. • The root container region should be centered in the caption display area. • Proposal #2: Define a new tts:aspectRatio attribute • The aspect ratio of the root container region is specified if this attribute is placed on the TT element.