TTML data for TimedText captions problem

Aug 6, 2010 at 8:33 AM
Hello I'm trying to display subtitles with SMFPlayer. The subtitles are delivered in manifest file as base64 encoded data inside "f" elements of a text stream. I can see that the base64 data is properly decoded to XML string and are delivered to InStreamTimedTextPlugin (I can see that in DataReceived event). But then I got "Parsing of DFXP data failed: TimedTextMarkerParser.ParseMarkerCollection received invalid input" on logging console. How exactly the XML for subtitle markers should look like? I tried the example "tt" node from here http://www.w3.org/TR/ttaf1-dfxp/ with no luck.
Aug 9, 2010 at 10:41 AM

Eventually I figured it out. It seems that the subtitle region has to be defined. The example XML should look like:

<?xml version="1.0" encoding="utf-8" ?>
<tt xml:lang="" xmlns="http://www.w3.org/ns/ttml" xmlns:tts="http://www.w3.org/ns/ttml#styling">
  <head>
    <layout>
      <region xml:id="default region">
        <style tts:backgroundColor="Black"/>
        <style tts:color="White"/>
        <style tts:fontSize="14px"/>
        <style tts:textAlign="center"/>
      </region>
    </layout>
  </head>
  <body region="default region">
    <div xml:id="d1" begin="0s" end="5s">
      <p xml:id="p1"><span tts:color="Red">Highlighted text</span><br/>More text...</p>
    </div>
  </body>
</tt>
I noticed that if I define other regions than "default region" then they are displayed, but the text appears on the default region anyway. Some other functionalities described here http://www.w3.org/TR/ttaf1-dfxp are probably not supported in current release of SMF.