Scrigroup - Documente si articole

     

HomeDocumenteUploadResurseAlte limbi doc
BulgaraCeha slovacaCroataEnglezaEstonaFinlandezaFranceza
GermanaItalianaLetonaLituanianaMaghiaraOlandezaPoloneza
SarbaSlovenaSpaniolaSuedezaTurcaUcraineana

AdministrationAnimalsArtBiologyBooksBotanicsBusinessCars
ChemistryComputersComunicationsConstructionEcologyEconomyEducationElectronics
EngineeringEntertainmentFinancialFishingGamesGeographyGrammarHealth
HistoryHuman-resourcesLegislationLiteratureManagementsManualsMarketingMathematic
MedicinesMovieMusicNutritionPersonalitiesPhysicPoliticalPsychology
RecipesSociologySoftwareSportsTechnicalTourismVarious

The Subtitle Workshop Manual

computers



+ Font mai mare | - Font mai mic



The Subtitle Workshop Manual

Subtitle Workshop version: 2.51

The ultimate subtitle editing tool!


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


  • Chapter 1: Introduction to Subtitle Workshop
    • 1.1 General overview
    • 1.2 Reading & Writing engine
      • 1.2.1 What is URUSoft Subtitle API?
    • 1.3 Visual overview
    • 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
    • 1.5 Command line parameters
    • 1.6 Language files
    • 1.7 Custom formats
  • Chapter 2: Time related features
    • 2.1 Framerate conversion
    • 2.2 Set delay
    • 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
    • 2.4 Duration limits
    • 2.5 Time expander/reducer
    • 2.6 Read times from file
    • 2.7 Extend length
    • 2.8 Automatic durations
    • 2.9 Shift subtitles
  • Chapter 3: Text & subtitles related features
    • 3.1 Smart line adjust
    • 3.2 Convert case
    • 3.3 Unbreak subtitles
    • 3.4 Divide lines
    • 3.5 Set maximum line length
    • 3.6 Read texts from file
    • 3.7 Combine subtitles
    • 3.8 Right-to-left
      • 3.8.1 Reverse text
      • 3.8.2 Fix punctuation
    • 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

Chapter 1: Introduction to Subtitle Workshop



1.1 General overview

Subtitle Workshop is the most complete, efficient and convenient subtitle editing tool. It supports all the subtitle formats you need and has all the features you would want from a subtitle editing program. Subtitle Workshop makes subtitle creating/editing/converting tasks 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 an advanced video preview feature which will ease the task even more. The best choice for the 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 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.

Complete list of features:

  • Reading and writing engine
    • Based in URUSoft SubtitleAPI, so new formats can be easily added by downloading an updated dll file.
    • Currently (version 1.05 of SubtitleAPI) supports around 56 subtitle formats.
    • Can handle both time and frame based subtitles.
    • Can load files in plain text format so that you can set the timings.
    • Supports reading and writing style tags (bold, italic, underline) and color tags in format which support it.
    • Supports Output Settings in DVDSubtitle, SAMI, Sonic Scenarist, SubStation Alpha, SubViewer 1 & 2 and TMPlayer formats.
    • Supports saving a subtitle in your custom format.
  • Interface
    • User friendly.
    • Configurable shortcuts.
    • Supports multi-language (currently over 35 languages are available!).
    • 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.
    • User friendly 'Translator mode'.
  • Video preview
    • Integrated in the main window.
    • Shows subtitles over the video.
    • Can show information about the video you are watching.
    • You are able to customize foreground color, background color (or transparent), show border or not, show shadow or not, border and shadow's width of the subtitles.
    • NOT based in Windows Media Player, this results in a highly improved performance and visual quality.
  • Subtitle fixing
    • Highly enhanced functions strictly designed to get speed and a high grade of efficiency.
    • Advanced & easy to customize text scripts for OCR errors repair, offering the possibility of using regular expressions.
    • Powerful and totally customizable error fixing engine.
    • Possibility to mark errors in the main list with a different font style and color so that it is easy to identify them visually.
    • Optional automated checks/fixes on load subtitle.
    • 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 custom characters, unnecessary spaces, too long/short durations and too long lines (only check).
  • General
    • Extremely customizable.
    • Multi-level Undo-Redo.
    • Spell check using Microsoft Word's engine, so it supports any installed language.
    • Can create new subtitles from scratch.
    • Easily add and delete subtitles with 'Insert' and 'Delete' keys.
    • 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 (equal in time, in lines or at the end of multiple videos).
    • Can join an indefinite number of subtitles, and those subtitles may be in different formats with different FPS (you can select a different FPS for each file).
    • Two methods of getting FPS from video: without using DirectX (only supports AVI) and using DirectX (supports all video formats, but it is slower).
    • You are able to choose which subtitle extensions to associate.
    • Supports drag & drop (subtitle files and video files).
    • Supports command line.
    • Recent files list (customizable number of recent files from 0 to 20).
  • Timing operations
    • Set delay (positive or negative, time or frames).
    • Set duration limits (maximum duration and minimum duration).
    • Adjust subtitles using four possible methods: 1- first and last dialogs, 2- synchronize using two points (linear algorithm), 3- Adjust to synchronized subtitles and 4- Advanced system to synchronize subtitles using an indefinite number of points.
    • 'Time expander/reducer' to expand/reduce the final time of certain subtitles under certain conditions.
    • 'Automatic durations' to calculate the duration of subtitles using a simple formula.
    • FPS Conversion with one click.
    • 'Extend length' to extend the length of selected subtitles to the start time of the next one.
    • 'Shift subtitle' forward or backwards a configurable amount of time.
    • 'Read times from file' feature, to fix a subtitle using another subtitle's times.
  • Text-related operations
    • Search & Replace text with 'Match whole words', 'Case sensitive' and 'Preserve case' options.
    • 'Smart line adjust' to constrain subtitles bigger than three lines into two and adjust length of lines.
    • 'Convert case' with 6 different conversion modes.
    • 'Unbreak subtitles' to make all selected subtitles be in one line.
    • 'Divide lines' to easily divide a subtitle with more than one line (or one big line) into two subtitles with proper time recalculation.
    • 'Reverse text' keeping lines order or not.
    • 'Fix punctuation', very useful for right-to-left languages.
    • 'Delete unnecessary links' to delete the unnecessary '' if they are present the end of one line and at the beginning of the next one.
    • 'Read texts from file' feature, to fix a subtitle using another subtitle's text.
  • Text and times related
    • 'Sort subtitles' to sort all the subtitles according to their start time.
    • 'Combine subtitles' to make all the selected subtitles become only one (for eg. '- Hi!' and '- Hey!!!' to '- Hi!|- Hey!!!').
    • Visual effects with the texts and times of the subtitles.
    • 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)
  • 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)

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 reported bugs and they were all fixed as soon as we could. As time passed, the engine became more reliable and stable. Because of this reliability is that we decided to release URUSoft Subtitle API.

1.2.1 What is URUSoft Subtitle API?

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.

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 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.

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 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:

  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 button with 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 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.

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 right codecs installed. If you don't, download Coda Codec Pack, it should fix most of the playback problems.

1.4.3 Create a new file

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.

1.4.4 Adding subtitles

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 will be zero.

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

1.4.5 Deleting subtitles

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.

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 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.

1.4.7 Style and color tags

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:

  • <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 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.

1.4.8 FPS and Input FPS

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

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).

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. You have 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 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:FolderSub.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.

1.6 Language files

You can easily create your own language file or update a currently existing language file and use it in Subtitle Workshop. To do so, you must translate the English.lng (or any other .lng) file to the language you want, and then copy it to the Langs directory with the name language.lng. For example, Espaol.lng, English.lng, Franais.lng.

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.

1.7 Custom formats

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

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.

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

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

Save project
Click this button to save the project into a *.cfp file. This will save all the information visible on the 'Custom formats' dialogue.

Text of the custom format script
This is very simple. The parts that Subtitle Workshop will write to a file can be divided in three, and in this order:

  1. A part that is written only once at the beginning of the file
  2. A part that is repeated each time there is a new subtitle
  3. 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 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 (this will write only one asterisk). To write two, '*' or '' are the same.

First write the first section (if there is). Then begin the second section (the repeating part) with .

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

  1. The start time of the subtitle. You have to write and Subtitle Workshop will replace it by the initial time (or frames) of the actual subtitle. You can also write 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 . You can do the same with the end frame.
  2. The end time of the subtitle. You have to write and Subtitle Workshop will replace it by the final time (or frames) of the actual subtitle. You can also write .
  3. The subtitle's text. You have to write 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 . 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 and Subtitle Workshop will add zeros automatically.

Check the 'CEF Examples' folder, and load some examples to see how to use this feature better.



Chapter 2: Time related features

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 is a fixed time or frames (constant) that represents the difference of the points where the subtitles should start, and actually start. To apply a delay, first load your subtitle, then click the 'Edit/Timings/Set delay' menu or press [Ctrl]+[D] keys. The delay dialog will pop up.
If you are working in the time mode, you should set a time delay and if you are working in the frames mode, you should 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.

2.3 Adjust subtitles

Subtitle Workshop can synchronize subtitles to a video by four methods. Whatever method you want to use, the first thing you have to do is load the subtitle file you are going to adjust, and for methods 1, 2 y 4 you need to load the video file you want to take 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 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.
2.2.2 Method 2: synchronize using two points

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.

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 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.

2.2.3 Method 3: adjust to synchronized subtitles

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 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.

2.2.4 Method 4: advanced subtitle adjust

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.

2.4 Duration limits

Duration limits makes possible to fix the duration of all the subtitles in a file to a range of time. Subtitles which are shown less than 1 second are usually hard to read, except if they are short words like 'Yes' or 'Ok'. Sometimes there are subtitles with more characters 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 and maximum possible duration for the subtitles. Each subtitle's duration which is shorter than the minimum duration allowed will be increased to the minimum possible duration you set, without causing overlapping with the next subtitle. Each subtitle's duration which is larger than the maximum possible duration will be set to the maximum duration you set.

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.

2.5 Time expander/reducer

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.

2.6 Read times from file

Useful if you have one subtitle file in which the text of each subtitle is right but the timings are not, and you have another file with the same number of subtitles and with the 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. A dialog will pop up, all you have to do is select the file with the right times in that dialog and load it.

2.7 Extend length

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

2.8 Automatic durations

'Automatic durations' is a very useful feature in the cases you have a subtitle file in which the duration of all (or some) subtitles is totally wrong. By specifying a time per character, word and line (the default values give very good results) Subtitle Workshop will calculate the appropiate duration for the subtitle. Another use this feature may have is for example when subtitling videos, to go faster you can only set start times manually and 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 is greater than original or only if it is smaller than original. You can also apply calculated durations to all the subtitles or just the selected ones.

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.

2.9 Shift subtitles

This feature moves all the selected subtitles initial time a specified number of milliseconds forward/backwards, without modifying their duration. It is very useful to easily 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 text related 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 of subtitles that have more than two lines, or if the line breaks are just put stupidly. It constrains the subtitle's text to be in one or maximum two lines (depending on the length of it). This feature has a bit of '-' sign detection. You may choose the length after which the subtitle will be in two lines and not in one, in the 'Two lines if longer than' option in Settings/General.

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.

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 select among 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 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.

3.3 Unbreak subtitles

Not much to say about this feature. It takes effect over all the selected subtitles, and make 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 file with a lot of subtitles with four (or more) lines, which are too big to be constrained into two lines with the 'Smart line adjust' feature. Dividing a subtitle into two manually is possible but is a very annoying job, since after you insert the subtitle you also have to set all the times and cut text from the first subtitle to put in the second one. 'Divide lines' 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 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.

3.5 Set maximum line length

Splits the subtitle in N number of lines so that each of the lines is shorter than a maximum specified length. That maximum length is configurable from Settings/Advanced. This feature affects all the selected subtitles, and while in translator mode, 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 will break what you are reading in more lines.'

To:

'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.'


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'.

3.6 Read texts from file

The same as the 'Read times from file' feature but instead of reading the times it reads the 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.

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 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.

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 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.

3.10 Delete unnecessary links

Deletes '' when they are placed at the end of a subtitle and at the beginning of the next 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 options available pressing 'More >' button. Explanation of the options:

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

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

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

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).

3.12 Marked subtitles

This is useful for example if you are translating a file, and want to mark certain subtitles because you are not sure about their translation. To mark all the selected subtitles, click the 'Edit/Subtitles/Mark selected subtitles' menu or the [Shift]+[Ctrl]+[M] keys. To unmark them click the 'Edit/Subtitles/Unmark selected subtitles' or the [Shift]+[Ctrl]+[A] keys.
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 mark the 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 to save a Subtitle Report File (*.srf). This file will later be loaded by Subtitle Workshop and it will automatically mark the subtitles you marked in ViPlay, so you can easily identify 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 top
Maintains the Subtitle Workshop's main window above all the other windows.

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

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

Interpret invalid files as plain text
Check this option and you will never get the 'The file is an invalid subtitle or an unsupported 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 timings manually.

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



Force working in time mode
If 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 time mode, but you will be able to switch to frames mode manually.

Keep order of lines when reverse text
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.

Select text on jump to next line
Specifies if you want to select the text in the 'Text' or 'Translation' text box, when jumping to the next line pressing [Shift]+[Enter].

Select text on jump to previous line
Specifies if you want to select the text in the 'Text' or 'Translation' text box, when jumping to the previous line pressing [Ctrl]+[Enter].

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

Work with style tags
Check 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. This option doesn't have any effect if 'No interaction with tags' is turned on.

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

4.1.1 Advanced

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

Toggle break point
Toggles between two break points (first space before specified length, or first space after specified length) in some subtitles.

Break line after
Useful to use 'Divide lines' in subtitles that are only one line, but that line is long. Use this value to divide that long line in various smaller lines, that have a maximum of number of characters equal to 'Break line after' value.

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

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

4.1.2 Charsets

Show in main form
Useful for people working with subtitles in various languages who use a different alphabet. Shows 'Original charset' and 'Translation charset' in the main form, so it can be quickly modified.

Original charset
Charset to display characters in the 'Text' column.

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).

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

Show custom formats
Specifies 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 start
Associate the desired subtitle extensions when Subtitle Workshop is executed.

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

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

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 work automatically every X minutes
Subtitle Workshop will silently save the modified subtitle file every the minutes you choose.

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

4.5 Video preview

All the options listed here will work only if you are in video preview mode. Double click and shift-double click in a subtitle
You are able to select what to do when you double click in a subtitle, and when you double 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 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.



Rewind and forward times
Times to rewind/forward when pressing the 'Rew' and 'Forward' buttons in the video controls bar.

Default altered playback rate
The percentage of playback rate to apply when pressing the 'Alter playback rate' button in the video controls bar.

4.5.1 Subtitles

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

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

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 External preview

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

4.6.1 General

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

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

Ask for a different video each time
Subtitle Workshop will ask you to open a video file each time you do the external preview.

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

4.6.2 Advanced

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

Save temporary file in custom format
If the video player doesn't support the subtitle format you are handling, but supports a minimum of one of the formats that Subtitle Workshop supports, then check this check box and select a format in the list.

Parameter to send the video player
This is very important. Here you have to specify how to tell the video player which subtitle and which video file to 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.

For details, refer to External preview.

4.7 Look

4.7.1 Program

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

'Text' and 'Translation' fields align
Choose the text alignment that you want for this two fields.

4.7.2 List

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

Apply style to subtitles
Only will take effect if a subtitle contains tags (bold, italic, underline or color). If this option is checked, Subtitle Workshop will draw the subtitle in the list with the appropriate style/color.

Mark untranslated subtitles with color
Draws the untranslated subtitles with a particular configurable color, so they can be easily identified.

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

4.7.3 Menu

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

Use gradient menu
Draws a gradient in the left of the menus.



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 through OLE technology. Thus, at least Microsoft Word 97 is required. To spell check a subtitle just load it and press F7 key or the 'Tools/Spell check' menu. All the errors and suggestions will be shown using Word's default windows. The spell check should support any installed dictionary.

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.

5.2 Batch convert

This feature lets you convert a large number of subtitle files in any format to a single format, 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, 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.

5.3 Split subtitles

There are two possible splits:

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

Use the one that best fits your needs.

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

  1. Split in selected item
    The subtitle file will be split right after the item that is selected in the main window.
  2. Split in item number
    The subtitle file will be split in the item you select.
  3. Split in given time
    The subtitle file will be split in the first subtitle which's initial time is greater than the time you select.
  4. Split in given frame
    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.

5.4 Join subtitles

With Subtitle Workshop you can join more than two subtitles, and those subtitles may be in different formats, time or frame based, and if frame based, they even may have different 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 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.

5.5 Information and errors

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

5.5.1 Errors & fixes explained

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:

  1. Lines without letters
  2. Empty subtitles
  3. Repeated subtitles
  4. Prohibited characters
  5. Text before colon (':')
  6. Hearing impaired
  7. Overlapping
  8. Bad values
  9. Unnecessary dots
  10. Repeated character
  11. OCR Errors
  12. '- ' in subtitles with one line
  13. Space after custom characters
  14. Space before custom characters
  15. Unnecessary spaces
  16. Subtitle over two lines
  17. 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 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.


Lines without letters
Deletes 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,350

This is the text 1
!

00:00:00,780

00:00:02,150

s?!t
This is the text 2

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


Empty subtitles
An empty subtitle can be:

  1. A subtitle that contains no text at all (blank text).
  2. A subtitle that doesn't contain any letter or number. Eg. the text: '- !!!!'

In both cases, Subtitle Workshop will delete the subtitle.


Repeated subtitles
This 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 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:

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 the final time of the last subtitle.


Prohibited characters
Finds 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 the name 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?

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, 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:

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 subtitles
Hearing impaired subtitles are whole subtitles, or just part of a subtitle, that are exclusively for deaf people. Most of the people don't want 'noises' and 'sounds' inside their subtitles, so they want to eliminate them. Deaf people shouldn't use this feature, of course. 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 hearing impaired. 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 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:

Start time

Final time

Text

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 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:

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


  1. 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:

Start time

Final time

Text

00:00:00,250

00:00:01,350

This is the text 1. More than four extra characters.

00:00:01,351

00:00:02,150

This is the text 2


  1. 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.

  2. 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:

Start time

Final time

Text

00:00:00,250

00:00:00,779

This is the text 1

00:00:00,780

00:00:02,150

This is the text 2. More than four extra characters.

  1. The duration of the first subtitle is 529 milliseconds, and the duration of the second one is 1370 milliseconds.


Bad values
Bad 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 dots
This option replaces four or more consecutive dots ('.') to only three followed by a space 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 characters
Finds the characters you wish when they are repeated, for example, if you have '!' as a repeatable characters, it would find:

Start time

Final time

Text

00:00:01,000

00:00:02,000

Do it, now! ! ! !


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 '-t!s?',;/_[]=', 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.


'-' in subtitles with one line
There is no sense in having subtitles with one line starting with '-' (open dialog) since only one person speaks in them. Thus, if you enable this option, Subtitle Workshop will delete the '-' if the subtitle contains only one line.


Space after custom characters
Adds a space (if not present) after any of the characters in 'Space after characters' in Information and Errors's settings/Advanced. Useful for example to add a space after the dialog 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 the character in words like 'multi-line'.


Space before custom characters
Adds 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
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:

  1. Enters and spaces at the beginning and end
  2. Spaces between enters (left and right)
  3. Double spaces and enters (double enter = blank line)
  4. Spaces in front of punctuation marks
  5. Spaces after 's' and 't'
  6. Spaces before '?' and '!'
  7. Spaces between numbers

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


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


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


Too long lines
Detects 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 is potentially 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 this Settings 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 list
You are able to let Subtitle Workshop mark the errors in the main list by enabling this option. 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 lot of cases this is very useful. For example, if you have lots of long three lines subtitles you can mark them in a certain color, and then fix them all (one by one) using Divide lines.
If the marked error is difficult to identify visually (for example it is very hard sometimes to tell that a subtitle has got unnecessary spaces or unnecessary dots) you can put the mouse over the subtitle with errors for half a second and you'll get a description specifying exactly what type of error it has.

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

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

Fix one unit overlap at load
Fixes 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,

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 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.

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

Space after characters
Specifies all the characters to use with the 'Space after custom characters' repair. The characters have to be one after the other (not separated by comma or whatever).

Space before characters
The same as above but this characters will be used with the 'Space before custom characters' repair.

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

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

Too long line
Specifies 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, you can 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 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=',' 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
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'.

Syntax of Regular Expressions
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.

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', where 'nnnn' - one or more hexadecimal digits.

xnn

char with hex code nn

x

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

f

form feed (FF), same as x0c

a

alarm (bell) (BEL), same as x07

e

escape (ESC), same as x1b


Examples:

foox20bar

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 '-'

[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

$

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 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.

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

'^' is at the beginning of a input string, and, if modifier /m is On, also immediately following any occurrence of x0Dx0A 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 x0Dx0A.

'$' is at the end of a input string, and, if modifier /m is On, also immediately preceding any occurrence of x0Dx0A 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 x0Dx0A.

'.' matchs any character, but if You switch Off modifier /s then '.' doesn't match x0Dx0A 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 x0Dx0A, but matchs the empty string within the sequence x0Ax0D.

Multiline processing can be easely tuned for Your own purpose with help of TRegExpr properties LineSeparators and LinePairedSeparator, You can use only Unix style separators n or only DOS/Windows style rn or mix them together (as described above and 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 [ tnrf])

S

a non space


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

Examples:

foobdr

matchs strings like 'foob1r', ''foob6r' and so on but not 'foobar', 'foobbr' and so on

foob[ws]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.

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 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

+

one or more ('greedy'), similar to

?

zero or one ('greedy'), similar to

exactly n times ('greedy')

at least n times ('greedy')

at least n but not more than m times ('greedy')

*?

zero or more ('non-greedy'), similar to ?

+?

one or more ('non-greedy'), similar to ?

??

zero or one ('non-greedy'), similar to ?

?

exactly n times ('non-greedy')

?

at least n times ('non-greedy')

?

at least n but not more than m times ('non-greedy')


So, digits in curly brackets of the form , specify the minimum number of times to match the item n and the maximum m. The form is equivalent to and matches exactly n times. The form matches n or more times. 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.

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'

foobar

matchs the string 'foobaar'

foobar

matchs strings like 'foobaar', 'foobaaar', 'foobaaaar' etc.

foobar

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?' returns 'bb', 'b' 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)

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> 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

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 to change /x, or ModifierStr to change all modifiers together). The default values for new instances of TRegExpr object defined in global variables, for example global variable RegExprModifierX defines value of new TRegExpr instance ModifierX property.

i

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

m

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

s

Treat 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.

g

Non standard modifier. Switching it Off You'll switch all following operators into non-greedy mode (by default this 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).

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 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'

((?i)Saint-)?Petersburg

matchs 'saint-Petersburg', but not 'saint-petersburg'


(?#text) A comment, the text is ignored. Note that TRegExpr closes the comment as 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 then use this feature. It lets you find out the FPS of a movie file and add it to Subtitle Workshop'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 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.

5.7 External preview

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

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.


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 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.

Buttons (from left to right):

  • Play/Pause
    Click once to play, and again to pause.
  • Stop
    Stops playback and rewinds to 00:00:00.000.
  • Toggle scroll list
    If in use (will be set in a darkened square), Subtitle Workshop marks the subtitle item being currently displayed in the video in the editor window, and scroll down if necessary.
  • Jump to previous/next subtitle
    This two buttons just move the player's position to the initial time of the previous/next subtitle of the one currently being displayed.
  • Rewind & Forward
    If pushed once, they will rewind or forward the amount of time specified in Settings. 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 rate
    If pressed (will be set in a dark square), video playback will be slower/faster by the percentage specified in Settings.
    Preset is 50%.
  • 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'.
  • Set Start Time & Set Final Time
    When used, both buttons will affect the subtitle item currently selected in the editor window.
    'Set start time' will overwrite the start time value of this subtitle to the time the video is currently on, and 'Set final time' will do just this for the final time, and jump to the next subtitle.
  • Start Subtitle & End Subtitle
    'Start subtitle' sets an internal variable to the time in which the movie is playing at that moment, 'End subtitle' creates a new subtitle with Initial time equal to that variable and final time equal to the current time. Very useful for creating subtitles from scratch.
  • 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.

5.9 SAMI Language Extractor

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


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 https://www.urusoft.net/.
You can also use the forum.

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

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.

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.



Politica de confidentialitate | Termeni si conditii de utilizare



DISTRIBUIE DOCUMENTUL

Comentarii


Vizualizari: 1291
Importanta: rank

Comenteaza documentul:

Te rugam sa te autentifici sau sa iti faci cont pentru a putea comenta

Creaza cont nou

Termeni si conditii de utilizare | Contact
© SCRIGROUP 2024 . All rights reserved