53
The Subtitle Workshop Manual Subtitle Workshop version: 2.51 The ultimate subtitle editing tool! Copyright © 2001-2004 URUSoft. (All key shortcuts mentioned in this manual are based on the defaults) Chapter 1: Introduction to Subtitle Workshop o 1.1 General overview o 1.2 Reading & Writing engine 1.2.1 What is URUSoft Subtitle API? o 1.3 Visual overview o 1.4 Getting started 1.4.1 Loading a subtitle file 1.4.2 Loading a video file 1.4.3 Create a new file 1.4.4 Adding subtitles 1.4.5 Deleting subtitles 1.4.6 Manually edit a subtitle 1.4.7 Style and color tags 1.4.8 FPS and Input FPS o 1.5 Command line parameters o 1.6 Language files o 1.7 Custom formats Chapter 2: Time related features o 2.1 Framerate conversion o 2.2 Set delay o 2.3 Adjust subtitles 2.2.1 Method 1: simple adjust, first and last dialogs 2.2.2 Method 2: synchronize using two points 2.2.3 Method 3: adjust to synchronized subtitles 2.2.4 Method 4: advanced subtitle adjust o 2.4 Duration limits o 2.5 Time expander/reducer o 2.6 Read times from file o 2.7 Extend length o 2.8 Automatic durations o 2.9 Shift subtitles Chapter 3: Text & subtitles related features o 3.1 Smart line adjust o 3.2 Convert case

Subtitle Workshop Manual

Embed Size (px)

Citation preview

Page 1: Subtitle Workshop Manual

The Subtitle Workshop Manual

Subtitle Workshop version: 2.51

The ultimate subtitle editing tool!

Copyright © 2001-2004 URUSoft.

(All key shortcuts mentioned in this manual are based on the defaults)

Chapter 1: Introduction to Subtitle Workshopo 1.1 General overviewo 1.2 Reading & Writing engine

1.2.1 What is URUSoft Subtitle API?o 1.3 Visual overviewo 1.4 Getting started

1.4.1 Loading a subtitle file 1.4.2 Loading a video file 1.4.3 Create a new file 1.4.4 Adding subtitles 1.4.5 Deleting subtitles 1.4.6 Manually edit a subtitle 1.4.7 Style and color tags 1.4.8 FPS and Input FPS

o 1.5 Command line parameterso 1.6 Language fileso 1.7 Custom formats

Chapter 2: Time related featureso 2.1 Framerate conversiono 2.2 Set delayo 2.3 Adjust subtitles

2.2.1 Method 1: simple adjust, first and last dialogs 2.2.2 Method 2: synchronize using two points 2.2.3 Method 3: adjust to synchronized subtitles 2.2.4 Method 4: advanced subtitle adjust

o 2.4 Duration limitso 2.5 Time expander/reducero 2.6 Read times from fileo 2.7 Extend lengtho 2.8 Automatic durationso 2.9 Shift subtitles

Chapter 3: Text & subtitles related featureso 3.1 Smart line adjusto 3.2 Convert case

Page 2: Subtitle Workshop Manual

o 3.3 Unbreak subtitleso 3.4 Divide lineso 3.5 Set maximum line lengtho 3.6 Read texts from fileo 3.7 Combine subtitleso 3.8 Right-to-left

3.8.1 Reverse text 3.8.2 Fix punctuation

o 3.8 Sorto 3.10 Delete unnecessary linkso 3.11 Search & Replaceo 3.12 Marked subtitles

Chapter 4: Settings explainedo 4.1 General

4.1.1 Advanced 4.1.2 Charsets

o 4.2 Formatso 4.3 File typeso 4.4 Saveo 4.5 Video preview

4.5.1 Subtitleso 4.6 External preview

4.6.1 General 4.6.2 Advanced

o 4.7 Look 4.7.1 Program 4.7.2 List 4.7.3 Menu

Chapter 5: Toolso 5.1 Spell checko 5.2 Batch converto 5.3 Split subtitleso 5.4 Join subtitleso 5.5 Information and errors

5.5.1 Errors & fixes explained 5.5.2 Settings explained 5.5.3 OCR Scripts 5.5.4 Syntax of Regular Expressions

o 5.6 Add FPS from AVIo 5.7 External previewo 5.8 Internal Preview: The video engineo 5.9 SAMI Language Extractor

Frequently Asked Questions [FAQ] Contact information License

Chapter 1: Introduction to Subtitle Workshop

Page 3: Subtitle Workshop Manual

1.1 General overview

Subtitle Workshop is the most complete, efficient and convenient subtitle editing tool. Itsupports all the subtitle formats you need and has all the features you would want froma subtitle editing program. Subtitle Workshop makes subtitle creating/editing/convertingtasks almost a pleasure, the amicable and intuitive interface mixes easy to access menus& must have features with advanced functions and a remarkable speed and stability,drastically reducing subtitle editing time. It includes spell check function and anadvanced video preview feature which will ease the task even more. The best choice forthe beginner, expert or the fansubber. Have a try, and you'll forget the rest!.

Subtitle Workshop was originally thought in order to make subtitle editing very easy,but having all the necessary and not-so-necessary features that make the life of a subtitleeditor or translator easier. The visual interface is one of the many things thatcharacterizes Subtitle Workshop. Most of the options are indeed, self-explanatory soeven a kid can use this software.

Complete list of features:

Reading and writing engineo Based in URUSoft SubtitleAPI, so new formats can be easily added by

downloading an updated dll file.o Currently (version 1.05 of SubtitleAPI) supports around 56 subtitle

formats.o Can handle both time and frame based subtitles.o Can load files in plain text format so that you can set the timings.o Supports reading and writing style tags (bold, italic, underline) and color

tags in format which support it.o Supports Output Settings in DVDSubtitle, SAMI, Sonic Scenarist,

SubStation Alpha, SubViewer 1 & 2 and TMPlayer formats.o Supports saving a subtitle in your custom format.

Interfaceo User friendly.o Configurable shortcuts.o Supports multi-language (currently over 35 languages are available!).o Can switch between interfaces to adapt to the user's need, you can turn

Video Preview Mode on and off and Translator Mode on and off.o User friendly "Translator mode".

Video previewo Integrated in the main window.o Shows subtitles over the video.o Can show information about the video you are watching.o You are able to customize foreground color, background color (or

transparent), show border or not, show shadow or not, border andshadow's width of the subtitles.

Page 4: Subtitle Workshop Manual

o NOT based in Windows Media Player, this results in a highly improvedperformance and visual quality.

Subtitle fixingo Highly enhanced functions strictly designed to get speed and a high

grade of efficiency.o Advanced & easy to customize text scripts for OCR errors repair,

offering the possibility of using regular expressions.o Powerful and totally customizable error fixing engine.o Possibility to mark errors in the main list with a different font style and

color so that it is easy to identify them visually.o Optional automated checks/fixes on load subtitle.o Checks and fixes (all are optional, you may configure it): empty subtitles,

lines without letters, overlapping, bad values, hearing impaired subtitles,text before colon (":") (optional - "Only if text is in capital letters"),unnecessary dots, "-" in subtitles with one line, subtitles over two lines,prohibited characters (configurable characters), repeated characters(configurable characters), repeated subtitles (configurable time tolerance),OCR errors, spaces before custom characters, spaces after customcharacters, unnecessary spaces, too long/short durations and too longlines (only check).

Generalo Extremely customizable.o Multi-level Undo-Redo.o Spell check using Microsoft Word's engine, so it supports any installed

language.o Can create new subtitles from scratch.o Easily add and delete subtitles with "Insert" and "Delete" keys.o Can split subtitle (at selected item, at given item, at given time, at given

frame, or at the end of video), or in an indefinite number of parts (equalin time, in lines or at the end of multiple videos).

o Can join an indefinite number of subtitles, and those subtitles may be indifferent formats with different FPS (you can select a different FPS foreach file).

o Two methods of getting FPS from video: without using DirectX (onlysupports AVI) and using DirectX (supports all video formats, but it isslower).

o You are able to choose which subtitle extensions to associate.o Supports drag & drop (subtitle files and video files).o Supports command line.o Recent files list (customizable number of recent files from 0 to 20).

Timing operationso Set delay (positive or negative, time or frames).o Set duration limits (maximum duration and minimum duration).o Adjust subtitles using four possible methods: 1- first and last dialogs, 2-

synchronize using two points (linear algorithm), 3- Adjust tosynchronized subtitles and 4- Advanced system to synchronize subtitlesusing an indefinite number of points.

Page 5: Subtitle Workshop Manual

o "Time expander/reducer" to expand/reduce the final time of certainsubtitles under certain conditions.

o "Automatic durations" to calculate the duration of subtitles using asimple formula.

o FPS Conversion with one click.o "Extend length" to extend the length of selected subtitles to the start time

of the next one.o "Shift subtitle" forward or backwards a configurable amount of time.o "Read times from file" feature, to fix a subtitle using another subtitle's

times. Text-related operations

o Search & Replace text with "Match whole words", "Case sensitive" and"Preserve case" options.

o "Smart line adjust" to constrain subtitles bigger than three lines into twoand adjust length of lines.

o "Convert case" with 6 different conversion modes.o "Unbreak subtitles" to make all selected subtitles be in one line.o "Divide lines" to easily divide a subtitle with more than one line (or one

big line) into two subtitles with proper time recalculation.o "Reverse text" keeping lines order or not.o "Fix punctuation", very useful for right-to-left languages.o "Delete unnecessary links" to delete the unnecessary "..." if they are

present the end of one line and at the beginning of the next one.o "Read texts from file" feature, to fix a subtitle using another subtitle's

text. Text and times related

o "Sort subtitles" to sort all the subtitles according to their start time.o "Combine subtitles" to make all the selected subtitles become only one

(for eg. "- Hi!" and "- Hey!!!" to "- Hi!|- Hey!!!").o Visual effects with the texts and times of the subtitles.o Possibility to mark subtitles for later review (and of course unmark them)

and read Subtitle Report Files (*.srf) generated by ViPlay.

Current list of supported formats:

Adobe Encore DVD (*.txt) Advanced SubStation Alpha (*.ass) AQTitle (*.aqt) Captions 32 (*.txt) Captions DAT (*.dat) Captions DAT Text (*.dat) Captions Inc. (*.txt) Cheetah (*.asc) CPC-600 (*.txt) DKS Subtitle Format (*.dks) DVD Junior (*.txt)

Page 6: Subtitle Workshop Manual

DVD Subtitle System (*.txt) DVDSubtitle (*.sub) FAB Subtitler (*.txt) IAuthor Script (*.txt) Inscriber CG (*.txt) JACOSub 2.7+ (*.jss; *.js) Karaoke Lyrics LRC (*.lrc) Karaoke Lyrics VKT (*.vkt) KoalaPlayer (*.txt) (equal to one of the variations of TMPlayer) MAC DVD Studio Pro (*.txt) MacSUB (*.scr) MicroDVD (*.sub) MPlayer (*.mpl) MPlayer2 (*.mpl) MPSub (*.sub) OVR Script (*.ovr) Panimator (*.pan) Philips SVCD Designer (*.sub) Phoenix Japanimation Society (*.pjs) Pinnacle Impression (*.txt) PowerDivX (*.psb) PowerPixel (*.txt) QuickTime Text (*.txt) RealTime (*.rt) SAMI Captioning (*.smi) Sasami Script (*.s2k) SBT (*.sbt) Sofni (*.sub) Softitler RTF (*.rtf) SonicDVD Creator (*.sub) Sonic Scenarist (*.sst) Spruce DVDMaestro (*.son) Spruce Subtitle File (*.stl) Stream SubText Player (*.sst) Stream SubText Script (*.ssts) SubCreator 1.x (*.txt) SubRip (*.srt) SubSonic (*.sub) SubStation Alpha (*.ssa) SubViewer 1.0 (*.sub) SubViewer 2.0 (*.sub) TMPlayer (*.txt) (five different variations) Turbo Titler (*.txt) Ulead DVD Workshop 2.0 (*.txt) ViPlay Subtitle File (*.vsf) ZeroG (*.zeg)

Page 7: Subtitle Workshop Manual

1.2 Reading & Writing engine

Subtitle Workshop's reading & writing engine has highly evolved since the beginning,and was rewritten from scratch a bunch of times. Many people have gladly reportedbugs and they were all fixed as soon as we could. As time passed, the engine becamemore reliable and stable. Because of this reliability is that we decided to releaseURUSoft Subtitle API.

1.2.1 What is URUSoft Subtitle API?

It is simply a dynamic link library (DLL) which contains the Subtitle Workshop readingand writing engine. This DLL was created so updates in the reading engine of SubtitleWorkshop can be published without releasing a new version, that not only includes bugfixes, but also new subtitle formats. Because of this DLL, you only have to downloadfew kb instead of more than 800 kb if you find a bug in the reading or writing engine.After downloading the DLL, you must go to Subtitle Workshop's folder and put it in the"SubtitleAPI" directory. The next time you open Subtitle Workshop, new formats/bugfixes will make effect.

1.3 Visual overview

If we are going to have a visual overview, we should start by looking at a screenshots.To view some, click here.

One of the things that make Subtitle Workshop unique is it's interface - very userfriendly but at the same time keeps the basic and advanced functionality in easy toaccess menus.The interface is ideal for virtually *any* task - you can obtain an excellent performancecreating subtitles, fixing times manually, translating subtitles, and of course, using allthe built in features.

1.4 Getting started

Get started using Subtitle Workshop's basic features.

1.4.1 Loading a subtitle file

To load a subtitle file simply click the "File/Load Subtitle" menu or press [Ctrl]+[O]keys. Additionally, you can drop your file into the main window, or if the extensions areassociated, just double click on the subtitle file you wish to open.

Every time you load a file using any of this methods, the file will be checked to see if it

Page 8: Subtitle Workshop Manual

is a valid file and which is the format of it. Most of the files will load properly, but ifyou get the "The file is a bad subtitle or an unsupported format" error message, there isstill some chance you can load the file. First of all you MUST be sure about the formatof the file, if you are, then proceed like this:

1. Click the "File/Load subtitle" menu.2. A dialog will pop up, you have to select the right filter in it (there is a combo

box where you see the "All supported files" text, you have to click the buttonwith the arrow that is next to it and select the format of the file).

3. Once you have done this, press the Open button in the dialog.

This way there will be no automatic format recognition nor file check. If the file stillcan't be loaded, you will get an error message. In this case, if you are sure the file is atext-based subtitle format e-mail it to me and I'll fix it.

1.4.2 Loading a video file

To load a video file simply click the "Movie/Open" menu or press the [Ctrl]+[P] keys.If you get the "File is not a valid video file" error message, make sure you have the rightcodecs installed. If you don't, download Coda Codec Pack, it should fix most of theplayback problems.

1.4.3 Create a new file

Using Subtitle Workshop you can easily create new files from scratch, and then savethem in any format. To do so, click the "File/New subtitle..." menu or press [Ctrl]+[N]keys. Once you have done this, you can start adding subtitles, and then save the file bythe "File/Save" menu or pressing [Ctrl]+[S] keys.

1.4.4 Adding subtitles

You just need to press the Insert key or click the "Edit/Insert subtitle" menu. Thesubtitle will always be added right after the focused item. The default duration of thenew subtitle is one second, and the start time of it is always going to be the final time ofthe previous one plus 1 millisecond. If you are adding the subtitle in a blank list, theinitial time of it will be zero.

If you want to insert a subtitle before the selected item, press [Shift]+[Insert] keys orthe "Edit/Insert before" menu.

1.4.5 Deleting subtitles

Page 9: Subtitle Workshop Manual

Select all the subtitles you wish to delete by holding Ctrl key and click in them andpress the Delete key or click the "Edit/Remove selected" menu.

1.4.6 Manually edit a subtitle

Every subtitle is composed by three parts:

1. The initial time - the time in which the subtitle is shown.2. The final time - the time in which the subtitle is hidden.3. The text - the subtitle itself.

Subtitle Workshop lets you easily edit any of these fields.

To edit the initial time just click the "Show" field, set the time (or frames) you wishand press [Enter].To edit the final time click the "Hide" field, set the time (or frames) you wish and press[Enter]. Note that you can also edit the final time of a subtitle by changing the"Duration" field.Additionally, you can edit any of this time values using the Up-Down buttons at theright side of each text box.

To edit the text, simply click the "Text" box and write the desired text. In the list ofsubtitles, the character "|" (pipe) represents new line.

1.4.7 Style and color tags

First of all, you must know that Subtitle Workshop only supports tags for the wholesubtitle. So if you really want to apply font style over one part of the subtitle, you aregoing to need notepad. As it only supports tags for the whole subtitle, you only need toopen the tags because closing them would be useless. The supported tags are:

<b> for bold <i> for italic <u> for underline <c:#RRGGBB> for color, the format of the color is HTML format

To add this tags you can simply write them, and additionally you can right-click the listof subtitles and a menu will pop up, you can use this menu to control the all tags on theselected subtitles. Note that more than one tag can be used in the same subtitle (ofcourse, if they are all different tags), it may have even the 4 supported tags at the sametime.

WARNING: Please note that not all subtitle formats support style tags, nor color tags.If you save these tags in a subtitle format which doesn't support them, the tags will be

Page 10: Subtitle Workshop Manual

lost.

1.4.8 FPS and Input FPS

Knowing the difference between this two fields is crucial to work with SubtitleWorkshop.

Input FPS is the FPS of the movie that the subtitle was originally made for. FPS is theFPS of the movie you want it to adjust the subtitle to. You have to modify this field inorder to convert FPS. When editing frame based subtitles there is no need for Input FPS(we only need FPS) so "Input FPS" will become absolutely useless after loading framebased subtitles (it won't have any effect in the times).

Q: How do I convert a 25 FPS subtitle File into 29,97?A: Simply set "Input FPS" to 25, load the subtitle file and then set "FPS" to 29,97. Youhave just changed framerate of the file.

1.5 Command line parameters

It is highly recommended that you send each parameter to Subtitle Workshop between "" to avoid problems with spaces in the name/path of the files.

To open a file:SubtitleWorkshop.exe "/OPEN(File)"

Example:SubtitleWorkshop.exe "/OPEN(C:\Subtitle.srt)"

To convert from one format to another:SubtitleWorkshop.exe"/CONVERT(Input_File/Output_File/Output_Format/Input_FPS/Output_FPS)"

Input FPS and Output FPS are only required if you are handling frame based files, if not,you may specify any value. In the FPS, if not a rounded value, the decimal digits haveto be separated using the decimal separator (configurable from Control panel/Regionaland language settings) of the PC on which Subtitle Workshop is running. Usually it is"," or ".". The subtitle format has to be in the form of a string, and if you are using anupdated version of SubtitleAPI you may specify new formats, since the possible formatsdepends on the version of SubtitleAPI.

For you to know all the supported formats and *exactly* how you should write them,call Subtitle Workshop like this:

SubtitleWorkshop.exe /GetSupportedFormats

Page 11: Subtitle Workshop Manual

After doing this Subtitle Workshop will save a list of the supported formats to the pathin which it is installed, in a TXT file with the name "SupportedFormats.txt".

Some examples:SubtitleWorkshop.exe "/CONVERT(C:\Folder\Sub.smi/C:\Subtitle.pjs/PhoenixJapanimation Society/25/29,97)"SubtitleWorkshop.exe "/CONVERT(C:\Subtitle.vsf/C:\Subtitle.jss/JACOSub2.7+/23,976/0)"SubtitleWorkshop.exe"/CONVERT(C:\Subtitle.srt/C:\Subtitle.sub/MicroDVD/29,97/29,97)"

To delay a file:SubtitleWorkshop.exe"/DELAY(Input_File/Output_File/Input_FPS/Delay_in_Milliseconds)"

Example:SubtitleWorkshop.exe "/DELAY(C:\Subtitle.srt/C:\Subtitle.srt/0/-5000)"

The example above will set a -5 seconds delay to Subtitle.srt and overwrite it. Wespecify 0 as FPS since we are loading a time based format. As in the parameter toconvert a file, if FPS is not a rounded value, the decimal digits have to be separatedusing the decimal separator of the PC in which Subtitle Workshop is running. If youspecify a wrong FPS and FPS is really needed, then the default FPS (25) will be used.

1.6 Language files

You can easily create your own language file or update a currently existing languagefile and use it in Subtitle Workshop. To do so, you must translate the English.lng (orany other .lng) file to the language you want, and then copy it to the Langs directorywith the name language.lng. For example, Español.lng, English.lng, Français.lng.

Warning! Do *NOT* translate the text between "[ ]" and the text after the % sign (forexample "%s" or "%d"). Otherwise the language file will not work properly!.

Tips:

If the language you are translating to use another charset than ANSI_CHARSETdo not forget to change it on the [General] section. Read charsets.txt for areference.

In the messages, character "|" (pipe) represents new line.

After you create a language file, send it to me so I can distribute it with the installationpackage. The name of the translator will be shown in the About Subtitle Workshopwindow.

Page 12: Subtitle Workshop Manual

1.7 Custom formats

This feature makes possible to save a subtitle file in a format that Subtitle Workshopdoesn't support, or to easily create your own format or text files with subtitles. Thisoption is only to save files, if you do this in a format that Subtitle Workshop doesn'tsupport, reading the file will not be possible.

To access the custom formats dialogue first load a subtitle, then click the "File/Saveas..." menu and then click the "Custom format" button.

Format nameThis is useful to identify the format in which you are saving the file (or the project).

Extension Specifies the file extension of the format. Subtitle Workshop will use thiswhen saving the file. Please note that the format of the extension must be "*.CHARS".

StructureSpecifies the time structure. h represents hours, m minutes, s seconds and zmilliseconds. If you write more than one h or "m" or "s" or "z", all the h or "m" or "s" or"z" have to be together. You can't write something like "h:m:h:,zmzs". A time like"00:00:00,0" would be "hh:mm:ss,z" and a time like "0:00:00,000" would be"h:mm:ss,zzz". If you want the time structure to be just milliseconds, write "MS"instead of a time structure.

Time or framesCheck the "Time" field if you are going to work with time. If you are going to workwith frames, then check the "frames" field and you don't need to specify a structure,because frames are always going to be a simple number.

FPSSelect the FPS of the subtitle you are saving. If you are saving a time subtitle to anothertime subtitle you don't need to touch this.

New line charSpecifies the character(s) to separate lines in subtitles. If you want to make new lineslike in SubRip format (without using any new line char, just separating lines) then youshould write "[Enter]" as the new line character.

Load projectClick this button to load the a custom format project from an already saved file (*.cfp).

Save projectClick this button to save the project into a *.cfp file. This will save all the informationvisible on the "Custom formats" dialogue.

Text of the custom format script

Page 13: Subtitle Workshop Manual

This is very simple. The parts that Subtitle Workshop will write to a file can be dividedin three, and in this order:

1. A part that is written only once at the beginning of the file2. A part that is repeated each time there is a new subtitle3. A part that is written only once at the end of the file

All you have to do is to write those three sections in the text box. When you first openthe "Custom formats" dialogue you can see a commented example. Comments arestarted with ** and are finished with !*. Due to this you can't write the characters "**"to a file because it would be understood as a comment start. If you want to write thistwo characters into a file you may use {asterisk} (this will write only one asterisk). Towrite two, "{asterisk}*" or "{asterisk}{asterisk}" are the same.

First write the first section (if there is). Then begin the second section (the repeatingpart) with {RepeatSub}.

Repeating sectionIn this section it is possible to write 4 things.

1. The start time of the subtitle. You have to write {swStart} and SubtitleWorkshop will replace it by the initial time (or frames) of the actual subtitle.You can also write {swFrameStart} and the program will replace by the frame.In this way you can save the time, for example in hh:mm:ss,zzz:FRAMESformat. If you want to put zeros in the left until you reach the desired length, youcan write {swFrameStart,DesiredTotalLength}. You can do the same with theend frame.

2. The end time of the subtitle. You have to write {swEnd} and Subtitle Workshopwill replace it by the final time (or frames) of the actual subtitle. You can alsowrite {swFrameEnd}.

3. The subtitle's text. You have to write {swText} and Subtitle Workshop willreplace it by the subtitle's text, with the new line char you selected.

4. The subtitle count (like in SubRip format). You have to write {SubCount}. Thisvariable holds the actual index of the subtitle. If you are in the first, subtitle, itwill be "1", if you are in the second, it will be "2", etc. Some formats likeSonicDVD need to add zeros in the left until the length of the number string isfor example 4. For this, write {SubCount,DesiredTotalLength} and SubtitleWorkshop will add zeros automatically.

Check the "CEF Examples" folder, and load some examples to see how to use thisfeature better.

Chapter 2: Time related features

Page 14: Subtitle Workshop Manual

2.1 Framerate conversion

See FPS and Input FPS.

2.2 Set delay

Subtitle Workshop can set a positive or a negative delay, in time or frames. The delay isa fixed time or frames (constant) that represents the difference of the points where thesubtitles should start, and actually start. To apply a delay, first load your subtitle, thenclick the "Edit/Timings/Set delay..." menu or press [Ctrl]+[D] keys. The delay dialogwill pop up.If you are working in the time mode, you should set a time delay and if you are workingin the frames mode, you should set a frames delay. Subtitle Workshop willautomatically detect it. You are able to choose if you want to apply the delay to all thesubtitles or just to the selected ones, useful if only one part of the subtitle gets appearslater than it should.

2.3 Adjust subtitles

Subtitle Workshop can synchronize subtitles to a video by four methods. Whatevermethod you want to use, the first thing you have to do is load the subtitle file you aregoing to adjust, and for methods 1, 2 y 4 you need to load the video file you want totake as a reference.

2.2.1 Method 1: simple adjust, first and last dialogs

This method offers a lot of accuracy, and is recommended in most cases. After youloaded the subtitle file and video, do this:

Play the video until you reach the first spoken dialog or the first place thatshould be subtitled in the movie, and when you hear/read it, take note the time(you will need it later).

Seek to the near end of the video and when you hear/read the last spoken dialogor the last place that should be subtitled, take note the time, too.

You can additionally take this two time values from an external video playerinstead of using Subtitle Worksop's video preview.

After you have followed this steps, click the "Edit/Timings/Adjust subtitles..."or the [Ctrl]+[B] keys. Switch to "Simple" tab. In "First spoken line" write thefirst time, and in "Last spoken line" write the last time. Then press Adjust!button.

2.2.2 Method 2: synchronize using two points

Page 15: Subtitle Workshop Manual

This method will work very well in most cases. It works by taking two points of thesubtitle file and two points of the video, and calculate the times using a linear algorithm.The first pair of points will be called "First sync points" and the last pair of points willbe called "Last sync points". Each pair of points consist in one point in the subtitle andone point in the video, the point in the subtitle has the wrong times and the point of thevideo has the right times. After selecting the first sync points and last sync pointsSubtitle Workshop calculates the rest of the times appropriately. The closer first syncpoints are to the beginning and last sync points are to the end, the most accuracy you get.Note: if the point of the subtitle selected in the first sync points corresponds to the firstsubtitle, and the point of the subtitle selected in the last sync points corresponds to thelast subtitle, then the first formula (first and last dialogs) will be used.

After understanding this basics you have to do this:

First of all, select the subtitle you want to mark as first point. The first point inthe subtitle will always be the selected subtitle's initial time.

Play the video until you find the right time for that subtitle (this will be the firstpoint in the video), when you do, click the "Mark as first sync point" button orpress the [Ctrl]+[1] keys.

Now select the subtitle you want to mark as last sync point. The last sync pointwill be the selected subtitle's initial time.

Play the video until you find the right time for that subtitle (this will be the lastpoint in the video), when you do, click the "Mark as last sync point" button orpress the [Ctrl]+[2] keys.

After doing this you will get a confirmation message, click "Yes" and the subtitle willbe instantly synchronized.

2.2.3 Method 3: adjust to synchronized subtitles

Useful if you have desynchronized subtitles in one language and want to quickly adjustthem to an already adjusted subtitle file in another language. This method will workeven if both files have a different number of subtitles, the only requirement for properadjustment is that first and last subtitles in both files correspond - that is, mean the same.This method is extremely easy: you just have to click the "Timings/Adjust/Adjust tosynchronized subtitles" menu or press the [Shift]+[Ctrl]+[B] keys, and load thesynchronized file. Note: this method is NOT the same as the "read times from file"feature.

2.2.4 Method 4: advanced subtitle adjust

Use this if the traditional two points adjust fails. This unique feature makes possible toadjust subtitles in the worst cases, when desynchronization is not constant, or isdifferent in different parts of the subtitle. This system lets you select multiplesubtitle/video points so that you can synchronize the subtitle by "parts". The maximumnumber of points you can select is the number of subtitles there are.For the best performance to be achieved you first have to load the subtitle file and then

Page 16: Subtitle Workshop Manual

load the corresponding video. In the video preview controls, you will notice that lastbutton is "Add subtitle/video synchronization point". You will need this button later.This are the steps yous should follow now:

First of all, select the subtitle you want to mark as point. The point will alwaysbe the selected subtitle's initial time. This subtitle can be any subtitle in the file.

Play the video until you find the right time for that subtitle, when you do, clickthe "Add subtitle/video synchronization point" button or press the[Ctrl]+[Alt]+[P] keys. The Adjust subtitles window will show, and advancedmode will be set by default. This window is "non-modal", that means, you canstill use the main Subtitle Workshop interface while it is opened.

You need to repeat the two steps above for each point you want to add. You canadditionally use the "Add" button to enter a time manually, or the "Add frommedia" button to add points directly from the Adjust subtitles window (worksthe same way as the button in the video preview control).

A very important thing you must know is the use of the "If time is outside the pointsscope" option. I will try to describe the three possibilities:

Extrapolate. Subtitle Workshop will use mathematical routines to calculate thetimes for every subtitle in the file even if it is outside the scope of points. Usingthis you can have behaviours like the one you would obtain using "synchronizeusing two points", but with more points.

Return original time (no changes). If a time is outside the points range and youwant to calculate the new time, Subtitle Workshop will return the original timeso no changes will be made. This is useful for eg. if you only want to adjustsubtitles 100-200 and leave all other subtitles like they are.

Return displacement of neighbour point. If desired time is before first syncpoint, then it will calculate the new time using the displacement of the first syncpoint. If desired time is after last sync point, then it will calculate the new timeusing the displacement of the last sync point. Useful sometimes.

When you are done configuring all the settings, click the Adjust! button.

2.4 Duration limits

Duration limits makes possible to fix the duration of all the subtitles in a file to a rangeof time. Subtitles which are shown less than 1 second are usually hard to read, except ifthey are short words like "Yes" or "Ok". Sometimes there are subtitles with morecharacters and with short duration, or subtitles with durations greater than 10 seconds,this are the cases in which you should use this feature. You can set a minimum andmaximum possible duration for the subtitles. Each subtitle's duration which is shorterthan the minimum duration allowed will be increased to the minimum possible durationyou set, without causing overlapping with the next subtitle. Each subtitle's durationwhich is larger than the maximum possible duration will be set to the maximumduration you set.

Page 17: Subtitle Workshop Manual

To set duration limits click the "Edit/Timings/Set duration limits..." menu or pressthe [Ctrl]+[L] keys. After that you need to enter the maximum and minimum durationin milliseconds and press the Apply button.

2.5 Time expander/reducer

Time expander/reducer is a very nice feature in the cases you have a subtitle file thatcontains some long subtitles with short durations. It is close to "Duration limits" butmuch more useful if the file only has long subtitles with short times. This feature letsyou expand or reduce the duration of certain subtitles under certain conditions. Toaccess to time expander/reducer click the "Edit/Timings/Time expander/reducer"menu or press [Shift]+[Ctrl]+[Y] keys.

The amount of time you want to expand or reduce the duration is customizable, andmay be set in seconds (with a precision of up to one millisecond) if you are working intime mode, or in frames (with a precision of up to one frame) if you are working inframes mode. You can also choose to expand/reduce the duration only under certainconditions, only if the subtitle is longer than a customizable number of characters and/oronly if duration is shorter/longer (depends if you want to expand or reduce duration)than a fixed time. Additionally, the "prevent overlapping" check box should be checkedso that no overlapping errors occur while increasing the final time of the subtitles. Whenyou have configured everything, you have to select if you want to apply time expanderto all the subtitles or only to the selected subtitles. To finally expand the durations of thepertinent subtitles, press the Apply button.

2.6 Read times from file

Useful if you have one subtitle file in which the text of each subtitle is right but thetimings are not, and you have another file with the same number of subtitles and withthe right times. You just have to load the file with the right texts, and then click the"Edit/Timings/Read timings from file" menu or press the [Shift]+[Ctrl]+[T] keys. Adialog will pop up, all you have to do is select the file with the right times in that dialogand load it.

2.7 Extend length

"Extend length" works only for the selected subtitles and has no effect over the lastsubtitle of the file. What is does is, extend length of each subtitle to one millisecondbefore the start time of the next subtitle. To extend length first select the subtitles youwant, and then click the "Edit/Timings/Extend length" menu or press the[Shift]+[Ctrl]+[E] keys.

Page 18: Subtitle Workshop Manual

2.8 Automatic durations

"Automatic durations" is a very useful feature in the cases you have a subtitle file inwhich the duration of all (or some) subtitles is totally wrong. By specifying a time percharacter, word and line (the default values give very good results) Subtitle Workshopwill calculate the appropiate duration for the subtitle. Another use this feature may haveis for example when subtitling videos, to go faster you can only set start times manuallyand Subtitle Workshop will calculate all final times. To access "Automatic durations"click the "Edit/Timings/Automatic durations" menu or the [Shift]+[Ctrl]+[R] keys.You can additionally specify if you want to apply new duration in all cases, only if it isgreater than original or only if it is smaller than original. You can also apply calculateddurations to all the subtitles or just the selected ones.

The use of this feature together with Duration limits and Detect too long/short durationsfrom Information and Errors can give excellent results in a short time.

2.9 Shift subtitles

This feature moves all the selected subtitles initial time a specified number ofmilliseconds forward/backwards, without modifying their duration. It is very useful toeasily modify timings to synchronize with a movie. To shift selected subtitles forward,click the "Edit/Timings/Shift +X milliseconds" menu or the [Shift]+[Ctrl]+[H] keys.To shift selected subtitles backwards, click the "Edit/Timings/Shift -X milliseconds"menu or the [Shift]+[Ctrl]+[N] keys.

Chapter 3: Text & subtitles related features

Subtitle Workshop isn't just an ordinary subtitle editor - and thus it offers many textrelated functions to ease your work.

3.1 Smart line adjust

Smart line adjust is a very useful feature in the case you find a file that has a lot ofsubtitles that have more than two lines, or if the line breaks are just put stupidly. Itconstrains the subtitle's text to be in one or maximum two lines (depending on thelength of it). This feature has a bit of "-" sign detection. You may choose the lengthafter which the subtitle will be in two lines and not in one, in the "Two lines if longerthan" option in Settings/General.

To use smart line adjust over a subtitle just select it and click the "Edit/Texts/Smart

Page 19: Subtitle Workshop Manual

line adjust" menu or press [Ctrl]+[E]. Smart line adjust will take effect over all theselected subtitles, and they may be more than one. If you are working in translator mode,smart line adjust will affect both original and translated text.

Note that smart line adjust is not perfect and it may act badly in some cases, it is justthought to help a bit if the lines needed to adjust are a lot, and does its job quite well. Itmay act completely wrongly if there are words composed by the "-" sign, although I'veadded a little detection for words composed with "-" sign. If you want to apply SmartLine Adjust over a whole file, you can do it, but reading all the subtitle after that ishighly recommended.

3.2 Convert case

Have you ever found a unique subtitle file that is all in uppercase?, or all in lowercase?.Well, then "Convert case" is your feature. To access convert case dialogue click the"Edit/Texts/Convert case..." menu or press [Shift]+[Ctrl]+[C]. You are able to selectamong five different case conversion modes:

1. "Sentence type" only upper cases the first letter of a sentence. It turns"HELLO!, thiS iS VERY nice. i don't WANT tO heAr IT." to "Hello!, this isvery nice. I don't want to hear it.".

if ""..." detection" is enabled, it will check if the final three characters of theprevious subtitle are "..." and if they are, then it will not uppercase the firstcharacter of the current subtitle (it will think it's the continuation of the previoussubtitle). If "Only first letter of first word" option is enabled, SubtitleWorkshop will uppercase only first letter of each sentence and leave all otherwords like they are.

2. "Lowercase" lower cases the whole text. Turns "HELLO!, thiS iS VERY nice. idon't WANT tO heAr IT." into "hello!, this is very nice. i don't want to hear it."

3. "Uppercase" upper cases the whole text. Turns "HELLO!, thiS iS VERY nice. idon't WANT tO heAr IT." to "HELLO!, THIS IS VERY NICE. I DON'TWANT TO HEAR IT.".

4. "Title type" only upper cases the first letter of each word. Turns "HELLO!, thiSiS VERY nice. i don't WANT tO heAr IT." to "Hello!, This Is Very Nice. IDon'T Want To Hear It."

5. "Inverse type" lower cases the uppercase characters and upper cases thelowercase characters. It reverses case. Turns "HELLO!, thiS iS VERY nice. idon't WANT tO heAr IT." to "hello!, THIs Is very NICE. I DON'T want ToHEaR it.".

Note that if you are working in translator mode, convert case will only work for originaltext. If you want it to work for translation, then use the "Swap" feature.

Page 20: Subtitle Workshop Manual

3.3 Unbreak subtitles

Not much to say about this feature. It takes effect over all the selected subtitles, andmake each one of them to be in only one large line. When working in translator mode,this feature affects the original text and also the translation.

3.4 Divide lines

Divides a subtitle into two subtitles. Very useful for example if you have a subtitle filewith a lot of subtitles with four (or more) lines, which are too big to be constrained intotwo lines with the "Smart line adjust" feature. Dividing a subtitle into two manually ispossible but is a very annoying job, since after you insert the subtitle you also have toset all the times and cut text from the first subtitle to put in the second one. "Dividelines" does all this very quickly.

First of all you have to select the subtitle, then go to the "Edit/Texts/Divide lines..."menu or press [Shift]+[Ctrl]+[D]. Then the "Divide line" dialog will pop up. Note thatif the selected subtitle has only one line that is shorter than the "Break line after" valueset in Settings/Advanced, the menu will be disabled and the key shortcut will not work.When in the divide line dialog, you are going to see two text boxes, one with firstsubtitle's text and the other one with second subtitle's text. You have to select afterwhich line to divide, the default value will be correct most of the times. That option willbe disabled if the subtitle you will divide has only two lines. When you change thisvalue, the text of both text boxes will be updated. If you notice that a line breakdisappears in some of the parts, go to Settings/Advanced and uncheck "Smart line adjustautomatically". If that option is checked, after updating the text of each text box, it willbe smartly adjusted into one or two lines. If you want to do it manually, pass the focusto the desired text box and press [Ctrl]+[E].After this you should focus on the times of the subtitles. Most of the times the secondsubtitle will be displayed immediately after the first one, and so it is recommended toleave the "Continue directly" check box checked. If the second subtitle should bedisplayed some time after the first one, you have to uncheck the check box and write thestart time of the second subtitle. Additionally you can use the time proportion buttonsavailable at the top of the window. "1:1" means equal duration for both subtitles, "2:1"means the first part will be displayed the double time as the second one, etc. You canalso choose if you want to use the original subtitle's time with proportionality buttons orto calculate an automatic duration for each new subtitle. In the second case, SubtitleWorkshop will calculate the duration of the first new subtitle (based on duration percharacter on the original subtitle) and use it to calculate the duration of the second newsubtitle.

Finally press the "Divide!" button. When working in translator mode, divide lines willonly insert an untranslated line in the translation, it will not divide the lines since it onlyworks for original subtitle.

Page 21: Subtitle Workshop Manual

3.5 Set maximum line length

Splits the subtitle in N number of lines so that each of the lines is shorter than amaximum specified length. That maximum length is configurable fromSettings/Advanced. This feature affects all the selected subtitles, and while in translatormode, affects original and translated text.

Example (Max. line length set to 45):

"This is the extremely long text in which we are going to use this feature, that willbreak what you are reading in more lines."

To:

"This is the extremely long text in which weare going to use this feature, that willbreak what you are reading in more lines."

The lines have respectively 43, 40 and 41 characters. As you can see, no line exceedsthe maximum line length.The resulting text doesn't look good on the screen, so this feature should be usedtogether with "Divide lines".

3.6 Read texts from file

The same as the "Read times from file" feature but instead of reading the times it readsthe texts.

3.7 Combine subtitles

Very useful, combines all the selected subtitles into one. For example:

Start time Final time Text

00:00:01,000 00:00:02,000 - Why don't you do that?

00:00:02,001 00:00:03,000 - I don't know!

Becomes:

Start time Final time Text

00:00:01,000 00:00:03,000- Why don't you do that?- I don't know!

The final time of the new subtitle becomes the final time of the last selected subtitle.

Page 22: Subtitle Workshop Manual

To combine two or more subtitles, select them and press [Ctrl]+[K] or the"Edit/Subtitles/Combine subtitles" menu.

3.8 Right-to-left

Features only useful for right to left languages, such as Hebrew or Arabic.

3.8.1 Reverse text

Reverses the text of all the selected subtitles. Example:

"Reverse this text!" to "!txet siht esreveR".

When in Translator mode, this feature will only work in original text. To make it workin translation, use the "Swap" feature.You can specify if you want to keep the order of the lines or not, for that, go toSettings/General and check or uncheck the "Keep order of lines when reverse text"option.

To reverse the text, select the desired subtitles and press [Ctrl]+[H] keys or the"Edit/Subtitles/Right to left/Reverse text" menu.

3.8.2 Fix punctuation

Fixes punctuation for right to left languages. Example:

"Fix this punctuation!..." to "...!Fix this punctuation".

When in Translator mode, this feature will only affect translation. To make it work inoriginal text, use the "Swap" feature or exit translator mode.To fix the punctuation, select the desired subtitles and press [Shift]+[Ctrl]+[F] keys orthe "Edit/Subtitles/Right to left/Fix punctuation" menu.

3.9 Sort

Sorts the subtitles according to their start time. Just press [Ctrl]+[Y] or the"Edit/Subtitles/Sort" menu.

3.10 Delete unnecessary links

Page 23: Subtitle Workshop Manual

Deletes "..." when they are placed at the end of a subtitle and at the beginning of thenext one. Example:

Start time Final time Text

00:00:01,000 00:00:02,000 But not exactly because...

00:00:02,001 00:00:03,000 ...what I want is clear.

Becomes:

Start time Final time Text

00:00:01,000 00:00:02,000 But not exactly because

00:00:02,001 00:00:03,000 what I want is clear.

Some people like it this way, some other people don't. To delete "unnecessary links"press [Shift]+[Ctrl]+[G] keys or the "Edit/Subtitles/Delete unnecessary links" menu.It will make effect over the whole subtitle, not the selected subtitles.

3.11 Search & Replace

Subtitle Workshop's Search & Replace is very fast and has some extended optionsavailable pressing "More >" button. Explanation of the options:

Case sensitivePerforms the search/replace being sensitive to UPPERCASE and lowercase characters.

Match whole wordsWill find the text only if it's forming a word.

Preserve case on replaceClones the case of the original text when replacing. For eg. text to find is "DOG" andtext to replace by is "CAT", Subtitle Workshop finds "Dog" and replaces it by "Cat" andnot by "CAT".

The text to find or to replace may contain line breaks, and thus we can say it can bemulti-line. Character "|" (pipe) represents new line. If you want to search for "|" then use"||" (two pipes).

3.12 Marked subtitles

This is useful for example if you are translating a file, and want to mark certain subtitlesbecause you are not sure about their translation. To mark all the selected subtitles, clickthe "Edit/Subtitles/Mark selected subtitles" menu or the [Shift]+[Ctrl]+[M] keys. Tounmark them click the "Edit/Subtitles/Unmark selected subtitles" or the[Shift]+[Ctrl]+[A] keys.

Page 24: Subtitle Workshop Manual

This feature has other uses, too. It's main purpose is to work together with ViPlay.Explanation:While you are watching a movie in ViPlay you can use a custom key (eg. "M") to markthe subtitle that is currently being displayed (or the last subtitle that has been displayed,if any). When you are watching the movie in ViPlay and you see a wrong subtitle(spelling mistake, too long duration, over two lines, or any other mistake) and you press"M" and it will be marked (internally). When the movie ends, ViPlay will ask you tosave a Subtitle Report File (*.srf). This file will later be loaded by Subtitle Workshopand it will automatically mark the subtitles you marked in ViPlay, so you can easilyidentify them and correct them after watching the movie.

4.0 Settings explained

Here we will try to explain all the meaning of the options available in Settings.

4.1 General

Always on topMaintains the Subtitle Workshop's main window above all the other windows.

Allow more than one instance runningAllows more than one instance of the program running, or only one. If this option isunchecked and you open more files via explorer, they will all be opened in the samewindow, and if that option is checked, they will be opened in separate windows.

Confirm when deleting subtitlesIf this option is checked, each time you try to delete a subtitle or more than one in themain list, Subtitle Workshop will show a confirmation message and ask you if you arereally sure to make the deletion.

Interpret invalid files as plain textCheck this option and you will never get the "The file is an invalid subtitle or anunsupported format" error message, but instead, the file with actually be loaded(without timings) like if it was plain text. After this, you need to set the timingsmanually.

Autosearch for movieEach time you open a subtitle file Subtitle Workshop will search for the correspondingmovie file, and load it. This feature includes suffix detection (each suffix has to beseparated by ".").Example: if the file name of the subtitle is "Spiderman.English.srt" and there is amovie in that directory called "Spiderman.avi", it will be loaded.

Page 25: Subtitle Workshop Manual

Force working in time modeIf this option is unchecked, each time you open a subtitle in a frame based format,Subtitle Workshop will automatically switch to frames mode. If not, it will work in timemode, but you will be able to switch to frames mode manually.

Keep order of lines when reverse textUseful for Right-to-Left languages like Arabic or Hebrew. Specifies if when you use the"Reverse text" feature ([Ctrl]+[H] keys or "Edit/Subtitles/Right to left/Reverse text"menu) you want to keep the order of the lines or reverse the text as a whole.

Select text on jump to next lineSpecifies if you want to select the text in the "Text" or "Translation" text box, whenjumping to the next line pressing [Shift]+[Enter].

Select text on jump to previous lineSpecifies if you want to select the text in the "Text" or "Translation" text box, whenjumping to the previous line pressing [Ctrl]+[Enter].

No interaction with tagsCheck this option if you want Subtitle Workshop to simply ignore tags when readingfiles in any subtitle format. And ignoring means do not delete them. Useful if you wouldlike to work with full support for tags (eg. for one part of the subtitle and not just all thesubtitle), feature which Subtitle Workshop does not support in it's current version.

Work with style tagsCheck this option if you want Subtitle Workshop to load and save style and color tags.The number of formats that support tags depends on the version of Subtitle API. Thisoption doesn't have any effect if "No interaction with tags" is turned on.

Recent files limitLimit the amount of recent files. If you don't want recent files, set the limit to 0. Themaximum of recent files is 20.

4.1.1 Advanced

Two lines if longer thanAs the maximum number of lines that Smart line adjust will produce is two, you have toset a length after which there will be two lines instead of one. "Two lines if longer than"is that value.

Toggle break pointToggles between two break points (first space before specified length, or first spaceafter specified length) in some subtitles.

Page 26: Subtitle Workshop Manual

Break line afterUseful to use "Divide lines" in subtitles that are only one line, but that line is long. Usethis value to divide that long line in various smaller lines, that have a maximum ofnumber of characters equal to "Break line after" value.

Smart line adjust automaticallySpecifies if you want to automatically "Smart line adjust" each part in the "Divide lines"window.

Shift timeTime to shift subtitle forwards/backwards with the shift subtitles feature.

4.1.2 Charsets

Show in main formUseful for people working with subtitles in various languages who use a differentalphabet. Shows "Original charset" and "Translation charset" in the main form, so it canbe quickly modified.

Original charsetCharset to display characters in the "Text" column.

Translation charsetCharset to display characters in the "Translation" column. Only useful if you work intranslator mode.

4.2 Formats

Default formatSpecifies the default format to use in all the windows where there are formats lists (eg.Join subtitles, Split, etc).

Formats to show when "Save as"Useful if you only work with a few formats and you don't want to waste time lookingfor the desired format in a list that contains more than 40 items. Only the checkedformats listed here will be shown in the "Save as" dialog.

Show custom formatsSpecifies if you want to show the custom formats placed on the "CustomFormats"folder in the "Save as" window.

4.3 File types

Register extensions on startAssociate the desired subtitle extensions when Subtitle Workshop is executed.

Page 27: Subtitle Workshop Manual

Associate with most supported subtitle extensionsIf this option is checked, then you just have to double-click on a subtitle file to load itinto Subtitle Workshop, and the file's icon will become Subtitle Workshop's main icon.

List of file extensionsFiles types which will be open by Subtitle Workshop when double clicking on file icon.

4.4 Save

Ask to save on exit program/close subtitleSubtitle Workshop will display the "File has changed. Do you want to save thechanges?." message when you try to exit program or close subtitle. If you disabled the"Allow more than one instance running" option and you try to load a file via explorerwhen there is already a loaded file, this message will be also shown.

Save work automatically every X minutesSubtitle Workshop will silently save the modified subtitle file every the minutes youchoose.

Save as backupSaves the original/translated file as a backup (FileName.ext.bak) instead of overwritingthe original/translated file.

4.5 Video preview

All the options listed here will work only if you are in video preview mode. Doubleclick and shift-double click in a subtitleYou are able to select what to do when you double click in a subtitle, and when youdouble click in a subtitle while holding [Shift] key. The available options are three:

1. Focus text box will pass the focus to the "Text" box, or, if you are in translatormode to the "Translation" box.

2. Go to subtitles time in video will jump directly to the start time of the subtitlein the video.

3. Go N seconds before subtitle in video will jump the "Seconds to jump" valuebefore the initial time of the subtitle in the video.

Rewind and forward timesTimes to rewind/forward when pressing the "Rew" and "Forward" buttons in the videocontrols bar.

Default altered playback rateThe percentage of playback rate to apply when pressing the "Alter playback rate" buttonin the video controls bar.

Page 28: Subtitle Workshop Manual

4.5.1 Subtitles

Try transparent backgroundEnable this check box if you want the subtitles to be displayed transparently over thevideo. This option will work most of the times, but if it doesn't work you can check thefollowing option:

Force using regions (may be slow)If checked, the subtitles will be transparent, and should never fail. Use it only if youdon't get transparent subtitles only with the first option enabled and you really wantthem. If this option is enabled then the text of the subtitles can't have the FUCHSIAcolor (#FF00FF).

Most of the other things here don't need any kind of explanation, everything you modifycan be seen in the "SAMPLE" subtitle.

4.6 External preview

This feature makes possible to preview subtitles in your favourite movie player.

4.6.1 General

Exe of the video playerThe executable file of the video player you want to use for external preview. Rememberthat the video player must support command line and external subtitles.

Detect associated programPress this button if the movie player you want to use is associated with .AVI files, andyou don't know where to find the executable file.

Ask for a different video each timeSubtitle Workshop will ask you to open a video file each time you do the externalpreview.

Always test with same videoSubtitle Workshop will always use the same video for external preview, so it won't askyou anything and will open the movie player directly.

4.6.2 Advanced

Save temporary file in original formatSelect this if you are sure that the video player supports the subtitle format you arehandling.

Save temporary file in custom formatIf the video player doesn't support the subtitle format you are handling, but supports aminimum of one of the formats that Subtitle Workshop supports, then check this check

Page 29: Subtitle Workshop Manual

box and select a format in the list.

Parameter to send the video playerThis is very important. Here you have to specify how to tell the video player whichsubtitle and which video file to open. VIDEO_FILE represents the video file andSUBT_FILE the subtitle file. Look at the help file of the video player to see thespecification on the command line parameters.

For details, refer to External preview.

4.7 Look

4.7.1 Program

Font to use in the program & font sizeIf you change this, the whole font of the program and/or it's size will be changed. Trythis if you get problems with the fonts or if you don't like the default font.

"Text" and "Translation" fields alignChoose the text alignment that you want for this two fields.

4.7.2 List

Show grid linesShows line between the rows and columns of the subtitle's list in the main window.

Apply style to subtitlesOnly will take effect if a subtitle contains tags (bold, italic, underline or color). If thisoption is checked, Subtitle Workshop will draw the subtitle in the list with theappropriate style/color.

Mark untranslated subtitles with colorDraws the untranslated subtitles with a particular configurable color, so they can beeasily identified.

Show horizontal scroll barUncheck this option and you will never get the horizontal scrollbar in the main list.

4.7.3 Menu

Use Office XP style menuUses the custom menu & popup menu in the main form. If you turn this off, the defaultWindows menus will be used.

Use gradient menuDraws a gradient in the left of the menus.

Page 30: Subtitle Workshop Manual

Chapter 5: Tools

Must-have features in every subtitle tool.

5.1 Spell check

This spell check uses Microsoft Word's spell check engine, connecting to it throughOLE technology. Thus, at least Microsoft Word 97 is required. To spell check a subtitlejust load it and press F7 key or the "Tools/Spell check" menu. All the errors andsuggestions will be shown using Word's default windows. The spell check shouldsupport any installed dictionary.

Note: this feature may give errors (TOleExeption) some times, this is not because ofSubtitle Workshop, but because of Word. But anyway, it works pretty well most of thetime.

5.2 Batch convert

This feature lets you convert a large number of subtitle files in any format to a singleformat, and then save them in the path you wish with only few clicks.

Click the "Tools/Batch convert..." menu or press [Ctrl]+[M]. After doing this, youshould follow this steps:

1. Select what file extensions to search for, all the possible extensions are shownon the left.

2. Select the search path (the folder in which the subtitle files you want to convertare)

3. If you want to include subfolders in the search, check the "Include subfolders"check box.

4. If you want Subtitle Workshop to make an exhaustive format check, check the"Exhaustive format check" check box. If this option is off, Subtitle Workshopwill skim the file to see if it is a valid file and in what format it is. Skimmingusually works very well, and it gives an excellent speed. If you want to performthroughout tests through the file, with an effectivity of 100%, then useexhaustive check. Exhaustive check is remarkably slower than standard check.

5. Select the output directory (the path in which the converted files will be saved)6. Select the output format.7. Select the Default FPS for the frame based files (if there are).8. Press the "Next" button.

Page 31: Subtitle Workshop Manual

After pressing the button, Subtitle Workshop will search for valid subtitle files in thesearch path you chose.

When searching finishes, you will see a list with all the found files, format, FPS (forframe based subtitles - this value should be by default, the same as "Default FPS" youset) and size (in Kb).You may add new files to the list, or remove files. You can also change FPS of a framebased file (or many files at one time), selecting it and changing the box that is at the leftof the "Clear" button.

Finally, press the Convert button and conversion should start. When it finishes, SubtitleWorkshop will generate a log (*.log) file, reporting all the possible errors together withthe successes.

5.3 Split subtitles

There are two possible splits:

1. Simple - splits subtitle file in two parts2. Advanced - splits subtitle file in an indefinite number of parts

Use the one that best fits your needs.

Simple splitYou first have to choose where to split the file, you have 5 possibilities:

1. Split in selected itemThe subtitle file will be split right after the item that is selected in the mainwindow.

2. Split in item numberThe subtitle file will be split in the item you select.

3. Split in given timeThe subtitle file will be split in the first subtitle which's initial time is greaterthan the time you select.

4. Split in given frameThe subtitle file will be split in the first subtitle which's initial frame is greaterthan the frame you select.

5. Split in end of videoThe subtitle file will be split in the first subtitle which's initial time is greaterthan the time in which a video ends (the video's duration).

After selecting where to split select the file names (excluding the extension, it will beadded automatically), the output format and press the Split button.

Advanced splitSwitch to the Advanced page, and then select the number of parts you want to make.

Page 32: Subtitle Workshop Manual

You have to select if you want to make the parts equal in time (length), in lines or if youwant to split at the end of multiple videos.If you want to split at the end of multiple videos you need to select a video for each part,to do so double click in each part in the list starting with the first one. You can't select avideo for the last part since it will be calculated automatically.

Leave the "Auto-name the parts" check box checked if you want Subtitle Workshop toset the file names of the parts automatically, if you want to do it manually, uncheck thecheck box, select the desired part & press F2 to type the name.

Check "Recalculate time values" if you want Subtitle Workshop to automatically set adelay to the second subtitle so you don't have to do it manually after spliting. Finallyselect the output path, the output format and press the Split button.

5.4 Join subtitles

With Subtitle Workshop you can join more than two subtitles, and those subtitles maybe in different formats, time or frame based, and if frame based, they even may havedifferent FPS!Click the "Tools/Join subtitles..." menu or press [Ctrl]+[J].

Now press the Add button and add all the files you want, in the correct order. If youmade a mistake in the order of one file you may drag it with the mouse and put it whereyou want. If the file is a frame based subtitle you may also modify it's FPS selecting itand modifying the value of the combo box that is at the left of the "Clear" button. Youcan do that operation to all selected frame based subtitles at one time.Optionally, may set a movie fragment for each part (except of course the last) soSubtitle Workshop will make all changes in the timings of subtitles automatically. Thisway you won't need to make any changes to the resulting file. To select a moviefragment for each part select it and click the Set movie fragment button. If you made amistake, select that part and press the Delete movie fragment button. Now need toselect the output format, and if it is a frame based one, the output FPS. If you want toload the resulting file, check the "Load file after joining and saving" check box. Checkthe "Recalculate time values" if you want Subtitle Workshop to automatically set thedelay to all the subtitles beginning in the second one, so you don't have to do itmanually. This option will not work if the parts are associated to movie fragments.Finally, press the Join button.

5.5 Information and errors

This is one of the features that make Subtitle Workshop unique - despite of otherprogram's attempt to imitate it, Subtitle Workshop's Information and Errors still has thebest performance, flexibility and options.

5.5.1 Errors & fixes explained

Page 33: Subtitle Workshop Manual

Information and Errors can check for and fix a large variety of common errors insubtitles, here we will try to review all the possible errors and the way(s) they areautomatically fixed. Before we do it is important to know what types of errors are goingto be fixed first. The priorities are:

1. Lines without letters2. Empty subtitles3. Repeated subtitles4. Prohibited characters5. Text before colon (":")6. Hearing impaired7. Overlapping8. Bad values9. Unnecessary dots10. Repeated character11. OCR Errors12. "- " in subtitles with one line13. Space after custom characters14. Space before custom characters15. Unnecessary spaces16. Subtitle over two lines17. Too long duration (only check)18. Too short duration (only check)19. Too long lines (only check)

Errors 1 to 6 are first because when fixing that type of errors, the subtitle can get deletedunder certain circumstances, so if for example time fixings were first, it would lead to atime fix and then to delete the subtitle, and that is pointless.

Lines without lettersDeletes lines of the subtitle that don't contain letters (a-z, á-í, etc). Example:

Start time Final time Text

00:00:00,250 00:00:01,350This is the text 1!!!!!!!

00:00:00,780 00:00:02,150¿?!¡This is the text 2

In both cases, Subtitle Workshop will delete second and first lines respectively, becausethey do not contain letters (don't misunderstand, "letters" is not the same as"characters").

Empty subtitlesAn empty subtitle can be:

1. A subtitle that contains no text at all (blank text).

Page 34: Subtitle Workshop Manual

2. A subtitle that doesn't contain any letter or number. Eg. the text: "- !!!!"

In both cases, Subtitle Workshop will delete the subtitle.

Repeated subtitlesThis is very common in OCRs. Example:

Start time Final time Text

00:00:01,000 00:00:01,010 Come on, let's book.

00:00:01,010 00:00:02,000 Come on, let's book.

Repeated subtitles are characterized by two things:

1. The text is exactly the same.2. Usually one subtitle has a very short duration, most of the times it is the first one

(like in the example) but can be the other way round.

In the example above, the start time of second subtitle is exactly the final time of thefirst, this is very common, but it's not like this always. That's why the "Tolerance forrepeated subtitles" value is configurable, it is the maximum difference betweenFinalTime1 and InitialTime2 admittible to detect a subtitle as a repeated subtitle. Afterfixing, the final subtitle will look like this:

Start time Final time Text

00:00:01,000 00:00:02,000 Come on, let's book.

The start time will be the start time of the first subtitle, and the final time will be thefinal time of the last subtitle.

Prohibited charactersFinds subtitles that contains prohibited characters and delete them (the whole subtitle -not the characters).

Text before colon (":")The text before colon is usually for deaf people. Most of the times it represents thename of the person who is currently speaking.

Example:

Start time Final time Text

00:00:01,000 00:00:02,000 MAN:|She feel the same about you?

Page 35: Subtitle Workshop Manual

00:00:03,000 00:00:04,000 JERRY:|I don't know.

In 80% of the cases, the text before colon will usually be all in CAPITAL LETTERS, soyou can enable the "Only if text is in capital letters" option, and thus avoid many kind ofproblems, eg. with this kind of subtitles "I'm going to tell you something:|Don't ever dothat again". After fixing, the text will be:

Start time Final time Text

00:00:01,000 00:00:02,000 She feel the same about you?

00:00:03,000 00:00:04,000 I don't know.

The detection for the colon will not detect it if it is between two numbers, eg. "12:30",and thus it will avoid problems with times.

Hearing impaired subtitlesHearing impaired subtitles are whole subtitles, or just part of a subtitle, that areexclusively for deaf people. Most of the people don't want "noises" and "sounds" insidetheir subtitles, so they want to eliminate them. Deaf people shouldn't use this feature, ofcourse. Hearing impaired subtitles are usually enclosed in parenthesis ("(" and ")"and/or "[" and "]").

Example:

Start time Final time Text

00:00:01,000 00:00:02,000 - [Boy] You want me to kill him for you?

00:00:03,000 00:00:04,000 Yeah. Would you?

00:00:05,000 00:00:06,000 [Shutter Whirring, Clicking Off]

First subtitle contains a part for hearing impaired, and third subtitle is all for hearingimpaired. So, after fixing, this will result in:

Start time Final time Text

00:00:01,000 00:00:02,000 You want me to kill him for you?

00:00:03,000 00:00:04,000 Yeah. Would you?

Overlapping subtitlesThis error is produces whenever a subtitle appears in the screen sonner than the time inwhich previous subtitle is hidden. That is to say, when the final time of a subtitle isgreater than the initial time of the next one. Let's see this example to see it clearly:

Start time Final time Text

Page 36: Subtitle Workshop Manual

00:00:00,250 00:00:01,350 This is the text 1

00:00:00,780 00:00:02,150 This is the text 2

Subtitle number two is shown before subtitle number one is hidden. Subtitle Workshopwill fix this acting appropiately, depending of the length of the texts of the subtitles.There are three possible solutions:

1. If the difference between the length of the text of both subtitles is less than 5,the length for each subtitle will be set appropiately. That is, the duration of eachsubtitle will be: (FinalTime2 - InitialTime1) div 2.

This is the case of the example above, the solution for overlapping is this onesince the length of both texts is equal.Subtitle Workshop will fix the subtitles like this:

Start time Final time Text

00:00:00,250 00:00:01,200 This is the text 1

00:00:01,201 00:00:02,150 This is the text 2

2.As you can see, (2150-250) div 2 = a duration of 950 Milliseconds for eachsubtitle, and as it is impossible to give the 950 milliseconds to the secondsubtitle (we need one extra millisecond for that) we give it 949.

3. If the text of first subtitle is more than 4 characters longer than the text of secondone, second subtitle's time will be cut. Subtitle Workshop will fix the examplelike this:

Start time Final time Text

00:00:00,250 00:00:01,350This is the text 1. More than four extracharacters.

00:00:01,351 00:00:02,150 This is the text 2

4.So as we cut second subtitle's initial time, the duration will obviously be lessthan the duration of the first subtitle. In this case we have got 1100 millisecondsfor the first subtitle and 799 for the second.

5. If the text of second subtitle is more than 4 characters longer than the text of firstone, first subtitle's time will be cut. Subtitle Workshop will fix the example likethis:

Start time Final time Text

Page 37: Subtitle Workshop Manual

00:00:00,250 00:00:00,779 This is the text 1

00:00:00,780 00:00:02,150This is the text 2. More than four extracharacters.

6. The duration of the first subtitle is 529 milliseconds, and the duration of thesecond one is 1370 milliseconds.

Bad valuesBad values is when the initial time of a subtitle is greater than it's final time.

Example:

Start time Final time Text

00:00:02,000 00:00:01,000 This is the text

Subtitle Workshop can fix that by inverting the time values, so the subtitle would be:

Start time Final time Text

00:00:01,000 00:00:02,000 This is the text

Unnecessary dotsThis option replaces four or more consecutive dots ("....") to only three followed by aspace when necessary.

Example:

Start time Final time Text

00:00:01,000 00:00:02,000 Yeah.... Should taste it.....

Would result in:

Start time Final time Text

00:00:01,000 00:00:02,000 Yeah... Should taste it...

Repeated charactersFinds the characters you wish when they are repeated, for example, if you have "!" as arepeatable characters, it would find:

Start time Final time Text

00:00:01,000 00:00:02,000 Do it, now!!!!!!!!!!!!!!!!!!!!!!

Page 38: Subtitle Workshop Manual

And will replace into:

00:00:01,000 00:00:02,000 Do it, now!

It works the same with every repeatable character. The default characters are "-¡!¿?",;\/_[]=", you may add/remove characters if you want, from Information and Errorssettings.

OCR ErrorsAs different languages have different OCR errors, the OCR scripts were born. For moreinformation on the scripts, refer here.

"-" in subtitles with one lineThere is no sense in having subtitles with one line starting with "-" (open dialog) sinceonly one person speaks in them. Thus, if you enable this option, Subtitle Workshop willdelete the "-" if the subtitle contains only one line.

Space after custom charactersAdds a space (if not present) after any of the characters in "Space after characters" inInformation and Errors's settings/Advanced. Useful for example to add a space after thedialog start to turn:

-This is it.-Really

To:

- This is it.- Really

This feature has a bit of composed words detection, so it doesn't add a space after thecharacter in words like "multi-line".

Space before custom charactersAdds a space (if not present) before any of the characters in "Space before characters"in Information and Errors's settings/Advanced. Useful for example for french language,to add spaces before "?", "!" and ":".

Unnecessary spaces

Page 39: Subtitle Workshop Manual

This is a must. Eliminates the unnecessary spaces you choose from the text of a subtitlefile. Currently this type of spaces can be removed:

1. Enters and spaces at the beginning and end2. Spaces between enters (left and right)3. Double spaces and enters (double enter = blank line)4. Spaces in front of punctuation marks5. Spaces after "¿" and "¡"6. Spaces before "?" and "!"7. Spaces between numbers

As different languages may require different spacings, all the types of spaces to removeare configurable.

Subtitles over two linesJust checks if a subtitle has three or more lines, and uses Smart line adjust to fix it.

Too long/short durationSubtitle Workshop can identify if the duration of a subtitle is longer/shorter that aspecified minimum/maximum value and report it to you. Subtitles with too shortduration can be unreadable and subtitles with too long duration can be annoying. Thiserror must be fixed manually.

Too long linesDetects if a subtitle contains lines that are longer than a specified number of characters.Too long lines can exceed the width of the screen in some video players and this ispotentially dangerous.

5.5.2 Settings explained

To access to Information and Errors Settings, press [Alt]+[I] keys or the"Tools/Information and errors/Settings..." menu. Additionally you can access thisSettings from the Information and Errors window, pressing the "Settings" button.Now let's review all the options you will find.

General options

Mark errors in main form's listYou are able to let Subtitle Workshop mark the errors in the main list by enabling thisoption. You can specify Font Color/Style (bold, italic, underline).If the errors are marked in the main list, it is very easy to fix them manually, and in a lotof cases this is very useful. For example, if you have lots of long three lines subtitlesyou can mark them in a certain color, and then fix them all (one by one) using Divide

Page 40: Subtitle Workshop Manual

lines.If the marked error is difficult to identify visually (for example it is very hardsometimes to tell that a subtitle has got unnecessary spaces or unnecessary dots) youcan put the mouse over the subtitle with errors for half a second and you'll get adescription specifying exactly what type of error it has.

Mark errors on load subtitleIf this option is enabled, it performs an automated check for errors each time you load asubtitle file. This option is going to take effect only if "Mark errors in main form's list"is enabled.

Fix errors on load subtitleAutomatically fixes all the errors when the subtitle is loaded.

Fix one unit overlap at loadFixes the most common overlapping when the subtitle is loaded. Example:

Start time Final time Text

00:00:01,000 00:00:02,000 This is subtitle 1

00:00:02,000 00:00:03,000 This is subtitle 2

Would be changed to:

Start time Final time Text

00:00:01,000 00:00:02,000 This is subtitle 1

00:00:02,001 00:00:03,000 This is subtitle 2

Enabling this option is very safe.

OCR Script:Specifies the name of the OCR Script you are currently using. This script has to be inthe "OCRScripts" folder inside Subtitle Workshop's directory. All the scripts listed hereare all the ".ocr" files found in the above mentioned folder. The "Edit" button will openNotepad so you can edit the file manually, add or remove possible OCR Errors.

Advanced options

Repeatable charactersSpecifies all the characters that can be repeated, and that are going to be fixed if the"Repeated characters" fixing is enabled.

Prohibited charactersSpecifies all the characters that can't be in any subtitle, if the "Prohibited characters"fixing is enabled and a subtitle contains any of this characters, it will be deleted.

Tolerance for repeated subtitles

Page 41: Subtitle Workshop Manual

Specifies the maximum admittible difference between final time of the first subtitle andinitial time of the second one to detect and eventually fix a repeated subtitle.

Space after charactersSpecifies all the characters to use with the "Space after custom characters" repair. Thecharacters have to be one after the other (not separated by comma or whatever).

Space before charactersThe same as above but this characters will be used with the "Space before customcharacters" repair.

Too long durationSpecifies the value after which a duration is considered as too long.

Too short durationSpecifies the value before which a duration is considered as too short.

Too long lineSpecifies the number of characters after which a line is considered as too long.

Check for, fix, unnecessary spaces

You are able to choose what errors to check for, and what errors to fix. And also, youcan choose what unnecessary spaces to check for and what to fix.

5.5.3 OCR Scripts

The OCR Scripts are nothing but a serie of Find-ReplaceBy specifications in a human-friendly close to HTML syntax. What makes them powerful?. The commands that areavailable. The possibility of using regular expression makes possible for you to find andreplace almost anything needed in any language. A very important thing to know aboutOCR Scripts is that all commands are performed consecutively, that is, in the order theyare written.Let's now see a small example of an OCR Script:<SWOCRWordChars="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ñÑáéíóúÁÉÍÓÚäëïöü">

<!-- The comments are set just like in HTML --><ERROR Find="[A-ZÁ-Ú](l)" ReplaceBy="I"><ERROR Find="[a-zá-ú](I)" ReplaceBy="l"><ERROR Find="\d( :)" ReplaceBy=":"><ERROR UseREOnlyToFind="False" Find=",{2,}" ReplaceBy="...">

</SWOCR>

WordChars represents all the charcters that can form a word in your language. Thedefault is the string shown above. If no parameter is passed, the default will be used.This are one of the most common OCR errors in English language, as in OCR Engines,"l" (small "L") and "I" (big "i") have no difference at all, they are often misplaced.Another very common error is the inclussion of spaces before colon. In the short

Page 42: Subtitle Workshop Manual

example above Subtitle Workshop will use regular expressions on the search for errors.And if we don't want to use regular expressions?. For that we need to take a look at theparameters that define how you want the search to be made:

UseREUseRE="True" or UseRE="False". The default value is True. If it is set to false thenregular expressions will not be used in the search. Use it as False only if you want tosimplify the way find-replace commands are written, because if regular expressions aredisabled then the OCR scripts have few power.

UseREOnlyToFindUseREOnlyToFind="True" or UseREOnlyToFind="False". The default value is True.To explain how this works we need to see an example:<ERROR UseREOnlyToFind="True" Find="[a-z]at" ReplaceBy="dog">

Applied to "The name of my cat is Max" will return "The name of my dog is Max", but<ERROR UseREOnlyToFind="False" Find="[a-z](at)" ReplaceBy="dog">

Applied to "The name of my cat is Max" will return "The name of my cdog is Max".

In the first situation, when we are about to replace we also replace the part that is aregular expression (in this case "[a-z]", matching "c" this time).In the second situation, when we are about to replace we only use the regular expressionpart ("[a-z]") to search for the text, but we don't use it to replace. We will only replacethe part o the "Find=" text that is between parenthesis, that is, you need to write thenormal regular expression and the part that is "constant" and won't vary betweenparenthesis. This is extremely useful for the OCR Scripts (take a deep look atDefault.ocr to understand).

The following parameters are only available when "UseRE" is set to false:

WholeWordWholeWord="True" or WholeWord="False". Setting it to False is the same as notincluding it. If true, it will find the "Find=" text only if it is forming a Word.

CaseSensitiveCaseSensitive="True" or CaseSensitive="False". Setting it to False is the same as notincluding it. If true, it will be case sensitive while finding the text.

This are the most used commands, you can do a lot with them. But there are more:

PreserveCaseThe default value is False. If true, it will preserve the case of "Find" text when replacingto "ReplaceBy" text. For example, if we have this error:<ERROR UseRE="False" Find="DOG" WholeWord="True" PreserveCase="True"ReplaceBy="CAT">

As it is not case sensitive, we suppose Subtitle Workshop finds the text "Dog" and not"DOG". When replacing to "CAT", it will clone the case of the text it found, so it willreplace "Dog" by "Cat" and not by "CAT".

Page 43: Subtitle Workshop Manual

Syntax of Regular Expressions

Introduction

This document is taken from TRegExpr help file, an excellent Regular Expressionslibrary for Delphi, by Andrey V. Sorokin.

Regular Expressions are a widely-used method of specifying patterns of text to searchfor. Special metacharacters allow You to specify, for instance, that a particular stringYou are looking for occurs at the beginning or end of a line, or contains n recurrences ofa certain character.Regular expressions look ugly for novices, but really they are very simple (well, usuallysimple ;) ), handly and powerfull tool.

I strongly recommend you to play with regular expressions. Let's start our learning trip!

Simple matches

Any single character matches itself, unless it is a metacharacter with a special meaningdescribed below.

A series of characters matches that series of characters in the target string, so the pattern"bluh" would match "bluh" in the target string. Quite simple, eh?

You can cause characters that normally function as metacharacters or escapesequences to be interpreted literally by 'escaping' them by preceding them with abackslash "\", for instance: metacharacter "^" match beginning of string, but "\^" matchcharacter "^", "\\" match "\" and so on.

Examples:

foobar matchs string 'foobar'

\^FooBarPtr matchs '^FooBarPtr'

Escape sequences

Characters may be specified using a escape sequences syntax much like that used in Cand Perl: "\n'' matches a newline, "\t'' a tab, etc. More generally, \xnn, where nn is astring of hexadecimal digits, matches the character whose ASCII value is nn. If Youneed wide (Unicode) character code, You can use '\x{nnnn}', where 'nnnn' - one ormore hexadecimal digits.

\xnn char with hex code nn

\x{nnnn} char with hex code nnnn (one byte for plain text and two bytes for Unicode)

\t tab (HT/TAB), same as \x09

\n newline (NL), same as \x0a

\r car.return (CR), same as \x0d

Page 44: Subtitle Workshop Manual

\f form feed (FF), same as \x0c

\a alarm (bell) (BEL), same as \x07

\e escape (ESC), same as \x1b

Examples:

foo\x20bar matchs 'foo bar' (note space in the middle)

\tfoobar matchs 'foobar' predefined by tab

Character classes

You can specify a character class, by enclosing a list of characters in [], which willmatch any one character from the list.

If the first character after the "['' is "^'', the class matches any character not in the list.

Examples:

foob[aeiou]r finds strings 'foobar', 'foober' etc. but not 'foobbr', 'foobcr' etc.

foob[^aeiou]r find strings 'foobbr', 'foobcr' etc. but not 'foobar', 'foober' etc.

Within a list, the "-'' character is used to specify a range, so that a-z represents allcharacters between "a'' and "z'', inclusive.

If you want "-'' itself to be a member of a class, put it at the start or end of the list, orescape it with a backslash. If you want ']' you may place it at the start of list or escape itwith a backslash.

Examples:

[-az] matchs 'a', 'z' and '-'

[az-] matchs 'a', 'z' and '-'

[a\-z] matchs 'a', 'z' and '-'

[a-z] matchs all twenty six small characters from 'a' to 'z'

[\n-\x0D] matchs any of #10,#11,#12,#13.

[\d-t] matchs any digit, '-' or 't'.

[]-a] matchs any char from ']'..'a'.

Metacharacters

Metacharacters are special characters which are the essence of Regular Expressions.There are different types of metacharacters, described below.

Metacharacters - line separators

^ start of line

Page 45: Subtitle Workshop Manual

$ end of line

\A start of text

\Z end of text

. any character in line

Examples:

^foobar matchs string 'foobar' only if it's at the beginning of line

foobar$ matchs string 'foobar' only if it's at the end of line

^foobar$ matchs string 'foobar' only if it's the only string in line

foob.r matchs strings like 'foobar', 'foobbr', 'foob1r' and so on

The "^" metacharacter by default is only guaranteed to match at the beginning of theinput string/text, the "$" metacharacter only at the end. Embedded line separators willnot be matched by "^'' or "$''.You may, however, wish to treat a string as a multi-line buffer, such that the "^'' willmatch after any line separator within the string, and "$'' will match before any lineseparator. You can do this by switching On the modifier /m.The \A and \Z are just like "^'' and "$'', except that they won't match multiple timeswhen the modifier /m is used, while "^'' and "$'' will match at every internal lineseparator.

The ".'' metacharacter by default matches any character, but if You switch Off themodifier /s, then '.' won't match embedded line separators.

TRegExpr works with line separators as recommended at www.unicode.org(http://www.unicode.org/unicode/reports/tr18/):

"^" is at the beginning of a input string, and, if modifier /m is On, also immediatelyfollowing any occurrence of \x0D\x0A or \x0A or \x0D (if You are using Unicodeversion of TRegExpr, then also \x2028 or \x2029 or \x0B or \x0C or \x85). Note thatthere is no empty line within the sequence \x0D\x0A.

"$" is at the end of a input string, and, if modifier /m is On, also immediately precedingany occurrence of \x0D\x0A or \x0A or \x0D (if You are using Unicode version ofTRegExpr, then also \x2028 or \x2029 or \x0B or \x0C or \x85). Note that there is noempty line within the sequence \x0D\x0A.

"." matchs any character, but if You switch Off modifier /s then "." doesn't match\x0D\x0A and \x0A and \x0D (if You are using Unicode version of TRegExpr, then also\x2028 and \x2029 and \x0B and \x0C and \x85).

Note that "^.*$" (an empty line pattern) doesnot match the empty string within thesequence \x0D\x0A, but matchs the empty string within the sequence \x0A\x0D.

Multiline processing can be easely tuned for Your own purpose with help of TRegExpr

Page 46: Subtitle Workshop Manual

properties LineSeparators and LinePairedSeparator, You can use only Unix styleseparators \n or only DOS/Windows style \r\n or mix them together (as described aboveand used by default) or define Your own line separators!

Metacharacters - predefined classes

\w an alphanumeric character (including "_")

\W a nonalphanumeric

\d a numeric character

\D a non-numeric

\s any space (same as [ \t\n\r\f])

\S a non space

You may use \w, \d and \s within custom character classes.

Examples:

foob\drmatchs strings like 'foob1r', ''foob6r' and so on but not 'foobar', 'foobbr' andso on

foob[\w\s]rmatchs strings like 'foobar', 'foob r', 'foobbr' and so on but not 'foob1r','foob=r' and so on

TRegExpr uses properties SpaceChars and WordChars to define character classes \w,\W, \s, \S, so You can easely redefine it.

Metacharacters - word boundaries

\b Match a word boundary

\B Match a non-(word boundary)

A word boundary (\b) is a spot between two characters that has a \w on one side of itand a \W on the other side of it (in either order), counting the imaginary characters offthe beginning and end of the string as matching a \W.

Metacharacters - iterators

Any item of a regular expression may be followed by another type of metacharacters -iterators. Using this metacharacters you can specify number of occurences of previouscharacter, metacharacter or subexpression.

* zero or more ("greedy"), similar to {0,}

+ one or more ("greedy"), similar to {1,}

? zero or one ("greedy"), similar to {0,1}

{n} exactly n times ("greedy")

{n,} at least n times ("greedy")

{n,m} at least n but not more than m times ("greedy")

Page 47: Subtitle Workshop Manual

*? zero or more ("non-greedy"), similar to {0,}?

+? one or more ("non-greedy"), similar to {1,}?

?? zero or one ("non-greedy"), similar to {0,1}?

{n}? exactly n times ("non-greedy")

{n,}? at least n times ("non-greedy")

{n,m}? at least n but not more than m times ("non-greedy")

So, digits in curly brackets of the form {n,m}, specify the minimum number of times tomatch the item n and the maximum m. The form {n} is equivalent to {n,n} and matchesexactly n times. The form {n,} matches n or more times. There is no limit to the size ofn or m, but large numbers will chew up more memory and slow down r.e. execution.

If a curly bracket occurs in any other context, it is treated as a regular character.

Examples:

foob.*r matchs strings like 'foobar', 'foobalkjdflkj9r' and 'foobr'

foob.+r matchs strings like 'foobar', 'foobalkjdflkj9r' but not 'foobr'

foob.?r matchs strings like 'foobar', 'foobbr' and 'foobr' but not 'foobalkj9r'

fooba{2}r matchs the string 'foobaar'

fooba{2,}r matchs strings like 'foobaar', 'foobaaar', 'foobaaaar' etc.

fooba{2,3}r matchs strings like 'foobaar', or 'foobaaar' but not 'foobaaaar'

A little explanation about "greediness". "Greedy" takes as many as possible, "non-greedy" takes as few as possible. For example, 'b+' and 'b*' applied to string 'abbbbc'return 'bbbb', 'b+?' returns 'b', 'b*?' returns empty string, 'b{2,3}?' returns 'bb', 'b{2,3}'returns 'bbb'.

You can switch all iterators into "non-greedy" mode (see the modifier /g).

Metacharacters - alternatives

You can specify a series of alternatives for a pattern using "|'' to separate them, so thatfee|fie|foe will match any of "fee'', "fie'', or "foe'' in the target string (as would f(e|i|o)e).The first alternative includes everything from the last pattern delimiter ("('', "['', or thebeginning of the pattern) up to the first "|'', and the last alternative contains everythingfrom the last "|'' to the next pattern delimiter. For this reason, it's common practice toinclude alternatives in parentheses, to minimize confusion about where they start andend.Alternatives are tried from left to right, so the first alternative found for which the entireexpression matches, is the one that is chosen. This means that alternatives are notnecessarily greedy. For example: when matching foo|foot against "barefoot'', only the"foo'' part will match, as that is the first alternative tried, and it successfully matches thetarget string. (This might not seem important, but it is important when you are capturingmatched text using parentheses.)Also remember that "|'' is interpreted as a literal within square brackets, so if You write

Page 48: Subtitle Workshop Manual

[fee|fie|foe] You're really only matching [feio|].

Examples:

foo(bar|foo) matchs strings 'foobar' or 'foofoo'.

Metacharacters - subexpressions

The bracketing construct ( ... ) may also be used for define r.e. subexpressions (afterparsing You can find subexpression positions, lengths and actual values in MatchPos,MatchLen and Match properties of TRegExpr, and substitute it in template strings byTRegExpr.Substitute).

Subexpressions are numbered based on the left to right order of their openingparenthesis.First subexpression has number '1' (whole r.e. match has number '0' - You can substituteit in TRegExpr.Substitute as '$0' or '$&').

Examples:

(foobar){8,10} matchs strings which contain 8, 9 or 10 instances of the 'foobar'

foob([0-9]|a+)r matchs 'foob0r', 'foob1r' , 'foobar', 'foobaar', 'foobaar' etc.

Metacharacters - backreferences

Metacharacters \1 through \9 are interpreted as backreferences. \<n> matchespreviously matched subexpression #<n>.

Examples:

(.)\1+ matchs 'aaaa' and 'cc'.

(.+)\1+ also match 'abab' and '123123'

(['"]?)(\d+)\1matchs '"13" (in double quotes), or '4' (in single quotes) or 77 (withoutquotes) etc

Modifiers

Modifiers are for changing behaviour of TRegExpr.

There are many ways to set up modifiers.Any of these modifiers may be embedded within the regular expression itself using the(?...) construct.Also, you can assign to appropriate TRegExpr properties (Modifier for example tochange /x, or ModifierStr to change all modifiers together). The default values for newinstances of TRegExpr object defined in global variables, for example global variableRegExprModifierX defines value of new TRegExpr instance ModifierX property.

Page 49: Subtitle Workshop Manual

iDo case-insensitive pattern matching (using installed in you system locale settings),see also InvertCase.

mTreat string as multiple lines. That is, change "^'' and "$'' from matching at only thevery start or end of the string to the start or end of any line anywhere within thestring, see also Line separators.

sTreat string as single line. That is, change ".'' to match any character whatsoever,even a line separators (see also Line separators), which it normally would not match.

gNon standard modifier. Switching it Off You'll switch all following operators intonon-greedy mode (by default this modifier is On). So, if modifier /g is Off then '+'works as '+?', '*' as '*?' and so on

xExtend your pattern's legibility by permitting whitespace and comments (seeexplanation below).

r

Non-standard modifier. If is set then range à-ÿ additional include russian letter '¸', À-ß additional include '¨', and à-ß include all russian symbols. Sorry for foreign users,but it's set by default. If you want switch if off by default - set false to global variableRegExprModifierR.

The modifier /x itself needs a little more explanation. It tells the TRegExpr to ignorewhitespace that is neither backslashed nor within a character class. You can use this tobreak up your regular expression into (slightly) more readable parts. The # character isalso treated as a metacharacter introducing a comment, for example:

((abc) # comment 1

| # You can use spaces to format r.e. - TRegExpr ignores it(efg) # comment 2)

This also means that if you want real whitespace or # characters in the pattern (outside acharacter class, where they are unaffected by /x), that you'll either have to escape themor encode them using octal or hex escapes. Taken together, these features go a long waytowards making regular expressions text more readable.

Perl extensions

(?imsxr-imsxr)You may use it into r.e. for modifying modifiers by the fly. If this construction inlinedinto subexpression, then it effects only into this subexpression.

Examples:

(?i)Saint-Petersburg matchs 'Saint-petersburg' and 'Saint-Petersburg'

(?i)Saint-(?-i)Petersburg matchs 'Saint-Petersburg' but not 'Saint-petersburg'

(?i)(Saint-)?Petersburg matchs 'Saint-petersburg' and 'saint-petersburg'

((?i)Saint-)?Petersburg matchs 'saint-Petersburg', but not 'saint-petersburg'

(?#text) A comment, the text is ignored. Note that TRegExpr closes the comment as

Page 50: Subtitle Workshop Manual

soon as it sees a ")", so there is no way to put a literal ")" in the comment.

5.6 Add FPS from AVI

Useful if you have a movie and it's corresponding subtitle (which is a frame based one)and you want to edit it but you don't know the FPS of the movie. If this is your case thenuse this feature. It lets you find out the FPS of a movie file and add it to SubtitleWorkshop's list.There are two ways in which you can use this feature:

1. Using the "Tools/Add FPS from AVI" menu. This method reads the header ofthe video file, and thus it only works with AVI files (not MPEG, ASF, WMV,etc). It is very fast and if the file is a valid AVI file, it works very well.

2. Loading the movie from the "Movie/Open" menu. This method uses DirectX,and so it will work with all kind of video files. There are some cases with AVIfiles that DirectX detects 0 as FPS, in this cases, Subtitle Workshop willalternatively read the header of the AVI.

Each time you use this feature, the FPS of the video will be added to all the places inwhich there are boxes to select FPS.

5.7 External preview

This option makes possible to directly test the subtitle file you are working with in yourfavourite movie player. The movie player you use must support command line, and aminimum of one of the subtitle formats that Subtitle Workshop supports.

In the Settings window, go to External preview and then to General. Here you mustselect the exe file of the video player you want to use. If the video player is alreadyassociated with .AVI files, click "Detect associated program" button.Then select if you want to be asked for a different video each time you test the subtitle,or if you are always going to test the subtitle with the same video.

In the Advanced section, we have other necessary things we have to configure. Selectthe format in which you want the temporary subtitle file to be saved (it will be saved inthe temp directory). Only select Original format if you are sure that the video player youare using supports the subtitle format that you are creating/editing.

Finally, you must select the parameters to send to the video player. VIDEO_FILErepresents the video file, and SUBT_FILE represents the subtitle file. You may addother parameters, like full screen, etc. Please be sure (in most cases) to add SUBT_FILEand VIDEO_FILE between " " so if one of the files contains one (or more) spaces, itwill be sent on the same parameter.

When you finished configuring all this settings, you can test the subtitle pressing the F8key or the "Tools/External preview" menu.

Page 51: Subtitle Workshop Manual

Tested video players:

1. BSPlayer"VIDEO_FILE" "SUBT_FILE" -fs(Save temp. file in SubRip format)

2. ViPlay/MOVIE:"VIDEO_FILE" /SUBTITLE:"SUBT_FILE" /FS(Save temp. file in any format)

5.8 Internal Preview: The video engine

The Video Preview window: have a look at how your subtitles will perform

This mode will only works (and makes sense) when you have opened a subtitle file anda video file (see Loading a subtitle file and Loading a video file). If you have done both,a media player interface will be inserted into the upper part of the main editor window.The size of it can be adjusted by clicking the mouse on the border of the video andsubtitle part of the window (a new cursor symbol will show up) and dragging up ordown . Adjusting the video window will also resize the video itself .

Note: If you have an automatic subtitle display filter such as VobSub installed, it will ofcourse also be effective in here. This may result in two subtitles being displayed on topof each other, at the same time. In that case, rename the subtitle file opened unwillingly,or uninstall the filter.

The video window is composed of the displayed video itself, a scroll bar, a set ofbuttons and a set of figures giving current play time, total play time and frames persecond (FPS) of the video. The subtitle file opened will be displayed on top of the video,following it's timing. Font, color, size and other attributes can be adjusted in Settings.

Buttons (from left to right):

Play/PauseClick once to play, and again to pause.

StopStops playback and rewinds to 00:00:00.000.

Toggle scroll listIf in use (will be set in a darkened square), Subtitle Workshop marks the subtitleitem being currently displayed in the video in the editor window, and scrolldown if necessary.

Page 52: Subtitle Workshop Manual

Jump to previous/next subtitleThis two buttons just move the player's position to the initial time of theprevious/next subtitle of the one currently being displayed.

Rewind & ForwardIf pushed once, they will rewind or forward the amount of time specified inSettings. Preset is 0.5 seconds (500 milliseconds).If pushed continuously, they will scroll through the video at rather fast pace.Both ways can be used if the video is playing, paused or stopped.

Alter playback rateIf pressed (will be set in a dark square), video playback will be slower/faster bythe percentage specified in Settings.Preset is 50%.

Move subtitleThis button moves all the selected subtitles, so that the first one's start time isequal to the player's time. It doesn't modify the duration of the subtitles, just actslike a "quick" version of "Set delay".

Set Start Time & Set Final TimeWhen used, both buttons will affect the subtitle item currently selected in theeditor window."Set start time" will overwrite the start time value of this subtitle to the time thevideo is currently on, and "Set final time" will do just this for the final time, andjump to the next subtitle.

Start Subtitle & End Subtitle"Start subtitle" sets an internal variable to the time in which the movie is playingat that moment, "End subtitle" creates a new subtitle with Initial time equal tothat variable and final time equal to the current time. Very useful for creatingsubtitles from scratch.

Mark as first synch point, Mark as last synch point, and Add subtitle/videsynchronization pointThis buttons are explained in Adjust subtitles.

The seek bar can be used like the one in Windows Media Player, ViPlay or any otherplayer. The smallest possible seeking interval depends on the length of the video file.

5.9 SAMI Language Extractor

This feature is intended to extract one or more languages from subtitles in SAMI formatthat contain more than one language. Subtitle Workshop doesn't support multilingualSAMIs so with this tool you can extract the desired languages and open them as onelanguage SAMIs.

Page 53: Subtitle Workshop Manual

Frequently Asked Questions [FAQ]

The most up to date FAQ, the official one, is available here.

Contact information

You are free to send me your comments, ideas, suggestions, language files, bug reports,etc. For contact information, enter the "Contact us" section in http://www.urusoft.net/.You can also use the forum.

You can visit us on the internet in the following direction: http://www.urusoft.net.

License

This program is provided 'AS IS', without the guarantee of any type. The whole riskwith regard to the use of this program is taken by the user. The author doesn't becomeresponsible for any direct or indirect, incidental or consequent damage, being from anyflaw in the program.

This program should be distributed freely, it cannot be sold or resold, distributed as partof any commercial package, used in a commercial, used environment or distributed assupport of a commercial, or used service and/or distributed in any activity type withends of lucre without the author's previous signed authorization, with the only exceptionof the distribution in magazines (read below).

Magazine publishers interested in including URUSoft programs in a CD as a part of anedition of their magazine must send us a message via e-mail telling us that they aregoing to distribute the program, detailing it's name and version and also name andedition number of the magazine.In any future inclusion of the program in the magazine the above mentioned processmust be repeated.

The integrity of the file of distribution of this program should be original as it isdistributed by its author. All their files should be distributed together in the originalformat.

If this program is an upgrade of an old version, you will be able to use it or to onlytransfer it together with the product to upgrade. All Brand Names are Copyright of theirRespective Owners. The Author of this program is NOT associated with any company.

IF YOU DON'T ACCEPT THESE TERMS, YOU SHOULD CEASE ANDDESIST TO USE THIS PROGRAM.