Professional Documents
Culture Documents
(All key shortcuts mentioned in this manual are based on the defaults)
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 1 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
3.8 Sort
3.10 Delete unnecessary links
3.11 Search & Replace
3.12 Marked subtitles
Chapter 4: Settings explained
4.1 General
4.1.1 Advanced
4.1.2 Charsets
4.2 Formats
4.3 File types
4.4 Save
4.5 Video preview
4.5.1 Subtitles
4.6 External preview
4.6.1 General
4.6.2 Advanced
4.7 Look
4.7.1 Program
4.7.2 List
4.7.3 Menu
Chapter 5: Tools
5.1 Spell check
5.2 Batch convert
5.3 Split subtitles
5.4 Join subtitles
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
5.6 Add FPS from AVI
5.7 External preview
5.8 Internal Preview: The video engine
5.9 SAMI Language Extractor
Frequently Asked Questions [FAQ]
Contact information
License
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 subtitle editor or translator easier. The visual interface is one of the
many things that characterizes Subtitle Workshop. Most of the options are indeed, self-explanatory so even a kid can
use this software.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 2 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 3 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 4 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
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)
It is simply a dynamic link library (DLL) which contains the Subtitle Workshop reading and writing engine. This DLL
was created so updates in the reading engine of Subtitle Workshop can be published without releasing a new version,
that not only includes bug fixes, but also new subtitle formats. Because of this DLL, you only have to download few 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/bug fixes will make effect.
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 user friendly but at the same time keeps the
basic and advanced functionality in easy to access menus.
The interface is ideal for virtually *any* task - you can obtain an excellent performance creating subtitles, fixing times
manually, translating subtitles, and of course, using all the built in features.
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 are associated, 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 is a valid file and which is the
format of it. Most of the files will load properly, but if you get the "The file is a bad subtitle or an unsupported format"
error message, there is still some chance you can load the file. First of all you MUST be sure about the format of the
file, if you are, then proceed like this:
This way there will be no automatic format recognition nor file check. If the file still can't be loaded, you will get an
error message. In this case, if you are sure the file is a text-based subtitle format e-mail it to me and I'll fix it.
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 right codecs installed. If you don't, download Coda Codec Pack,
it should fix most of the playback problems.
Using Subtitle Workshop you can easily create new files from scratch, and then save them 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 by the "File/Save" menu or pressing [Ctrl]+[S] keys.
You just need to press the Insert key or click the "Edit/Insert subtitle" menu. The subtitle will always be added right
after the focused item. The default duration of the new subtitle is one second, and the start time of it is always going to
be the final time of the previous one plus 1 millisecond. If you are adding the subtitle in a blank list, the initial time of it
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 6 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
will be zero.
If you want to insert a subtitle before the selected item, press [Shift]+[Insert] keys or the "Edit/Insert before" menu.
Select all the subtitles you wish to delete by holding Ctrl key and click in them and press the Delete key or click the
"Edit/Remove selected" menu.
To edit the initial time just click the "Show" field, set the time (or frames) you wish and 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 the right side of each text box.
To edit the text, simply click the "Text" box and write the desired text. In the list of subtitles, the character "|" (pipe)
represents new line.
First of all, you must know that Subtitle Workshop only supports tags for the whole subtitle. So if you really want to
apply font style over one part of the subtitle, you are going to need notepad. As it only supports tags for the whole
subtitle, you only need to open the tags because closing them would be useless. The supported tags are:
To add this tags you can simply write them, and additionally you can right-click the list of subtitles and a menu will pop
up, you can use this menu to control the all tags on the selected subtitles. Note that more than one tag can be used in the
same subtitle (of course, if they are all different tags), it may have even the 4 supported tags at the same time.
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 lost.
Knowing the difference between this two fields is crucial to work with Subtitle Workshop.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 7 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Input FPS is the FPS of the movie that the subtitle was originally made for. FPS is the FPS of the movie you want it to
adjust the subtitle to. You have to modify this field in order 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 frame based
subtitles (it won't have any effect in the times).
To open a file:
SubtitleWorkshop.exe "/OPEN(File)"
Example:
SubtitleWorkshop.exe "/OPEN(C:\Subtitle.srt)"
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 have to be separated using the decimal separator (configurable from
Control panel/Regional and 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 an updated version of SubtitleAPI you may
specify new formats, since the possible formats depends 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
After doing this Subtitle Workshop will save a list of the supported formats to the path in 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/Phoenix Japanimation Society/25/29,97)"
SubtitleWorkshop.exe "/CONVERT(C:\Subtitle.vsf/C:\Subtitle.jss/JACOSub 2.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. We specify 0 as FPS since we are loading
a time based format. As in the parameter to convert a file, if FPS is not a rounded value, the decimal digits have to be
separated using the decimal separator of the PC in which Subtitle Workshop is running. If you specify a wrong FPS and
FPS is really needed, then the default FPS (25) will be used.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 8 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Warning! Do *NOT* translate the text between "[ ]" and the text after the % sign (for example "%s" or "%d").
Otherwise the language file will not work properly!.
Tips:
If the language you are translating to use another charset than ANSI_CHARSET do not forget to change it on the
[General] section. Read charsets.txt for a reference.
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 installation package. The name of the
translator will be shown in the About Subtitle Workshop window.
To access the custom formats dialogue first load a subtitle, then click the "File/Save as..." menu and then click the
"Custom format" button.
Format name
This 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 this when saving the file. Please note
that the format of the extension must be "*.CHARS".
Structure
Specifies the time structure. h represents hours, m minutes, s seconds and z milliseconds. 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 frames
Check the "Time" field if you are going to work with time. If you are going to work with 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.
FPS
Select the FPS of the subtitle you are saving. If you are saving a time subtitle to another time subtitle you don't need to
touch this.
Load project
Click this button to load the a custom format project from an already saved file (*.cfp).
Save project
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 9 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Click this button to save the project into a *.cfp file. This will save all the information visible on the "Custom formats"
dialogue.
All you have to do is to write those three sections in the text box. When you first open the "Custom formats" dialogue
you can see a commented example. Comments are started 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 this two characters
into a file you may use {asterisk} (this will write only one asterisk). To write two, "{asterisk}*" or "{asterisk}
{asterisk}" are the same.
First write the first section (if there is). Then begin the second section (the repeating part) with {RepeatSub}.
Repeating section
In this section it is possible to write 4 things.
1. The start time of the subtitle. You have to write {swStart} and Subtitle Workshop 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:FRAMES format. If you want to put zeros
in the left until you reach the desired length, you can write {swFrameStart,DesiredTotalLength}. You can do the
same with the end frame.
2. The end time of the subtitle. You have to write {swEnd} and Subtitle Workshop will replace it by the final time
(or frames) of the actual subtitle. You can also write {swFrameEnd}.
3. The subtitle's text. You have to write {swText} and Subtitle Workshop will replace 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}. This variable holds the actual index of
the subtitle. If you are in the first, subtitle, it will be "1", if you are in the second, it will be "2", etc. Some formats
like SonicDVD need to add zeros in the left until the length of the number string is for example 4. For this, write
{SubCount,DesiredTotalLength} and Subtitle Workshop will add zeros automatically.
Check the "CEF Examples" folder, and load some examples to see how to use this feature better.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 10 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
set a frames delay. Subtitle Workshop will automatically detect it. You are able to choose if you want to apply the delay
to all the subtitles or just to the selected ones, useful if only one part of the subtitle gets appears later than it should.
This method offers a lot of accuracy, and is recommended in most cases. After you loaded the subtitle file and video, do
this:
Play the video until you reach the first spoken dialog or the first place that should 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 dialog or the last place that should be
subtitled, take note the time, too.
You can additionally take this two time values from an external video player instead 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 the first time, and in "Last spoken line" write the last time. Then press
Adjust! button.
This method will work very well in most cases. It works by taking two points of the subtitle 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 will be called "Last sync points". Each pair of points consist in one point in the subtitle and one point
in the video, the point in the subtitle has the wrong times and the point of the video has the right times. After selecting
the first sync points and last sync points Subtitle Workshop calculates the rest of the times appropriately. The closer first
sync points 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 first subtitle, and the point of the subtitle selected in the last
sync points corresponds to the last subtitle, then the first formula (first and last dialogs) will be used.
First of all, select the subtitle you want to mark as first point. The first point in the 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 first point in the video), when you do,
click the "Mark as first sync point" button or press the [Ctrl]+[1] keys.
Now select the subtitle you want to mark as last sync point. The last sync point will be the selected subtitle's
initial time.
Play the video until you find the right time for that subtitle (this will be the last point in the video), when you do,
click the "Mark as last sync point" button or press the [Ctrl]+[2] keys.
After doing this you will get a confirmation message, click "Yes" and the subtitle will be instantly synchronized.
Useful if you have desynchronized subtitles in one language and want to quickly adjust them to an already adjusted
subtitle file in another language. This method will work even if both files have a different number of subtitles, the only
requirement for proper adjustment 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 to synchronized subtitles" menu or
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 11 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
press the [Shift]+[Ctrl]+[B] keys, and load the synchronized file. Note: this method is NOT the same as the "read times
from file" feature.
Use this if the traditional two points adjust fails. This unique feature makes possible to adjust subtitles in the worst
cases, when desynchronization is not constant, or is different in different parts of the subtitle. This system lets you select
multiple subtitle/video points so that you can synchronize the subtitle by "parts". The maximum number 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 load the corresponding video. In
the video preview controls, you will notice that last button 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 always be 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, click the "Add subtitle/video
synchronization point" button or press the [Ctrl]+[Alt]+[P] keys. The Adjust subtitles window will show, and
advanced mode will be set by default. This window is "non-modal", that means, you can still 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 can additionally use the "Add" button
to enter a time manually, or the "Add from media" button to add points directly from the Adjust subtitles window
(works the 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 points scope" option. I will try to
describe the three possibilities:
Extrapolate. Subtitle Workshop will use mathematical routines to calculate the times for every subtitle in the file
even if it is outside the scope of points. Using this you can have behaviours like the one you would obtain using
"synchronize using two points", but with more points.
Return original time (no changes). If a time is outside the points range and you want to calculate the new time,
Subtitle Workshop will return the original time so no changes will be made. This is useful for eg. if you only want
to adjust subtitles 100-200 and leave all other subtitles like they are.
Return displacement of neighbour point. If desired time is before first sync point, then it will calculate the new
time using the displacement of the first sync point. If desired time is after last sync point, then it will calculate the
new time using the displacement of the last sync point. Useful sometimes.
When you are done configuring all the settings, click the Adjust! button.
To set duration limits click the "Edit/Timings/Set duration limits..." menu or press the [Ctrl]+[L] keys. After that
you need to enter the maximum and minimum duration in milliseconds and press the Apply button.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 12 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Time expander/reducer is a very nice feature in the cases you have a subtitle file that contains some long subtitles with
short durations. It is close to "Duration limits" but much more useful if the file only has long subtitles with short times.
This feature lets you expand or reduce the duration of certain subtitles under certain conditions. To access 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, and may be set in seconds (with a
precision of up to one millisecond) if you are working in time mode, or in frames (with a precision of up to one frame) if
you are working in frames mode. You can also choose to expand/reduce the duration only under certain conditions, only
if the subtitle is longer than a customizable number of characters and/or only 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
checked so that no overlapping errors occur while increasing the final time of the subtitles. When you have configured
everything, you have to select if you want to apply time expander to all the subtitles or only to the selected subtitles. To
finally expand the durations of the pertinent subtitles, press the Apply button.
The use of this feature together with Duration limits and Detect too long/short durations from Information and Errors
can give excellent results in a short time.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 13 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Subtitle Workshop isn't just an ordinary subtitle editor - and thus it offers many text related functions to ease your work.
To use smart line adjust over a subtitle just select it and click the "Edit/Texts/Smart line adjust" menu or press
[Ctrl]+[E]. Smart line adjust will take effect over all the selected 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 just thought to help a bit if the lines
needed to adjust are a lot, and does its job quite well. It may act completely wrongly if there are words composed by the
"-" sign, although I've added a little detection for words composed with "-" sign. If you want to apply Smart Line Adjust
over a whole file, you can do it, but reading all the subtitle after that is highly recommended.
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 is very nice. I don't want to hear it.".
if ""..." detection" is enabled, it will check if the final three characters of the previous subtitle are "..." and if
they are, then it will not uppercase the first character of the current subtitle (it will think it's the continuation of the
previous subtitle). If "Only first letter of first word" option is enabled, Subtitle Workshop will uppercase only
first letter of each sentence and leave all other words like they are.
2. "Lowercase" lower cases the whole text. Turns "HELLO!, thiS iS VERY nice. i don'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. i don't WANT tO heAr IT." to
"HELLO!, THIS IS VERY NICE. I DON'T WANT TO HEAR IT.".
4. "Title type" only upper cases the first letter of each word. Turns "HELLO!, thiS iS VERY nice. i don't WANT
tO heAr IT." to "Hello!, This Is Very Nice. I Don'T Want To Hear It."
5. "Inverse type" lower cases the uppercase characters and upper cases the lowercase characters. It reverses case.
Turns "HELLO!, thiS iS VERY nice. i don't WANT tO heAr IT." to "hello!, THIs Is very NICE. I DON'T want
To HEaR it.".
Note that if you are working in translator mode, convert case will only work for original text. If you want it to work for
translation, then use the "Swap" feature.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 14 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
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 that if the selected subtitle has only one line that is shorter than the
"Break line after" value set 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 first subtitle's text and the other one with
second subtitle's text. You have to select after which line to divide, the default value will be correct most of the times.
That option will be disabled if the subtitle you will divide has only two lines. When you change this value, the text of
both text boxes will be updated. If you notice that a line break disappears in some of the parts, go to Settings/Advanced
and uncheck "Smart line adjust automatically". If that option is checked, after updating the text of each text box, it will
be smartly adjusted into one or two lines. If you want to do it manually, pass the focus to the desired text box and press
[Ctrl]+[E].
After this you should focus on the times of the subtitles. Most of the times the second subtitle will be displayed
immediately after the first one, and so it is recommended to leave the "Continue directly" check box checked. If the
second subtitle should be displayed some time after the first one, you have to uncheck the check box and write the start
time of the second subtitle. Additionally you can use the time proportion buttons available 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 can also choose if you want to use the original subtitle's time with proportionality buttons or to calculate
an automatic duration for each new subtitle. In the second case, Subtitle Workshop will calculate the duration of the first
new subtitle (based on duration per character on the original subtitle) and use it to calculate the duration of the second
new subtitle.
Finally press the "Divide!" button. When working in translator mode, divide lines will only insert an untranslated line
in the translation, it will not divide the lines since it only works for original subtitle.
"This is the extremely long text in which we are going to use this feature, that will break what you are reading in
more lines."
To:
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 15 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
The lines have respectively 43, 40 and 41 characters. As you can see, no line exceeds the maximum line length.
The resulting text doesn't look good on the screen, so this feature should be used together with "Divide lines".
Becomes:
The final time of the new subtitle becomes the final time of the last selected subtitle.
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.
When in Translator mode, this feature will only work in original text. To make it work in translation, use the "Swap"
feature.
You can specify if you want to keep the order of the lines or not, for that, go to Settings/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.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 16 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
When in Translator mode, this feature will only affect translation. To make it work in original text, use the "Swap"
feature or exit translator mode.
To fix the punctuation, select the desired subtitles and press [Shift]+[Ctrl]+[F] keys or the "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.
Becomes:
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.
Case sensitive
Performs the search/replace being sensitive to UPPERCASE and lowercase characters.
The text to find or to replace may contain line breaks, and thus we can say it can be multi-line. Character "|" (pipe)
represents new line. If you want to search for "|" then use "||" (two pipes).
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 17 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
4.1 General
Always on top
Maintains the Subtitle Workshop's main window above all the other windows.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 18 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Useful 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.
4.1.1 Advanced
Shift time
Time to shift subtitle forwards/backwards with the shift subtitles feature.
4.1.2 Charsets
Original charset
Charset to display characters in the "Text" column.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 19 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Translation charset
Charset to display characters in the "Translation" column. Only useful if you work in translator mode.
4.2 Formats
Default format
Specifies the default format to use in all the windows where there are formats lists (eg. Join subtitles, Split, etc).
4.4 Save
Ask to save on exit program/close subtitle
Subtitle Workshop will display the "File has changed. Do you want to save the changes?." 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 explorer when there is already a loaded file, this message will be also shown.
Save as backup
Saves the original/translated file as a backup (FileName.ext.bak) instead of overwriting the original/translated file.
1. Focus text box will pass the focus to the "Text" box, or, if you are in translator mode to the "Translation" box.
2. Go to subtitles time in video will jump directly to the start time of the subtitle in the video.
3. Go N seconds before subtitle in video will jump the "Seconds to jump" value before the initial time of the
subtitle in the video.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 20 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
4.5.1 Subtitles
Most of the other things here don't need any kind of explanation, everything you modify can be seen in the "SAMPLE"
subtitle.
4.6.1 General
4.6.2 Advanced
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 21 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
open. VIDEO_FILE represents the video file and SUBT_FILE the subtitle file. Look at the help file of the video player
to see the specification on the command line parameters.
4.7 Look
4.7.1 Program
4.7.2 List
4.7.3 Menu
Chapter 5: Tools
Must-have features in every subtitle tool.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 22 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Note: this feature may give errors (TOleExeption) some times, this is not because of Subtitle Workshop, but because of
Word. But anyway, it works pretty well most of the time.
Click the "Tools/Batch convert..." menu or press [Ctrl]+[M]. After doing this, you should follow this steps:
1. Select what file extensions to search for, all the possible extensions are shown on the left.
2. Select the search path (the folder in which the subtitle files you want to convert are)
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 Workshop will skim the file to see if it is a valid file and in what format it is.
Skimming usually works very well, and it gives an excellent speed. If you want to perform throughout tests
through the file, with an effectivity of 100%, then use exhaustive 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.
After pressing the button, Subtitle Workshop will search for valid subtitle files in the search path you chose.
When searching finishes, you will see a list with all the found files, format, FPS (for frame based subtitles - this value
should be by default, the same as "Default FPS" you set) and size (in Kb).
You may add new files to the list, or remove files. You can also change FPS of a frame based file (or many files at one
time), selecting it and changing the box that is at the left of the "Clear" button.
Finally, press the Convert button and conversion should start. When it finishes, Subtitle Workshop will generate a log
(*.log) file, reporting all the possible errors together with the successes.
Simple split
You first have to choose where to split the file, you have 5 possibilities:
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 23 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
The subtitle file will be split in the first subtitle which's initial frame is greater than the frame you select.
5. Split in end of video
The subtitle file will be split in the first subtitle which's initial time is greater than 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 be added automatically), the output
format and press the Split button.
Advanced split
Switch to the Advanced page, and then select the number of parts you want to make. You have to select if you want to
make the parts equal in time (length), in lines or if you want 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 a video for the last part since it will be calculated
automatically.
Leave the "Auto-name the parts" check box checked if you want Subtitle Workshop to set the file names of the parts
automatically, if you want to do it manually, uncheck the check box, select the desired part & press F2 to type the name.
Check "Recalculate time values" if you want Subtitle Workshop to automatically set a delay to the second subtitle so
you don't have to do it manually after spliting. Finally select the output path, the output format and press the Split
button.
Now press the Add button and add all the files you want, in the correct order. If you made a mistake in the order of one
file you may drag it with the mouse and put it where you want. If the file is a frame based subtitle you may also modify
it's FPS selecting it and modifying the value of the combo box that is at the left of the "Clear" button. You can 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) so Subtitle Workshop will make all
changes in the timings of subtitles automatically. This way you won't need to make any changes to the resulting file. To
select a movie fragment for each part select it and click the Set movie fragment button. If you made a mistake, select
that part and press the Delete movie fragment button. Now need to select the output format, and if it is a frame based
one, the output FPS. If you want to load the resulting file, check the "Load file after joining and saving" check box.
Check the "Recalculate time values" if you want Subtitle Workshop to automatically set the delay to all the subtitles
beginning in the second one, so you don't have to do it manually. This option will not work if the parts are associated to
movie fragments. Finally, press the Join button.
Information and Errors can check for and fix a large variety of common errors in subtitles, here we will try to review all
the possible errors and the way(s) they are automatically fixed. Before we do it is important to know what types of
errors are going to be fixed first. The priorities are:
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 24 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Errors 1 to 6 are first because when fixing that type of errors, the subtitle can get deleted under certain circumstances, so
if for example time fixings were first, it would lead to a time fix and then to delete the subtitle, and that is pointless.
Empty subtitles
An empty subtitle can be:
Repeated subtitles
This is very common in OCRs. Example:
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 25 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
In the example above, the start time of second subtitle is exactly the final time of the first, this is very common, but it's
not like this always. That's why the "Tolerance for repeated subtitles" value is configurable, it is the maximum
difference between FinalTime1 and InitialTime2 admittible to detect a subtitle as a repeated subtitle. After fixing, the
final subtitle will look like this:
The start time will be the start time of the first subtitle, and the final time will be the final time of the last subtitle.
Prohibited characters
Finds subtitles that contains prohibited characters and delete them (the whole subtitle - not the characters).
Example:
In 80% of the cases, the text before colon will usually be all in CAPITAL LETTERS, so you can enable the "Only if
text is in capital letters" option, and thus avoid many kind of problems, eg. with this kind of subtitles "I'm going to tell
you something:|Don't ever do that again". After fixing, the text will be:
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.
Example:
First subtitle contains a part for hearing impaired, and third subtitle is all for hearing impaired. So, after fixing, this will
result in:
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 26 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Overlapping subtitles
This error is produces whenever a subtitle appears in the screen sonner than the time in which previous subtitle is
hidden. That is to say, when the final time of a subtitle is greater than the initial time of the next one. Let's see this
example to see it clearly:
Subtitle number two is shown before subtitle number one is hidden. Subtitle Workshop will 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 each subtitle will be: (FinalTime2 - InitialTime1) div 2.
This is the case of the example above, the solution for overlapping is this one since the length of both texts is
equal.
Subtitle Workshop will fix the subtitles like this:
As you can see, (2150-250) div 2 = a duration of 950 Milliseconds for each subtitle, and as it is impossible to give
the 950 milliseconds to the second subtitle (we need one extra millisecond for that) we give it 949.
2. If the text of first subtitle is more than 4 characters longer than the text of second one, second subtitle's time will
be cut. Subtitle Workshop will fix the example like this:
So as we cut second subtitle's initial time, the duration will obviously be less than the duration of the first subtitle.
In this case we have got 1100 milliseconds for the first subtitle and 799 for the second.
3. If the text of second subtitle is more than 4 characters longer than the text of first one, first subtitle's time will be
cut. Subtitle Workshop will fix the example like this:
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 27 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Bad values
Bad values is when the initial time of a subtitle is greater than it's final time.
Example:
Subtitle Workshop can fix that by inverting the time values, so the subtitle would be:
Unnecessary dots
This option replaces four or more consecutive dots ("....") to only three followed by a space when necessary.
Example:
Repeated characters
Finds the characters you wish when they are repeated, for example, if you have "!" as a repeatable characters, it would
find:
It works the same with every repeatable character. The default characters are "-¡!¿?",;\/_[]=", you may add/remove
characters if you want, from Information and Errors settings.
OCR Errors
As different languages have different OCR errors, the OCR scripts were born. For more information on the scripts, refer
here.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 28 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Thus, if you enable this option, Subtitle Workshop will delete the "-" if the subtitle contains only one line.
-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 the character in words like "multi-
line".
Unnecessary spaces
This is a must. Eliminates the unnecessary spaces you choose from the text of a subtitle file. Currently this type of
spaces can be removed:
As different languages may require different spacings, all the types of spaces to remove are configurable.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 29 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
To access to Information and Errors Settings, press [Alt]+[I] keys or the "Tools/Information and errors/Settings..."
menu. Additionally you can access this Settings from the Information and Errors window, pressing the "Settings"
button.
Now let's review all the options you will find.
General options
OCR Script:
Specifies the name of the OCR Script you are currently using. This script has to be in the "OCRScripts" folder inside
Subtitle Workshop's directory. All the scripts listed here are all the ".ocr" files found in the above mentioned folder. The
"Edit" button will open Notepad so you can edit the file manually, add or remove possible OCR Errors.
Advanced options
Repeatable characters
Specifies all the characters that can be repeated, and that are going to be fixed if the "Repeated characters" fixing is
enabled.
Prohibited characters
Specifies 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.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 30 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
You are able to choose what errors to check for, and what errors to fix. And also, you can choose what unnecessary
spaces to check for and what to fix.
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 are available. The possibility of using regular expression makes
possible for you to find and replace almost anything needed in any language. A very important thing to know about
OCR Scripts is that all commands are performed consecutively, that is, in the order they are written.
Let's now see a small example of an OCR Script:
<SWOCR WordChars="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. The default 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 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
the parameters that define how you want the search to be made:
UseRE
UseRE="True" or UseRE="False". The default value is True. If it is set to false then regular expressions will not be used
in the search. Use it as False only if you want to simplify the way find-replace commands are written, because if regular
expressions are disabled then the OCR scripts have few power.
UseREOnlyToFind
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 31 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
UseREOnlyToFind="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 a regular 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 expression part ("[a-z]") to search for the
text, but we don't use it to replace. We will only replace the part o the "Find=" text that is between parenthesis, that is,
you need to write the normal regular expression and the part that is "constant" and won't vary between parenthesis. This
is extremely useful for the OCR Scripts (take a deep look at Default.ocr to understand).
The following parameters are only available when "UseRE" is set to false:
WholeWord
WholeWord="True" or WholeWord="False". Setting it to False is the same as not including it. If true, it will find the
"Find=" text only if it is forming a Word.
CaseSensitive
CaseSensitive="True" or CaseSensitive="False". Setting it to False is the same as not including 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:
PreserveCase
The default value is False. If true, it will preserve the case of "Find" text when replacing to "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 will replace "Dog" by "Cat" and not by "CAT".
Introduction
This document is taken from TRegExpr help file, an excellent Regular Expressions library for Delphi, by Andrey V.
Sorokin.
Regular Expressions are a widely-used method of specifying patterns of text to search for. Special metacharacters allow
You to specify, for instance, that a particular string You are looking for occurs at the beginning or end of a line, or
contains n recurrences of a certain character.
Regular expressions look ugly for novices, but really they are very simple (well, usually simple ;) ), 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 meaning described below.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 32 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
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 escape sequences to be interpreted literally by
'escaping' them by preceding them with a backslash "\", for instance: metacharacter "^" match beginning of string, but
"\^" match character "^", "\\" 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 C and Perl: "\n'' matches a newline,
"\t'' a tab, etc. More generally, \xnn, where nn is a string of hexadecimal digits, matches the character whose ASCII
value is nn. If You need wide (Unicode) character code, You can use '\x{nnnn}', where 'nnnn' - one or more
hexadecimal digits.
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 will match 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 all characters 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, or escape it with a backslash. If you
want ']' you may place it at the start of list or escape it with a backslash.
Examples:
[-az] matchs 'a', 'z' and '-'
[az-] matchs 'a', 'z' and '-'
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 33 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Metacharacters
Metacharacters are special characters which are the essence of Regular Expressions. There are different types of
metacharacters, described below.
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 the input string/text, the "$"
metacharacter only at the end. Embedded line separators will not be matched by "^'' or "$''.
You may, however, wish to treat a string as a multi-line buffer, such that the "^'' will match after any line separator
within the string, and "$'' will match before any line separator. 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 times when the modifier /m is used, while
"^'' and "$'' will match at every internal line separator.
The ".'' metacharacter by default matches any character, but if You switch Off the modifier /s, then '.' won't match
embedded line separators.
"^" is at the beginning of a input string, and, if modifier /m is On, also immediately following any occurrence of
\x0D\x0A or \x0A or \x0D (if You are using Unicode version of TRegExpr, then also \x2028 or \x2029 or \x0B or \x0C
or \x85). Note that there 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 preceding any occurrence of \x0D\x0A or
\x0A or \x0D (if You are using Unicode version of TRegExpr, then also \x2028 or \x2029 or \x0B or \x0C or \x85).
Note that there is no empty 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 the sequence \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 properties LineSeparators and
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 34 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
LinePairedSeparator, You can use only Unix style separators \n or only DOS/Windows style \r\n or mix them together
(as described above and used by default) or define Your own line separators!
Examples:
foob\dr matchs strings like 'foob1r', ''foob6r' and so on but not 'foobar', 'foobbr' and so on
foob[\w\s]r matchs 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.
A word boundary (\b) is a spot between two characters that has a \w on one side of it and a \W on the other side of it (in
either order), counting the imaginary characters off the 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 previous character, 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")
*? 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 to match the item n and the
maximum m. The form {n} is equivalent to {n,n} and matches exactly n times. The form {n,} matches n or more times.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 35 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
There is no limit to the size of n or m, but large numbers will chew up more memory and slow down r.e. execution.
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 that fee|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 the beginning of the pattern) up to the first "|'', and the last alternative contains everything from the
last "|'' to the next pattern delimiter. For this reason, it's common practice to include alternatives in parentheses, to
minimize confusion about where they start and end.
Alternatives are tried from left to right, so the first alternative found for which the entire expression matches, is the one
that is chosen. This means that alternatives are not necessarily 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 the target
string. (This might not seem important, but it is important when you are capturing matched text using parentheses.)
Also remember that "|'' is interpreted as a literal within square brackets, so if You write [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 (after parsing You can find subexpression
positions, lengths and actual values in MatchPos, MatchLen and Match properties of TRegExpr, and substitute it in
template strings by TRegExpr.Substitute).
Subexpressions are numbered based on the left to right order of their opening parenthesis.
First subexpression has number '1' (whole r.e. match has number '0' - You can substitute it 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
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 36 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
Metacharacters \1 through \9 are interpreted as backreferences. \<n> matches previously matched subexpression #<n>.
Examples:
(.)\1+ matchs 'aaaa' and 'cc'.
(.+)\1+ also match 'abab' and '123123'
(['"]?)(\d+)\1 matchs '"13" (in double quotes), or '4' (in single quotes) or 77 (without quotes) etc
Modifiers
i Do case-insensitive pattern matching (using installed in you system locale settings), see also InvertCase.
Treat string as multiple lines. That is, change "^'' and "$'' from matching at only the very start or end of the string to
m
the start or end of any line anywhere within the string, see also Line separators.
Treat string as single line. That is, change ".'' to match any character whatsoever, even a line separators (see also
s
Line separators), which it normally would not match.
Non standard modifier. Switching it Off You'll switch all following operators into non-greedy mode (by default this
g
modifier is On). So, if modifier /g is Off then '+' works as '+?', '*' as '*?' and so on
x Extend your pattern's legibility by permitting whitespace and comments (see explanation below).
Non-standard modifier. If is set then range à-ÿ additional include russian letter '¸', À-ß additional include '¨', and à-ß
r 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 variable RegExprModifierR.
The modifier /x itself needs a little more explanation. It tells the TRegExpr to ignore whitespace that is neither
backslashed nor within a character class. You can use this to break up your regular expression into (slightly) more
readable parts. The # character is also 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 a character class, where they are
unaffected by /x), that you'll either have to escape them or encode them using octal or hex escapes. Taken together,
these features go a long way towards 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 inlined into 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'
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 37 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
1. Using the "Tools/Add FPS from AVI" menu. This method reads the header of the 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 AVI files that DirectX detects 0 as FPS, in this cases, Subtitle Workshop
will alternatively read the header of the AVI.
Each time you use this feature, the FPS of the video will be added to all the places in which there are boxes to select
FPS.
In the Settings window, go to External preview and then to General. Here you must select the exe file of the video
player you want to use. If the video player is already associated 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. Select the format in which you want the
temporary subtitle file to be saved (it will be saved in the temp directory). Only select Original format if you are sure
that the video player you are using supports the subtitle format that you are creating/editing.
Finally, you must select the parameters to send to the video player. VIDEO_FILE represents the video file, and
SUBT_FILE represents the subtitle file. You may add other parameters, like full screen, etc. Please be sure (in most
cases) to add SUBT_FILE and VIDEO_FILE between " " so if one of the files contains one (or more) spaces, it will be
sent on the same parameter.
When you finished configuring all this settings, you can test the subtitle pressing the F8 key or the "Tools/External
preview" menu.
1. BSPlayer
"VIDEO_FILE" "SUBT_FILE" -fs
(Save temp. file in SubRip format)
2. ViPlay
/MOVIE:"VIDEO_FILE" /SUBTITLE:"SUBT_FILE" /FS
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 38 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
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 and a 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 and
subtitle part of the window (a new cursor symbol will show up) and dragging up or down . 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 of course also be effective in here.
This may result in two subtitles being displayed on top of 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 of buttons and a set of figures giving
current play time, total play time and frames per second (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.
Play/Pause
Click once to play, and again to pause.
Stop
Stops playback and rewinds to 00:00:00.000.
Move subtitle
This button moves all the selected subtitles, so that the first one's start time is equal to the player's time. It doesn't
modify the duration of the subtitles, just acts like a "quick" version of "Set delay".
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 39 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
final time" will do just this for the final time, and jump to the next subtitle.
Mark as first synch point, Mark as last synch point, and Add subtitle/vide synchronization point
This buttons are explained in Adjust subtitles.
The seek bar can be used like the one in Windows Media Player, ViPlay or any other player. The smallest possible
seeking interval depends on the length of the video file.
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.
License
This program is provided 'AS IS', without the guarantee of any type. The whole risk with regard to the use of this
program is taken by the user. The author doesn't become responsible for any direct or indirect, incidental or consequent
damage, being from any flaw in the program.
This program should be distributed freely, it cannot be sold or resold, distributed as part of any commercial package,
used in a commercial, used environment or distributed as support of a commercial, or used service and/or distributed in
any activity type with ends of lucre without the author's previous signed authorization, with the only exception of the
distribution in magazines (read below).
Magazine publishers interested in including URUSoft programs in a CD as a part of an edition of their magazine must
send us a message via e-mail telling us that they are going to distribute the program, detailing it's name and version and
also name and edition number of the magazine.
In any future inclusion of the program in the magazine the above mentioned process must be repeated.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 40 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
The integrity of the file of distribution of this program should be original as it is distributed by its author. All their files
should be distributed together in the original format.
If this program is an upgrade of an old version, you will be able to use it or to only transfer it together with the product
to upgrade. All Brand Names are Copyright of their Respective Owners. The Author of this program is NOT associated
with any company.
IF YOU DON'T ACCEPT THESE TERMS, YOU SHOULD CEASE AND DESIST TO USE THIS PROGRAM.
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 41 of 42
The Subtitle Workshop Manual 2/23/12 10:49 AM
http://2005.uploaded.fresh.co.il/2005/07/08/65948686.html Page 42 of 42