Você está na página 1de 48

PgcEdit English Documentation

PgcEdit ©
Copyright r0lZ, 2004-2005
Licence: GNU General Public Licence (GPL)
PgcEdit version 0.5.7 Documentation
Version 2
7 June 2005

1 Introduction
2 Usage
3 Main PgcEdit Window
4 Toolbar
5 What If Things Go Wrong?
6 Menus
7 PGC Editor
8 Command Editor
9 Menu Editor
10 Clipboard
11 Right Click Popup Menus
12 Mouse Shortcuts
13 Keyboard Shortcuts

1 What is PgcEdit?
Any person interested in understanding or modifying the operation of a DVD knows IfoEdit
(http://www.ifoedit.com), an excellent freeware program which makes it possible to modify (almost) all
the information contained in the DVD’s IFO files. However, while IfoEdit allows you to modify (most
of) the commands and parameters associated with PGCs (Program Chains), it has many limitations,
the chief one being that it is very difficult to have an overall view of the DVD’s command structure.

PgcEdit was initially written to supplement IfoEdit. PgcEdit offers an easy to understand view of the
DVD’s programming. It allows you to edit, via easy to use GUIs, all the DVD’s commands with their
legal values, without any limitations except those imposed by the DVD standard.

PgcEdit also has an extremely powerful but easy to use PGC Editor, where you can make changes to
stream assignments, subtitle colors, the chapter table, cell and PGC still times, the cell flags,
VOB/Cell IDs and many others, again through an easy and intuitive GUI.

PgcEdit’s powerful, fully-featured Menu Editor allows users to edit menus, by creating, deleting,
hiding, changing the location, size, commands and colors of the buttons.
Furthermore, PgcEdit has a Trace mode allowing users to follow the flow of the commands as they
are played by a real player, while watching how the GPRMs, SPRMs and PUOs change. With this
simulation, PgcEdit may be used as a powerful debugging tool.

With PgcEdit, you may blank out whole titlesets easily, which is a very handy space-saving feature.
As well, from PgcEdit, you can burn your project.

PgcEdit is also a basic DVD authoring tool – by using its New DVD command, combined with
importing menus and titles and its Command Editor, you can author your DVD from scratch.

PgcEdit is written in Tcl/Tk, which is an interpreted scripting language. Tcl/Tk was chosen for its
power in building interactive user interfaces and for the fact that a Tcl/Tk application can run on any
platform which has a Tcl/Tk interpreter, including Linux, Windows and MacOSX.

2 Usage
The internal structure of a DVD is complex. It is beyond the scope of this document to expose this
structure, or to explain the role of each command. See mpucoder’s excellent site and DVD-Replica
for an introduction to this structure. Using PgcEdit should be relatively obvious to anyone
accustomed to this structure, or to IfoEdit.

You can’t load a single IFO file in PgcEdit. Instead, PgcEdit is designed to load all the IFO files of a
DVD at the same time. This makes it possible to present all the commands of the DVD in a coherent
and easily accessible manner. But that means that the structure of the DVD must be correct to be
able to correctly load each of the files. So, on loading a DVD, PgcEdit checks on a number of key
things like the structural integrity of the IFOs, and where it finds errors that are repairable, it offers to
fix them for you.

Once you have loaded a DVD in PgcEdit, you can select the PGC to be edited with the drop-down
menu of the PGC Button, or via the PGC Selector (usually located on the left side of the commands
list but its location is configurable by the user).
• Select a command by clicking on it.
• Select several commands at the same time with a shift-click, or by dragging the mouse over
the group of commands.
• Double-clicking a command calls the Command Editor, where you can edit the command.
• When you click on a Goto command, the line where this command is branching to is briefly
color-highlighted (in light blue). If this line does not exist, the line containing the Goto is
highlighted in red. The same applies to lines with a Jump, Call or Link (or Set+Link). In these
cases, it is the destination PGC which is highlighted.
• Clicking such a command with the middle mouse button (or Ctrl – Left Click) will move you
automatically to the target line or PGC. Note also that the Goto target lines are highlighted in
yellow, and lines with errors (illegal use of a command in the current domain, illegal
parameters) are highlighted in pink. (See also Options - Highlight Errors and GOTO targets)
• When one or more commands are selected, you can use the action buttons located at the
bottom of the main GUI. The same actions are available via the Edit menu or by right clicking
the command.

3 The main window

The following diagram depicts the main PgcEdit window:
Note the various areas, including the PGC button, which is a quick jump to various PGCs.

The Search box enables you to search the DVD’s commands back and forwards in the current PGC
(buttons < and >) or in the whole DVD (<< and >>).
• The case option does a case-sensitive search
• The reg expr option will search for a “regular expression”. In such expressions, the “.” (dots)
match any character, and the “.*” (dot+star) match any occurrences of any character. Most
special characters (parenthesis, brackets etc.) must be prefixed with backslash (\). There are
many other very powerful features in regular expressions. See here for the official description
of the Tcl regular expressions, or this handy, easy to read table.
• The all box searches the entire DVD for all instances of the searched text and shows them in
a popup box, which enables you to move easily to each instance. Right click the all box to
search only in menu buttons and buttons over video.
Note also Options - Set current search string as default.

The Scratchbook offers a space where you can copy, paste, and edit commands without modifying
the structure of the DVD. You can use this space to store commands which you will need later, or to
build a program which you will be able to copy and paste in a PGC when it is finalized. It’s possible to
back up the commands of the scratchbook on disk; this feature can be used to preserve a set of
commands which you often need.
4 The Toolbar

The toolbar is a handy way of accessing PgcEdit’s most important functions. Each toolbar item has
an easy tool tip that explains what each toolbar item does.

5 What To Do If Things Go Wrong

If you have made a big mistake, do not worry.
• Click File – Restore Backup
• Navigate to the PgcEdit_backup folder
• Copy all the VOBs back to the parent folder
• Then click File – Reload DVD and answer Yes
6 Menus
There are 11 main menus which drive most of the PgcEdit functions. Each menu has several
These are discussed separately.

Note: The Menu Editor is accessible from any menu PGC which has buttons (including titles which
have BOV).

6.1 File menu

Open DVD (Ctrl + o): Loads all IFO files of the selected DVD.

Save DVD (Ctrl + s): Saves the IFO files of the DVD (and any VOBs that were modified by the Menu
Editor), in the original folder. The tables of VTS sectors are updated according to the VOB files
contained in the folder at the time of the save operation (see also Options – When saving, leave at
least 32k of space between IFO and BUP).

Reopen DVD (Ctrl + r): Reloads the IFO files of the current DVD. Use this menu if you have
modified the IFO files with an external program, such as IfoEdit or just want to start over and not save
your changes.

Find BOVs: Searches for buttons over video, which are buttons in the titles domain (VTST) as
opposed to buttons in the menu domain (VMGM / VTSM). You may set PgcEdit to scan for these
automatically when you open a DVD, as opposed to this function, which does a manual scan. See
also Options – Automatically launch BOV finder when DVD is opened.

Save IFOs as: Allows you to back up the IFO files of the current DVD in another folder. Only the
IFOs are backed up (not any changes to the menu VOBs) and the calculation of the VTS Sectors will
be done without the VOB files (or with the VOBs present in the destination folder at the time of the
backup). Therefore, the calculation will not be correct. This function is intended simply for the
temporary backup of IFOs, or for future reference. Note that the destination folder of the “Save DVD”
menu item is left unchanged by this operation.

New DVD: Create a new, empty VIDEO_TS.IFO in a specified folder of your choice. This file is then
loaded in the editor, and may be used as a basis to import titles and menus from other DVDs.
Import VTST Titles: Import all titles of a VTS from another DVD. A new VTS is created and the
global table of titles is updated. The source VTS menus are not imported. The VOB files may be
copied (or moved) automatically. The original DVD commands are not modified. This task is left to

Create Backup (Ctrl + b), Incremental backup, Restore Backup and Delete Backup:
Backup/restore and delete the IFO files, in case things turn sour! See also the Options menu. The
Incremental backup renames the original PgcEdit_backup folder to one which contains the date and
time it was last modified and saves your IFOs in a newly created PgcEdit_backup folder. This is very
useful for progressive saving of your work.

Open Scratchbook and Save Scratchbook: Allows you to open/save the contents of the
Scratchbook to/from disk.

Import PGC Commands (Ctrl + i) and Export PGC Commands (Ctrl + e): Enables you to import
and export the current PGC’s commands. The Import function will overwrite the commands in the
current PGC. Note that only the commands are exported. The other PGC parameters (i.e.
parameters you can edit with the PGC Editor, such as the Prohibited User Operations and the cell
table) are not exported. The file format is PgcEdit’s internal format (ASCII).

Import all PGC Commands and Export all PGC Commands: Same as above, but will
import/export all the DVD’s PGCs in one operation. The import function will try to import all the files
whose names match the current DVD’s PGCs. So, to import only some of the PGCs, you may delete
or rename the files you don’t want to import.

Check DVD +/- R Size: Calculate the space used by the IFO, BUP and VOB files of the DVD source
folder, and displays the used percentage of a standard capacity DVD-R or DVD+R. Note that this
calculation does not take into account the possible modifications made to the IFO files loaded in
PgcEdit. To obtain an accurate result, save the DVD before using this function.

Burn DVD / Create ISO: Allows you to burn your project via DVD Decrypter. An ISO image is
created first on your hard drive. You will need to have mkisofs.exe and cygwin.dll installed (get these
from ImgTool Classic at www.coujo.de), as well as DVD Decrypter. There is a one-time setup of the
burning function – this is explained here (step 5).

Explore DVD folder (Ctrl + f): Opens the DVD folder in an Explorer window (this command available
only on Windows platforms).

Quit and Kill: Exit program. The Kill menu will exit immediately, without confirmation, without saving
the setups, and bypassing error messages, if any.

6.2 Edit menu

This menu is also accessible by right clicking a command. As well, the quick-click action buttons
at the bottom of the main PgcEdit screen mirror the top part of this menu.

Edit Cmd (Spacebar): Call the Command Editor for the current command (see below). A command
must be highlighted in the right hand pane first.

Edit PGC (Enter/Return): Call the PGC Editor for the current PGC selected in the left pane (see

Add Before (Ctrl + Shift + <) and Add After (Ctrl + Shift + >): add a NOP command before or after
the selected command(s).

Delete (Del): Remove the selected commands.

Duplicate (Ctrl + d): Duplicate the selected commands.

Copy (Ctrl + c), Append (Insert), Cut (Ctrl + x), Paste replace (Ctrl + v), Paste before (Shift + v) and
Paste after (Ctrl + Shift + v): Clipboard functions.
• Append adds the selected commands to those already present in the clipboard
• Paste replace replaces the selected commands by the contents of the clipboard
• Paste before and Paste after add the commands on the clipboard before or after the selected

Decr GOTOs (Ctrl -) and Incr GOTOs (Ctrl + Plus sign): increments by -1 or 1 the number of the
target line of all the GoTo (and SetTmpPML) commands contained in the selection.
Move Up (Ctrl + [) and Move Down (Ctrl + ]): Move the selected commands in the list.

Jump to Target (Ctrl + j): If the currently selected line is a Goto, this function will select the
destination line. If the current line is a Jump, Call, Link or Set+Link, the function will select the
destination PGC.

Undo cmds changes (Ctrl + z): Resets the current PGC commands to the original state.
Warning! This function is very limited – it only works for commands and the undo buffer is
reset each time another PGC is displayed. This means that if you go to another PGC, the PGC
you are leaving will lose its undo capabilities. However, you can go to the scratchbook and
return to the same PGC without losing the undo.
The scratchbook also has a limited undo function, as it can be reset to whatever it defaulted to
when PgcEdit was opened (see Options – Save current scratchbook as default).

Copy as text: Copies the currently selected commands exactly as they appear in the main listbox to
the clipboard. You may control whether to copy the hex codes.

Append to scratchbook: Adds the selected commands to the scratchbook directly.

Delete all commands: Deletes all the commands in a PGC (but not the cell parameters).

Note: The keyboard shortcuts only work when the main pane (containing the commands) is active.

6.3 Trace menu

Trace Mode (Ctrl + t): Toggle Trace mode on or off. You may also start trace mode by clicking the

trace toolbar icon.

In this mode, you can ‘play’ the DVD, simulating the execution of all the DVD’s commands. In Trace
mode, a new sub-window is opened in the lower part of the interface as depicted below:
Trace is a very powerful debugging tool. The controls allow you to play, stop, watch registers and
PUOs, set breakpoints (at PGCs or any or all of the registers), log the trace, enter values to registers
and many other things. These are described below.

Setting up Trace
Virtual player setup
The first thing you need to do is setup your virtual player to imitate the system that you play your
DVDs on. Click Setup in the trace window (or from the main menu, click Trace – Virtual Player
Setup) and enter the data pertaining to your setup. This data includes:
• Preferred languages for menus, audio and subtitles (and extensions – you can usually leave
these at “unspecified”)
• Video screen shape and for 4:3 TVs, whether you view in letterbox or pan and scan
• Parental management country code and level (usually leave blank)
• Preferred region codes
• Your system’s audio capabilities
• Whether your player holds the program number or chapter number in SPRM 7 (small test
DVD available for download on the PgcEdit homepage).
Click Save to store these settings permanently. If you wish to make a temporary change, click Use.

Preview setup
This is straightforward. You may choose whether, in trace mode, to:
• Start preview automatically when playing a cell (i.e. video is present and played). A shortcut
for this is to tick the little box to the right of “Setup”. This will open the preview window and
you may select whether to play the cell or fast forward through it etc. See Preview for more
• Automatically start preview playback – when a cell is previewed, playback is automatically
started at normal speed. The other preview controls are still enabled.
• Close preview automatically at the end of a cell – this will close the preview screen when the
cell has finished playing and move on to the next cell or the cell/post commands (if the last
• Close preview automatically after a short delay – this will play the cell for the time specified on
the playback slider down the bottom and automatically close the preview and move on to the
next cell. Set the cell duration playback slider 1.0 seconds or more for this to take effect.
• Skip preview of short cells (less than 1 second) – this stops annoying black screens from
popping up all the time.

The other setup options are self-explanatory.

Watching registers and other info

Trace allows you to step through the DVD in order and watch how it proceeds and how things
change. On the Trace menu, click Watch and check which options you would like to view. The
options are:
• Input (see below)
• SPRM labels
• PUOs
• Registers (GPRMs, SPRMs and Input)

“Input” shows the effect of the command and how many times the register has been set. At a break in
the playback, or if you are tracing in “step mode”, you may also input your own value in the input box
to see the effect of a change in command before you actually change it. You may input in decimal,
hex, ASCII (for languages) or button numbers. Illegal/invalid inputs are rejected by PgcEdit.

This watch is more comprehensive, adding the registers and SPRM labels. At the start of your
session, the SPRM registers will reflect your virtual player setup. During the trace, the registers are
updated as each command is executed. Registers not yet used are greyed out. You can see that
GPRM(12) was the last set (it is in yellow) and was set to 0, while GPRMs 2, 3, 5, 6 and 7 haven’t
been touched yet.
Starting the trace
You may trace in three modes:
• Step (one command at a time)
• Next PB – traces and breaks at the next cell to play video
• Run – just play the DVD as your standalone player would

During playback, you may:

• Quickjump to any of the defined menus, which breaks the playback and goes to the menu
• Press the Next, Previous or Return buttons to skip chapters or execute the GoUp action
• Break the trace (the Run button turns into a red Break button during playback)
• Slow things down by pressing Step
• Preview the cell being played
• Eject the DVD (by pressing the load/eject button)

• If you wish to restart the trace from the beginning, you must press the load/eject button (just
think of the trace as a normal DVD player!)
• It may be necessary to “Break” the playback to click on a defined menu type or one of the
Next/Prev/Return buttons.
• Trace will probably not perform properly if you don’t trace in the precise order that the DVD
commands are executed. You may want to manually go to another PGC for a while but the
state of the registers will most likely not be correct
• The duration slider (to the right of Run) controls the speed of the trace. Set it to meet your


Breakpoints are events that stop the execution of the DVD’s commands. You may set breakpoints at
any or all of the following:
• When any or all of the GPRMs and SPRMs have just been written to (a Register Breakpoint)
• At the start of the pre- or post commands of one or more PGCs (a PGC Pre/Post Breakpoint)
• At the start of playback of one or more PGCs (a PGC Playback Breakpoint)
• All menus
• All titles
• When specific user selected characters (e.g. SetSTN) are written to the log (log output)
When the trace is halted for whatever reason, you may click on the value showing in a register to give
it focus in the input box, where you can input values of your own, if you wish (and see other pertinent
data for that register – e.g. Set count, value in hex).
Start playback again with the Step, Next PB or Run buttons.

• Left click a register number (either GPRM or SPRM) in the watch list to set a Register
Breakpoint (register will turn red).
• Set a pre/post breakpoint with Ctrl + Shift + t (PGC will turn red in PGC Selector).
• Set a playback breakpoint with Ctrl + Alt + t (PGC will turn blue in PGC Selector)
• (If both a Pre/Post and Playback breakpoints have been set for a PGC, it will turn purple)
• Right click in the log and select Search to bring up the log search box. Set a “break on log
output” by ticking the Break box and entering the characters you wish to break on in the
search box (note that you can only define one log breakpoint at a time and you may also use
the case and regular expression options)
These controls are toggles. Repeat them to turn off the breakpoints.
You may also set a breakpoint by holding down the shift key and left-clicking on a PGC in the PGC
Selector. First click is the pre/post breakpoint, the next is a playback breakpoint, the third is both
pre/post and playbacks and fourth turns off all breakpoints.
You may also clear all PGC breakpoints in the main menu (Trace – Clear all PGC breakpoints) or
the Breakpoints menu of the Trace screen.

Trace State
This menu allows you to:
• Remember and restore all GPRMs and SPRMs whenever you wish. (You might like to
remember your registers before experimenting in the input box, or before manually moving to
another PGC to do something there and restore them after your return)
• Clear the register changed flags (greys out everything in the watch and while not changing
the value in the register, it changes the state to unused)
• Clear the highlights from the PGCs that have been visited

Trace Clipboard
Trace allows you to copy registers used as commands. Optionally, you can append the commands to
the Scratchbook.
The difference between “used” and “changed” commands is as described in Trace State. If you clear
the register changed flags, you can run through the DVD and break and then copy the registers which
have changed since then. On the other hand, at the same point in time, “copy used registers” will
copy all registers in use.
Trace Log
During the trace, the log records every action of the DVD. You may choose to limit this with the Log
filter in the Log menu. So, if, for example, you are only interested in comparisons, you would only log
IF conditions.
At any point, you may log the registers. The Log menu contains commands to Log all
GPRMs/SPRMs now.
At any break in playback, you may right click in the log window to bring up a menu where you can:
• Show the log in a text viewer
• Select all the log and copy it
• Search the log (and set a log output breakpoint)
• Save the log as a text file
• Clear the log
• Force the log of a particular register (by clicking on its value in the watch window and then
clicking on the green or yellow field in the input window).
Even if you have closed Trace and re-open it later, the log and the trace will be intact (providing you
have not opened a new DVD or re-opened the current project).
Expand (and contract) the log window with the + button on the lower left of the log.

6.4 Preview menu

The preview window is a little DVD player (without the audio), where you can Play the PGC, go
forward or back by an I-frame at a time (> or <) or by 5 frames at a time (>> or <<). You may advance
forward to the next cell (Cell+) or back to the previous one (Cell-). You may also make a bitmap of
the current frame by pressing the BMP button. Pressing Shift-BMP will make a graphic in the PPM
format. Checking the info box will give information about the cell being played, including its VOB/Cell
ID, aspect ratio, frame rate, time, the sector being displayed, number of buttons (if a menu) etc.
Toggle play on and off with the spacebar.
The options in the preview menu are available only under Windows or Linux (if you have installed

Preview PGC (`/~ above the Tab key): Launch the preview for the current PGC. All cells are shown,
in sequence of the cell table of the PGC. To see a particular cell, you can also use the Play button (at
the extreme right) in the cell table of the PGC Editor. The preview is also available in the menu button
viewer and in Trace mode. In the Preview window, you can toggle the Always On Top mode in the
little system menu of the Preview window and you can change the default window size with the
Options -> Preview video screen size menu.

Preview full domain VOB(s): Shows the whole VOB file (or files) of the current domain. This is
helpful if you wish to preview the content of the whole domain before blanking all PGCs.
Automatically start Preview playback: If this option is checked, when the preview window is
launched, playback will begin immediately.

Full Size, Medium Size, Small Size. Allows you to change the default size of the preview window
and of the menu button viewer.

Disable DirectDraw overlays: Direct draw overlays use the very low level overlay buffer, which is
much faster than the usual way of displaying video to the screen. However, PgcEdit has no idea what
is being displayed so you can’t take snapshots of the GUI while this option is selected (but you can
make BMPs of what’s inside it). On some systems it may actually be faster to disable DirectDraw. As
well, Linux users should disable DirectDraw overlays, otherwise the display will crash.

Use Preview? (requires restart): This is self-explanatory – turns preview on! If Preview is causing
problems or is not supported (eg Mac/Linux without WINE), then use this option to turn it off. With
preview off, the menu button viewer will still work but will not show backgrounds.

6.5 Utilities menu

Title Play Map table: Displays the global table of the DVD Titles (VMG_TT_SRPT), and enables you
to modify the Prohibited User Operations (PUOs) defined in this table.
Domain Streams Attributes: Allows you to modify all the stream attributes of the current domain
(VMGM menu, VTSM menu or VTST title).

Region Code: Allows you to modify or clear (region free) the region code of the DVD. There is also
a button to launch a search for “sprm(20:player region code)” in all the DVD commands. Some DVDs
(mainly region 1) use this SPRM to check the player region code.

Filter Prohibited User Operations: Selectively removes some of the prohibited operations,
separately for all the menus of the Video Manager, for all the menus of the Title Sets, for all the Titles,
and for the global table of Titles. Note that there can still be PUOs in the VOB files. These PUOs are
not accessible to PgcEdit, which only deals with IFO files. To eliminate these, rip the disk with DVD
Decrypter using the setting remove PUOs in VOBs.

Enable Navigation Buttons: Allows you to use:

• The Previous button on the remote when you are in the first chapter to jump back to the
beginning of the chapter (menu and title domains)
• The Next button on the remote when in the last chapter to jump to the end of the title (menu
and title domains)
• The Return (GoUp) button to jump to the beginning of the title (title domain only).
• The Return (GoUp) button on the remote to either go back to the beginning of the current
PGC or resume playback of the last visited title (menu domain only)
Note that these buttons are not reassigned if they already have a programmed function and the “Next
Chapter” will be changed only if there are post-commands in the PGC.
You may apply any or all of these selectively to:
• The current PGC only
• All PGCs in the current domain
• All titles on the DVD (this is usually a good idea)
• All PGCs of the Video manager.

Remove Parental Management: Removes the table and references related to parental management
prohibitions. The function replaces also all SetTmpPML with GOTO commands. Therefore, the DVD
will be played regardless of the parental level setup of the player.
Note: SPRM 13 (which holds the current parental level of the player) may be tested by the PGC
commands. This situation is not modified by the utility. Therefore, some restricted content may still
be prohibited. You will need to change all occurrences of SPRM 13 to the constant value 15 to fully
remove parental management prohibitions. For example, if you encounter Set gprm(0) = (mov) sprm
(13), you would change this to Set gprm(0) = (mov) 15. The utility asks if you want to search for
SPRM (13) and shows you if there are any occurrences, which you can change manually.

Blank out all PGCs in Domain (Ctrl + Delete): Modify all the PGCs in the current domain (either
menus or titles) of the VTS to inhibit the playback of these PGCs, and replace the VTS VOBs by a tiny
10k blank or optionally, by a ‘feature removed’ imported clip (or, at your option, completely remove the
VOB for menus). You also have the choice of killing the playback of this little ½ second VOB (which
is usually a good idea). Select “kill playback when it’s safe” and let PgcEdit figure out whether to kill
the playback or not for you.

Blank out all Title PGCs in DVD: This utility goes through each titleset and asks if you want it
blanked. The same options are available as for the Blank out all PGCs in Domain above. This
feature is useful if you have a DVD with several titlesets and you only want to keep the one with the
main movie (say Cancel to that any you don’t want blanked). Just use this utility to blank out the rest
of them in one easy command.

New Menu: Replaces all the PGCs of the menu of the current VMGM or VTSM. New Menu creates
a single PGC (a Title Menu if the current PGC belongs to VMGM or a Root Menu if it is in a VTSM).
No video is associated with the new menu. This makes it possible, for example, to jump to the First-
Play PGC when you use the remote control Title or Root Menu buttons. Of course, you will have to
modify the menu commands according to your needs.

Import Menu: Replaces the current menu with another one, extracted from another DVD. By
contrast with IfoEdit’s function “Merge Menu Tables”, Import Menu makes it possible to import a
VMGM menu into a VTSM menu, or vice versa (but it is not always recommended!). Moreover,
Import Menu also copies the menu VOB file if requested.

Remove Menu: Remove all the data (and if desired, the VOB file) related to the current VMGM or
VTSM menu.

Remove LU: Click on any PGC in a language unit (LU) and use this utility to remove the entire
language unit from the particular menu (VTSM or VMGM). You will need to do this for all unwanted
LUs in all VTSs. This utility removes all traces of the LU from the IFOs (leaving the cells
unreferenced) but does not strip them out of the VOBs – to do this, you should process the menus
with VobBlanker. Note: You can not remove the last LU of a VTS – to do this, use the Remove Menu

Set Menu Type: This allows you to modify the menu type of the current menu PGC to a Title menu
for VMGM and a Root, SubPic, Audio, Angle or Chapter menu for VTSM.

Show/Edit Menu Buttons or BOVs (Ctrl + m): Displays the button layout of the current menu, and
the commands associated with them and allows you to edit them with the Menu Editor. The “Jump to
Target” button loads the target PGC of the current button command in the main window (if the target
is another PGC), or loads the target Program or Cell in the Menu Button viewer (if the target is a
Program or Cell within the current PGC). Note that you can use the keyboard arrow keys to select
adjacent buttons, exactly like a remote control.

Swap Menu LUs: Swap two LUs (language units), including all their PGCs. This may be used to test
one particular LU with IfoEdit or to set the default LU for players that do not allow you to change the
default menu language in the setup menu.

Copy LU cmds to other LUs: Copy all commands of all PGCs of the source LU to all other LUs.
Normally, all LUs share the same structure, only the video data is different. So this utility allows you
to modify the commands in your preferred LU, and then to automatically modify the other LUs

New dummy PGC: Create a new PGC. You must select a PGC before calling this function. The new
PGC will be created after all PGCs in the same group (for example, at the end of the current Menu
LU). You may create this in the menu or title domain, but be aware that dummy PGCs not associated
with a title in the title domain are off spec. PgcEdit automatically does this for you.
Clone current PGC: This utility makes a copy of the current PGC, including all the cell values and
adds it as a new PGC at the end of the LU. Note, it will be unreferenced. Use this function if you
wish to manually re-order a menu or to duplicate a PGC and change some of the parameters in it
(e.g. delete some cells).

Swap or copy menu PGC: This utility will swap 2 PGCs around or copy one PGC over another (and
in so doing, lose the cells of the PGC that is copied over). To use it, select a PGC, call the utility,
select a source PGC and choose whether to swap the two or copy over the original. You have the
choice of swapping the commands or not, and the PGC/cell values (streams, cell table, color table
etc) or not.
Note that swapping things around will not change the references in other PGCs – if they originally
referred to your original PGC, then they will now refer to the swapped/copied one which stands in its
place at the same PGC number. You will therefore need to do some (and possibly quite a bit of) re-
authoring of the VM commands. This command can not be undone with Ctrl z.
Use of this function is similar to that of Clone PGC.

New ‘Play All’ Title: Create a new PGC with all the VOB/Cell IDs of the current VTS. This PGC
plays the whole video of the titleset. This may be handy for a multi-episode DVD, which doesn’t have
an option to play all the episodes as a whole. Only applicable to the titles domain.

Delete last PGC in Domain: Deletes the last PGC (title or menu domain). Useful if you have an
unreferenced PGC that you have no further need for any more. To delete multiple PGCs, use the
Utilities tearoff menu and repeatedly click on this command. Beware of going too far though and only
delete unreferenced PGCs! Note: You may only delete titles beginning with the last one on the DVD
and may not delete the last remaining PGC from a VTS.

Delete All Commands in Domain: Keeps the PGC and cell structure but eliminates all their
commands. The cell tables are not touched. This can be useful if you wish to author your DVD’s
commands yourself. Note: This command may not be undone with Ctrl z. If you make an error, re-
open the DVD.

Set Provider ID: Edit the name of the DVD provider (a field in VIDEO_TS.IFO/VMGM_MAT that
IfoEdit does not let you modify).

Set DVD-TEXT General Name: Create or modify the General Name (and Movie Name) of the DVD.
Some DVD players (multi-disc, most of the Sony players) can display this name to identify the DVD.
This name is part of the data in VMG_TXTDT_MG. If the VMG_TXTDT_MG does not exist, it will be

Remove DVD-TEXT data: Disregard all the DVD-TEXT information of the DVD. Caution: The entire
VMG_TXTDT_MG is erased, and not just the general name of the DVD.

6.6 Info menu

PGC: Displays the current PGC commands and various parameters (including the cell table)
pertaining to the PGC. Also displays the menu button commands and other information, if applicable.
You may save/copy the commands from the text viewer if you wish.

Title Play Map table: This is a text-dump of the global table of Titles of the DVD (VMG_TT_SRPT).
See also Utilities - Title Play Map Table.

DVD commands: Display the commands of all the PGCs of the DVD. The commands are displayed
in a window and can be saved to disc and searched. This function also lists the menu button
commands, if applicable. Complex DVDs may take some time to perform this function.

PGCs params and Cell Tables: Displays the PGC parameters of all the PGCs of the entire DVD.
This includes the PGC’s playback and still times, PUOs, Next, Prev and GoUp links, and for cells with
video, a dump of the cell table, as well as the PGC’s stream attributes.

Menu Buttons commands: Displays the commands of all the buttons of every menu in the DVD.
The button info display is set out by VTS and within each VTS, by VOB/Cell ID. Also includes the
location of the first NavPack for each VOB cell.

Go to calling command (Ctrl + g): Displays a popup window showing every PGC which calls the
PGC and the command which calls it. Clicking on a calling command goes to that command. Click
on the New Target button to do a Go to calling command on that PGC or click on Return to target to
go back to the original PGC.
The calling commands are color coded depending upon where they come from:
• Light Green – Menu PGC command
• Pink – Menu button command
• Light Blue – Title PGC command
• Light Purple – Button Over Video command
• Light Grey – Next/Prev/GoUp PGCN links

Calls cross references (Ctrl + h): For every PGC in the DVD, lists all the commands that branch to
this PGC. At the end of the output, a list of all unreferenced PGCs is also displayed. You will be
asked before this executes, whether you wish to delete all the commands in unreferenced PGCs and
if PGCs with unreferenced menus are encountered, whether you wish to delete the menu (so you may
strip it out later with VobBlanker or IfoEdit). In this way, by iterating the command, you may “clean up”
the DVD of authoring remnants and unreferenced material.
Streams: Display the attributes of the video, audio and sub-picture streams of all the DVD Title Sets
(including menus).

Find Unused GPRMs: Displays a list of the 16 GPRMs and their usage in the DVD. This includes
commands in the menu buttons and buttons over video. Note that (if you are searching for a spare
GPRM) you may safely delete the command that uses a GPRM that is only referenced once in the

6.7 Macros Menu

Kill PGC Playback (Ctrl + k): IfoEdit can disable the playback of a menu, provided that it does not
have buttons. It cannot disable the playback of a Title. This function, on the other hand, can be used
indifferently for titles and menus with or without buttons. The macro modifies the commands of the
current PGC so that the video is not displayed when the PGC is executed. It does this by copying the
post commands to the end of the pre commands and changing any commands that play the video to
point to the post commands.
If you have killed playback on a menu PGC (and the cell is not re-used elsewhere), PgcEdit will offer
to remove all references to this particular cell (and in so doing, convert it to a dummy menu) so you
can strip it with VobBlanker. To save space, accept this option and process your menus with

Enable all operations: Removes all Prohibited User Operations (PUOs) from the current PGC, and
enables the Prev, Next and Return buttons of the remote, where applicable. (See also Utilities -
Enable Navigation Buttons)

Reset Used GPRMs to 0: This macro will insert the commands to reset all GPRMs that are used in
at least one PGC in the DVD to 0. This may be used before a jump to the FP-PGC to ensure that the
DVD will restart in the same state as when the disc is inserted. It is best to reset only the used
GPRMs, so that other macros that may need one (or several) unused GPRMs will find them.

Jump to PGC upon DVD insert: This macro allows you to jump to any PGC (mainly menus or titles)
immediately upon insertion of the DVD, by-passing all the annoying trailers and studio promos. You
may also set your desired audio and subtitle streams in the process. See here for a complete guide
to this macro.
Import First-Play (startup) Clip, Import Title’s Intro Clip and Import Title’s Closing Clip: These
macros import a title from another DVD and modify the DVD’s commands to play the imported title at
DVD startup, or before or after the selected title. Note that the first two macros need an unused
GPRM to operate.

DVDShrink Streams Remapping: This macro checks whether you may safely use DVD Shrink’s
Logical Remapping of Enabled Streams preference with the current DVD. The macro explains in
detail what the risks are (essentially, DVD Shrink cannot modify commands which indirectly set
streams resulting in menus which do not work) and this thread also goes through the theory behind
this DVD Shrink option.

DVDShrink Remote Buttons: In re-author mode, DVD Shrink (http://www.dvdshrink.org) can put
several titles, one after another, on the same DVD. When a title is finished playing, the next title is
played automatically. Unfortunately, it is not possible to go directly to a precise title, because there is
no menu. 2COOL wrote a very clever guide suggesting a solution to this problem: Using Title Menu
Button to Skip Titles in Re-authored DVD Shrink Movies (see here). But this procedure is relatively
complex and slow to implement, especially when there are many titles on the DVD. Therefore, I wrote
this macro to the procedure. It can be used only on a DVD generated by DVD Shrink in Re-author
mode (but probably also works with Nero Recode in the same mode), and allows you to use the Title
Menu button on your remote control to jump directly to the following title. This macro also enables the
Previous and Next Chapter buttons in respectively the first and last chapter of a title, and the Return
button to return to the beginning of the current title. The macro also automatically makes the
playback return to the first title when the last title has finished playing.

Fix number of streams in VMGM/VTSI_MAT tables: After blanking titles, it is usual for the audio
and subtitle streams in the blanked title to be disabled. This can have adverse effects (see here) and
so this macro examines all domains of the DVD and reports if the streams can be safely disabled or
not. Answer yes when asked if you want to fix them up. Note, if you re-enable these blanked
streams, they will also be selectable by the remote.
Note also, that you can do the same check on a single domain – just use the Domain Stream
Attributes utility.

6.8 Tools menu

The Tools menu is a configurable menu in which you can define external programs, which can be run
from inside PgcEdit.

Configure Tools: Configuration of the Tools menu. As an example, here’s how to configure IfoEdit.
(a) Select the Configure Tools menu item and click on the Add New button.

(b) In the Label field, type IfoEdit.

(c) The Application field must contain the complete path to IfoEdit.exe. Navigate to it by clicking
on the “…” at the right of the field.

(d) Click on the “?” to the right of the Arguments field and examine the definitions of what these
mean and choose what’s best for each application you configure. In this case it is “%p\%i”
(with quotation marks), which means the VIDEO_TS folder and the current IFO filename. (A
good one for VobEdit would be “%p\%v”).

(e) Click on the “…” on the right of the Working Folder field and choose the appropriate folder
for your application. In this case, it’s the VIDEO_TS folder and PgcEdit automatically inserts
%p for you.

(f) Then, if you want both applications to remain open and be able to independently work on the
DVD, check only Run application in background. Caution: there is a risk you might modify
the same file in two different programs so use this option only for programs that do not modify
the DVD (e.g. your software player).

(g) If, on the other hand, you want IfoEdit to be launched as a function of PgcEdit:

(i) Uncheck Run in application background

(ii) Check Save DVD before launching application (this is not strictly necessary if you
are just testing some changes and do not plan to make other changes)

(iii) Check Iconify PgcEdit when application is running (this will minimise PgcEdit to
the taskbar and not permit it to be opened) and

(iv) Check Reopen DVD after application is closed (this will reopen the DVD in PgcEdit
after you’re done in the other app).

(h) This way when you launch IfoEdit, PgcEdit will save the IFOs, then will be disabled while
IfoEdit is running, and finally will reload the IFO files (possibly modified by IfoEdit), before
being activated again. This is the safest way of running a program which modifies the IFOs or
VOBs (e.g. VobBlanker, DVD Shrink, IfoEdit, VobEdit, MenuShrink).
(i) To finish, click on OK, then on Save (to preserve the setup on HD) or on Use (for the current
session only).

(j) Test your newly configured application by pressing Test

(k) Once all is complete, pressing F1 on your keyboard will now launch IfoEdit with the IFO you
are currently working on (the VTS highlighted in the PGC Selector).

As you configure more tools, they will correspond to other F keys in order. You may change the order
of your applications with the Move up and Move down buttons in the Configure Tools submenu.
Note: The separator does not take up an F key – it is just a way of bunching up like applications

Tick Display application output to enable the application’s DOS output to the console in a dialog
You can, of course, launch anything that has a CLI from PgcEdit. Typical applications include those
mentioned in (h) above plus your software players.

6.9 View menu

Toolbar, PGC Selector and Edit Buttons: Show or hide those GUI parts.

PGC Selector side: With this submenu, you can choose the placement and height (if top or bottom)
of the PGC Selector.

Edit Buttons: Turning this option on will show the edit buttons down the bottom of the GUI. This is
very handy.

Tcl Calculator/Converter: This is a small calculator and decimal/hexadecimal/ASCII converter.

CAUTION! This calculator uses the Tcl syntax, which is somewhat unusual! In particular, a
calculation which uses only integers will give an integer result! For example: 3 / 2 gives 1, whereas 3
/ 2.0 gives 1.5.

You can enter a number in hexadecimal form (0x0A), octal (012), or decimal (10). You can also enter
an ASCII text of at the most 3 characters in the little box at the right, to convert it to integer. The
language codes used on DVDs are codes of 2 letters in lower case, for example, “en” (25966) for
English, “fr” (26226) for French. Pressing Enter carries out the calculation, and the result is displayed
in the lower field. If the result is an integer, it is also displayed in hexadecimal and ASCII.
Note that by using the above prefixes, you may type a number in hexadecimal, octal or ASCII directly
in most of PgcEdit’s numerical fields.
The Tcl Calculator has many other math functions: for example entering pow(2,5)+3 raises 2 to the
power of 5 and adds 3 with a result of 35. For a full list of available math functions, see here.
6.10 Options menu
The Options menu lets you configure PgcEdit (except for the programs of the Tool menu, which is
configured separately). Most of the options are self-explanatory.

The Install sub-menu creates shortcut icons and file associations. This sub menu is not present if you
use PgcEdit.tcl with an external Tcl/Tk interpreter, or under Linux or Mac. If you wish to open PgcEdit
directly by double clicking a file type, it is wise to associate BUPs with PgcEdit. Other programs (such
as your software player) may like to have IFOs to themselves.

Ticking Launch Open DVD dialog at startup will make PgcEdit offer to open a DVD folder (or file)
for you when PgcEdit is launched. Unchecking this option will start PgcEdit in Scratchbook mode and
you will need to open your DVD “manually” via the File – Open command (or toolbar button).

Start in Trace mode (when a DVD is opened at startup) will open PgcEdit in Trace Mode when
PgcEdit is started and a DVD is selected to load.

Use file browser instead of folder browser for open/save enables you to browse by file instead of
by folder when opening or saving a DVD. Note: Folder browsing enables you to open the DVD
simply by selecting a folder containing DVD files. If you browse by file, you will need to select a DVD
Selecting Automatically launch BOV finder when a DVD is opened will launch the button over
video (buttons in the titles domain) find routine whenever a DVD is opened. This is usually not too
bad after the first analysis of a DVD, however, it can get monotonous if you are reloading your project
quite often. You may wish to turn this off and simply use File -> Find BOVs to detect BOVs.

Show toolbar, PGC Selector and Edit Buttons at startup is a handy way to access the important
PgcEdit functions via the toolbar (see below), PGC selector and Edit buttons (down the bottom).
However, those who prefer more screen space may wish to turn some or all of these off.

Create backup when a DVD is opened for the first time – this creates a backup of your IFOs in
case you mess up. It is also a repository of VOBs that are blanked. Leave this option on!

Store PgcEdit_Backup folder in parent of VIDEO_TS folder allows you to select where you want
the backup folder to be stored, either within the VIDEO_TS folder or in its parent folder, alongside
VIDEO_TS. There is no issue with storing it in either location, and this will not affect the burning of
your project (if you burn with PgcEdit), however, you may run into conflicts, if you are working on
several projects, each storing their backup folders in the parent.

When saving, leave at least 32k of space between IFO and BUP is a way of ensuring that errors
on a disk are not fatal by placing the IFO and BUP too close together. This function will save the
sector references in a non-standard way, leaving “padding” where blanking has occurred. Note that if
you save the DVD in another application such as IfoEdit, DVD Shrink, Nero, these sector references
will be recalculated by those programs and the padding will be lost. So only use this in conjunction
with a burn through PgcEdit (or ImgTools Classic, or any burning program using mkisofs under Linux
or MacOSX). See here for a guide on burning with PgcEdit.

If Auto-adjust Command Editor to contents is checked, the Command Editor’s height will change
whenever you select another command, so that the GUI fits exactly in the window. This is a handy
space saver.

Allow Menu Tearoffs adds a dotted line as the first element of each menu. Selecting (clicking on)
this dotted line allows you to detach the menu as a floating window which you can place wherever you
want. You may use this, for example, to change several options at once in a torn off menu. Do NOT
use this option with Tcl/Tk Aqua on Mac.

If Popup menus on right mouse button released is checked, then the right click menus appear only
on the release of the button, instead of its click.

Hi-lite Errors and GOTO Targets will show errors in pink/red and GOTO targets in yellow. This
makes it easier to see at a glance where the command is leading and if there are problems (e.g. a
command may be legal but going to an invalid location – eg Jump to Title 99, where no title 99 exists).

Auto renumber GOTOs when commands added/removed will renumber the target line numbers of
the GOTO commands when you insert or delete lines in the same section of a PGC. Leave this
option checked. But, be careful: the GOTOs that are WITHIN a copied/pasted block are not

Include [hex codes] in main listbox and in Info / commands dumps shows the hex codes for the
commands (in square brackets) together with the interpreted commands. Leaving this off will show
only the disassembled code. Many people may find it easier to view the screens with this option off.
Expert Mode suppresses most messages and dialogue boxes. If you are not a master of this
program, do NOT turn this on.

Set current search string as default allows you to open PgcEdit with your desired search string in
the search box at the bottom.

Global font enables you to change the default font for PgcEdit (which is MS Sans Serif 8 point on the
Windows platform). Restart to make this change take effect.

Fixed width font enables you to select a font for items which display in a fixed width.

Use custom colors for GUI enables you to choose your own color for PgcEdit’s background.

Select web browser… will allow Linux and Mac users to easily access the PgcEdit homepage, online
documentation and DVD-Replica online help in the Command Editor.

Save settings allows you to save your options and other setup choices (e.g. preview size and trace
virtual player), while Restore defaults will take you back to the state of the program at installation.

The last option, Save current scratchbook as default, will remember your current Scratchbook from
session to session. Selecting the Undo function when in Scratchbook mode reloads the default

Note: Some options of the Trace mode are also saved with the options of this menu.

6.11 Help menu

Here’s where you access:
• this document
• the version history
• the licence terms governing the use of PgcEdit
• the international ISO639 language codes
• the PgcEdit homepage and
• the credits
7 PGC Editor
IfoEdit lets you modify almost all the PGC data. PgcEdit’s editor allows you to modify only some of
them but the interface is very easy to use. I only kept the most useful, or those for which IfoEdit does
not allow simple and user-friendly editing (for example the sub-pictures colors and the assignment of

To access the PGC Editor, just double click on a PGC or press Enter.

Typical editing procedures:

1. Cell removal and chapter editing
2. Stream re-assignment
3. Subtitle color changing, copying, pasting, importing and exporting (in either ASCII or
YCbCr format)
4. Editing the cell flags, including setting/removing the layer break
5. Cell command numbering
6. Removing/editing PUOs
7. Changing the Next, Previous and GoUp links
8. Changing cell and PGC still times
9. Previewing a cell
10. Viewing the attributes of the various streams (audio, video and sub-picture) in the
11. Finding out cell times and where the various cells start and end in the VOB (in terms of
VOBU sectors)
12. Seeing which angle a cell belongs to (in a multi-angled PGC)
Tip: Hover over a button or a heading with the mouse to get a handy tip on what the button does or
the properties of a stream etc.

In general, to edit an item, where appropriate:

• Click a button or
• Type in an input field (e.g. Still Time, Cell Command, Previous PGCN link, Layer break)
Some of these are discussed in more detail below.

Domain Stream Attributes

Click on Domain Stream Attributes to view and change the attributes for the various streams in this
You may:
• Click on the various audio and sub-picture extensions to change them (e.g. normal to director
• Change the languages that will be displayed with the various streams (note this will NOT
change the actual language in the stream – just what the player displays). Use the ISO 639
language button to find out the official 2 letter language codes
• The video aspect ratio (and for 16:9, how it will be displayed on 4:3 TVs). Be careful! The
changes you make here in the IFO take precedence over those in the VOB and you may make
changes that make your picture look too narrow or too stretched in the vertical plane. Also
note that if you select 16:9, you must select at least one of Automatic P&S or Automatic
• Change all the properties of any or all of the audio streams, including the coding,
quantization, sample rate and channels (this does not change what is actually in the VOB and
what you will hear).
Audio/Sub-picture stream assignments
Clicking on an audio or sub-picture stream button, located in the “north east” quadrant of the PGC
Editor, bring up the stream setup dialogs.

These enable you to add and/or rearrange the stream assignments. Again, be careful! Changing the
stream assignments can have unintended effects where you don’t also change the assignments in the
PGC commands and the menus (if any) – you may be listening to/viewing a different language than
you want!
You may add a stream by clicking on one of the previously unused streams (marked “none”). Of
course, adding a stream that is non-existent in the VOB is meaningless.
The hex values of the stream numbers are identified. For sub-picture stream, you may assign stream
numbers for the 4 viewing modes (4:3, widescreen, letterbox and pan & scan).
Streams that have been stripped with popular stream stripping programs like IfoEdit, VobBlanker and
DVD Shrink can be “disabled” – this sets them to “None” in the PGC Editor’s table of streams.

Adding or Removing Programs

You may:
• Click on an already numbered program to remove the program from the program table.
Higher numbered programs will be renumbered down and you will also need to edit the
chapter table to remove excess chapters
• Click on an unnumbered program to insert (and add) a program to the program table. There
is no need to update the chapter table, but the last chapter will contain more than one
Note: Editing programs and chapters will also necessitate editing the scene selection menu.
Remove Cell
Click to remove a cell from the cell table. This does not remove any data from the VOB.

You may use the slider to select the cell you want to remove. The corresponding VOB/Cell ID will be
unreferenced (unless re-used elsewhere in the VTS). Removing a cell may also result in you needing
to update the chapter table and PgcEdit will warn you accordingly. After removing cells, you may
wish to reduce the size of your DVD by removing them from the VOB with VobBlanker.

Chapter Editor
The chapter editor enables you to edit chapter points.

You may:
• Add or delete chapters
• Re-assign which programs correspond to which chapters (by selecting one or more chapters
and clicking Increment Program or Decrement program)
• Set the program number to equal the chapter number (by selecting one or more chapters and
clicking Set selected Programs = PTTs) – this is the usual case.
• Set a particular program to a certain chapter (by selecting one (or more) chapters and typing
in the program number and clicking Apply)
• You need to add chapters that actually correspond to existing programs. Otherwise, after
exiting the chapter editor, a message will appear telling you to remove or re-assign the
chapters pointing to out of range programs and the Edit Chapter (PTT) table button in the PGC
Editor will turn red to let you know an action needs to occur. You can then click on a button in
the program list to create a program.

Cell still time

Enter a number from 0 to 254 in the Still Time field of a cell to insert a pause after the cell’s playback
(up to 254 seconds). To have an infinite pause, enter 255.

Re-assign VOB and Cell ID

Click on the VOB/Cell ID identifier in the PGC Editor to bring up the dialog, where you can use the
slider to assign a different existing VOB/Cell ID to the cell or create a new blank cell to replace the cell
in question (leaving the current cell unreferenced if it is not re-used).
Note the warnings!
Cell type flags

Clicking on the cell type button for a cell displays the Cell Type Flags Editor, where you can change
the STC (System Time Clock aka the SCR or System Clock Reference) discontinuity flag, seamless
joint flag and the angle flags.

8 Command Editor
The Command Editor lets you edit the DVD’s commands. It is composed of several parts (2
examples are shown below).
At the top are the command selection menus. The first three menus present the complete list of all
the commands, sorted differently in each of these menus. The fourth menu shows only Jumps and
Calls, sorted according to the type of source and destination PGCs. It enables you to easily select the
legal Jump or Call in all situations.

Below the menus is a field containing the hexadecimal representation of the command, the validation
menu button (see below) and the name of the current command. If you wish, you may click on the
name of the command to find out more about it, its usage, legal syntax etc (Windows users only).
This involves a call to the Internet.

Below this is a field showing the “disassembled” current command, with the syntax that is used for the
commands displayed in the list of the main window.

Command modification
You may modify the command in the interface below the disassembled command. This interface is
different for each command and, if you use this, you will only be allowed to input a legal value for
each command. This is the easiest way to edit a command.

The numerical fields of this part of the interface accept values in decimal, hexadecimal (by prefixing
them by “0x”), octal (prefixed by “0”) or ASCII (prefixed by ’, the single quote character, aka
apostrophe). Between parentheses, on the right side of these numerical fields, is the legal range of
the parameter. If you wish, click the “B” when you want to set/compare button numbers.

In theory, you will not be able to enter an illegal value. (However, to be able to type a value in
hexadecimal or octal, you must be able to type a zero alone, even if this value is illegal. In that case,
the program beeps, and the disassembled command is highlighted in color). Note that only
theoretical errors are detected: it is thus possible to type legal, but meaningless values. For example,
a Jump to VTS 99 is legal, and will be accepted, but it makes sense only if VTS 99 exists.

Advanced users – Test your changes with validation

In normal use, the hexadecimal field is updated automatically when you change the command, and
when you modify the values of the current command.
It is also possible (although less easy) to type the command directly into the hexadecimal field. When
this field is manually edited, the modifications are not automatically updated in the other parts of the
interface. To force the update of the command, you must validate the contents of the hexadecimal
field. To do that, just type Enter/Return in this field. At the time of validation, the contents of the
hexadecimal field are analyzed and transcribed in the other parts of the interface. If an error is
detected, two things can happen:
a. If the resulting command does not exist, an error message pops up, and the cursor is
positioned on the digit which caused the error.
b. If a value is illegal or out of range, it is corrected in the hexadecimal field, and this value is
highlighted in color, so you can easily locate the errors. In this case, you can revert to the
contents of the field before validation by selecting the Undo Validation option on the
Validation menu, or you can erase the highlights with Clear Validation Highlights.

Of course, if things go really bad, simply click Cancel and start again.

The Disassemble Without Validate option lets you visualize the disassembled command without
correcting the possible value errors, and without transferring the values in the interactive part of the
interface. This lets you check that the command is complete and coherent before validating it.
The menu button next to the hex field also contains options to copy and paste the contents of the
field. Copy as Hex String and Copy as Binary are options allowing you to exchange the command
with another program. The simple Copy option is used internally by PgcEdit.

9 Menu Editor

9.1 Introduction
You may access the menu editor in one of 4 ways. Select a PGC with menu buttons in the PGC
Selector and either:
• Press Ctrl + m or
• Click on the menu editor toolbar icon or
• Middle click (or Ctrl – Left Click) on the PGC or
• In the Utilities menu, select Show/Edit menu buttons or BOVs
This will bring up the first cell in the PGC that has buttons (skipping over any motion intro).

This is not the place to explain everything about menus but rather I will point out the various editing
options in PgcEdit.
9.2 Menu Viewer

This shows all the key ingredients of the Menu Viewer.

• Click on the button’s command to edit it with the Command Editor.
• Either click on Jump to Target or middle click on the menu button to jump to where the
command is pointing (highlighted in light blue when you select a button) – in this case PGCN 19.
• If the PGC has more than one program, you can click on the program selector/info bar at the top
of the display to go to other programs
• The clipboard menu allows you to copy and paste the command associated with the elected
• The image buttons enable you to go through motion menus (the l< button will return you to the
first I-frame which has buttons)
• Use the cursor “arrow” keys (Å Æ Ç È) on your keyboard to emulate the navigation buttons on
your remote
9.3 Menu Editor
Bring up the main menu editor for a button either by:
• Right clicking on a menu button or
• Selecting the button and clicking Edit

This shows the full editor screen.

• Check Show adjacent buttons down the bottom of the GUI to get a visual idea of which
buttons are next to the selected button in the menu viewer (you may edit these with the
Adjacent buttons sliders in the top half of the screen)
• You may edit the command with the Command Editor
• Check Auto Activate to make the button execute the command simply by selecting it with the
remote (no “enter” required)
• Ticking advanced opens the lower panel, where you can:
Force select a particular button for the cell (this ignores the value in SPRM 8 and always
highlights what you have selected)
Force which button to execute (if you like) after playback ends (selecting a delay in the
• You may edit the horizontal (X) and vertical (Y) positions and sizes of the selected button.
However, in order to edit the horizontal values, you must do each group separately (because
where there is more than one group, the aspect ratios are different). As you move the sliders
to edit the button’s positions and sizes, you will get an immediate view of your edits in the
menu viewer. Note, there are situations where both X and Y must be edited independently
(e.g. 3 groups of buttons)
You can check to see the buttons are the right size, not only visually, but by using the Edit
button slider to move between buttons and see the other buttons’ heights, widths and
• PgcEdit has a full color scheme editor. Access this by clicking on Edit Color Schemes. You
may select 1 of 4 schemes for the cell – the default scheme (using the values stored in the
subpic packs of the PGC) or 3 user defined schemes. The colors for these user defined
schemes are defined in the sub-picture color lookup table, which is also editable in the PGC

9.4 Color Scheme Editor

This is not the place to explain all there is about how color schemes work in menus. For an excellent
reference, see www.mpucoder.com/dvd. Suffice to say that you may define 3 color schemes in each
PGC and apply any one of these schemes to any particular button in the PGC.
The button shapes are usually defined in the sub-picture streams of the menu. Each pixel in the sub-
pic data may be assigned one of 4 values – these are called Background, Pattern, Emphasis 1 and
Emphasis 2, and are easily editable in PgcEdit
Background is usually used to define the background color of the button, while Pattern usually defines
the color of the pattern of the button’s shape though this is not hard and fast.

Bring up the color editor by clicking on Edit Color Schemes in the Menu Editor.

A color scheme is defined for two button states:

• The color and contrast for when the button is selected (i.e. button highlighted but not
• The color and contrast for when the button is activated (i.e. button pressed)
Color schemes pick a color from the PGC’s sub-picture color lookup table (CLUT) – editable in the
PGC Editor. The numbers range from 0 to 15, corresponding to the 16 colors defined in the PGC’s
CLUT. If your desired color for a particular scheme is not there, you may change it from the PGC
Editor, but beware that by changing a color in the CLUT, you will also change other color schemes
that use this color for that PGC.
To pick one of the 16 colors from the lookup table, simply move the slider from 0 through 15 until you
get your desired color for the parameter.
The way a button is actually displayed depends not only on the color but on its contrast. You may set
the contrast for any of B, P, E1 and E2 – from 0 (fully transparent) to 15 (fully opaque – i.e. a solid
color). By moving the sliders, you can get an idea of how the opacity will vary with each step from 0
to 15.
After this is complete, it is simply a matter of assigning which color scheme pertains to which button
on the menu. Do this in the Menu Editor

9.5 Menu Editor Menus

The Menu Editor also has 5 menus of its own:

File Menu

This menu gives you the tools to export and import for:
• the current button – exported data is for the selected group in the current button only and
includes position and size data, button command and adjacent button information
• the buttons for the whole menu – exported data is all information for all buttons in all groups,
plus the advanced global controls set at the bottom of the Menu Editor GUI, but not including
the color information
• the color schemes.
The exported files are able to be viewed and edited in Notepad.
These functions are very useful if you wish to copy menu button information easily from one DVD to

Edit Menu
The functions on this menu are similar to the file menu, except they are more for copying to the
current DVD, as opposed to exporting to, and importing from, another DVD.
Additionally, there are options only to copy and paste the button’s command (these functions are also
accessible from the clipboard button in the Menu Viewer).

Button Menu

The functions on this menu allow you to create new buttons, align them with other buttons, undo any
changes that have been made and delete buttons you don’t need anymore. New buttons are created
with the LinkTailPGC command. You may need to alter this to suit your needs.
Note: The Undo last changes no longer functions once you have pressed OK and exited the Menu
Editor, or if you change the current button or group. As well, it can not be used to undo the advanced
Caution: Deleting a button may make the DVD unplayable if other parts of the DVD refer to that
button in some way. Hiding a button is much more preferable.

Hide Button Menu

This menu allows you to hide buttons without deleting them. This is always the safest practice.
You have 3 options. Hide the button (in an unviewable area of the screen) and change its command
• Jump to a non-deleted button (auto-activate is also set to ensure that if you land on this
button, the relevant non-deleted button is highlighted)
• Replace its command with a NOP
• Leave its original command
Jumping to a non-deleted button is usually best. Replacing with a NOP may be confusing to a user
who somehow lands on the button and keeps pressing enter and nothing happens, while leaving the
original command may be useful if you wish to convert a visible button to an auto-activated hidden
After hiding buttons, you should always examine the adjacent buttons to ensure that the remote will
work as you intend it to.
Of course, you may unhide a button by moving and/or resizing it. However, be aware that if you move
or resize a hidden button, it will not be regarded as hidden anymore and there could be unintended

View Menu

Color Schemes Editor brings up the color editor (same as clicking Edit Color Schemes)
The other menu items do not affect how the DVD works or plays but simply affects the PgcEdit GUI.
• Show Advanced Controls display the advanced global controls at the bottom of the Menu
Editor (same as checking Advanced)
• If Show all buttons is unchecked, only the selected button will be visible in the Menu
Viewer. Of course, you may select the other buttons by moving to them in the menu viewer
with a cursor key or clicking in the Edit button field of the Menu Editor GUI.
• Show adjacent button links will show the left/right/up/down links to the current button.
Same as ticking Show Adjacent Buttons in the Menu Editor GUI.
• You may also select:
– Current button edit color: The color of the border for the button being edited
– Current button phantom color: The color of the button number of the button being
– Other buttons color: The colors of the border and button number for the buttons not
currently being edited
10 The Clipboard
For compatibility reasons with Linux and Mac, the clipboard is managed in a particular way by Tcl/Tk.
There is an unpleasant side to this: if you place a PgcEdit data in the clipboard (by Cut or Copy) and
then close PgcEdit, pasting in another program no longer works – the clipboard is emptied of its
contents when the Tcl/Tk program which filled it exits.
Remember to leave PgcEdit open as long as there is useful data in the clipboard. It is perfectly
possible to copy/paste between two DVDs by opening two instances of PgcEdit at the same time.

11 The Right click popup menus

This menu is called when you right click on a PGC in the PGC selector. It also selects the PGC
(which you can do first with a left click). It contains many frequently used utilities and procedures
which are explained in more detail elsewhere.
The popup menu is context sensitive and changes depending on whether you have selected a menu
PGC, a title PGC or the FP-PGC.

Menu PGC

Preview PGC
Edit PGC
Info: PGC
Go to calling command
Domain Streams Attributes
Blank out all Menu PGCs
New Menu
Import Menu
Remove Menu
Remove LU
Set Menu Type
Menu Buttons
Swap Menu LUs
Copy LU cmds to other LUs
New dummy PGC
Clone PGC
Kill PGC Playback
Enable all operations
Toggle PGC pre/post breakpoint
Toggle PGC playback breakpoint
Delete all commands in PGC
Delete all commands in Domain!

Title PGC

Most of these are the same as for menu PGCs – the ones pertinent only to the titles domain are:
Blank out all VTST Titles
BOVs (Buttons Over Video)
Import Title’s Intro (and Closing) Clip
New ‘Play All’ Title

12 Mouse shortcuts

Main Window
Menu Viewer / Editor
PGC Editor
Command Editor
Trace Window

Main Window Shortcuts

• Left click on the PGC button: Navigate to a PGC
• Right click on the PGC button: Show/hide the PGC Selector

• Right click in the PGC Info Area (just under the toolbar): Show/hide the toolbar

• Right click in the Status Bar (at the bottom): Show/hide the edit buttons
• Left click on the Status Bar (at the bottom): Clear status message

• Right click in search box: Popup search menu

• Right click on “all” button: Search for desired string in menu buttons and buttons over
video only

• Double click a PGC on the PGC Selector: Call the PGC Editor
• Middle click a PGC on the PGC Selector: Call the Menu Editor (if a menu or title)
• Right click a PGC on the PGC Selector: Call the PGC popup menu
• Shift left-click a PGC on the PGC Selector: Set Trace breakpoints

• Middle click on a command: If a Goto, Jump, Call, Link PGCN etc, jump to the indicated
line or PGC
• Right click on a command: Call the Edit Popup Menu
• Double click on a command: Edit command (brings up the Command Editor)

• Escape when a dialog is opened: Close dialog (like Cancel button)

Menu Viewer / Editor Shortcuts

• Click and hold an empty space: (Temporarily) hide all buttons
• Middle click on a button: Jump to target
• Right click on a button: Edit menu button
• Cursor keys: Select adjacent menu button

PGC Editor Shortcuts

• Right click on PUOs: Remove all PUOs for the PGC
• Right click on an empty space in the streams part of the GUI: Popup “copy/paste all”
streams menu

Command Editor Shortcuts

• Left click on menu button to right of hex field: Popup menu for hex command entry
• Right click on menu button to right of hex field: Validate hex entry
• Return in hex field: Validate hex entry
• Middle click on menu button to right of hex field: Clear validation highlights

Trace Window Shortcuts

• Right click on the run button: Toggle delay between 0 and 5 seconds per command.
• Right click on the log window: Popup menu (copy, save, search etc)
• Left click on a GPRM / SPRM in watch window: Sets breakpoint for that register (in red)
• Left click on green field / press enter on an input field in watch window: Force that
register to be logged

Note: The shortcuts displayed in the Edit menu are available only when the main command list is
Note: All middle button clicks are also available with Control – Left Click.

13 Keyboard shortcuts

Ctrl +

A Select all commands in PGC U

B Create backup V Paste replace

C Copy to clipboard Shift V Paste after

D Duplicate selected commands W

E Export PGC Commands X Cut command

F Explore DVD’s folder Y

G Go to calling command Z Undo command change (limited)

H Calls cross references Delete Blank out all PGCs in domain

I Import PGC Commands + Increase Goto target line number

J Jump to target - Decrease Goto target line number

K Kill PGC playback [ Move command up one line

L ] Move command down one line

M Launch menu viewer/editor Shift > Add new command before selected

N Shift < Add new command after selected

O Open DVD Other commands (without Ctrl)

P Delete Delete command

Q Spacebar Launch command editor

R Re-open DVD Enter Launch PGC Editor

S Save DVD Esc Cancel /exit screen

T Trace mode ` (~) Preview PGC

Shift Toggle pre/post breakpoint Shift V Paste before


Alt T Toggle playback breakpoint F keys User definable tools