Converting SRT to INTEROP/SMPTE XML in Subtitle Edit

Changing formats in subtitle edit

In Subtitle Edit you can convert subtitle formats like SRT, PAC, STL, TTML XML, Timed Text, DVD subtitles, and more.

To change from one format to another you would normally

  • open the file in subtitle edit
  • change the format
  • remove formatting that is not needed (Edit-replace)
  • save

Some formats like SMPTE D-Cinema XML 2014 are more advanced.

Checking and fixing subtitles in Subtitle Edit

Subtitle Edit can also be used to check and fix subtitles.

  • Add the video file and check if the subtitles are in sync.
  • If the subtitles are in the wrong frame rate you can change the frame rate (Synchronization – change frame rate)
  • If the subtitles have the wrong starting point, (Adjust – Set start and offset the rest)
  • Check max characters per seconds (CPS) and minimum length of subtitles. Subtitles usually have max 17 or 20 CPS and optimal CPS 12. The minimum length is normally 1 second. CPS can be set in Options – Settings
  • Fixed subtitles can be burned into the video in Subtitle Edit or you can import the SRT in Resolve and burn them in


Converting an SRT file to an INTEROP/SMPTE XML DCP subtitle file in Subtitle Edit

Choose the D-cinema XML 2014 format

In the Toolbar choose

  • Format: SMPTE 2014. Use SMPTE 2014 instead of SMPTE 2010 to pass DCP validation tools.
  • Encoding: UTF-8 with BOM

Change the XML properties

File – DcinemaSmpte2014 properties


Choose Movie title and reel number

  • Make one XML for each reel with the correct reel nr.

Generate unique UUIDs

  • Click on the Subtitle ID Generate ID button
  • Click on the URI Generate button

Choose Edit Rate and Time Code Rate

  • Change it to the frame rate of the DCP
  • Choose 25 FPS to get a 25 FPS time code when making a 25 FPS SMPTE DCP. Because the timecode is frame-based it is important to change it in subtitle edit and not manually.

Choose Top/bottom margin and font size

  • Minimum Top/bottom margin value: 8. 10 are also used.
  • Default font size: 42. 38 – 40 are also used.

Choose font

Arial.ttf is the normal subtitle font. The max size is 640 KB.

Rename the font to the font URI UUID that was generated.

Example:

Rename arial.ttf to 03048fd9-d51c-4050-bfbe-933320810bdd and place it in the same folder as the XML file.

Choose Color, Effect, and Effect Color

Color is usually white (FFFFFFFF). Some use a warmer white to match the white point used in the movie.

The default effect in SMPTE 2014 is shadow.

Effect color is usually black (FF000000)

Choose Fade up/down Time

The default is 0

Save the XML

To activate the Dcinema properties, make a change in the subtitles. Then save the XML, and change it back.

  • File – Save as
  • Format D-Cinema SMPTE 2014 XML

Example SMPTE 2014 XML

<?xml version="1.0" encoding="UTF-8"?>
<SubtitleReel xmlns="http://www.smpte-ra.org/schemas/428-7/2014/DCST">
  <Id>urn:uuid:5fc5a0af-d2ba-4921-9047-27e509637387</Id>
  <ContentTitleText>title</ContentTitleText>
  <AnnotationText>This is a subtitle file</AnnotationText>
  <IssueDate>2024-04-08T15:45:43</IssueDate>
  <ReelNumber>1</ReelNumber>
  <Language>en</Language>
  <EditRate>24 1</EditRate>
  <TimeCodeRate>24</TimeCodeRate>
  <StartTime>00:00:00:00</StartTime>
  <LoadFont ID="Arial">urn:uuid:857176ec-629d-4a17-a000-9fa21ed8c5e5</LoadFont>
  <SubtitleList>
    <Font ID="Arial" Size="42" Weight="normal" Color="FFFFFFFF" Effect="shadow" EffectColor="FF000000">
      <Subtitle SpotNumber="1" FadeUpTime="00:00:00:00" FadeDownTime="00:00:00:00" TimeIn="00:00:01:00" TimeOut="00:00:03:00">
        <Text Vposition="14" Valign="bottom" Halign="center" Direction="ltr">-Test</Text>
        <Text Vposition="8" Valign="bottom" Halign="center" Direction="ltr">-Test</Text>
      </Subtitle>
    </Font>
  </SubtitleList>
</SubtitleReel>

Passing DCP Validation tools

To pass validation in DCP validation tools like Wailua and Easydcp the XML need to follow specific rules

Short xmlns schema

ST 428-7:2014 uses only the short xmlns schema and this is required by some DCP validation tools

<SubtitleReel xmlns="http://www.smpte-ra.org/schemas/428-7/2014/DCST">


Issue date without UTC timezone

Using Issue Date in this format yyyy-mm-ddThh:mm:ss instead of the UTC timezone used in the example in ST 428-7:2014 is required by some DCP validation tools.

  <IssueDate>2021-10-17T09:25:42</IssueDate>
  

Each XML file must have the correct reel number

<ReelNumber>1</ReelNumber>

Every reel in a DCP must have subtitle XML if one reel has one.

Use a XML with a blank subtitle in logo reels .

Start time must be 00:00:00:00

 <StartTime>00:00:00:00</StartTime>

RDD-52 Validation rules

To pass RDD-52: validation in Easydcp and other tools you need to follow some rules:

A minimum duration of 15 frames with a minimum duration of 2 frames between subtitles

Setting a minimum duration of 2 frames between subtitles can be automatically set in Subtitle Edit. Tools – Apply minimum gap between subtitles.

The first subtitle in the first reel need to start at 4 seconds or later.

Only the first reel need to have the first subtitle at a time code at 4 second or later.

Recommended limit of 52 characters per line, max 79, max 3 lines

Using 52 as max characters is best. Using more will look wrong and if you use font size 42 on a 1.33:1 film you will have less room than using font size 40 on a 2.39:1 film.

Adding the XML to a DCP

To add an SMPTE 2014 XML subtitle file to an SMPTE DCP, you need a folder with the XML file and font.

When the DCP is made the XML file and font will be combined into an MXF file.

In an Interop DCP, the XML file and Font are placed in a subfolder when the DCP is made.

Interop properties

The properties for Interop TI DLP are similar to SMPTE 2010/2014.
It does not have Edit Rate and Time Code Rate and the Font URI is just usually Arial.ttf

<?xml version="1.0" encoding="UTF-8"?>
<DCSubtitle Version="1.0">
  <SubtitleID>efdcb1d6-82bb-4399-b3c0-65b81323687d</SubtitleID>
  <MovieTitle>title</MovieTitle>
  <ReelNumber>1</ReelNumber>
  <Language>en</Language>
  <LoadFont URI="Arial.ttf" Id="Arial" />
    <Font Id="Arial" Color="FFFFFFFF" Effect="shadow" EffectColor="FF000000" Italic="no" Underlined="no" Script="normal" Size="42">
    <Subtitle SpotNumber="1" FadeUpTime="0" FadeDownTime="0" TimeIn="00:00:01:000" TimeOut="00:00:03:000">
      <Text VPosition="14" VAlign="bottom" HAlign="center" Direction="horizontal">-Test</Text>
      <Text VPosition="8" VAlign="bottom" HAlign="center" Direction="horizontal">-Test</Text>
    </Subtitle>
  </Font>
</DCSubtitle>

Changing font size manually

When the font is 42 and the bottom margin is 8, Subtitle Edit uses 6 percent between the two subtitle lines. They are on 8/14.
If you choose 40, Subtitle Edit changes them to 5 percent apart so they are on 8/13.
If you want font size 40 and 8/14 lines you can edit the XML in a text editor like BBEdit (mac) or notepad ++(win)
Replace:
Size=”42
with
Size=”40″

Moving subtitles up and to the sides

If you want to move a subtitle up, to avoid hitting a burned-in title you can edit the XML:
Text Vposition=”14″
Text Vposition=”8″
to something like
Text Vposition=26″
Text Vposition=”20″

The vposition formatting will reset if you edit the XML again in Subtitle Edit.



To move subtitles to the sides you can use space/whitespace.

To move the text to the right use space before the text:

<Text Vposition="8" Valign="bottom" Halign="center" Direction="ltr">    test</Text>

To move text to the left use space after the text:

<Text Vposition="8" Valign="bottom" Halign="center" Direction="ltr">test       </Text>

Testing XML subtitles

Testing in DCP-o-matic player with soft subtitle support

Checking subtitles in Easydcp Plus

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.