Back Forum Reply New

language stream menu

I'm using maestro.
How can i build a menu that have options to choose language, and when a language is activated, users cant change it during the play?

You've got two different things going here: changing the language, and locking out manual language-changing.

To change the language, you link the button to a command sequence.  In the Project Window (the narrow one in the upper-left that lists all of your movies and menus), right-click on the Command Sequences folder and select quot;Add New Command Sequencequot;.  Rename it to quot;AudioEnglishquot; or quot;SubtitleEnglishquot; or something like that.

Now double-click on the new Command Sequence to get a new dialog box.  Click quot;Addquot; near the Command List to get a new command, which defaults to NOP (No Operation, or quot;do nothingquot;).  Select the new command, then click the Set System Stream button at the top of the window.  In System Parameters, select quot;Immediatequot;.  Check which of Audio or Subtitle (or both) that you want to change.  Select which stream you want to switch to in the drop-down list (I forget if this lists the stream by name or number--check with your movie to see which one you want).  For Subtitle, you can also select quot;Offquot;, which means you can have a button that turns off subtitles.  Make sure the Hex Values and Compare boxes are unchecked.  The text in the Command list should look like quot;SetSTN Au(1)quot;, for set Audio to Stream # 1.

Repeat the above to create a command sequence for each audio or subtitle language you want to change to.  When all this is done (and you've saved the project, just in case), go back to your language menu, right click on a language-changing button, and select Command Sequences and the command sequence for that language.  Repeat for all of the other buttons.

Now for locking out user language changes.  On the Project Window, right-click on the main movie and select Properties.  Under Disabled User Action, Stream Selection, check Audio Stream Change to disable audio language change by the user, and/or Subtitle Stream Change to disable subtitle language change (and turning subtitles on/off) by the user.

Next, you probably want to set up the DVD so that pressing the Audio button on the DVD remote control goes to the Audio menu, and pressing the Subtitle button goes to the Subtitle menu.  Click on the top item in the Project Window, then click on the Connections tab in the main window on the screen.  At the bottom of the screen you will see a list of destinations.  The upper-left has a list of possible links, and the upper-right has the destination for that link.  Look for Audio Menu and Subtitle Menu, and drag the appropriate menus into those spots in the upper-right.

(Continuing from the previous post)

That's the basic theory.  If you look at Hollywood DVD's, you will see that things get trickier: the button for the current language is automatically highlighted when you select the language menu, and selecting a different language will automatically cause the Resume Movie button to be highlighted.  Clicking this button will cause the movie to start from the beginning with the correct language if you haven't seen it yet, or resume where you left off with the correct language if you've already started it.  Getting your DVD to do this is rather complicated, so follow closely:
[list=1][*]If you have multiple audio languages and multiple subtitle languages, you must have separate audio and subtitle menus to change them (otherwise, if you want to default to a button, which button do you default to: the current audio language or the current subtitle language?).[*]Let's look at the audio menu first, and let's say you want your menu to choose between English, French, or German.  This means you must have five buttons: English, French, German, Main Menu, and Resume Movie.  Create and import the menu and overlay, then create highlights in the order given (you may find it useful later if you name each button in the Buttons tab).  Assign the button navigation and link the Main Menu button back to your main menu, but don't link the other buttons yet.[*]Create a similar menu for subtitles, adding an Off button before the first button (English).[*]Now we're ready to start creating Command Sequences.  There are two potential problems we will have to solve: what should the default language be the first time the DVD is played, and which movie will we resume to.  This last problem is because the Resume function replays the last movie played.  If your DVD has a First Play leading into your main menu and you select Resume before starting the main movie, it will resume (i.e. re-play) the First Play instead.  We therefore need for the DVD to start with a command sequence that sets things up before proceeding to the First Play movie.[*]Create a command sequence called FirstPlay and double-click it to edit.  Add a command (NOP), select it, click the Set GPRM button, set OperationType to Move, select Immediate, then select GPRM0 in the first field and enter 0 in the second and make sure Compare is unchecked, which should set the command in the Command List to quot;MOV GPRM0, 0quot;.  What this means is that we will be using GPRM0 (General Parameter 0) to keep track of whether the main movie has been played yet or not: if it has (value of 1), then the Resume Movie button should resume it, but it it has not (value of 0), then the Resume Movie button should switch to the main movie and play it from the beginning.[*]Add another command to FirstPlay.  Select it, click the Set GPRM button, set OperationType to Move, select Immediate, then select GPRM1 in the first field and enter 0 in the second and make sure Compare is unchecked, which should set the command in the Command List to quot;MOV GPRM1, 0quot;.  We will be using GPRM1 to keep track of the audio stream, and for now we are defaulting it to the first track (Stream # 0), which should be whatever language you want to play if the DVD Player's preferred language is not one of your DVD's languages (in the case of this example, if the DVD Player is set up to prefer Chinese audio tracks, and the DVD has only English, French and German to choose from, we will default to English).[*]Repeat the above to set GPRM2 to 0.  GPRM2 is the variable to track the subtitle stream (both which one and whether it's on).  A value of 0 means the first track, off.  Once again, this should be the subtitle you want to have ready to turn on even if the DVD Player's preferred subtitle language is not on the DVD.[*]Add a fourth command, click Set GPRM, set OperationType to Move, select SPRM, then select GPRM3 in the first box and SPRM16 in the second box and make sure Compare is unchecked, which should set the command in the Command List to quot;MOV GPRM3, SPRM16quot;.  SPRM16 is the System Parameter that stores what the DVD Player's preferred audio language is, and we are temporarily putting it in GPRM3 so we can look at it.[*]Repeat the above command to copy SPRM18 (the preferred subtitle language) to GPRM4.[*]Now things get tricky.  Add a sixth command, click Set GPRM, set OperationType to Move, select Immediate, select GPRM1 in the first field and enter 1 in the second, then check the Compare box.  In the Compare square, click Immediate, and in the statement select and enter values so it says quot;if GPRM3 is Equal 26226quot;, which should set the command in the Command List to quot;MOV GPRM1, 1 if (GPRM3 = 26226)quot;.  This will set the DVD's default audio language (GPRM1) to French (Track # 2, assuming French is the second track) if the DVD Player's preferred language (SPRM16 copied into GPRM3) is French (code 26226).  How do you get these code numbers?  They're in DVD Demystified, but apparently nowhere on the Internet, so I put them up here.[*]The seventh command is identical to the sixth command with two changes: set GPRM1 to 2, and do it if GPRM3 = 25701.  This will set the DVD's default audio language to German (Track # 3) if the DVD Player's preferred language is German (code 25701 in the above table).[*]Repeat the above two statements with GPRM2 (the DVD's preferred subtitle language) and GPRM4 (copy of SPRM18, the DVD Player's preferred subtitle language).[*]Now that we have all of this set we are finally ready to play the DVD.  Add a command, select it, click Jump, set Target Type to Movie with GPRM Based Chapter unchecked, select the First Play movie from the first list and Chapter 1 (the only chapter in all likelihood) from the second list, and make sure that Compare is unchecked, resulting in quot;Jump to Intro[1]quot; (or whatever your First Play movie is called).[*]Click the OK button to close the Edit Command Sequence window and finish editing the FirstPlay command sequence.[*]Go to the Connections pane for the entire project and change First Play to the FirstPlay command sequence.  Save.[*]Create a new command sequence called JumpToAudioButton and double-click to edit.  Add a command, click Set GPRM, set OperationType to Move, select GPRM, and select GPRM3 and GPRM1 (with Compare unchecked) to get quot;MOV GPRM3, GPRM1quot;--we need to temporarily copy GPRM1 into the no-longer used GPRM3.[*]Add a command, click Set GPRM, set OperationType to Add, select Immediate, and select GPRM3 and enter 1 (with Compare unchecked) to get quot;ADD GPRM3, 1quot;.  The point is that the audio tracks start with 0, while the button numbering starts with 1, so we need to add 1 to turn the English audio track (0) into the English button (1).[*]Add command, click Jump, set Target Type to Menu, click the GPRM Based Button box, select Audio Menu (or whatever you named it) and GPRM3 (with Compare box unchecked) to get quot;Jump Audio Menu[GPRM3]quot;.  Click OK to finish editing JumpToAudioButton.[*]Create a new command sequence called JumpToSubtitleButton and double-click to edit.  The logic here is slightly different than JumpToAudioButton, since we have to worry about turning the subtitles on an off as well as setting a language.[*]Add a command, click Jump, set Target Type to Menu, make sure GPRM Based Button is unchecked, select Subtitle Menu (or whatever you named it) and the Subtitle Off button (or Button 1, if you didn't name it), check the Compare box, select Immediate, and fill in boxes to get quot;if GPRM2 is gt;= 64quot;, resulting in quot;Jump Subtitle Menu.Subtitle Off if (GPRM2 gt;= 64)quot;.  We are going to add 64 to GPRM2 if the subtitle should be displayed (in other words, a value of 1 means French subtitles off, and 65 means French subtitles on) and we'll assume that if subtitles are on and the user is going to the Subtitle Menu, it's to turn them off.[*]Add command, click Set GPRM, set OperationType to Move, select GPRM, and select GPRM2 and GPRM4 (leaving Compare unchecked), resulting in quot;MOV GPRM2, GPRM4quot;.  As before, we're using GPRM4 as a temporary variable, and we're about to add 1 to determine the correct button.[*]Add command, click Set GPRM, set OperationType to Add, select Immediate, and select GPRM4 and enter 1 (leaving Compare unchecked) to get quot;ADD GPRM4, 1quot;.[*]Add command, click Jump, set Target Type to Menu, check the GPRM Based Button box, and select the Subtitle Menu and GPRM4 (leaving Compare unchecked) to get quot;Jump Subtitle Menu[GPRM4]quot;.[*]Click OK to stop editing the JumpToSubtitleButton command sequence.[*]Go to the Connections tab for the project and change every connection to Audio Menu to point to the JumpToAudioButton command sequence instead, and every connection to Subtitle Menu to point to the JumpToSubtitleButton command sequence instead.  Save.[*]Double-click on the AudioEnglish command sequence you created earlier, with its single command.  Add a new command, click Set GPRM, set OperationType to Move, select Immediate, select GPRM1 and enter 0 (with Compare not checked), resulting in quot;MOV GPRM1, 1quot;.[*]Add command, click Jump, select Menu, leave GPRM Based Button unchecked, select Audio Menu (or whatever you named it), Resume Movie button (or Button 5 if you didn't name it), and leave Compare unchecked to get quot;Jump Audio Menu.Resume Moviequot;.  Click the OK button to stop editing this command sequence.[*]Make the same two additions to AudioFrench and AudioGerman, but setting GPRM1 to 1 for French and 2 for German.[*]Make the same changes to SubtitleEnglish, SubtitleFrench and SubtitleGerman, but with Jump destination of Subtitle Menu Button 6 instead of Audio Menu Button 5 and with GPRM2 values of 64 (English), 65 (French), and 66 (German).[*]Create a new command sequence named SubtitleOff and double-click to edit.[*]Add command, select Set System Stream, select Subtitle, and then pick quot;Offquot; from the drop-down list and make sure Compare is not checked to result in quot;SetSTN sp(off)quot;.[*]Add command, select Set GPRM, set OperationType to Subtract, select Immediate, select GPRM2 and enter 64, check the Compare box, select Immediate, and fill in boxes to get quot;if GPRM2 is gt; 63quot;, resulting in quot;SUB GPRM2, 64 if (GPRM2 gt; 63)quot;.[*]Add command, click Jump, select Menu, leave GPRM Based Button unchecked, select Subtitle Menu (or whatever you named it), Resume Movie button (or Button 6 if you didn't name it), and leave Compare unchecked to get quot;Jump Subtitle Menu.Resume Moviequot;.  Click the OK button to stop editing this command sequence.[*]Make sure each language button in the two menus (including the Subtitle Off button) is linked to the correct command sequence.  Save.[*]Create a new command sequence called ResumeMovie.  Double-click to edit.  For safety sake, we will start the movie from the beginning by default, and only resume if we know for sure that we should.[*]Add command, select Resume, check the Compare box, select Immediate, and fill in quot;if GPRM0 is Equal 1quot; to result in quot;Resume if (GPRM0 = 1)quot;.[*]Add command, select Set GPRM, set OperationType to Move, select Immediate, select GPRM0 and enter 1, and leave Compare unchecked to get quot;MOV GPRM0, 1quot;.[*]Add command, select Jump, select Movie, leave GPRM Based Chapter unchecked, select the Main Movie (or whatever you called it) and Chapter 1 (or whatever you called that), and leave Compare unchecked to get quot;Jump Main Movie[1]quot;, then click OK to end editing the ResumeMovie command sequence.[*]Link the Resume Movie Buttons in both the Audio Menu and Subtitle Menu to the ResumeMovie command sequence.  You can also link the Play Movie button on your Main Menu to ResumeMovie (note that I've had some trouble getting ResumeMovie to play the correct movie 100% of the time, so linking Play Movie to it may be risky; also note that if you have more movies than just the First Play and the Main Movie than you need to keep track of that too--perhaps set GPRM5 to hold movie number to play [0=First Play, 1=Main Movie, 2=Previews, etc] and compare it to GPRM0).[/list=1]

I leave it as an exercise to the reader to work out the following: given four chapter menus, each linking to four chapters, use SPRM7 (the current chapter number) and the Set GPRM Operation Types Divide and Modulo to have the Chapter Menu button on the DVD remote link to the correct button on the correct menu.  quot;Moduloquot;, by the way, is the fancy term for quot;remainderquot;, i.e. 14 Modulo 4 = 2, because 15 divided by 4 = 3 with a remainder of 2.
¥
Back Forum Reply New