Simple DVD Spec. Re-Authoring With DVDAfterEdit, Part 3

by Ben Weinrach

(Editors note: Just so you know, it is best to start with Part 1 and Part II of this series before beginning this Part 3 installment)

Adding a Second Scene Selection Menu and "Composite Commands"

Ready for some more spec. re-authoring fun? Great! The project discussed in this article is similar to the previous project, but with two significant differences. While the "show" still has four chapters and the structure is basically the same, there is now a second scene selection menu. In addition, the button highlight upon return to the scene selection menus is not handled by the last activated button like before, but is determined by the last chapter/PTT that played. This project also introduces "Composite Commands," which are used here to set a GPRM and link to another PGC, all within a single command line. Composite Commands can be extremely handy when used with buttons, since buttons can only have one command.

Using the last PTT to determine the button highlight is not very common, but some (if not all) of the more recent releases by the Criterion Collection use this technique. Though possibly a little disorienting at first, I think it makes a lot of sense, depending on the content. Once a chapter is activated from a scene selection menu, the show plays as usual. Whether the user allows the show to play through to another chapter or skips a chapter with the remote (backwards or forwards), the button that corresponds to the current playing chapter is highlighted upon return by the activation of the remote menu key. Note that if this button is on a different scene selection menu from the button that activated the show originally, the DVD player will display the correct menu! So the disc is not telling us where we started, but where we ended - or what we were just watching. This is exactly how the demo project presented here functions, though on a much smaller scale than a feature length movie with more than 20 or so chapters.

This article refers to basic operations, terminology, and techniques found in Simple DVD Spec. Re-Authoring With DVDAfterEdit, Parts 1 & 2. My intention is to focus on the new stuff, so please review the previous articles for more detail on certain subjects like "Title" and "Menu" remote key assignments, for example.

The "2 Scene Select PTT" project contains a 15 frame/1 GOP First Play in VTS 2, a track with 4 chapters in VTS 1, the Main Menu in the VMG, and Scene Selection Menus in VTSM 1 PGC 1 and VTSM 1 PGC 2. There are no dummy menus (still with one inconsequential exception).

» Click here to download before and after DVDAfterEdit build files for this "2 Scene" example project. Note that the original build is not fully programmed and will not play correctly, if at all.

Please note that as of this writing, this new demo project will not simulate 100% correctly with Tracer, as the use SPRM 7 has not been fully integrated yet.

Adjusting The Layout

Here's the left pane of the finished structure:

center,left pane of the finished structure

The first thing we need to do is move the Main Menu (VTSM 1 PGC 7) to the VMG - same as before. Once imported with the "Replace Menu Vob" command, delete all of the PGC's except for PGC 7. Be sure to double check that the Main Menu PGC's "entry PGC" parameter is set to "yes," in order for the remote title key to function.

Next, delete every PGC in VTSM 1 except for PGC 8 and PGC 9 - these are the Scene Selection Menus. Again, check the newly renamed PGC 1 (which is the menu for Scenes 1-2) to make sure its "entry PGC" and "Menu Type" parameters are set to "yes" and "root," respectively, in order for this PGC to become the target for the "Menu" remote key.

Now delete all of the PGC's in VTSM 2. This remaining PGC is our only dummy menu.

And to finish the structure use my favorite step, "Delete All Commands In Project."

GPRM Definitions

Now that the project's layout is set, it's time to re-author. I'm using only 2 GPRM's for this disc and their definitions follow below. I'll go into greater detail when we look at the programming for each area of the disc.

r0 = Menu Status

This GPRM is used to keep track of which menu navigation is going to and coming from. It keeps track of from where VTS 1 was activated - whether from the Main Menu or either of the Scene Selection Menus. It also handles what happens when the title and menu remote keys are activated, so navigation gets directed to the correct location. It also assists with how button highlights are determined for the Main Menu.

r1 = Ultimately determines the button highlight for the Scene Selection Menus

This GPRM is used to define which button will be highlighted while on the Scene Selection Menus, but is a little more complicated than before. There are more possible values for r1 this time around because... well, I'll get to that shortly!

All Commands Revealed!

The picture below shows all of the PGC's in this project and their respective commands. Go ahead and insert all of these commands now. Details follow for only the PGC's that are different from those in Part 2.

center,All PGC's in this project

First Play

This is exactly the same as in Part 2...

VTS 2: 15 Frames/1 GOP

This is also exactly the same as in Part 2...

VTSM 2: Dummy PGC

Same as Part 2...

VTS 1: Track With 4 Chapters

Not quite the same as Part 2 - finally!

center,VTS 1: Track With 4 Chapters

Line 1: If GPRM 0 is equal to a value of 1, then navigation goes to line 3, skipping the command in line 2.

Line 2: So if GPRM 0 is not equal to a value of 1, then navigation Calls VMG PGC 1, which is the Main Menu.

Line 3: This sets GPRM 1 to a value of 5, setting a value for "end of show" status, which will be explained later.

Line 4: This line instructs navigation to jump to the root-designated VTSM of VTS 1, which is the Scenes 1-2 Selection Menu.

VMG: Main Menu

Surprise! These are the same Pre-Commands and Button Commands as before, but the post-Commands are slightly different:

center, VMG Main Menu

Line 1: GPRM 0 gets set to a value of 1.

Line 2: GPRM 1 gets set to a value of 0.

Line 3: Navigation jumps to the root menu of VTS 1, which in this disc is VTSM 1 PGC 1.

VTSM 1 PGC 1: Scenes 1-2 Selection Menu

Here are the Pre-Commands for VTSM 1 PGC 1 - all lucky thirteen lines worth. This gauntlet isn't too scary...

Pre-Commands for VTSM 1 PGC 1

Line 1: If GPRM 0 is equal to a value of 1, navigation skips to line 3.

Line 2: If GPRM 0 is not equal to a value of 1, then navigation jumps to the Main Menu/VMG.

Line 3: If GPRM 1 is not equal to a value of 0, then navigation skips down to line 6.

Line 4: If GPRM 1 is equal to a value of 0, then it is set to a value of 1024 in order for button 1 to highlight.

Line 5: After GPRM 1 is set to 1024, navigation is instructed to skip down to line 13.

Line 6: If GPRM 1 is not equal to a value of 5, then navigation skips to line 9.

Line 7: If GPRM 1 is equal to a value of 5, then it is set to a value of 4.

Line 8: Once GPRM 1 is set to a value of 4, navigation jumps down to line 11.

Line 9: This sets GPRM 1 to the value stored in SPRM 7, which is the last PTT or chapter that played.

Line 10: If the value of GPRM 1 is less than 3, then navigation skips to line 12.

Line 11: If the value of GPRM 1 is equal to 3 or greater (i.e. 4), then navigation links to VTSM 1 PGC 2, which is the Scenes 3-4 Selection Menu.

Line 12: This command multiplies the value of GPRM 1 by 1024, in order to get the correct button to highlight. Notice in the pulldown menu for *= the other possible operations available.

command to get correct button to highlight

Line 13: This sets the button to highlight from the value stored in GPRM 1.

There are some interesting things going on here. Here's how it works:

Scenario 1: The Show in VTS 1 is played by the activation of the "Play Movie" button on the Main Menu. If the user activates the menu remote key during playback, navigation will target VTSM 1 PGC 1 because it is the root menu of VTS 1. Since the value of the Main Menu is 0 (r0 == 0), navigation will immediately exit this PGC and jump to the Main Menu.

Scenario 2: The "Scene Selection" button on the Main Menu is activated. GPRM 0 is set to 1 because navigation is going to the Scenes 1-2 Selection Menu. GPRM 1 is set to a value of 0, in order to indicate that navigation will be entering the Scenes 1-2 Selection Menu from another menu. Once at the Pre-Command area for the Scenes 1-2 Selection menu, navigation will skip down to command line 3 because r0 = = 1. Since r1 = = 0 at this point, the value of r1 is changed to 1024. Button #1 is then set to highlight at line 13.

Scenario 3: The show is played via activation of button # 1(Chapter 1), located on the Scenes 1-2 Selection Menu. Before reaching PTT 2/Chapter 2, the menu remote key is activated. Navigation returns to the root menu of VTS 1, checks the first Pre-Command, and skips down to line 3. Since the value stored in r1 is currently 1024, navigation skips down to line 6. Obviously 1024 is not equal to 5, so navigation skips down to line 9. Here, the value of r1 is change to the value stored in SPRM 7, which is 1, for PTT 1/Chapter 1. At the next line, navigation checks if the value of r1 is less than 3, which it is. This determines which Scene Selection Menu is the final destination. The value of r1 is then multiplied by 1024, in order to get a legal button number value. Button 1 finally is set to highlight.

Scenario 4: The show is played via activation of button # 1(Chapter 1), and the menu remote key is activated between Chapters 2 and 3. Everything works just like Scenario 3, except at line 9, the value stored in SPRM 7 is now 2. Since 2 is less than 3, navigation remains in this PGC, and button 2 is set to highlight because r1 is now equal to 2048.

Scenario 5: The show is played via the activation of either button 1 or 2 on the Scenes 1-2 Selection Menu, and the menu remote key is activated between Chapters 3 and 4. Once back at line 9, r1 gets changed to a value of 3 (for PTT 3). Since 3 is not less than 3, line 11 executes and navigation links to PGC 2 - which is the Scenes 3-4 Selection Menu.

Scenario 6: The show is played via the activation of any Scene Selection Menu button, and plays until its end. In VTS 1's Post-Command area, navigation skips to line 3 because r0 = =1. At line 3, r1 is set to a value of 5, and then navigation jumps to the Pre-Command area of VTSM 1 PGC 1. Navigation gets to line 6, and since 5 = 5, r1 is then set to a value of 4. Navigation then skips down to line 11, where it links to VTSM 1 PGC 2.

Although Chapter 4 should be the last PTT that played in Scenario 6, I'm using the "end of show" value of 5 in r1 as a safety net in case the DVD player gets any ideas about changing the value of SPRM 7 after navigation leaves VTS 1. This way there are instructions for the DVD player to follow for every possible navigation scenario.

Unlike the project in Part 2, the chapter selection buttons have no relation to what button gets highlighted upon return. The user could also skip chapters while playing the show - forwards or backwards - activate the menu remote key, and the Per-Commands take care of the rest!

Here are the Button Commands for VTSM 1 PGC 1:

center,Button Commands for VTSM 1 PGC 1

Buttons 1 and 2 (for Chapters 1 and 2, respectively), target the corresponding PTT, just like the previous project. Button 3, which targets the Scenes 3-4 Selection Menu, is using what's called a "Composite Command." GPRM 1 is set to a value of 3, and the "link" option is enable in order to link to PGC 2. Two instructions, one command line! They're great for use with buttons, since buttons can only have a single command line. The "link" option allows for jumping - or linking - to PGC's within the same domain, PG's and Cells within the PGC, and the other DVD Spec. legal operations shown in the pulldown. Lastly, Button 4 jumps to the Main Menu.

link options

link to PGC's

VTSM 1 PGC 2: Scenes 3-4 Selection Menu

Here are the Pre-Commands:

VTSM 1 PGC 2 Pre-commands

Line 1: If GPRM 1 is not equal to a value of 4, navigation skips to line 4.
Line 2: If GPRM 1 is equal to a value of 4, then GPRM 1 is set to a value of 2048, in order to highlight button 2.
Line 3: Once the GPRM is set in line 2, navigation skips to line 5.
Line 4: Target of line 1 - GPRM 1 is set to a value of 1024.
Line 5: Button highlight is determined by the value stored in GPRM 1.

Remember that a menu remote key activation during playback of VTS 1 cannot target this menu directly, as it is not designated as root. That being the case, fewer Pre-Commands are needed here because the PTT value has already been determined by the time navigation enters this PGC. Another thing to keep in mind is that while the PTT values for the chapters on this menu are 3 and 4, the buttons to be highlighted are 1 and 2. If the value of r1 were changed to 3072 or 4096 prior to entering this menu (by pre-Command line 12 in VTSM 1 PGC 1), these values would need to be changed again to get the correct button to highlight once navigation reached Pre-Command line 5. An alternative might be to use "Set Button" commands targeting specific buttons instead of referring to a GPRM, but this may not reduce the total number of command lines.

Here are the Button Commands:

VTSM 1 Button Commands

They are very similar to those of VTSM 1 PGC 1. Buttons 1 and 2 target PTT's 3 and 4 respectively, and a Composite Command is used for Button 3. This time r1 is set to 0, which is the same state as if navigation originated from the Main Menu via the activation of the Scene Selection button. Again, Button 4 jumps to the Main Menu.

Conclusion

Though not very common, this highlight via PTT technique may prove useful for various navigational needs. Hopefully, it has also shown how other SPRM's can be used to assist in determining the highlighted button number, besides that mundane SPRM 8...