DVDLab Pro tutorial: Audio & subtitle menu

I came across an old tutorial I wrote on how to make a more advanced audio and sutbtitle menu in DVDLab Pro, but it haven’t been publish on my blog until now (had it on an old website). If you have any questions about the tutorial, feel free to ask in the comments below. Bare in mind, that it’s many years since I wrote the article, but will try to answer as good as I can.

Audio & subtitle menu

In my project I wanted to select the subtitle and audio from the same menu. The subtitle should either be On or Off and the audio is either English or Japanese. Make one menu with all the buttons and clone it. I have the Main menu button as the first button.

Now you have to use the transparency setting on the text which is not selected, like the ones in my menus. Then you make links to the other menus (I’ll explain later why you do this). So in Setup 1 (top-left) you make the Off link to Setup 3 (bottom-left) and Japanese links to Setup 2 (top-right). What you do is making the link from the not selected item to the menu which represent the selected state. (Hope you understod that).

Until now, you haven’t actually changed the videos default settings. What I’ve done is using VM commands in the PRE command of the menus. That means a set of command is executed right before use see the menus. This can be a little bit technical and I don’t understand everytihing myself. But this is what you have to do. Right click on your 1st seup menu and select Edit VM commands.

Then you select Edit in the PRE Commands Sequence. You then get a new window called VM Visual Block Editor. Here you select the Script button.

Now you write

SetSTN (audio=0 subp=0:on )

in the 1st line. Click OK until your back in your workbench. So what does this command do? If you on the top-left picture the On and English button is selected. If you see at the command we used, the SetSTN command use audio=0 to set the first audiostream which in my case is English. subp=0:on will set the 1st subtitle to on, that mean it will show the 1st subtitle.

Now you have to do the same for the three remaining menus. So for the Setup 2 menu (top-right) you have to write

SetSTN (audio=1 subp=0:on ) in the first line in the VM Scriot window.
Setup 3 menu (bottom-left): SetSTN (audio=0 subp=0:off )
Setup 4 menu (bottom-right): SetSTN (audio=1 subp=0:off )

(A side note: Computers start counting from 0, that’s why the first audio is 0 and second is 1, and not one and two as we human counts.).

If I change the audio or subtitle when I watch the movie, I want the change to appear next time I go to the Setup menu. To do this we have to add an Empty Command in the Connections window. Dobbel click the VM commands and select Script. Now write the following code (not the numers in front, this is the linenumber):

1. GPRM0 = SPRM1
2. GPRM1 = SPRM2
3. GPRM0 *= 100
4. GPRM0 += GPRM1
5. if (GPRM0 == 164) LinkPGCN 4
6. if (GPRM0 == 0) LinkPGCN 5
7. if (GPRM0 == 100) LinkPGCN 6
8. LinkPGCN 3

So what does this code do? GPRM0 and GPRM1 is a register in the DVD command set which we can store numbers in (check here for more). SPRM1 and SPRM2 is System Parameter Registers which reads the state of your DVD player (read more here). The SPRM1 checks the state of the audio, in my case this will be 0 (for English) or 1 (for Japanese). SPRM2 check if the subtitle is On or Off. The LinkPGCN command sends you to the right menu. The number after the LinkPGCN command indicates which menu to go to. In the Connections window you will see a red number, that’s number used in the code.

In the Main menu I link the Setup to the VM commands and not to any of my setup menus.

You can read more about the DVD commands and registers at http://www.dvd-replica.com/.

This entry was posted in English and tagged , . Bookmark the permalink.



Legg igjen kommentar