|Page (2) of 3 - 11/23/04||email article||print page|
Scripting in DVD Studio Pro, Series 2Part 1: The basics of working with SPRMs Moving an SPRM to a GPRM
To do this anything like this almost invariably involves setting a "mov" command as the first command in your script because we want to move the value of an SPRM (in this case, SPRM 16, which is the audio language code for a DVD player) into one of our available GPRMs. It's doesn't really matter which GPRM you choose as the repository for this information. I'll arbitrarily pick GPRM 0 for this. And here's how it will work.
1. Create a new script in your project (Project > Add to Project > Script).
2. Double-click the script to open it up in the Script Editor window.
3. Then select the default command ("Nop") so that the Inspector palette shows you the various options you can set for this command. In the Inspector, change the "Nop" command to "Set GPRM." Set the Operation to "mov." Set the Source Type to "SPRM." Set the Source Value to "SPRM 16." And set the Target to "GPRM 0." All of this is shown in the example below.
That's it. You can now test your script to see that it is, in fact, working. To test it, open up DVD Studio Pro's Preferences. In the Simulator settings, change the Audio setting to English, and click OK. Now set your script as the First Play for your DVD, and test it in Simulator (or simply simulate it by right-clicking the script in the Outline tab and choosing "Simulate" from the list of options.)
Then take a look in the information drawer, and you'll see that both SPRM 16 and GPRM 0 are set to 25966, which is the language code for English. (If the information drawer isn't open, click the "i" icon in Simulator.)
How do I know 25966 is the language code for English? Two ways. First, I can look it up in the DVD Studio Pro manual. (The language code table starts on page 480.) Or I can use the handy-dandy Haxtor utility to calculate it for me. In Haxtor, set one of the fields to ASCII, and the other to DEC (decimal). Type "en" into the ASCII field, and you'll see its decimal value in the second field.
Yep, it's 25966, just like we expected. Type in the two-letter abbreviation for any language, and you'll find its numeric equivalent this way. (Generally the abbreviation is the first two letters of the name of the language, but this isn't true of languages that share the same first two letters. French is "fr," while Frisian is "fy.")
Related Keywords:apple dvd studio pro, scripting, dvdsp, sprm, gprm
Source:Digital Media Online. All Rights Reserved