AVIAddXSubs
Overview
This utility is used to incorporate subtitles (XSUB) in DivX/XVid avi files.
Subtitles are provided through srt and idx/sub external files.
Alternatively can be used to generate idx/sub subtitles. Those subtitles are
provided in the form of two files, one with the extension .idx (text file) and
the other with the extension .sub (binary file) that can accompany (like a srt
file) the avi and be played in many hardware players.
In both cases the subtitles are created as bitmaps in user's PC
and so are ready to be used in any capable player without any language or
character set considerations. Because of that they are the most universal ways to subtitle
videos in any language with the only assumption that at least the user's PC is
capable to handle the specific language.
So the user is now able to choose the subtitle format (XSUB or idx/sub) with
which his/her DivX/XVid player gives the best results.
In both cases subtitles can be configured in font, font size, bold, text
color and text outline.
Up to 8 subtitles
can be provided from 8 separate srt (ANSI format) files. Also user
can choose to generate up to 8 subtitles from one and only
srt file, in various configuration regarding font, font size,
position on screen and many others. So at playback time, through remote control,
can choose any of them that looks more favorable to him/her.
Specifically in the incorporation of XSUB subtitles in avi up to 8 subtitles can be provided from one idx/sub pair of files and be
combined with those coming from srt. Please note that the total of subtitles
cannot be over the specifications limit of 8. AVIAddXSubs automatically enforces
this limitation. Please note that because the program can
generated idx/sub subtitles too ensure that the generated idx/sub files
go to a different directory than the one of source files to avoid repetitive XSUB
incorporation if you repeat the process.
Just drag & drop the srt (subtitle text) or avi file
to program's icon (or shortcut) in your desktop. A new file with extension divx
will be created
ready to view it in your hardware DivX player. Note
that you can drag&drop more than one files for a batch subtitle
incorporation.
ZIP File contents
- AVIAddXSubs.exe : Main utility
- SUBRenamer.exe : Renames avi and its associated srt under a new
name following AVIAddXSubs rules in case of multiple subtitles. Read more in
below section.
- AVIInfo.exe : Displays information of avi/divx files.
To inquiry problematic avi. Just drop the
avi to its icon and email the information
it appears when requested.
- AVIBitrate.exe: Bitrate analysis tool for those they use
the USB 1.1 slot of their player. Generally an avi, where for many
consecutive seconds has bitrate above 6.5Mbits/sec, can cause jerky move and
bad sound in various scenes. If this appears to be frequent throughout the
playtime and especially for many consecutive seconds, then, maybe, is
better to use a DVDRW disk instead of USB, for a trouble free playback. If
your player has a real USB 2.0 then there will be no problem (if USB device
attached is fast enough too).
- AVIAddXSub.dll,
calclib.dll : Needed by the executables.
- menu.avi. This file is as small video which is used in case the user
adds CHAPTERS to the generated files.
- README.htm : This file
What you need
- Create a shortcut of AVIAddXSubs.exe in your desktop.
- In a directory place the AVI file and its associated (same name) srt.
e.g. movie.avi and movie.srt.
- Drag & Drop any number of avi files (in the same folder) to the icon of AVIAddXSubs in the desktop.
You can also drag&drop any number of folders instead of
separate files. In this case avi/divx files in these folders and their
sub-folders will be processed.
- At Configuration/SUB1 edit character set and language to your local (Use
ANSI for character set in case of English/Spanish/Italians/Germans etc).
- Press "Create"
That’s it!
Multiple Subtitles from srt (up to 8)
In configuration page you can configure up to 8 srt subtitle files. There are
8 tabs, SUB1 through SUB8, with a number of configuration options.
For every tab corresponds a srt file that is searched through a specific naming
convention. This naming convention is controlled through a literal at option
"SRT extension" found in every such tab. The corresponding srt file name is
composed from the avi file name and the literal defined in the aforementioned option, that is
[AVI name]+[SRT extension]+[.srt]. For example,
to an avi lost0204.avi and a "SRT extension"
"-en" corresponds a srt "lost0204-en.srt".
If "SRT Extension" is empty the srt file has exactly the name of the avi:
lost0204.srt.
In case you wish to incorporate the same srt more than once in
an avi, using different configurations in every incorporation, enter the same
literal in "SRT extension" option for all those tabs (SUB 1-8) that represent
those configurations.
Examples:
For a file lost0303.avi, a tab (SUB 1-8) with "SRT extension":
- empty string loads the srt "lost0303.srt"
- "-en" loads the srt "lost0303-en.srt"
- "-pt" loads the srt "lost0303-pt.srt"
- "-For My flat TV" loads the srt
"lost0303-For My flat TV.srt"
- ".fr" loads the srt "loast0303.fr.srt"
Adding/Removing Right Click Menu option
An alternative way to start the program and instruct it to process avi files
(or avi files contained in folders in case folders are selected) is
through a right click menu option. A right
click on any file or folders generates a menu from which the user can choose
from a number of actions upon to the right clicked items. An action can be added
that starts AVIAddXSubs on those items. This option
has to be added first through Configuration page 2 of AVIAddXSubs.
Press buttons "Add Menu Option" or "Remove Menu Option" according to your
wishes. The menu option "AVIAddXSubs: Add Subtitles" will appear only when folders or AVI files are right
clicked.
Starting and ending AVIAddXSubs without user intervention.
Normally to start the processing the user has to press "Create Subtitles DivX
file". But if the program starts through a drag&drop or through right click menu
option and if the configuration page option "Start at once" is checked, then
this step is bypassed and the processing starts immediately.
Also there is a capability so AViAddSubs can stop its execution after
finishing processing. This is intended to advanced people that wish to use the
program in batch processing jobs that do various thing and a XSUB subtitle
incorporation in addition. This capability can be accessed only through
AVIAddXSubs configuration file (aviaddxsubs.txt) and through the parameter
ENDATONCE. Its default value is 0. Just put an 1 there.
About Idx/Sub subtitle files (in case of conversion in XSUB format)
Any such file pair can contain subtitles for more than one languages. In case
of more than one language a dialog will appear so the user is able to choose
which of them to include. Up to 8 languages can be selected and included.
Also in case the subtitle colors are not satisfactory the user is able to
intervene in the idx file with any text editor, like Windows notepad, and get
better results. First check the text entry Custom Colors. This entry provides
a palette of 4 colors that can be used in subtitle bitmaps.
This entry appears as in the following example:
custom colors: ON,
tridx: 0001, colors:
000000, 808080, FFFFFF, 0000FF
Check if marked as
ON or OFF. If it is OFF make it ON and check again in case you get better
results. If not you can change any of these colors as follows: In the same entry
there is a section with the name tridx. This defines which of the palette
colors are used as transparent. Its value is four digits of 0 or 1. If you see
1, then in the corresponding palette position there is a transparent color. Then
you point your attention to the rest of palette colors. To get letters
with white body and black outline, use the (RGB in hex format) color
FFFFFF (white) and 00000 (black). Put these values in the various
none transparent positions of the palette (all except the last in the
example above), every time save the idx
file, run AVIAddXSubs and see if the result is now satisfactory.
SUBRenamer utility
This utility is used to rename easily an avi file and its associated srt. The
easiest way to use it is to create a shortcut of the program in your desktop.
Then select an avi and all its associated srt and drag&drop them to program's
shortcut. When the program runs resembles in a way the list of SUB 1-8 + idx/sub
tabs in AVIAddXSubs itself. The avi will appear under an edit box named "AVI
File" and all srt (or idx) in the list at the bottom. The list has always 9
lines. The lines 1-8 represent SUB 1-8 tabs of AVIAddXSubs and the 9 the idx/sub
tab. Every file will go in an appropriate position. You can use "UP" and "Down"
buttons to rearrange the list so every srt file is listed in the
SUB position you prefer.
In the list there are four columns. The first is the SUB number and the second
is the current srt/idx file name. The third (ext) and four (lang) display
information read from
AVIAddXSubs configuration file. They display the literal found in "SRT
extension" and the language for all tabs 1-8.
Under the edit box "New common name for avi and idx/sub" will appear
automatically the name of the AVI without extension. For example
if the avi was "lost0209.avi" there will appear "lost0209". You can accept or
modify this name. Under this name all files (avi, srt, idx, sub) will be renamed
if you press the button "Rename".
Changing the introductory avi
When user chooses to add chapters in the generated avi then a
small supplied avi ("menu.avi") is incorporated in the final file. This avi
displays a message ("Loading... Please Wait...") briefly at video
initialization. User is able to replace this avi with another that display what
it prefers. To do so just use an imaging software to create an image (.jpg) with
720X576 resolution. Then use VirtualDub to make an avi based in this image (or
many images if you prefer). Load the image(s) with VirtuaDub. Then select any
Frame Rate (I choosed 1) and choose for compression XVid. These options are
under the menu "Video" of VirtualDub. Then you can save the new avi under the
name "menu.avi". Finally replace the supplied avi with this one and start
incorporating subtitles as usual using any interval for the generated chapters.
IMPORTANT NOTES
- To see the subtitles in your player possibly you have to activate them first.
Read how in the manual of the player. Some button in the remote control.
- Do not put the srt file together with the generated .divx to
avoid confusion. Is not needed to play
the video
with XSUB subtitles. The subtitles are now in the same file as the video.
- You can rename the .divx as .avi if your player works better with the later.
- Also set (in configuration page) the correct character set for the 8
subtitles. English
text works with any character set (but you can use ANSI).
German, French, Swedish, etc (the rest of Latin western languages) work best with
ANSI. Subtitle text (.srt) has to be in ANSI text format. If it is UTF8 or UNICODE
use Notepad to convert it to ANSI.
At the configuration 1&2 pages
- XSUB or Idx/Sub? This is a one of two selection about the kind of
the subtitle will generate each one of SUB 1-8 pages. When XSUB is selected
then the srt specified through "SRT extension" will be loaded and
incorporated in the avi as XSUB. If Idx/Sub is selected then the as before
specified srt file will be converted to an idx/sub subtitle file
pair.
- "Rearrange Subtitle Text (Optimize)". This option takes three
values. "When very long", "Always" and "Never". Its purpose is to rearrange
the subtitle text in cases it is too long and might goes partially outside
screen, given the screen resolution. When the user selects "Always" then
every subtitle is processed to utilize the screen width as better as
possible.
- Font Size: You can choose the maximum font size (in points). AVIAddXSubs
will choose a smaller font if a specific subtitle doesn't fit in the
resolution. Note that this will happen only if "Rearrange Subtitle Text
(Optimize)" has the value "Never".
- Width: Is a percentage of the normal font width. Values less than
100% condense the font, greater expand it.
- Font: You can choose the preferred font.
- Bold. Check this to get subtitles in bold text.
- Color (Text and Outline): Click Text button to define
subtitle text color. Click Outline button to define outline color.
- Outline Size: Defines the size or "thickness" of the outline
around subtitle text. If it is zero then the outline is disabled.
- Preview: Invokes a window where a sample text is displayed
accordingly to the current subtitle configuration. Gives a quick idea
on how subtitle will look like. You can test font, size, colors etc. You can
load a srt and browse the subtitles back and forth.
- Character Set: Choose the correct character set.
- Language Code: Select language code. This is for displaying the
language at the list of available subtitles in your player, if supported by
the player.
- Align: Choose the align between the lines of every subtitle. Left,
center or right.
- Vertical Position (or VP): Choose the position (in vertical axis) where the subtitles will be placed. If you have problems to see
selected subtitles in the hardware player, experiment with smaller numbers in
this option.
- Center At (or CP): This options defines the center point of your
TV in horizontal axis. It is used for the centering of subtitles. If you
found that subtitles are not well centered in your TV then experiment with
this option.
- Opaque Background:
When this options is checked an opaque box (in outline color) surrounds the subtitles.
- Subtitle Bitmaps. Choose the first or second choice depending
on your TV
system, PAL or NTSC. Please note that this selection provides information to the
program on how to construct the bitmaps of the incorporated subtitles. How
the subtitles are handled is depended on your player's firmware which can
vary a lot. So you can leave the default choice and if you
are
not getting satisfying results, choose the others. Use custom when
subtitles do not appear whatever you do with VP. Play with Width and height
to see if you get better results.
- SRT extension. You can use this option to incorporate many srt
files in one avi in different languages and configurations. This option
defines the srt which will be loaded from every tab in the range SUB 1-8.
The literal entered there is added to the avi file name ("aviname"+"SRT
Extension"+".srt"). If there is no literal entered the srt has the same file name as the avi. The tabs
that carry the same literal in this option load the same srt and so you can
use this to incorporate it in various configuration. For example other VP,
CP, font, font size, color, etc.
- Full Screen. When is checked a full screen bitmap is generated
for every subtitle in the Width and Height of the above options. If not
checked then the generated bitmap is as big as the text it contains. if you
find out that you need different VP to keep subtitles appear in the
preferred TV position for various AVIs, experiment with this option. Also
has been found that some players cannot use full screen subtitle bitmaps. In
this case uncheck this option.
- Overscan. When this is checked then the given horizontal
resolution is reduced by 13% in the calculations of "Rearrange Subtitle
Text" option. This is useful in cases the TV is connected through analogue
connections to the player. When HDMI is used this usually is not needed. In
this case you can uncheck this option so "Rearrange Subtitle Text" can
utilize a bigger horizontal space in its calculations.
- Add Subtitles. Normal program operation. srt or idx/sub subtitle
files are incorporated in the generated file.
- No Subtitles. With this option the generated file it doesn't include any
subtitle existed in the original and no other subtitle file is incorporated.
Please note that the program (in its normal operation) always removes any
existing subtitles before add the new. This option is useful in cases you
want only some other services of the program, like "unpack packed bitstream"
or adding chapters or just a file with no subtitles at all.
- Add Test Subtitles. When checked sample subtitles are generated. Each of
these subtitles remain on TV about three seconds and every time is displayed
in a different VP. Starts at VP=100 and increases
50 pixel every time until reach the bottom of the screen, and then starts
again. This helps the user, first to know that subtitles can, somehow,
appear with his/her player and at which VP.
- Choosing Subtitles. Under this (at idx/sub tab of "Configuration
1") is a group of three options which affect the way the subtitles included
in an idx/sub file are chosen for incorporation. You can choose to include
all unconditionally, to be asked which to choose when the processing starts
or always to be chosen automatically only those they match the language
codes you pass. In the last case you enter the language codes separated with
a comma and no spaces.
- Unpack packed bitstream. Some players (like my PHILIPS DVP5980)
do not fully support "packed bitstream". This causes some video encoded this
way to appear with jerky move, like some frames are dropped, etc. This is a
nice way to catch a headache. If this option is checked (default) the frames become
unpacked automatically and all "packed" AVIs have a much smoother
playback.
Unpacking packed bitstream has nothing to do with video compression. The
"unpacked" AVI actually can be slightly smaller.
- Mark DivX as: You can mark generated divx files as DIVX, XVID or DX50. Some players need a
specific mark
to show the subtitles. This option affects original avi with the above marks
that
represent compatible encodings. For example DIV3 avi will not be affected by
this
option. Selection NONE leaves the mark of the original avi.
- Use .avi for output file(s) if possible. By default the output
file is named with extension divx. If this is checked and has been
defined an output directory different from the one of the source file,
then the generated file is named with extension avi. This cannot
work, of course, when input and output directory are the same because we
cannot write the new over the original avi.
- Delete original avi: If this option is checked then after
the successful generation of the new subtitled file, the original
(or source) will be deleted.
- Move srt to output directory: When is checked (and the avi is
copied too) the srt is moved in the
output directory. Please note that the srt is not needed to
view the subtitles in the player. This option is useful in cases the output
directory is used also for archiving purposes. To avoid confusion do not
burn the srt together with the avi in the DVD will use to play the video in
the player.
- Do not copy avi when no XSUB: Checking this option and
configuring the program only for idx/sub generation the original avi will not
be copied in the output directory. Please note that except of cases of a
simple copy of the file this operation applies the "Unpack packed bitstream"
option that makes some players to have a smoother playback.
- Do not convert idx/sub in XSUB: You need to check this option in
case you generate only idx/sub subtitles and you don't want idx/sub to be
converted in XSUB and incorporated in the avi. This way you are avoiding the
case when the program will take its idx/sub output as input when you repeat
the subtitle operation. This can happen when the input and output
directories are the same.
- YUV values at Idx/Sub color palette: If this is checked then for
idx/sub color palette YUV values are generated else RGB values.
- Start at once: When files or folders are dropped to programs icon
or shortcut, or through right click on them, then if this option is checked
the processing will start immediately without having the user first to press
"Create Subtitled DivX file".
- Chapter every ... minutes. When a value above zero is entered
there then this defines a time interval at which a chapter will be
generated. If the value is zero then no chapters are generated. In case of
adding chapters then a small avi supplied in the zip is incorporated in the
avi. This small avi ("menu.avi") displays the message "Loading... Please
Wait...". The user can change that to display another message or picture(s) of his/her preference. See more at "Changing the introductory avi"
above. For this feature to work the hardware player has to support
officially or unofficially DivX Ultra.
- Time Shift by ... a number of milliseconds. Using a negative
number subtitles will appear the specified milliseconds sooner. With
positive numbers later.
- Increase Duration by
... a number of milliseconds. This is useful in cases that subs go away
very fast
or the synchronizations is "suspected" not that good. Of course the duration
extension is
limited by the start of the next subtitle.