Share

Subtitle XML Elements

Subtitle XML files are text files that use the following elements. Use the following syntax to work with Subtitle XML files external to the Flame workstation.

In Flame-compliant subtitle XML file, the <!DOCTYPE> is subtitle.



<name></name>

DescriptionAn element that defines the name of the Subtitle XML file. This name appears as the name of the clip created when importing the subtitle XML file.
Attributesnone
Sample<name>French version: Day at the Races</name>


<rate></rate>

DescriptionA format element that describes the frame rate of the Subtitle XML clip that appears in Flame after importing the Subtitle XML file.

The frame rate must be that of the target sequence or the subtitles might slip timecode.

Attributesnone
Sample
<rate>59.94 NDF</rate>


<resolution></resolution>

DescriptionA unique element that wraps around all of the attributes determining the format of the clip when importing a Subtitle XML file. This clip can then be resized within Flame like any other clip, if necessary.

If any of these values differ from the target sequence, Flame will apply Resize Timeline FX to the subtitles.

Mandatory children

<width></width>

The width of the imported Subtitle XML clip. An integer.

<height></height>

The height of the imported Subtitle XML clip. An integer.

<depth></depth>

The bit depth of the imported Subtitle XML clip.

<aspect></aspect>

The aspect ratio of the imported Subtitle XML clip.

<scanformat></scanformat>

The scanformat of the imported Subtitle XML clip.

Sample
<resolution>
  <width>1920</width>
  <height>1080</height>
  <depth>8</depth>
  <aspect>1.778</aspect>
  <scanformat>default</scanformat>
</resolution>


<timecode></timecode>

DescriptionAn element that defines the timecode in and out points during which the subtitles occur. All the titles in the Subtitle XML file will occur during the timecode indicated here, with each title also having its own start and end point indicated within the title elements.
Mandatory children

<start></start>

The start timecode of the subtitle sequence.

<end></end>

The end timecode of the subtitle sequence.

Sample
<timecode>
<start>01:00:00;00</start>
<end>01:00:08;00</end>
</timecode>


<video></video>

DescriptionThe <video> element wraps around all of the <title> elements, which in turn contain the text and attributes of individual subtitles.
Mandatory children

<title></title>

The <title> element wraps around each subtitle, with its associated start and end time, text, and font style and position parameters.

Sample

<video>
<title>
    <start>01:00:01;00</start>
    <end>01:00:02;00</end>
    <text>This is a subtitle string</text>
    <font>Garamond</font>
    <size>20</size>
    <fontcolor>
      <alpha>255</alpha>
      <red>255</red>
      <green>255</green>
      <blue>255</blue>
    </fontcolor>
    <vertical>0</vertical>
    <horizontal>0</horizontal>
    <setup>/opt/Autodesk/project/test/text/paz.ttg</setup>
  </title>
</video>


<title></title>

Each <title></title> element defines a single subtitle which will appear as a Text Timeline FX applied to a gap once imported into Flame, and added to a sequence.

The font style, colour, size, and position parameters are overridden if a valid text setup file is referenced within the

element.

<start></start>

DescriptionThe start timecode of the current subtitle
Attributesnone
Sample
<start>01:00:01;00</start>

<end></end>

DescriptionThe end timecode of the current subtitle
Attributesnone
Sample
<end>01:00:02;00</end>

<text></text>

DescriptionThe text of the current subtitle

To insert a carriage return, add <&#13;> (without the brackets) to the text.

Attributesnone
Sample
<text>This is a&#13; subtitle string</text>

<font></font>

DescriptionThe font of the current subtitle. This value is overridden if a text setup file is referenced in the <setup> element.
Attributesnone
Sample
<font>Garamond</font>

<size></size>

DescriptionThe font size of the current subtitle. This value is overridden if a text setup file is referenced in the <setup> element.
Attributesnone
Sample
<size>20</size>

<fontcolor></fontcolor>

DescriptionThis element wraps around the font colour elements (<alpha>, <red>, <blue>, <green>) of the current subtitle. These values are overridden if a valid text setup file is referenced in the <setup> element.
Mandatory children

<alpha></alpha>

The <alpha> colour component of the font of the current subtitle.

<red></red>

The <red> colour component of the font of the current subtitle.

<green></green>

The <green> colour component of the font of the current subtitle.

<blue></blue>

The <blue> colour component of the font of the current subtitle.

Sample
<fontcolor>
  <alpha>255</alpha>
  <red>255</red>
  <green>255</green>
  <blue>255</blue>
</fontcolor>

<vertical></vertical>

DescriptionThe vertical text position of the current subtitle. This value is overridden if a text setup file is referenced in the <setup> element.
Attributesnone
Sample
<vertical>0</vertical>

<horizontal></horizontal>

DescriptionThe horizontal text position of the current subtitle. This value is overridden if a text setup file is referenced in the <setup> element.
Attributesnone
Sample
<horizontal>0</horizontal>

<setup></setup>

DescriptionThe <setup> element can point to a text setup file from which font style and position parameters will be used. The parameters from the text setup file override the formatting elements of the current <title> element.

Leave empty when not using a text setup file.

Attributesnone
Sample
<setup>/opt/Autodesk/project/test/text/paz.ttg</setup>

Was this information helpful?