PDA

View Full Version : Creating DVD Architect End Actions w/ IFOEDIT


johnmeyer
27th October 2003, 23:53
Sony (formerly Sonic Foundry) makes DVD Architect (DVDA), a DVD authoring program. It is good in many ways, but has one huge feature deficiency: It does not let the user modify end actions. Thus, if you put three MPEG files on the main menu and then author, the DVD player will play whichever item you point to, but when it is finished playing that one item, the player goes back to the main menu.

Here's the list of files created by DVD Architect for a simple test DVD, using three MPEG files:

VIDEO_TS.BUP
VIDEO_TS.IFO
VIDEO_TS.VOB
VTS_01_0.BUP
VTS_01_0.IFO
VTS_01_1.VOB
VTS_02_0.BUP
VTS_02_0.IFO
VTS_02_1.VOB
VTS_03_0.BUP
VTS_03_0.IFO
VTS_03_1.VOB

As you can see, DVD Architect creates a new title set for each MPEG file. What I want to do is have each title call the next title. The last title can call the main menu.

If I open VIDEO_TS.IFO in IFOEDIT, and look at VMGM_PGCI_UT, it has four PGC menus, one for the main menu, and one for each of the three MPEG movies. Each of the three PGC menus for each title has three Pre Commands, but no Post Commands.

Here's my problem. I tried adding a post command to try to get my player to jump to the next title set, but the player ignores the command. I've tried all sorts of Post Commands, but nothing works. Here's what the command table looks like, directly from DVD Architect, before any of my modifications.


[000000e4] PGC Command Table start byte 236 [00ec]
[000000e6] PGC Program Map start byte 0 [0000]
[000000e8] Cell Playback Information Table start byte 0 [0000]
[000000ea] Cell Position Information Table start byte 0 [0000]

PGC Command Table:
[000000ec] Number of Pre Commands 3 [0003]
[000000ee] Number of Post Commands 0 [0000]
[000000f0] Number of Cell Commands 0 [0000]
[000000f2] Size of Command table in bytes 31 [001f]
[000000f4] 1.Pre Command Set GPreg<1> mov (set-val)<1> [71 00 00 01 00 01 00 00 ]
[000000fc] 2.Pre Command Set GPreg<2> mov (set-val)<1> [71 00 00 02 00 01 00 00 ]
[00000104] 3.Pre Command (JumpSS VTSM) Jump to TitleSet(vts): 1, Title(ttn): 1, chapter-menu [30 06 00 01 01 87 00 00 ]


Here is what I've tried:


PGC Command Table:
[000000ec] Number of Pre Commands 3 [0003]
[000000ee] Number of Post Commands 1 [0001]
[000000f0] Number of Cell Commands 0 [0000]
[000000f2] Size of Command table in bytes 39 [0027]
[000000f4] 1.Pre Command Set GPreg<1> mov (set-val)<1> [71 00 00 01 00 01 00 00 ]
[000000fc] 2.Pre Command Set GPreg<2> mov (set-val)<1> [71 00 00 02 00 01 00 00 ]
[00000104] 3.Pre Command (JumpSS VTSM) Jump to TitleSet(vts): 1, Title(ttn): 1, chapter-menu [30 06 00 01 01 87 00 00 ]
[0000010c] 1.Post Command (JumpSS VTSM) Jump to TitleSet(vts): 2, Title(ttn): 1, chapter-menu [30 06 00 01 02 87 00 00 ]


I have tried every possible combination for the post command. The player still insists on returning to the main menu after each title. While I nothing I do with the Post command makes any difference, I can change the Pre commands and cause my player to navigate to any title I wish.

Thus, I don't think the problem is finding the right Post command, but rather I think I must need to change a setting somewhere else in order to get the player to even look at the post command.

Does anyone have advice or clues?

Many thanks in advance.

johnmeyer
28th October 2003, 06:53
Well, I've figure about 95% of this out on my own, and I'll share that with everyone. However, I still have one last problem that I haven't figured out. See the last paragraph for my question.

My solution was to do everything in the VIDEO_TS.IFO file and leave everything else alone. I've been able to get everything to work simply by modifying the PGC menus.

For the "First Play PGC" in the VGM_MAT section, I added a navigation variable (shown in red below) to the already-existing PGC Command Table:

PGC Command Table:
[000000ec] Number of Pre Commands 2 [0002]
[000000ee] Number of Post Commands 0 [0000]
[000000f0] Number of Cell Commands 0 [0000]
[000000f2] Size of Command table in bytes 31 [001f]
[000000f4] 1.Pre Command Set GPreg<11> mov (set-val)<0> [71 00 00 0b 00 00 00 00 ]
[000000fc] 2.Pre Command (JumpSS VMGM) Jump to VMG PGC: 1 [30 06 00 01 00 c0 00 00 ]

Next, I realized that the first LU in the VMGM_PGCI_UT section was being used as the entry point for all the VTS_ VOBs to "get back home." Each one of them points back to this first menu (PGC-Menu 1) using this Post Command:

[000000f4] 1.Post Command (CallSS VMGM) Call VMG PGC: 1 [Resume Cell: 1] [30 08 00 01 01 c0 00 00 ]

Since there was no command table in the first LU in the VMGM_PGCI_UT section, I created one as follows:

[000000e4] PGC Command Table start byte 236 [00ec]
[000000e6] PGC Program Map start byte 308 [0134]
[000000e8] Cell Playback Information Table start byte 310 [0136]
[000000ea] Cell Position Information Table start byte 334 [014e]

PGC Command Table:
[000000ec] Number of Pre Commands 8 [0008]
[000000ee] Number of Post Commands 0 [0000]
[000000f0] Number of Cell Commands 0 [0000]
[000000f2] Size of Command table in bytes 71 [0047]
[000000f4] 1.Pre Command If GPreg<11> == (cmp-val)<2><' then Goto line# 4 [00 a1 00 0b 00 02 00 04 ]
[000000fc] 2.Pre Command If GPreg<11> == (cmp-val)<3><' then Goto line# 6 [00 a1 00 0b 00 03 00 06 ]
[00000104] 3.Pre Command If GPreg<11> == (cmp-val)<0><' then Goto line# 8 [00 a1 00 0b 00 00 00 08 ]
[0000010c] 4.Pre Command Set GPreg<11> mov (set-val)<0> [71 00 00 0b 00 00 00 00 ]
[00000114] 5.Pre Command (JumpSS VMGM) Jump to VMG PGC: 3 [30 06 00 03 00 c0 00 00 ]
[0000011c] 6.Pre Command Set GPreg<11> mov (set-val)<0> [71 00 00 0b 00 00 00 00 ]
[00000124] 7.Pre Command (JumpSS VMGM) Jump to VMG PGC: 4 [30 06 00 04 00 c0 00 00 ]
[0000012c] 8.Pre Command NOP [00 00 00 00 00 00 00 00 ]

Finally, each title set had its own PGC menu, and each of these menus had a PGC Command Table. I simply added one Pre Command line to each of these menus to set the GPreg variable so the first PGC menu could pass control to the next Title Set. Here's a sample (the red is the only line I added):

PGC Command Table:
[000000ec] Number of Pre Commands 4 [0004]
[000000ee] Number of Post Commands 0 [0000]
[000000f0] Number of Cell Commands 0 [0000]
[000000f2] Size of Command table in bytes 39 [0027]
[000000f4] 1.Pre Command Set GPreg<1> mov (set-val)<1> [71 00 00 01 00 01 00 00 ]
[000000fc] 2.Pre Command Set GPreg<2> mov (set-val)<1> [71 00 00 02 00 01 00 00 ]
[00000104] 3.Pre Command Set GPreg<11> mov (set-val)<2> [71 00 00 0b 00 02 00 00 ]
[0000010c] 4.Pre Command (JumpSS VTSM) Jump to TitleSet(vts): 1, Title(ttn): 1, chapter-menu [30 06 00 01 01 87 00 00 ]


Now for my question. This all works perfectly. However, if while playing the DVD I use the DVD remote to select the Title or Root menu, instead of getting the menu, the navigation proceeds instead to the next title. If the last title is playing, then I get back to the title menu.

So here's the question: When the Title Menu is selected on the DVD player, what is the entry point in this data structure? It looks like the player simply gets pointed to PGC-Menu 1. Is there a way to trap the Title Menu event so that it gets routed instead to the First Play PGC? Or does anyone have any other ideas?

I could live with what I've got, but it would be nice to get this working perfectly.

Thanks in advance!

maa
28th October 2003, 10:12
Firstly you are right - a VTS can not jump to another VTS - only to the VMG and from there you can do anything.

The Title Button calls the VMG in Video_ts.ifo
The Menu or Root Button calls the VTS_x Menu

What happens as a result of getting to each of these menus is what you see in your command tables.
Its a matter of following your navigation from First Play through to when a film is playing and noting which GPregs are set to what.
Then looking in the VMG to see what gets done when you press the Title button.

If necessary you can change the GPreg values once the film is started with a Pre Command in the VTS_PGC.

You can't call First Play from the Remote unless you press Stop Twice and even that doesn't work on certain players that just play VTS_1_PGC_1 after pressing play.

johnmeyer
30th October 2003, 19:38
I've got everything working. Here's my final "guide."

This is a guide for how to add "end actions" to DVDs created with DVD Architect 1.0c. When you are finished following these directions, your DVD should play continuously from one title to the next, without stopping. This guide is intended as a solution for the situation where you use multiple MPEG files in one DVD Architect (DVDA) project. DVDA insists on putting these into different titlesets. As a result, after each MPEG file (titleset) is finished playing, control returns to the main menu. The changes shown here will let each file play, one right after the other.

1. Open the VIDEO_TS.IFO file.
2. Click on VMGM_MAT. This will enable the "+" sign. Click on the + sign and then select "First Play PGC." This is where your player looks when play first starts.
3. Click on the lower screen. Scroll almost to the bottom. Look for the heading "PGC Command Table." Look for "Pre Command." Click on this, then right click. Click on "Insert Command." This will insert a NOP instruction.
4. Double-click on the NOP instruction. Change the numbers to: 71 00 00 0b 00 00 00 00. Press OK.
5. To refresh the IFOEDIT screen, click on the "Show Reserved Values" check box, and then click on it again (you'll need to do this each time you make a change).

After refreshing, the screen should look something like this:

PGC Command Table:
[000000ec] Number of Pre Commands 2 [0002]
[000000ee] Number of Post Commands 0 [0000]
[000000f0] Number of Cell Commands 0 [0000]
[000000f2] Size of Command table in bytes 31 [001f]
[000000f4] 1.Pre Command Set GPreg<11> mov (set-val)<0> [71 00 00 0b 00 00 00 00 ]
[000000fc] 2.Pre Command (JumpSS VMGM) Jump to VMG PGC: 1 [30 06 00 01 00 c0 00 00 ]

Note: Register 11 is used by this scheme to keep track of whether to display the main chapter menu. When it is zero, the main menu is displayed.

6. Next, go back to the top IFOEDIT screen and click on "VMGM_PGCI_UT." A "+" will appear. Click on that "+." You will now see a series of entries labeled "LU_1 (English) PGC-Menu_1" and so on. The first entry is where control is transferred by DVD Architect at the end of each title set. When you create a DVD from multiple MPEG files, DVD Architect 1.0c places each MPEG file into a separate title set, and then returns to the main menu after each title set finishes playing. What we will do here is tell the DVD player to instead play the next title set. We only need to modify the first entry in this list, so click on "LU_1 (English) PGC-Menu_1."
7. Click on the lower screen and scroll to the bottom. You will see that there is a line that says "There is no PGC Command Table." We will create one that will contain the branching commands needed to go to the next title set automatically.
8. Click on the "There is no PGC Command Table" line, and then right-click. Click on "Add PreCommand." This will add quite a few lines to the table, mostly telling you about the size of the table, etc. The highlight, however, should now be on a line that looks like this:

[000000f4] 1.Pre Command NOP [00 00 00 00 00 00 00 00 ]

9. Double-click on the NOP line. Change the numbers to: 00 a2 00 0b 00 00 00 0a. When you refresh (see above for refresh instructions), the line should now look like this:

[000000f4] 1.Pre Command If GPreg<11> == (cmp-val)<0><' then Break [00 a2 00 0b 00 00 00 0a ]

What you have done is test whether register 11 is equal to zero. If it is, don't execute any of the other commands, and instead carry out the instructions for this first program chain, which is to display the main menu. However, if register 11 is something other than zero (which it will be after returning at the end of a complete play of any of titles), continue going through the commands which follow, which will determine which title to play next.

10. From this point, you simply repeat this process: Right click on the last Pre-Command, and choose "Add PreCommand"; double-click, and add the numbers shown on the right side of the information below, in order to get the commands you see here. Repeat this process until you have a Command Table that looks similar to the one below (yours will be longer if you have more than three titlesets):

PGC Command Table:
[000000ec] Number of Pre Commands 8 [0008]
[000000ee] Number of Post Commands 0 [0000]
[000000f0] Number of Cell Commands 0 [0000]
[000000f2] Size of Command table in bytes 71 [0047]
[000000f4] 1.Pre Command If GPreg<11> == (cmp-val)<0><' then Break [00 a2 00 0b 00 00 00 0a ]
[000000fc] 2.Pre Command Set GPreg<11> mov (set-val)<0> [71 00 00 0b 00 00 00 00 ]
[00000104] 3.Pre Command Set GPreg<10> mov SPreg<title number in volume (TTN)> [61 00 00 0a 00 84 00 00 ]
[0000010c] 4.Pre Command If GPreg<10> == (cmp-val)<1><' then Goto line# 7 [00 a1 00 0a 00 01 00 07 ]
[00000114] 5.Pre Command If GPreg<10> == (cmp-val)<2><' then Goto line# 8 [00 a1 00 0a 00 02 00 08 ]
[0000011c] 6.Pre Command Break [00 02 00 00 00 00 00 00 ]
[00000124] 7.Pre Command (JumpSS VMGM) Jump to VMG PGC: 3 [30 06 00 03 00 c0 00 00 ]
[0000012c] 8.Pre Command (JumpSS VMGM) Jump to VMG PGC: 4 [30 06 00 04 00 c0 00 00 ]

The above table is for DVD that has three MPEG files and therefore three title sets. Regardless of how many titlesets you have (titlesets are the files with names like VTS_01_0.IFO and VTS_01_0.VOB), the first three lines above will always be the same. You will need to add more lines before and after the BREAK command line (Line #6 above), depending on how many titlesets you have. You will need "n-1" of these lines, where "n" equals the number of titlesets. You will also need to alter the compare values and the goto values in each of the lines you add. Remember that you are dealing with Hex numbers, so if you need to change the compare/goto instruction to check for title set 4 and then goto line 10, the codes for that would be: [00 A1 00 0A 00 04 00 0A ]. 0A, or course, is hexadecimal for 10 (if you don't know that, then you probably shouldn't be doing this).

The jump commands that follow the BREAK command should be self-explanatory. The only thing that is a little odd is that it may look like you are jumping too far ahead. For instance, the first jump above is to "PGC 3." Thus, in line 4, if titleset 1 just finished playing, then goto line 7 and from there jump to PGC 3. Why not 2? The reason is that PGC 1 (which is where all this code is) controls the chapter menu, and PGC 2 actually controls the first titleset. Therefore PGC3 controls the second titleset, and so on. You will need a branching PreCommand and a Jump PreCommand for each titleset.

One note: Before you finish with this section, you need to go to the top half of the IFOEdit screen and click on, and then look at, each and every "LU_1 (English) PGC-Menu n" line. Once you have clicked on one of these entries, scroll down to the Program Command Table. If this PGC menu controls a branch to a titleset, then last Pre Command will be a JumpSS instruction to a titleset. However, if this merely controls branching to another menu, there may be no command table at all. PGCs that don't branch back to PGC1 should not be included in the branching logic you are creating in PGC 1.

For instance, here's a table for a DVD that has four titlesets, a main menu, and a sub-menu. PGC 5 controls the submenu. Note that PGC 5 is not included.

PGC Command Table:
[000000ec] Number of Pre Commands 10 [000a]
[000000ee] Number of Post Commands 0 [0000]
[000000f0] Number of Cell Commands 0 [0000]
[000000f2] Size of Command table in bytes 87 [0057]
[000000f4] 1.Pre Command If GPreg<11> == (cmp-val)<0><' then Break [00 a2 00 0b 00 00 00 0a ]
[000000fc] 2.Pre Command Set GPreg<11> mov (set-val)<0> [71 00 00 0b 00 00 00 00 ]
[00000104] 3.Pre Command Set GPreg<10> mov SPreg<title number in volume (TTN)> [61 00 00 0a 00 84 00 00 ]
[0000010c] 4.Pre Command If GPreg<10> == (cmp-val)<1><' then Goto line# 8 [00 a1 00 0a 00 01 00 08 ]
[00000114] 5.Pre Command If GPreg<10> == (cmp-val)<2><' then Goto line# 9 [00 a1 00 0a 00 02 00 09 ]
[0000011c] 6.Pre Command If GPreg<10> == (cmp-val)<3><' then Goto line# 10 [00 a1 00 0a 00 03 00 0a ]
[00000124] 7.Pre Command Break [00 02 00 00 00 00 00 00 ]
[0000012c] 8.Pre Command (JumpSS VMGM) Jump to VMG PGC: 3 [30 06 00 03 00 c0 00 00 ]
[00000134] 9.Pre Command (JumpSS VMGM) Jump to VMG PGC: 4 [30 06 00 04 00 c0 00 00 ]
[0000013c] 10.Pre Command (JumpSS VMGM) Jump to VMG PGC: 6 [30 06 00 06 00 c0 00 00 ]

The jump commands can also be added by right-clicking on the NOP and then selecting "Edit Command." Choose "(JumpSS_VMGM) Jump to VideoManager PGC" on the Command Line, and the select the appropriate PGC Nr. from the drop-down box. Unfortunately, the other commands are not available in IFOEdit at this time, so you have to enter the HEX codes instead.

I had wanted to devise a scheme that would only require editing one file (the VIDEO_TS.IFO file), but ultimately I could not find a way to differentiate between when a titleset was returning control to PGC 1 after finishing completely, and when control was prematurely returned to PGC 1 by the user pressing the Title menu button on their remote. The usual way to do this is with Post commands (Pre commands are executed BEFORE something happens, and Post commands are executed AFTER). However, the way the DVD spec works, you have to use JUMP commands to go to other titlesets, so control never returns to the calling program, and therefore Post commands are never executed. Therefore, I had to put the Post commands into each Titleset control file (the VTS_*.IFO files). It takes only one line of code in each file, but if you have a dozen of these, it is a little tedious. However, once you do this, you are done.

11. Save your files in IFOEdit (click on the Save button). Say "yes" to saving the BUP files.
12. Close IfOEdit (ignore any warnings about not saving files), and then re-open it.
13. In IFOEdit, open the first VTS file, VTS_01_0.IFO.
14. In the top of the screen, click on the "VTS_PGCITI" line, then click on the "+" sign.
15. Click on "VTS_PGC_1."
16. Scroll down to the PGC Command Table. It will look something like this:

PGC Command Table:
[000000ec] Number of Pre Commands 0 [0000]
[000000ee] Number of Post Commands 1 [0001]
[000000f0] Number of Cell Commands 0 [0000]
[000000f2] Size of Command table in bytes 15 [000f]
[000000f4] 1.Post Command (CallSS VMGM) Call VMG PGC: 1 [Resume Cell: 1] [30 08 00 01 01 c0 00 00 ]

The Post Command is executed as soon as the titleset has finished playing. Note that it returns control back to the main Video Manger program control unit that you just finished editing. All we need to do here is to add a command, just before this branching logic, to set the variable that tells our new control logic whether to display the main menu, or whether to play the next title set. If you go back and look, the second line in our control logic sets this variable to zero which tells the control program to display the main menu. If the titleset is interrupted by the user pressing the chapter menu on his/her remote, then the menu will be displayed. However, by setting this variable to one just before returning control, this will let our new branching logic in PGC 1 to determine which titleset to play next.

17. Right click on line 1 and select "Insert Command." Double-click on the NOP instruction, and enter these values: 71 00 00 0b 00 01 00 00. This should give you a PGC Command Table that looks like this:


PGC Command Table:
[000000ec] Number of Pre Commands 0 [0000]
[000000ee] Number of Post Commands 2 [0002]
[000000f0] Number of Cell Commands 0 [0000]
[000000f2] Size of Command table in bytes 23 [0017]
[000000f4] 1.Post Command Set GPreg<11> mov (set-val)<1> [71 00 00 0b 00 01 00 00 ]
[000000fc] 2.Post Command (CallSS VMGM) Call VMG PGC: 1 [Resume Cell: 1] [30 08 00 01 01 c0 00 00 ]


While in the editing dialog, you can select the entire line of Hex values, and press Ctrl-C to copy them. When editing the next dialog, you can then select all the values and then press Ctrl-V to paste. Since the exact same command is used in each VTS file, this can save a lot of time and cut down on errors. You may find this trick useful when entering the branching logic outlined in the first part of this guide. You can create a whole bunch of NOP instructions one right after the other, then double click, select the entire row of zeros, and then press paste. Once everything is entered, and you know how many lines you have, you can go back and double-click on your branching logic to enter the correct values for the compare variable and the branch variable (the one's shown in red above).

Save this VTS file (save the BUP as well, when prompted). Repeat for each remaining VTS IFO file.

Play in WinDVD (or similar program) using the "Play from Folder" option to check the logic. You can also burn a DVD on a "RW" disc and check in a real player.

Good luck!

maa
30th October 2003, 23:57
Well done - thats well figured out !

emdiem
16th February 2004, 11:50
Alot of text here mate. I use DVD Architect 1.0 but only atm for video. End action can be set, dont know about dvd audio, but with video it is possible.

johnmeyer
16th February 2004, 17:54
Alot of text here mate. I use DVD Architect 1.0 but only atm for video. End action can be set, dont know about dvd audio, but with video it is possible.

End actions can be set? Man, I wish! Unfortunately it ain't so.

You cannot set end actions with DVD Architect, version 1.0 (a, b, or c).

It is a well-known, and much despised limitation of this prouduct. In fact, the product is generally quite limited in terms of creating complex navigation. Even the submenu creation is quite difficult (try creating submenus for a title that has fifteen chapters, for instance). These limitations are why I created this guide.

emdiem
16th February 2004, 18:04
no you are correct. I deleted my reply shortly after, but dont know why its still here. I opend up the program and saw that i really was thinking of Adobe Encore ....

maa
18th February 2004, 00:34
No wonder DVDLabs so popular then....