Multiple Language Video in DVD Studio Pro 2/3
June 21, 2004
A Solution to Multiple Language Video in DVD Studio Pro
By Graeme Nattress
I was recently faced with a dual language DVD problem production for the Canadian Dental Association. The DVD was to include a number of presentation videos from their recent conference and include the option to listen to the videos with a French soundtrack instead of the recorded English soundtrack. I was supplied with the English video as Quicktime files, and the matched French audio as AIFF audio files.
The menu structure of the DVD was to first present the user with the choice to view all the content and menus as English or French. From that point in, I created the menu structures from the supplied Photoshop files as normal.
After encoding the video and audio files in Compressor, I brought them into DVD Studio Pro 2 and made a track for each video, and added the English and the French audio.
Now, the problem as I saw it, was to make sure that after selecting French at the head menu, you only ever saw or heard the French. This would be easy enough if there was a completely different track for the French audio over the video, but with over 2 hours of video to fit on a single sided disk, there's no room for doubling up. Also, if a single video track was to be shared between the English and French, there was the problem of which set of menus to return to on the pressing of the "Menu" button.
The solution seemed to be to script the playing of the video tracks and returns to the menu based upon the result of the users' selection at the root menu - French or English.
Scripts are small computer programs that are run by the DVD player's computer processor. They can perform simple tasks like store variables, jump to different parts of the DVD or to different parts of a program depending upon conditions. Five scripts were created:
Set French Path This script gets executed when the user selects "French" at the root menu. It sets GPRM 0 to 1, then jumps to the French main menu. GPRM's are user variables that store the values you set them to. I decided that if GPRM 0 was set to 1, that the user had selected to go down the French path, and if it was 0, that the user had selected to go down the English path.
Entering a script in DVD Studio Pro 2 is a little different from DVD Studio Pro 1.5. The new method more closely resembles the way that a DVD player's little computer works, and more closely reminds me of the old days when all programming was done in "Machine Code". However, it's hard to do as the commands are simple and the interact quite easy. This is the script window setting for the first command - "mov GPRM0, 1"
First, what does "mov GPRM0, 1" mean, and what does it do. In English, we'd say something like "Set the contents of the variable called GPRM 0, to the value 1", however, a direct translation of the machine code to English would be something like "Move the value 1 to the contents of variable GPRM 0". Either way we look at it, GPRM 0 = 1! As you can see, it's an example of good practice to comment your code, so I've added a more natural description of the command and what it does to the comments section. This really helps when you look back at your code when you need to do a similar programming trick in a new DVD production.
To enter the command "mov GPRM0, 1", we select "mov" from the Operation menu, and select the source type to be Immediate. This means that we're going to be moving a directly entered value into our variable - in this case, the number 1, which we enter into the Source Value text box. The Target is set to point at GPRM 0, which is where we decided we would store the user's choice of language as a number, 0 for English, 1 for French.
The next command is "Jump French Main Menu". "French Main Menu" is what I called the French language main DVD menu. Naming your menus and video tracks with good descriptive names really helps here!
The "Jump" command is easy to use and self explanatory. It just "jumps" to where you tell it! In this case we just set the Jump To: to the "French Main Menu".
Set English Path
This script gets executed when the user selects "English" at the root menu. It sets GPRM 0 to 0, then jumps to the English main menu.
"mov GPRM 0, 0" is set in exactly the same manner as that of the "Set French Path" script above, as is the "Jump English Menu".
Return Main Menu
his script looks to see wether the user is on the French or English path, as set by the GPRM 0 variable (0 is English, 1 is French) and jumps to the correct menu.
The two "Jump" commands in the "Return Main Menu" script function very similarly to the ones we used above, but they also have a condition attached to them. This is so that the DVD player can decide the correct one to use. The conditions are set as shown:
To enable the use of a condition, the Compare Command box is checked and the condition is entered via the menus and text box. Our condition for jumping to the "English Main Menu" is that GPRM 0 must be equal to 0. We select GPRM 0, the variable we wish to compare from the Execute if pull down menu, and our condition type, "equals" from the is pull down menu. We are comparing to an immediate value, and that with value is 0.
The French conditional jump is set in the same manner as below:
Return Sub Menu
This script looks to see wether the user is on the French or English path, as set by the GPRM 0 variable (0 is English, 1 is French) and jumps to the correct sub menu.
In this project, there is one sub menu per language called "Keynotes English" and "Keynotes French" respectively. The script is created exactly as for the "Return Main Menu", but with it jumping to the appropriate sub menu instead.
By pressing the audio track button on your DVD player, it's possible to change the language of the audio you're listening to. I wanted to be able to, at the start of play of any movie, reset the language being played back to the choice you made at the root menu. This makes sure that when you go to a new movie, the language you hear is the language you selected.
The Set System Stream commands are the ones in this set of scripts that actually do the "work". They switch the audio playback to either stream 1, which is the English language stream, or Stream 2, which is the French language stream.
To do this, we select Command to be "Set System Stream". We set it to an Immediate Value, and target it to Audio, for which, in the French case, we select "Audio Stream 2". We do this on a conditional basis, using the Compare Command option, which we select GPRM 0, the variable we wish to compare from the Execute if pull down menu, and our condition type, "equals" from the is pull down menu. We are comparing to an immediate value, and that with value is 1.
The scripts were created as above, then added to the appropriate actions in the project. This is the settings for the "Intro Video". All video tracks have the same scripts added to them.
The "End Jump" is set to "Return Main Menu" script. This will decide which language main menu to return to. The "Pre-Script" is set to "Reset Language", which as well as resetting the language if you've gone and changed the audio settings on your DVD player, will set the language track to be played to the correct one for your language choice, French or English. Because the user can, at any point, hit the "Menu" button on their DVD player, it set the "Menu" button, under the "Remote Control" options to also the "Return Main Menu" script.
All screen captures, images, and textual references are the property and trademark of their creators/owners/publishers.