0% found this document useful (0 votes)
47 views

DVDsubEdit Manual

This document provides a user manual for DVDSubEdit version 1.4 and above. It describes how to open and view DVD subtitle files, select specific subtitles to view or modify, understand subtitle information displayed, and select display modes. Key functions covered include opening VOB files to view subtitles, filtering subtitles by stream or video cell, understanding presentation time stamps and commands, and viewing the color lookup table used to define subtitle colors.

Uploaded by

Luke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

DVDsubEdit Manual

This document provides a user manual for DVDSubEdit version 1.4 and above. It describes how to open and view DVD subtitle files, select specific subtitles to view or modify, understand subtitle information displayed, and select display modes. Key functions covered include opening VOB files to view subtitles, filtering subtitles by stream or video cell, understanding presentation time stamps and commands, and viewing the color lookup table used to define subtitle colors.

Uploaded by

Luke
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

DVDSubEdit User Manual.

Version 1.4 and above

1. Getting started: Viewing subpictures


1.1 Opening vob files.

This is very easy. You can either drag/drop vob files, or use the File menu.
DVDSubEdit will start scanning the file(s) for subpicture packs in the background. As
more subpicture units (SPUs) are found, the display is updated but you can start
looking at the subpics before the scanning is entirely done.

• Full title set: To look at the subpictures for an entire video title set, select all
the VOBs of the title domain (for example vts_01_1.vob vts_01_2.vob
vts_01_3.vob) and drag/drop them on the DVDSubEdit window.

Alternately you can use “Open


full domain” in the File menu
to open all the files belonging
to the same domain as the
selected file. For example,
selecting vts_01_2.vob will open
the entire first video titleset.

• Single or multiple vobs: You can look at selected vob files if you prefer (for
example, dragging/dropping vts_01_2.vob) but it’s possible that the first
subpicture unit will not be detected properly (because part of it is located in
the previous vob file). You can also use “Open file” in the File menu and select
one or multiple vob files. Note that all the vob files have to belong to the same
titleset (VTS) and to the same domain (i.e., menu domain or title domain).

• Menus: You can also look at menus by dragging/dropping or opening a menu


vob file, for example vts_01_0.vob or video_ts.vob. This will show you button
highlights etc. However, because most button highlights are transparent by
default (until a button is selected or activated), you probably will only see the
background video and the button rectangles. To see the highlights, you can
click the “Ignore Transparencies” check box in the Subpic Color/Transparency
area.

• Fast Reload of last vob(s): You can also select “Fast reload last vob(s)” or use
the Ctrl-O shortcut to reload the last vob (or set of vobs) you loaded.
DVDSubEdit keeps a temporary file that includes all the information about spus
for the last loaded files, so when this option is used the vob files do not need
to be scanned and the operation is very quick.

1.2 Selecting subtitles to visualize or modify.

By default, DVDSubEdit shows you all the subpicture units that it finds. But you can
filter them by stream ID (i.e., by language) or by the video cell (i.e., “chapter”)
they belong to. To do that, use the stream and VCID drop down selectors.

In this example, only the subpictures of


stream 0x20 (which corresponds to the
english subtitles according to the IFO
files, for the widescreen or letterboxed
display modes) are displayed, and only
those that belong to the video cell 1/1
(i.e., with the VID 1 and CELLID 1).

By clicking “Only show modified subpics” you can only show those subpictures that
you have modified one way or another. If you haven’t modified any, no subpicture
will be displayed. “Only show forced subpics” is useful to see which subpictures
have a forced-start command. The other options are explained further down in this
manual.
Once you have selected which subpictures to look at, you can use the slider to
quickly move through them or the arrow buttons to go from one to the next or
previous one.

You can also quickly go to a specific subpicture using the “Goto subpic” field.
If you’ve selected a specific stream, then entering 22 in that field would take you
to subpicture 22 in that stream. If you’ve selected All Streams, then entering 22 in
that field would take you to the 22nd subpicture regardless of stream.

Normally the background video is displayed along with the subtitles but you can
disable that by unchecking “Show video frame”. This can be useful if the
subpicture is difficult to see against a “busy” background. The “No zoom window”
dropdown allows you to view an enlarged version of the subpicture, and will pop a
small window which displays the subpicture bitmap with a 1:1 (no scaling) or a 1:2
(twice as big) ratio. The subpicture background is cropped to only show the
“interesting” part of the bitmap:

If you’re opening a menu vob


and buttons are present,
DVDSubEdit will display button
rectangles as in this example.
However, you probably won’t
see any button highlight unless
the “Ignore transparency” check
box is selected, because most
button highlights are
transparent by default, until a
button is selected/activated.

1.3 Selecting the display mode

Movies that are coded with a 16:9 aspect ratio can be played in three different
ways: original 16:9 (for displays that support this aspect ratio), letterboxed and
Pan&Scan (for 4:3 displays). Some DVDs have separate subtitle streams for each of
these display modes. This info is stored in the IFO files, and DVDSubEdit shows the
target display mode(s) for each subpicture stream in the stream selector (WS for
widescreen, LB for letterbox and PS for Pan&Scan). Note that it is common to have
only 1 subtitle stream for all aspect ratios. DVDSubEdit allows you to visualize the
background video in the way it will be shown on your display, for all three display
modes.
You select a specific
display mode by using the
drop down selector. This
will display the video as
it will appear on the
actual device, according
to the selected mode.
The subpicture is also shown as it will be on your display. This can be quite useful
to check that subpictures do line up with the background video, particularly for
menus. Menus that are encoded in 16:9 almost always have two highlight streams,
one for 16:9 displays, and one for Pan&Scan (menus are almost never shown in
letterboxed format!). DVDSubEdit lets you check that the stream intended for 16:9
does indeed line up with the video in that mode, and likewise for the PS stream.
In the preference panel, you can check the
option “Adapt display mode to subpic
stream”, which makes DVDSubEdit switch
display mode when you change the selected
subpicture stream if the current display mode
is not compatible with the stream’s display
mode(s).

1.4 Understanding subtitle info

Subpicture information is mainly displayed in the left part of the display:

• In this example, we’re looking at


subpicture pack (spu) number 3,
which is the first subpic in the 0x22
stream.
• The stream ID is 0x20 (hexadecimal
for stream 32).
• LBA (logical block address) tells you
where the first sector of the first
subpicture pack is for this spu.
• V/CID indicates which vob cell this
spu belongs to, in this case vobid 1
and cellid 1.
• PTS indicates the presentation time
in system clock units (90kHz clock).
• The duration shows that the second
set of commands (DCSQT) which
holds the Stop command is delayed
by 3.52 seconds.
• The TimeCode indicates the start
and end times (hh:mm:ss:1/1000s)
of the subpicture.
• The DCSQTs are the sets of
commands for the spu. The first
one has no delay, and comprises 6
commands: Set Color, Set Contrast,
Set Display Area, Set Field Index,
Start and End of commands.
In addition, the selection drop down list
indicates the language of the subtitles
(English in this example). Note that the
language is defined in the IFO files, and it
can change from PGC to PGC. For example,
the stream ID 0x20 might be declared as an
English subtitle in one PGC, then as
another language in another PGC. Finally,
the target display mode(s) is displayed
(Widescreen and Letterboxed in this case).

1.5 The Color Lookup Table (CLUT)

Subtitles colors are defined by the color


lookup table (CLUT) used in the PGC in which
the cell containing the subpicture pack is
referenced. DVDSubEdit shows the 4 colors
assigned to each pixel types (‘b’ for
background, ‘p’ for pattern, ‘e1’ for
emphasis 1, and ‘e2’ for emphasis 2).
The CLUT is normally read from the IFO file, and specifically from the first PGC that
references the VCID cell the subpicture belongs to. Of course, this can change from
cell to cell, so it’s possible to see the CLUT change when you move the subpicture
selection slider. SUP files don’t include any CLUT info, so if you load a SUP file, you
have to also load the corresponding IFO to be able to visualize the real colors.

• Selecting “Use IFO CLUT” makes DVDSubEdit use the colors found in the
CLUT of the PGC that references the cell the subpicture belongs to. This
option is only available if DVDSubEdit found an IFO associated with the VOB
files you loaded, or if you loaded an IFO along with a SUP file.
• Checking “Use Automatic CLUT” makes DVDSubEdit use different colors for
“text”, background, outline and antialias pixels. Text pixels are the pixels
used for the body of the subtitle characters, outline and antialias pixels are
used around the text pixels to avoid aliasing problems that could result for
the low resolution used in subpictures. The various types of pixels are
identified from the subpicture itself, and might change from DVD to DVD
(some DVDs use the ‘p’ pixel type for the body of the characters, while
others might use the ‘e1’ type). This option is very useful when you don’t
have the IFO that corresponds to the VOB files, or when you’re loading a
.sup file. You can click on the tiles to change the default colors.

1.6 Viewing individual pixels

You can temporarily visualize individual pixels by


pressing the corresponding pixel button. For
example, pressing the “e1” button will only show the
e1 pixels, with a fully opaque transparency, hiding all
the other pixels. This is very useful to visualize which
individual pixel types are used, or to visualize the
size of the subpicture background. The normal
display resumes as soon as you release the button.

1.7 Multiple sets of commands

If your subpicture data has multiple sets of commands


(DCSQTs), you can select which one to visualize (and later
modify) using the DSCQT drop-down selector. This will update
the supicture display to reflect the commands and
parameters used in the DCSQT.
Multiple sets of commands are sometimes used to create fade-in and fade-out
effects (although that’s fairly rare, but DVDSubEdit can add fade-in effects). For
example, a fade-out is created by having each DCSQT contain a set transparency
command with a gradually less opaque value. To remove such a fade-out, you
would select “All DCSQTs” (last item in the drop-down selector) then move the
transparency slider to full opaque. When you select “All DCSQTs”, the transparency
slider and the color tiles show the values corresponding to the first DCSQT until you
move the slider (or change the colors) at which point all DCSQTs take on the same
values. An easier way would be do click the “Del. Fade” button which is explained
later.
NOTE: DVDSubEdit currently only uses the first DCSQT to position the subpicture. In
other words, if one of the subsequent DCSQT has commands to move the
subpicture, these commands will not be reflected in the subpicture display.
Similarly, if you move the subpicture, only the first DCSQT parameters will be
modified.
2. Modifying subpictures
2.1 General: modifying 1 or many subpictures

Modifying an individual subpicture:


When you move a slider to modify your subtitles, only the subpicture currently
displayed is modified. All other ones are left alone. Typically, when you’re satisfied
with your modifications, you can apply them to the rest of the subtitles by clicking
the “Apply to all selected” button .

Modifying a group of subpictures:


When you click “Apply to all selected”, all the currently selected subtitles are
modified in the same way the currently visible one was modified.
For example, if you have selected stream 0x20, belonging to VCID 1/3, only these
subpictures will be modified. This makes it easy to modify only a given language (by
selecting the appropriate stream) or a given chapter (by selecting the appropriate
VCID). For example, to change the start command of all English subtitles, you would
select the stream corresponding to the English language, then change the start
command of one of the subtitles, then click the “Apply to all selected” button.
A small pop-up dialog then appears where you can select which of the modifications
you have made to the current subpicture you would like to apply to the rest of
them.

For example, if you’ve modified the start command and you’ve moved the subtitle,
you can decide to only apply the change to the start command by only clicking that
box.

Copying changes to another subpicture:


You can also modify the current subpicture
then apply the same modifications to another
subpicture by selecting “Apply last modifs” in
the Edit menu (or using the Ctrl-V shortcut).
Using the left and right keyboard arrows and
the Ctrl-V shortcut is a good way to quickly
modify a group of subtitles.

Undoing changes:
You can select “Reload this spu from file” in the Edit menu (or use the Ctrl-Z
shortcut) to reload the currently viewed subpicture from the file, or “Reload all
spus from file” to undo all your changes. At this point, DVDSubEdit does not have
multiple undos.

Saving your changes:


Once you’re satisfied with your modifications, you can select “Save all modifs” (or
use the Ctrl-S shortcut) in the File menu to save all your changes back into the vob
files. Note that there is no undo in that case! Once the changes are saved to the
vob files, there is no way to go back to the originals, unless you have kept a copy of
the files in another directory. If you opened a .sup file, the changes are saved back
into the original .sup file.
If you modified any of the Color Lookup Tables (CLUTs), the IFO files will also be
saved.

2.2 Changing the transparency

Changing the transparency of your subtitles can easily be done using the
transparency slider. You must first choose which of the 4 pixel types you want this
to be applied to.
Choosing ‘b’, ‘p’, ‘e1’ or ‘e2’ will select the background,
pattern, emphasis 1 or 2 pixels for modification. The slider
will then only change the transparency of the selected
pixels.
You can choose “All pixels” to modify the transparency of all
but the “true background” pixels. The pixels used for the
background are left alone so the background video can still
be seen by transparency.

To ignore all transparency values, you can check the “Ignore transparency” option:

This is useful to reveal subpictures that are initially transparent, such as button
highlights in menus. DVDSubEdit tries to be smart about identifying truly
background pixels: Assuming that the ‘b’ pixels are indeed used for the background
is a bad idea as this is certainly not mandatory and in many cases, they’re not.
DVDSubEdit assumes that the top left pixel in the subpicture is of the type used for
the background.
Once you’ve changed the transparency of your selected pixel(s), you can apply the
same modifications to all the selected subpictures using the Ctrl-A (Apply to all)
shortcut.

2.3 Hiding subpictures

To hide subpictures you can click the “Hide subpic” button,


which simply sets all transparencies to 0. You can also use
the Ctrl-H shortcut to do that.

2.4 Changing the colors indexes into the CLUT

Simply click on one of the tiles to select which color of


the current CLUT will be used for a given pixel type. To
adjust the “e1” pixel type, click on the e1 tile.
A dialog will pop up, allowing you to choose the color
among the 16 offered by the CLUT. For your
convenience, the dialog indicates which LU (if looking at
a menu vob) and which PGC the CLUT is defined in.
NOTE: If you want to apply the color changes to the rest
of the selected subpictures, you can apply the changes
you made to all the pixels in one shot using Ctrl-A.

2.5 Changing the CLUT colors

If you want to change the color coded in the CLUT itself, you can Shift-Click any of
the 16 tiles in the “Pick color” dialog, and a color selection dialog will pop-up,
allowing you to change the color stored in the color-lookup table in the IFO file for
that specific tile. This does not modify the IFO file until you save all your changes.
This is available only if an IFO file was loaded with your subpictures: if you open a
.sup file and you don’t open an IFO file to provide a CLUT, this option will not be
available.
2.6 Modifying the “start” command

A drop-down list is available to select the subpicture start


command. Subtitles normally use a “Normal Start”
command, in which case the subtitles are only displayed if
the corresponding subtitle stream is selected and the
subtitles are turned on in the player.
A “Forced Start” command can be used instead, in which case the subtitles are
displayed even if the subtitles are turned off in the player. During playback forced
subtitles are only shown if the stream is selected. In other words, if no stream is
selected, the forced subtitles will not be shown. If the stream is selected but
turned off, then only forced subtitles will be shown in that stream. If the stream is
selected and turned on, all subtitles will be shown. Forced subtitles are often used
when a character is speaking in a tongue that is foreign to the main language used
in the movie, for example aliens in a sci-fi movie.
Note that DVDSubEdit can’t be used to select a given stream in the DVD, or to turn
subtitles on or off. This is done via PGC commands, and can be easily accomplished
with PGCEdit.
Menu highlights always use a forced start command. Note that you can choose to
only show subtitles having a start command using the check box in the subpic
selection area.

2.7 Modifying the subtitle vertical positions by hand

Use the slider or the entry box to move the


subpicture by the desired number of pixels.

DVDSubEdit limits the amount you can move subpictures so none of the
“useful”pixels will disappear from the video frame. Once again, this applies to all
but non “truly background” pixels (i.e. pixels that DVDSubEdit has determined are
used as background). If you’re using borders (see below) DVDSubEdit makes sure
none of the useful pixels disappear from inside the selected borders.
You can also use the mouse: Click on the subpicture in the video display and move
it to the desired location… If you press Alt or Ctrl while dragging the subpicture,
you can constrain vertical or horizontal motions.

2.8 Modifying the subtitle vertical positions using the borders

It is often easier and faster to define borders in which you want your subtitles to
fall. This can be done using the border slider and the border selector.

Using the border slider:


The border slider can be used to adjust bottom
and top borders (shown in red in the video
display) which define an area where subtitles
will be confined.
The currently viewed subtitle is moved up or down until it fits entirely inside the
“safe” area defined by the two red lines. This can be very useful to automatically
move all the subtitles within a given area of the screen: adjust the borders to the
appropriate position, then click “Apply to All Selected” to apply the modification to
all selected subtitltes.

Using pre-selected borders:


The drop-down list lets you pick from pre-selected borders:
• 4:3 safe area cuts about 16% of the total image height (8% at the top and 8%
at the bottom) to account for the television overscan.
• 16:9 already letterboxed is useful for widescreen movies that are authored
as 4:3 letterboxed DVDs (i.e. 4:3 movies with the top and bottom black
bars). Selecting this ensure the subtitles fall within the actual widescreen
video (and not in the black bars). This can be useful if you intend to zoom to
get rid of the black bars during playback.
• 16:9 already letterboxed safe adds a safe area to make sure your television
overscan does not cut into the subtitles.
• 1.85:1 in 16:9 frame is useful to see the limits of a original 1.85:1 aspect
ratio, when placed in a 16:9 frame.
• 2.39:1 in 16:9 frame is useful to see the limits of a original 2.39:1 aspect
ratio, when placed in a 16:9 frame
The pre-selected borders can be adjusted by editing the DVDSubEdit.ini file (see
appendices to see where to find it). If you find that certain values are better for
your particular display, you can change the pre-selected borders to match your
preferred choice.

NOTE: The border option is disabled if the subpicture corresponds to a menu


(more specifically, if the VOBU the spu falls within has buttons and the subpicture
has a forced-start command). In addition, when you click “Apply to all selected”,
subpics containing button highlights will not be moved. This prevents inadvertently
moving button highlights in button-over-video situations (e.g. the rabbit in the
matrix movies).

2.9 Changing the subtitle horizontal position

Use the slider to change the horizontal


position of your subpics. This is only
possible, however, if the subpicture
background does not occupy the entire
screen.
If the slider is not enabled, your subpicture
background is the size of the entire screen
and DVDSubEdit cannot move the subpicture
unless the background is cropped.
This can be done by clicking the “Crop subpic background” button. DVDSubEdit
then decodes the subpicture data, crops the background to the minimum size that
still encloses the useful part of the subpicture (the text), and then re-encodes the
data. Once this is done, the slider is enabled. To crop all selected subpictures,
simply press Ctrl-A (or select “Apply last modifs to all” in the Edit menu).
You can also use the mouse to move the subtitle horizontallly: Click on the subpic
in the video display and move it to the desired location…
2.10 Changing the subtitle duration

Use the slider or the entry box to change the


length of time during which the subpicture is
displayed.

The slider will only allow valid durations: for example, you cannot display a
subpicture past the start time of the next subpicture (in the same stream).
Similarly, you cannot set the duration to 0 (because two DCSQT normally can’t have
the same delay value).
If you check the “Show frame” checkbox, the I-frame right after the end of the
subtitle will be displayed instead of the one corresponding to its start. This is
helpful to adjust the end of a subtitle to match a specific frame. Note however that
DVDSubEdit cannot show the exact last frame that will have the subtitle (because
it can only show I-frames), so this will be somewhat approximate.
The slider simply alters the delay value of the last DCSQT (which normally holds the
“stop” command). You cannot change the delay of an individual DCSQT (yet).
Clicking the “Inf.” button will remove the last DCSQT which holds the stop
command, thereby making the subpicture of “infinite” duration (in reality, it will
be displayed until the next subpicture starts). Conversely, if a subpicture does not
have a delayed DCSQT with a stop command, clicking the slider will pop a dialog
offering to add a DCSQT with a stop command:

This will allow you to set an arbitrary duration to the subpicture.


When you chose Apply To All, you will have a choice to apply this exact duration to
all selected subpics, or to make sure they last at least that long, or at most that
long.
In the example below, the durations are adjusted to be at least 1.167 seconds
Clicking the “Add fade” button will add a fade-in, obtained by using a series of
DCSQT with increasing transparencies. The fade-in lasts 1/8th of the subpic duration
(this is not currently adjustable), with a fully transparent subpicture at the start,
and a final transparency equal to the original transparency (the transparency
before Add fade was used). In some cases, it’s not possible to add a fade-in because
there isn’t enough room in the subpicture packs for the required additional DCSQTs.
Clicking the “Del. fade” button will remove any fade-in present in the subpicture,
assigning a fixed transparency equal to the final transparency in the original fade-
in.

2.11 If you have multiple sets of commands

If you have multiple sets of commands (DCSQTs) use the drop-down selector to
choose which one to modify before you apply any modification. At this point, the
only data you can modify in DCSQTs other than the first one is the transparency and
the color assignment. If you move the subpicture, only the first DCSQT is modified.
If you choose “All DCSQTs” in the drop-down selector, your modifications
(transparency or color) will be applied to all the DCSQTs that have corresponding
commands. If you then use Apply to All, your modification will be applied to all
DCSQTs of all selected subpictures.

3. Re-timing subtitles
3.1 Changing the timing of a single subtitle

In some rare cases, you need to move a subtitle from one location to another one,
because this specific subtitle is out of sync with the video.
To do that, make sure that you load the full title domain (by opening the files with
the “Open Full Domain” menu, or making sure you’re dropping all the VOB files of
the VTS in question – but excluding the menu of course, for example vts_01_0.vob).
DVDSubEdit will refuse to re-time subpictures if you’re in the menu domain, or if
you omitted one of the vob files. Then click the “Retime this SPU” button. A small
dialog will popup allowing you to specify either an absolute PTS (presentation time)
where the subtitle should be displayed, or a value by which to move the subtitle.
The PTS values are in seconds. In practice, it’s best to search for the target
location of your subtitle using the preview before applying the move. Note the PTS
of the image you’d like the subtitle to be synchronous with, and use this new PTS
when you use the re-timing function.
Because of the way DVDSubEdit works, if you need to move the subtitle by more
than 3 to 5 seconds, it’s a good idea to do it in two steps, moving it first to an
intermediate location then to the accurate target location. It’s also a good idea to
check with a software player that the subtitle is displayed at the right time, and
readjust if needed.
Note that there is no undo for this operation. The vob files are modified as the
operation completes, along with the corresponding IFO file. There is no need to
subsequently save the subpictures (they’ve already been saved).

3.2 Re-timing all the subtitles

In some cases, the entire subtitle track is out of sync with the video, either
appearing too early or too late. DVDSubEdit lets you resynchronize the subtitles by
moving them as a whole by a fixed positive or negative delay. Again, make sure you
load the full domain and click the “Retime selected SPUs” button. A small dialog
will popup where you can specify by how much the selected subtitles should be
moved. Positive values (for example +1s) will make the subtitles appear later than
they currently do. Negative values will make them appear before they currently do.
Since this is a lengthy operation (requiring the modification of many packs in the
vob files), it’s best to have a fairly good idea of how much the subtitles should be
moved by.
The operation takes more time when moving by a larger amount. Adding or
subtracting a small delay (less than 1 second) is relatively fast, but moving by more
than 3-4 seconds can become quite lengthy.
Note that there is no undo for this operation. The vob files are modified as the
operation completes, along with the corresponding IFO file. There is no need to
subsequently save the subpics (they’ve already been saved).

3.3 Re-timing issues

Re-timing subtitles in place (i.e. directly inside the vob file, without
demuxing/remuxing) is tricky. DVDSubEdit tries to do the best job it can, but you
can still run into problems.
• Subpicture collisions happen when one of the subpics you’re re-timing will
end up in the same vobu as another one belonging to the same stream.
While this isn’t illegal, it poses additional problems or subpicture ordering.
For this reason, DVDSubEdit currently refuses to re-time a subtitle if it will
collide with another one. You can run into that problem when re-timing an
individual subtitle, and this is an indication that there’s already a subtitle
that will be displayed around the same PTS. The solution is to make sure
you’re not trying to display two subtitles at the same time. Sometimes, you
will run into the problem when trying to move an entire subpicture track
(for example if the track has a large number of subpics, close to each other,
as in Spiderman R1 for example).
• Angles: Re-timing subtitles in multi-angle movies poses additional problems
that DVDSubEdit isn’t currently able to handle. As a result, re-timing
subtitles is forbidden in such cases.

4. Working with the subpicture bitmap


4.1 Exporting and importing the bitmap

DVDSubEdit lets you export the


subpicture as a bitmap in the .bmp or
.ppm format. Select “Save current
subpic as a bitmap” in the File menu.
The dialog that lets you select the
name of the file to save to also lets you
select the format:

• 4-bit bitmap file (the bitmap


includes a 16-color lookup
table).
• 24—bit bitmap file.
• ppm file.

A few notes:
• The bitmap does not use transparency and all the pixels are rendered as
fully opaque. As a result, it’s quite possible that the saved bitmap looks
slightly different than the subpicture shown in DVDSubEdit or seen during
playback.
• The bitmap’s size is the size of the video frame: 720x480 for NTSC, 720x576
for PAL, and the subpicture is placed exactly where it would be shown by a
DVD player.

It is also possible to save the current video frame as a 24-bit bitmap file. This can
be useful to align menu highlights with the background video. Use “Save current
video frame as .BMP” in the File menu.

Importing a bitmap can be done using “Replace current subpic with .bmp file” in
the File menu. Only bitmap files (.bmp) can be used for that, but they can either
be 4-bit (using a 16-color lookup table included in the bitmap) or 24-bit. More
information on that subject is given below (4.2 ).

4.2 Editing the bitmap with an external tool

DVDSubEdit allows you to edit the subpicture bitmap using any external bitmap
editing tool (such as PhotoShop, Gimp, or even mspaint). This is a very powerful
feature, because it allows you to make changes to the bitmap without having to
demux, edit, then remux the entire VOB file (which would be a lengthy process).
You can achieve this by saving the subpicture as a bitmap (as described above),
opening the saved bitmap with the tool of your choice, editing and saving it, then
going back to DVDSubEdit to re-import it into the subpicture (using “Replace
current subpic with .bmp file” in the File menu). But that’s doing it the hard way!
The same thing can be done in one shot using “Edit subpic bitmap with external
tool” in the File menu. This automatically saves the subpicture in a temporary
bitmap file, opens it with you choice bitmap editing program, waits for you to be
done editing the file, then re-imports it into the subpicture.
Before you can use this feature, you have to select the tool you’ll be using, in the
Preferences.

The path should point to you bitmap


editing tool (mspaint.exe in this
example). You can also indicate
additional command line parameters to
pass to the program when it is
launched, which can be useful to
specify your favorite program options.

You can also select whether the bitmap will be saved as a 24-bit or a 4-bit bitmap.
More on that subject below.

When editing the bitmap with an external tool, restrictions apply:


• It’s not always possible to re-import the modified bitmap into the
subpicture, because the encoded bitmap has to fit in the number of
subpicture packs used by the original bitmap (DVDSubEdit cannot insert
packs in the VOB file – that would be a very lengthy operation). To help with
that, DVDSubEdit crops the modified bitmap as it imports it, and attempts to
move commands and data in the subpicture packs to maximize the amount
of space available for the modified bitmap. In general, small modifications
don’t pose a problem, but if you add too much to the bitmap it is likely that
it won’t fit into the original space. In that case, DVDSubEdit issues an error
message, and restores the original bitmap.
• DVD subpictures use 4-color bitmaps (or more precisely, 4 types of pixels).
The exported bitmap will only show 4 different colors, corresponding to
each of the ‘b’, ‘p’, ‘e1’ and ‘e2’ pixel types. However, bitmap editing tools
might not be able to save the modified bitmap using only 4 colors and when
the modified bitmap is re-imported into the subpicture, DVDSubEdit has to
re-assign colors to pixel types. This is especially true when the tool uses
anti-aliasing (around text for example), which usually requires more than 4
colors (although DVD subpictures can do it with 4, but not very well). In such
cases, DVDSubEdit does its best to map the colors found to the four
available pixels.
• Selecting the right CLUT: The saved bitmap will show the colors found in the
selected CLUT (see section 1.5 for info on selecting the CLUT). If you’re
using the IFO CLUT, the bitmap is saved with the colors found in the IFO
CLUT. If you’re using the automatic CLUT, the bitmap is saved with the
colors assigned by the automatic CLUT.
A problem with using the IFO CLUT is that the 4 original colors might be hard
to distinguish, and hard to select in the bitmap editing tool. Sometimes, the
same color is assigned to two different pixel types, which means they
become indistinguishable in the bitmap.
By contrast, the automatic CLUT assigns different colors to each pixel types,
and the default colors are chosen to makes editing the bitmap easy. By
default, the text pixels are white, the background pixels are black, and the
outline or anti-alias pixels are two different shades of gray. This makes it
easy to select the right color when editing the bitmap. Furthermore, if the
bitmap editing tool adds anti-aliasing between the characters and the
background, it will most likely use shades of gray, which DVDSubEdit will
easily map to the outline and anti-alias pixels.
• Save as a 4-bit or as a 24-bit bitmap? Whether you should save the bitmap as
a 4-bit or a 24-bit bitmap depends on your bitmap editing tool. Many tools
can’t edit 4-bit (16 color) bitmaps, although some do a good job at it. All
the tools can edit 24-bit bitmaps. Editing a 24-bit bitmap allows the tool to
use any arbitrary color, which can be problematic when the bitmap is
imported back into the subpicture.
• Recall that in the bitmap, the subpicture is placed exactly where it would
appear in the video display. If you move some text while editing the bitmap,
the text will appear where you moved it in the modified subpicture after the
bitmap is re-imported.
This allows you to manage difficult cases. For example if parts of a subtitle
appear at the top, and parts of it appear at the bottom, and you want to
realign everything at the bottom, you can use the external editing feature
to achieve that.
• This should be obvious, but is still worth underlining: You cannot add or
change your subpicture colors using the external tool. DVD Subpictures only
use 4 pixel types, which usually translates into only 4 different colors, and
the colors are defined in the IFO CLUTs. Changing the colors is done by
either assigning a different CLUT color to a given pixel type, or by changing
the CLUT color altogether. This is explained in section 2.4 and 2.5 .

5. OCR (Optical Character Recognition)


DVDSubEdit includes the GOCR code by Joerg Schulenburg (with many
improvements added to it), which works quite well on most subtitles (but not on
all, unfortunately). OCR allows you to search subtitles for a specific word, or to
filter your selection to only select subtitles that include one or several specific
characters. OCR also allows you to handle hearing-impaired text such as
[footsteps], as explained below.

5.1 OCR preferences

Select the “Preferences” item in the File menu to open the setup panel:
In the Optical Character Recognition area, the following options are available:

• Detect italicized text should always be on, otherwise GOCR might make
many errors when subtitles are in italics.
• Case sensitive searches allows you to chose which type of search you prefer
in the OCR output panel.
• Word boundary detection can be used if you find that word boundaries
seem to be poorly detected. Selecting a low number will tend to find more
words, while a large number will tend to cluster words together.

5.2 Running the OCR, finding characters or strings

To enable OCR-based functions, you’ll


need to first run the OCR on the selected
subpics by clicking the “Run OCR” button.

This will run the OCR in the background. When that’s done, you can use the search
box to find occurrences of a word in the selected subpictures. You can select case-
sensitive or insensitive searches in the Preferences panel.

The GOCR code works quite well on many subtitles, and does not require any
preliminary “training”. However, it sometimes has problems with italicized text,
especially when italics are mixed with non-italics.
Also note that DVDSubEdit does not try to run OCR on subpics that seem to contain
button highlights (i.e., spus located in VOBUs where buttons are defined, and which
are turned on by a forced start).
In the Subpicture Selection area, you can type a
set of characters (‘[‘ in the example on the
right) and DVDSubEdit will only show subtitles
that include any of these characters (case
insensitive).
This feature is useful for example to remove subtitles for the hearing impaired,
which are usually enclosed between brackets “[“ or parentheses “(“. You can prune
such subtitles using the OCR function, and quickly hide them if you don’t want
them to appear in the final DVD. Or you can use the automatic removal provided by
the application. More about that below.

5.3 Exporting text data

You can also export the output of the OCR as a .srt file by clicking the “Save as
.srt” button. This will save the subtitle text for each subtitle in the .srt format
which can then be used by SubtitleCreator or other programs. Note that you should
select a stream before you use this function so you don’t mix various languages in
your .srt file.

5.4 Removing hearing-impaired subtitles

This function allows you to remove entire subtitles, or parts of subtitles that are
intended for hearing-impaired viewers. Hearing-impaired subtitles are usually
bracketed between square brackets, for example [laughing], or between
parentheses (laughing). DVDSubEdit can detect such occurrences and automatically
remove the text and the brackets, leaving the useful part of the subtitle intact.
In the OCR setup panel, a few options are available to fine-tune this process:
• Remove text between square brackets. Checking this option will instruct
DVDSubEdit to remove any text located between square brackets.
• Remove text in parentheses. Checking this option will cause text between
parentheses to be erased.
• Remove text between music notes. GOCR can recognize (most) music
notes, which are indicated in the output as ‘#’. This option allows the
removal of any text bracketed by music notes.
• Remove single word followed by colon (e.g. “Man: No way”). This allows
you to automatically remove the parts of the subtitles that indicate which
person is speaking.
• Realign bottom of modified subtitles. If your subtitle has two lines, and the
bottom one is erased, the top one will be moved down in its place if this
option is checked. Note that if the subtitle has three lines and you remove
the middle one, the top line will not move down to replace it.
• Re-center modified subtitles. Some subtitles are centered in the frame,
some are left-aligned (the left side of each line are aligned for multi-line
subtitles). By default, the remaining text in a line is left aligned if a portion
of the line is erased. With this option, the entire line is re-centered so its
middle falls exactly where the middle of the original line fell before the
erasing.

To run the hearing-impaired removal tool on a single subtitle, you can use the Ctrl-
W shortcut or use the OCR menu. If the current subtitle hasn’t been OCR’ed yet,
the OCR function is first run, and the current subtitle is then “cleaned-up” of all
hearing-impaired text. To run the tool on all selected subtitles, use “Hide hearing
impaired text in selected subpics” in the OCR menu.

Finally, DVDSubEdit allows you to selectively remove parts of the subtitles by


selecting undesirable words or characters in the OCR output and pressing the Del
key.
For example, here’s an original subtitle:

After running the OCR on this subtitle


(Ctrl-T) the two words “putting him”
are selected in the OCR output window.
Pressing Delete (or Backspace) will
erase these two words from the OCR
output window and from the subtitle.

The result is:

You can also place the cursor at any point in the OCR output and press Del to erase
the character left of the cursor. This very powerful tool is very convenient to fine-
tune the hearing-impaired removal.

You can check the “Show original” check


box to display the text in the original
subtitle (i.e., before any modification).
This is quite useful to check that the
hearing-impaired removal tool did the
right thing.

For more detailed instructions, check out CoNS’s cool guide to remove text for the
hearing-impaired…

6. Working with sup files and other topics


DVDSubEdit lets you open and save .sup files. Sup files are created for example by
VobEdit, or PgcDemux, and can be remuxed for example by using muxman.
Loading: You can load a .sup file, either by drag/dropping it on the main dialog, or
by using “Open .sup file” in the File menu. When working on a .sup file, no video is
available (of course), and the CLUT is not available, unless you load an IFO file to
be used with your subpictures. If you don’t load an IFO file, you will have to adjust
the default CLUT so it looks good on your subpics, or check the “Auto CLUT” check
box so the subpicture colors are adjusted to show the text (white for the character
body, and black for all other pixels). In addition, you won’t be able to re-time
subpics. All other modifications are available.
Saving: Whether you opened a VOB file or a sup file, you can save the selected spus
as a .sup file, using the “Save selected spus as .sup file” in the “File” menu. Note
that you must have selected a specific stream for this to work. The output file can
then be used to remux the subpics into a new VOB, for example using the equally
excellent freeware “muxman”. Note that DVDSubEdit does not keep track of
discontinuous PTS. If the PTS resets at one point in the vob, the PTS associated with
the spus after the reset point will also reset in the .sup file.

7. Preferences
Select the “Preferences” item in the File menu to open the setup panel:

The options in the Optical Character Recognition and Hearing-impaired areas are
described above. The general settings are as follows:

• Open IFO after loading sup files will instruct DVDSubEdit to automatically
display an open-IFO dialog so you can load an IFO file to go with your .sup
file. The open-IFO panel by default opens in the same directory as your .sup
is located.
• Alert if Closed Captions will cause DVDSubEdit to pop an alert panel when a
scanned VOB file contains Closed-Captions. Closed-Captions are encoded in
the mpeg video stream. DVDSubEdit is not capable of decoding or saving
Closed Captions yet.
• Adapt display mode to subpic stream causes the display mode (for 16:9
movies) to change automatically when you select a subpicture stream whose
display mode(s) does not match the current display mode. For example if
the current display mode is widescreen and you select a subpicture stream
that is intended for letterboxed, the display mode will change automatically
to letterboxed.

Finally you can select the default background color which is used when no video is
shown (either because you loaded a .sup file or you unchecked the “Show Video
Frame” option).

8. Appendices
8.1 Keyboard shortcuts, command-line arguments

- Ctrl-0 Fast-reloads the last opened set of vobs.


- Ctrl-S Saves modifications back to the vob files.
- Ctrl-V Applies previous modifications to the current subpicture.
- Ctrl-Z Reloads the current subpicture from file (undo changes)
- Ctrl-A Applies previous modifications to all selected subpictures.
- Ctrl-E Crop background of this subpicture.
- Ctrl-H Hide the current subpicture (make it transparent).
- Ctrl-T Runs the OCR on the currently viewed subtitle.
- Ctrl-Shift-T Runs the OCR on the all selected subtitles.
- Ctrl-W Hides hearing-impaired text in currently viewed subtitle.
- Ctrl-Shift-W Hides hearing-impaired text in all selected subtitles.
- Ctrl-U Open a .sup file.

DVDSubEdit can be launched with command line arguments:


DVDSubEdit VTS_01_1.VOB launches the program and opens the VOB file.
DVDSubEdit –f VTS_01_1.VOB launches the program, and opens the full VTS 1
domain.

8.2 Known problems and limitations

- You can’t change subpicture positions in DCSQTs other than the first one.
- You can’t change the delay of an individual DCSQT
- The video display only shows I-Frames, and therefore, the frame displayed is
not necessarily the exact frame at which the subpicture will start displaying
(because subpictures can start displaying at any frame). The same applies
for displaying the end of the subpicture.
- The OCR code sometimes has problems with italics, and can fail to detect
spaces between words.
8.3 Setup, file location, and troubleshooting

DVDSubEdit saves its settings in a .ini file located in the application data
directory, typically:
C:\Documents and Settings\YOURNAME\Application Data\
DVDSubEdit.ini
where “YOURNAME”is the user name. Some settings can only be adjusted by
editing this .ini file, for example the values used for the border presets.

If you run into problem at startup (for example the app starts but the window is
invisible), quit the app, remove the .ini file and start the app again.
The log file is kept in your $TEMP$ directory, usually
C:\Documents and Settings\YOURNAME\Local
Settings\Temp\DVDSubEdit.log

8.4 Index

.sup, 21 hearing impaired, 19


4-bit bitmap, 16 hearing-impaired, 17
Angles, 14 Hide subpic, 9
antialias pixel, 5 highlights, 2, 3, 8, 10, 11
anti-aliasing, 16 IFO files, 2, 5
Apply to all selected, 7, 11 Ignore transparency, 3, 8
automatic CLUT, 16 Importing a bitmap, 15
Automatic CLUT, 5 infinite duration, 12
background, 1, 2, 5, 8, 9, 10, 11, 18 Keyboard, 22
background pixel, 5 language, 2, 5, 7
bitmap, 3, 14, 15, 16, 17 LBA, 4
borders, 10, 11 letterboxed, 11
button, 2, 3, 7, 8, 11 menu, 1, 2, 3, 8, 11
CLUT, 5, 9, 16, 21 menus, 2, 8
color lookup table, 5 Menus, 2
colors, 5, 9 mspaint, 15
command line parameters, 16 muxman, 21
Crop, 11 Normal Start, 10
cropping, 16 OCR, 17, 18, 19, 21, 22
DCSQT, 4, 6, 12, 13, 22 out of sync, 13, 14
demuxin, 15 pattern, 5, 8
duration, 4, 11, 12 PGC, 5
Edit subpic bitmap with external tool, PhotoShop, 15
16 ppm file, 15
emphasis, 5, 8 preference file, 5
external bitmap editing tool, 15 presentation time, 4, 13
fade-in, 6, 13 PTS, 4, 13, 14, 21
fade-out, 6 remux, 21
Forced Start, 10 remuxing, 15
Forced subtitles, 10 Replace current subpic with .bmp file,
Full title set, 1 15
Gimp, 15 Re-timing, 13, 14
GOCR, 17 Save current video frame, 15
Saving your changes, 8
shortcuts, 22
split subtitles, 17
start command, 7, 10
stop command, 12
stream ID, 2, 4, 5
Subpic collisions, 14
subtitle positions, 10
subtitle stream, 2, 3, 4, 5, 7, 10, 12,
14, 19, 21, 22
text pixel, 5
TimeCode, 4
transparency, 8, 9, 13, 15
Undoing changes, 8
V/CID, 4
VCID, 2, 5, 7
8.5 Table of contents

1. GETTING STARTED: VIEWING SUBPICTURES 1

1.1 OPENING VOB FILES. 1


1.2 SELECTING SUBTITLES TO VISUALIZE OR MODIFY. 2
1.3 SELECTING THE DISPLAY MODE 3
1.4 UNDERSTANDING SUBTITLE INFO 4
1.5 THE COLOR LOOKUP TABLE (CLUT) 5
1.6 VIEWING INDIVIDUAL PIXELS 5
1.7 MULTIPLE SETS OF COMMANDS 6

2. MODIFYING SUBPICTURES 7

2.1 GENERAL: MODIFYING 1 OR MANY SUBPICTURES 7


2.2 CHANGING THE TRANSPARENCY 8
2.3 HIDING SUBPICTURES 9
2.4 CHANGING THE COLORS INDEXES INTO THE CLUT 9
2.5 CHANGING THE CLUT COLORS 9
2.6 MODIFYING THE “START” COMMAND 10
2.7 MODIFYING THE SUBTITLE VERTICAL POSITIONS BY HAND 10
2.8 MODIFYING THE SUBTITLE VERTICAL POSITIONS USING THE BORDERS 10
2.9 CHANGING THE SUBTITLE HORIZONTAL POSITION 11
2.10 CHANGING THE SUBTITLE DURATION 12
2.11 IF YOU HAVE MULTIPLE SETS OF COMMANDS 13

3. RE-TIMING SUBTITLES 13

3.1 CHANGING THE TIMING OF A SINGLE SUBTITLE 13


3.2 RE-TIMING ALL THE SUBTITLES 14
3.3 RE-TIMING ISSUES 14

4. WORKING WITH THE SUBPICTURE BITMAP 14

4.1 EXPORTING AND IMPORTING THE BITMAP 15


4.2 EDITING THE BITMAP WITH AN EXTERNAL TOOL 15

5. OCR (OPTICAL CHARACTER RECOGNITION) 17

5.1 OCR PREFERENCES 17


5.2 RUNNING THE OCR, FINDING CHARACTERS OR STRINGS 18
5.3 EXPORTING TEXT DATA 19
5.4 REMOVING HEARING-IMPAIRED SUBTITLES 19

6. WORKING WITH SUP FILES AND OTHER TOPICS 20

7. PREFERENCES 21

8. APPENDICES 22

8.1 KEYBOARD SHORTCUTS 22


8.2 KNOWN PROBLEMS AND LIMITATIONS 22
8.3 SETUP, FILE LOCATION, AND TROUBLESHOOTING 23
8.4 INDEX 23
8.5 TABLE OF CONTENTS 25

You might also like