Using EditPad Pro to convert a TXT subtitle file to XML

The original file I received looked like this, and is a typical subtitle file as used by Adobe Encore.

1
00:00:03,030 –> 00:00:07,989
It brings me great pleasure to welcome to Stanford Jack Dorsey,

2
00:00:07,990 –> 00:00:11,419
who is as you know, the co-founder and chairman of the

3
00:00:11,420 –> 00:00:15,909
board of Twitter and the co-founder and CEO of Square.

 

To convert the file to a structured XML file for translation in SDL Studio I ran the following regular expressions (regex) in EditPad Pro.

1) Match the timecode and place

2)Find ID number
(^[\d]*) replace with<id>$1</id>

3)Find text line
(^.*^\w.*$) replace with<trans>$1</trans>

4)Place <xml> at start of file
\A  replace with <xml>

5) Place </xml> at end of file
\z  replace with </xml>

The resulting file then looks like this:

<xml>

<seg>1</seg>
<time>00:00:03,030 –> 00:00:07,989</time>
<trans>It brings me great pleasure to welcome to Stanford Jack Dorsey,</trans>

<seg>2</seg>
<time>00:00:07,990 –> 00:00:11,419</time>
<trans>who is as you know, the co-founder and chairman of the</trans>

<seg>3</seg>
<time>00:00:11,420 –> 00:00:15,909</time>
<trans>board of Twitter and the co-founder and CEO of Square.</trans>

</xml>

A new XML filetype can now be made in SDL studio to filter out the translatable text between the <trans> tags.

Posted in HTML & XML, Regular Expressions (RegEx), Subtitles & Captions | Comments Off

Adobe Encore Error when importing Subtitle Text File

ERROR MESSAGE: The subtitle or menu subpicture is too complex to be encoded

This error requires the re-setting of the margins when importing subtitles.

I got this frustrating error when I was importing a subtitle text file into Adobe Encore when preparing a multilingual DVD for a client. It turned out to be another known Encore bug which I remedied by doing the following:

Left Edge Margin is 72 by default, Right Edge margin is 648 by default.
The margin sizes need to be reset to 120, 600
The font size may need to be reduced too.

Problem importing subtitle file in Adobe Encore

Screen shot showing where the margins should be set

Posted in Subtitles & Captions, Troubleshooting & tips, Video Tips | Comments Off

Subtitles & Captions: Definitions

Q: Is there a difference between subtitles and captions? If there is, what is it?

The two terms ‘subtitles’ and ‘captions’ are often used interchangeably. They indicate that text is visible on the video screen. Strictly speaking there are differences in meaning.

Subtitles: are text versions of dialogue or narration which appear on the video, usually at the bottom center of the screen. These are often in translation.

Captions: in some countries (notably the USA), subtitles for the hard of hearing are refered to as captions. They will convey other information in addition to the dialogue, such as sound effects (Door slams, Police siren, sighs and coughs).

Both subtitles and captions can be created in ‘open’ and ‘closed’ formats. Open captions/subtitles are ‘burned on’ to the video and cannot be turned off. Closed captions/subtitles can be turned off, or switched to other languages by the user. DVDs usually have closed subtitles, which are accessed via a menu.

Posted in Subtitles & Captions | Comments Off