All you need for this guide is IfoEdit v0.95 (or newer) and an IFO-file to edit.
We want to make a video-sequence play with the second audio stream
instead of the first,
just as an example how to use the DVD-commands.
The very first thing we do is to find out the number of our PGC.
Start IfoEdit and open your IFO-file in it. You´ll see something like this:
All PGCs are listed in the lower window, including their duration, which can
help you find yours.
You can see the video-content of every PGC by double-clicking on the line below its number
(underlined in blue). This brings up the VOB-preview:
You can also scroll through the video if the beginning is just a black frame. Once you found your PGC, remember its number. Then go to the upper window, in IfoEdit, and double-click on "VTS_PGCITI". It opens a list of the PGCs and its content shows up in the lower window.
Click on your PGC in the upper window, then scroll down in the lower window until you find an entry about the "command table". There are 2 possible entries and we will treat both of them separately:
1. "There is no PGC Command Table"
In this case you just right-click on this text, a pop-up menu appears and you choose "Add PreCommand".
IfoEdit creates the command table with a pre-command, "NOP", what means "no
Right-click on this command and choose "Edit Command", this brings up a new box.
Scroll down the available commands and choose "(SetSTN) Set Audio Stream Nr", then take the number "1", for the second stream. Click on "OK" and you´re done. Don´t forget to save the IFO.
2. "PGC Command Table:" (already present)
This time you right-click on the line which says: "Size of Command Table in bytes" (underlined in blue), and choose "Add PreCommand".
You get a new "NOP" pre-command, the remainig steps are the same as above (right-click on it, edit command, set audio stream to "1"). In the end you should see something like this:
This is the same procedure you would use to work with any other DVD-commands in any other PGC, including a 3rd case, here:
How to add a command which is not in the pull-down menu-box:
If you want to use other commands than those which IfoEdit offers, then you first need to find out the right hex-code for your command. Some examples are here. When you have it, then just double-click on the command you want to change (or on the "NOP", if you added a new one), and you get this box:
In the box you enter the hex-code of your command (just type on).
When you´re done, click on "OK"-button and there you are!
Example: Let us say you want a video-sequence to repeat 4 times. We do this by taking an empty Register and adding "1" to its value after the movie was played, and returning to the begin of the movie´s PGC as long as our Register´s value is less then "5".
You add a new post-command in the Movie-PGC, like described above, and then you double-click on it, the HexEdit-box appears and you enter following numbers: 73 00 00 0f 00 01 00 00 and then press "OK". The content of the command is not automatically updated, you need to click somewhere else and then come back to your command to check the syntax. Our command should read: Set GPreg<15> add (set-val)<1> .
Then we add one more post-command, a conditional link. Supposing your movie is PGC 3, you will need the following code: 20 f4 00 0f 00 05 00 03. This one should read: If GPreg<15> < (cmp-val)<5> then (LinkPGCN) Link PGC 3. That´s it, this 2 commands do the trick.
If the DVD-player shall not stop after these 5 loops, then you can add a 3. post-command to direct the playback to another movie, or to return to the menu, or whatever you want.
Once you get familiar with this whole DVD-stuff, then you can make so many nice things on a DVD. Have fun with it :-)
Lord of the Discs
© 2003 Josef Braunstein