|
|
PgcEdit ©
Copyright r0lZ, 2004-2005
Licence: GNU
General Public Licence (GPL)
PgcEdit version
0.5.7 Documentation
Version 2
7 June 2005
Contents
2 Usage
4 Toolbar
6 Menus
10 Clipboard
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.
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.
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.

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