This is a preliminary notification. By March 2017, Netflix will be deploying some additional TTML schema checks.

Our updated TTML parser will utilize TTML standard schemas to perform the first level of source validation. We completed a recursive survey of many partners' TTML files and the following errors were the most consistently observed. Please take the time to review these errors within your facility and ensure your TTML files are updated accordingly, prior to these new checks being deployed.

xml:lang not defined. This property must be defined and is expected to be defined on the top level tt element. Although xml:lang can be the empty string (“”), a better value would represent a valid language code consistent with the contents of the file.

xml:lang not properly formatted. For example, the language code pt_BR would fail validations since it was defined using an underscore and this is not valid with respect to RFC 4646: Tags for Identifying Languages. The correct language code would include a dash instead: pt-BR.

id vs xml:id. id was once allowed in an older version of the TTML specification but this predated even the approved TTML v1 specification; id should simply be replaced with xml:id.

xml:id not properly formatted. The values are expected to be alpha-numeric with the first character consisting of a non-numeric value.

Same xml:id value used more than once. This attribute must be unique within the document to ensure proper de-referencing of the style reference. 

Invalid attributes. The schema validator will ensure all attributes defined are valid with respect to the TTML specification. There were many instances of non-TTML attributes being defined within the source (e.g. ccol, ccrow, etc).  Attributes that are not defined within the TTML specification should be removed.

TTML schema compliance can be validated with the Skynav TTML Verifier: http://www.skynav.com:8080/ttv/verify


Example TTML:

<?xml version="1.0" encoding="utf-8"?>
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:ttp="http://www.w3.org/ns/ttml#parameter" xmlns:tts="http://www.w3.org/ns/ttml#styling" xmlns:ttm="http://www.w3.org/ns/ttml#metadata" xmlns:xml="http://www.w3.org/XML/1998/namespace" ttp:timeBase="media" ttp:frameRate="24" xml:lang="en">
    <head>
        <metadata>
            <ttm:title>Sample TTML</ttm:title>
        </metadata>
        <styling>
            <style xml:id="s1" tts:textAlign="center" tts:fontFamily="Arial" tts:fontSize="100%"/>
        </styling>
        <layout>
            <region xml:id="bottom" tts:displayAlign="after" tts:extent="80% 40%" tts:origin="10% 50%"/>
            <region xml:id="top" tts:displayAlign="before" tts:extent="80% 40%" tts:origin="10% 10%"/>
        </layout>
    </head>
    <body region="bottom" style="s1">
        <div>
            <p xml:id="subtitle1" begin="00:00:01.375" end="00:00:05.750" style="s1" region="top" >TOP SAMPLE TEXT</p>
            <p xml:id="subtitle2" begin="00:00:05.916" end="00:00:10.216" style="s1" >BOTTOM SAMPLE TEXT</p>
            <p xml:id="subtitle3" begin="00:00:10.418" end="00:00:15.083" style="s1" region="top" >Top Hello</p>
            <p xml:id="subtitle4" begin="00:00:15.391" end="00:00:20.558" style="s1" >Bottom Hello</p>
            <p xml:id="subtitle5" begin="00:00:20.750" end="00:00:25.041" style="s1" >He had a great story.</p>
            <p xml:id="subtitle6" begin="00:00:25.875" end="00:00:30.166" style="s1" >- Did he tell you what it was about?<br/>- He did.</p>
            <p xml:id="subtitle7" begin="00:00:30.416" end="00:00:35.558" style="s1" >In 1992, a shipping container<br/>fell overboard</p>
            <p xml:id="subtitle8" begin="00:00:35.858" end="00:00:40.091" style="s1" >on its way from China</p>
            <p xml:id="subtitle9" begin="00:00:40.341" end="00:00:45.133" style="s1" >to the United States,<br/>releasing 29,000 rubber ducks</p>
            <p xml:id="subtitle10" begin="00:00:45.325" end="00:00:50.041" style="s1" >into the Pacific Ocean.</p>
        </div>
    </body>
</tt>

Was this article helpful?
22 out of 34 found this helpful