[please note that this page has many images and may load slowly]
While working at NAB with the DVDAfterEdit gang, I spent a lot of time talking to DVD authors. Many of them were experienced Maestro and DVDSP2 users looking for a little more control over their projects.
When I showed them the programming their favorite authoring application was doing behind the scenes, many were surprised at the complexity - especially for very simple projects. They understood that they could re-author with DVDAfterEdit, stripping away the excess commands and dummy menus, but were not quite sure where to begin.
I was able to relate with them. I explained how after working with DVDSP 1.X for over a year, I suddenly found myself having to learn a very popular spec-based authoring system in a hurry. After a while, the programming syntax and workflow became clear, and actually rather easy - at least for the types of jobs I was authoring. The amount of programming efficiency and organization is truly up to the author, which directly translates into navigation speed. Fewer commands and less jumping in and out of domains means a faster experience for the end user as well as less searching around the disc for the DVD player. When recordable DVD formats are used for delivery, this becomes even more important.
This article is going to show you how unbelievably easy and effective re-authoring with DVDAfterEdit can be. I'll demonstrate how to delete unneeded PGC's and how to wipe out all navigation commands, whether they were input by the author or added by the abstraction-layer authoring application upon build. Then we'll add the minimum Pre, Post, and Button Commands required to get the disc functioning as desired. The resulting VIDEO_TS folder will have a fraction of the commands and PGC's found in the original build. Once you have a solid grasp of these techniques, you'll find that the complete re-authoring of small projects can take just minutes and your authoring application may be downgraded to just the role of a multiplexer!
PGC (Program Chain): The basic object or building block in DVD structure. PGC's can contain instructions and/or video and audio. Menus and tracks are PGC's, and "dummy PGC's" are usually menus used to hold commands without video and audio assets. Think of a PGC as a container.
VMG (Video Manager): The upper-most level or "domain" of DVD structure; it contains various attributes of a disc that can affect playback, as well as contain menu and dummy PGC's.
First Play PGC: This PGC informs the player how to start playing a disc. Commands can be used to set GPRM's, get information about the setup of the player, and direct navigation.
VTS (Video Title Set): Usually holds a disc's program material, and can be comprised of multiple PGC's. DVD's can have multiple VTS's, much like the tracks of an audio CD. The VTS domain is under that of the VMG.
VTSM (Video Title Set Menu): Each VTS has a dedicated menu area, its own VTSM domain, which can contain multiple menu PGC's. These menus can only control the VTS PGC's in the same VTS domain as the menu. So for example, VTSM 1 can control a track in VTS 1, but not in VTS 2.
The project we are going to re-author contains a 15 frame/1 GOP First Play in VTS 5, 4 short tracks in VTS's 1 - 4, and a single menu in VTSM 1.
» Click here to download "4 Track" example files for this project, including DVDSP 2 original build and the final DVDAfterEdit build.
DVDSP2 put 8 dummy menus in the VMG, the Main Menu in VTSM 1 (if you expand the arrows further, you will see this listed as "program" in DVDAfterEdit) with 6 additional dummy menus, and 5 dummy menus in each of the other VTS's respective menu domains.
Upon further inspection, you'll notice line after line of Pre-Commands in many of these dummy PGC's (see image below). These dummy PGC's and commands are generated "behind the scenes" upon project build.
Popular abstraction-layer authoring applications (like Maestro & DVDSP 2) make programming navigation easy for the author, but create all these commands and dummy PGCs which are not required by the DVD Specification to get the disc to operate as desired. All of this extra stuff makes DVD players have to work harder, by running through a lot of commands just to search for and jump to another PGC with a lot of commands, etc., until navigation ultimately lands where needed.
We are going to delete everything we don't need (and want), while maintaining the original PGC structure and the project's functionality.
Open the arrows for the VMG and select all 8 PGC's. Delete them by control-clicking and selecting the "Delete PGC" command. Notice how DVDAfterEdit keeps 1 PGC, as there needs to be at least one whether it will be used or not.
Next, open the arrows for VTSM 1, and delete all of the dummy PGC's. Keep PGC 7 (the Main Menu), which will automatically change to PGC 1.
Finish this step by deleting all of the PGC's in the 4 remaining VTSM domains. Each VTSM will keep 1 dummy PGC, which we'll need. The left pane should now look like this:
Now we need to delete all remaining Pre, Post, and Button Commands because these are now irrelevant since we no longer have all of those dummy PGC's. We could have done this step first.
In the "Edit" menu, select Project-wide Edits/Delete All Commands In Project.
These parameters define a Menu PGC's function in the grand scheme of the disc. By changing these values, we are actually hard-wiring our DVD controller's "menu" and "title" remote keys. Although abstraction-layer authoring applications allow us to assign these remote keys to whatever we want, this "hard-wiring" is actually part of the DVD Specification.
If a VTSM is designated as an "entry PGC" with a "menu type" of "root," then when the menu remote key is activated in its respective VTS, navigation will jump to this menu. DVDSP 2 makes this root menu a dummy, in order to use its Pre-Command area to send navigation on its way. We will be using both of these techniques, but with far fewer commands.
The same scenario also applies to the VMG - when the "title" remote key is activated while in a VTS (track), navigation is directed to the VMG PGC designated as the "entry PGC."
Select VMG PGC 1, and look at the "entry PGC" line in the right pane. Notice that it's grayed-out (therefore unavailable for editing) and is set to "yes."
Now select VTSM PGC 1. Change "entry PGC" to "yes" and "Menu Type" to "root." Now that this is a "root menu" and an "entry PGC," activating the menu remote key while playing Titles in VTS 1 will automatically call this menu PGC, first looking in the Pre-Command area for any instructions when it gets there. Since this menu is our Main Menu (FYI, DVDSP 2 seems to put all 4:3 menus in VTSM 1), the track in VTS 1 has the closest physical link to the Main Menu than any other VTS. In other words, it never needs to leave the VTS 1 domain to get to the Main Menu, unlike the VTS's in this project.
Check the other VTSM's. Notice how they are already set to "yes" and "root." DVDAfterEdit did this for us when we deleted all of the dummy PGC's. Since this project only has one menu, these VTSM's will function as dummies - but more on that in just a bit.
Since we've deleted unwanted PGC's and commands as well set up our menu designations, it's time for the bulk of our work: adding our commands (but we'll save the button commands for the last step as not all of our targets exist quite yet). There is a basic rule to keep in mind when setting up a disc's programming: navigation cannot jump between Video Title Sets - it must first enter the Video Manager domain. Here is the desired layout for this DVD:
First Play= Jump to VTS 5, then jump to the Main Menu in VTS 1. The Main Menu has 4 buttons with targets of VTS 1, VTS 2, VTS 3, and VTS 4. At the end of each VTS, navigation jumps back to the Main Menu.
Begin by programming the First Play. In the left pane, select "First Play" and insert a Pre-Command. We want the DVD to play VTS 5, so enter "Jump TT 5" as the Pre-Command. The "jump" command is used when navigation needs to leave one domain for another.
Once VTS 5 finishes playing, we want navigation to jump to the Main Menu. But since our Main Menu is in VTSM 1 and navigation is about to leave VTS 5, there is really only one place it can go in order to get there - the VMG. Select the program in VTS 5, and insert the Post-Command "Call VMG PGC."
VMG PGC 1 is the entry PGC in the Video Manager Domain and all navigation will be routed to this PGC including "title" remote key activation. But we want our navigation to go to the Main Menu in VTS 1, so let's give VMG PGC 1 a Pre-Command.
Select VMG PGC 1 in the left pane, and ." Now navigation will jump to the Main Menu in VTS 1 whenever navigation enters the VMG.
So now we're at the Main Menu, but we need to tell the DVD player which button navigation originated from (i.e. the button highlight). Since there is only one menu, all we need to do for this disc is move the value from SPRM 8 (which is where the last highlighted button number is stored automatically by the player) to a GPRM, which is referenced by a command to set the button highlight. Basically, we need two Pre-Commands.
Select VTSM PGC 1 and insert two Pre-Commands. For Pre-Command 1, enter "Set R0 = SPRM 8 Button." This means that GPRM register 0 is to have the same value as that of SPRM 8 - or that the value of SPRM 8 is to be moved to GPRM 0. SPRM 8 is a system parameter register that keeps track of the last selected/activated button number. Notice how DVDAfterEdit's SPRM pull-down menu conveniently displays the function of each SPRM.
For Pre-Command 2, select "Set Button GPRM r0." This tells the player to set the button number from the value stored in GPRM register 0 - which is the highlighted button number that we got in Pre-Command 1.
That's all we need here, so let's assign commands to the other VTSM's.
We know the menu "entry PGC" and "root" designations we checked in step 3 are good to go and the menu remote key of a VTS is hard-wired to its respective VTSM. So when the "menu" remote key is activated in a playing VTS, navigation goes to its VTSM and first looks for instructions in the Pre-Command area. We need to tell navigation to jump from the VTSM to VMG PGC 1.
Insert the following Pre-Command for VTSM 2, VTSM 3, and VTSM 4: "." Now the activation of the "menu" remote key from VTS's 2, 3, & 4 will jump to the Main Menu in VTS 1 via VMG PGC 1. Remember, the "title" remote key automatically calls VMG PGC 1, so we do not need any other commands for that to work. Also remember that if VTS 1 is playing and the "menu" remote key is activated, we do not need to jump to VMG PGC 1 to get to VTSM 1. In fact, we couldn't do that if we tried, because the first stop on the navigation path would be to VTMS 1 anyway!
Before we move onto the Button Commands we need to assign the end jumps for the short programs in VTS's 1 through 4. Select VTS 1 PGC 1, insert a Post-Command and set it to "Call VTS menu." Once VTS 1 finishes playing, this will send navigation to the Main Menu in VTSM 1.
In order for navigation to get back to VTSM 1 from VTS's 2, 3, and 4, remember that we need to jump to the VMG first. So insert a Post-Command for those VTS's and set it to "Call VMG PGC 1."
Last but not least, we need to assign the four buttons on the Main Menu that target VTS 1 - VTS 4. Currently, the button commands found in Nav Pack 1 in VTSM 1 PGC 1 should look like this:
Click the arrow next to Button Command 1 and set it to "Jump VTS TT." Since there is only a single title in VTS 1, we don't have a choice as to which one we select.
Now, in order to jump from the Main Menu in VTS 1 to the program in VTS 2, we need to create a dummy PGC in the VMG because navigation cannot jump from VTS to VTS directly. Select VMG PGC 1, and control-click "Add Dummy PGC." Then insert the Pre-Command "Jump TT 2" into this new PGC, VMG PGC 2.
Create Dummy PGC's for VTS 3 and VTS 4, with Pre-Commands Jump TT 3 and Jump TT 4 respectively. Now, back at Nav Pack 1 in VTSM 1, assign Button Command 2 to "Jump VMG PGC 2" and repeat. The Button Commands should now look like this:
You're finished! No more "obstruction layer" slowing things down. Go ahead - open the original and final VIDEO_TS folders and compare. Better yet, use DVDAfterEdit's "copy all PGC commands as text" function, paste into a text editor, and do a line count for each VIDEO_TS! The disc is down to the bare minimum of commands - and if we were to move the Main Menu in VTSM 1 to the VMG, we wouldn't need any dummy VMG PGC's either.
We'll actually try something like that in Simple DVD Spec. Re-authoring With DVDAfterEdit, Part 2, where instead of a project with 4 tracks, we'll re-author a similar project that has a track with 4 chapters, and an additional scene selection menu. Navigation originating from the scene selection menu will actually return there - unlike most "Hollywood" DVD's. The project will also feature greater use of GPRM's, Pre-Commands, and Post-Commands.
( We have Ian to thank (or stone, possibly?) for contributing "obstruction layer"... )