So, there's this new thing in Vista called DVD Maker. If you shoot some HD footage of baby Tyler stuffing Cheetos up his nose and want to send a video DVD to Grandma with easy to navigate menus and a little menu eye candy - DVD Maker does a good job of that out of the box.
But if you're reading this then you're probably a geek who's interested in some of the cool behind the scenes things you can do with DVD Maker (or you're Eric Fleischman). In either case, you might be interested to know that you can create new custom menu styles in DVD Maker with very little effort. Keep in mind that while you can create new menu styles with little effort, I make no promise that they will be pretty or easy to navigate.
In keeping with the second grandest tradition in all of software, let's talk about how to write 'Hello World' using the DVD Maker menu style extensibility SDK. If you've used the Movie Maker filters and effects extensibility model this will seem very familar. If you haven't, don't worry. All you need is a little XML and faith.
A complete menu style in DVD Maker requires you to define three menus and up to three transitions. This creates a rough navigation scheme like so:

For this entry, we're only going to discuss the main menu page. To make things really easy we'll use a copy of an existing style and just change the parts we want to. To do this you'll need a copy of Vista. I'll wait while you get that...
OK. Now follow these steps:
- Open DVDMaker
- Add some content, (doesn't matter what)
- Press the Next button.
- Select the 'Full Screen' style.
- Press the 'Customize Menu' button.
- Press the 'Save as New Stlye' button.
- Give the style an easy to remember name like "HelloWorld".
- Save the style and close DVD Maker.
- Navigate to %APPDATA%\Microsoft\Movie Maker\AddOnTFX
- Use notepad to open HelloWorld.xml.
There you go. You now have the a basic menu style XML to work with.
The hard part is how we get it to say "Hello World!" instead of just being a string of videos. There's a difficult way to do this and a cheap way. Guess which one I'm going to talk about?
The DVD Maker menus are a composite of layer after layer of visual effects. The XML describes these effects and the order in which to render them. For our simple case all we're going to do is add one effect with our text on top of everything else. So we need is an image of our text to overlay. You can create one using any number of visual tools, (I used Digital Image Suite). Create an image with the text in black and the rest of the image transparent. For example, here's my image, (the magenta part is transparent):

Put this image in an easy to remember place. I use c:\dvdstuff while I'm authoring styles for simplicity. Then, we insert some magic XML in the right spot of the file you already generated. (A little warning here: a badly authored style will not load in DVD Maker. DVD Maker should still work fine, but your style won't be amongst the available options).
Find this section in the XML and insert the section in green, (should be around line 80):
|
<MainMenu value=""> ... <Token value="TFX\VideoToFill"> ... </Token>
<!-- draw a black box over everything --> <Token value="TFX\OverlayImage"> <Textures value=""> <Source value=".." /> </Textures> </Token>
<!-- drop the video mask on the black box --> <Input value="InsetVideo"> <InputStartOffset value="1784" /> </Input> <Token value="TFX\VideoMaskToFill"> <Textures value=""> <Source value="..\..\..\..\..\dvdstuff\helloworld.png" /> </Textures> <Properties value=""> <Scale value="0.66, 0.5, 1.0" /> <Offset value="0.0, 0.1, 0.0" /> </Properties> </Token>
<Text value="Title"> <MenuStartTime value="0.000000"> </MenuStartTime> <MenuEndTime value="15000.000000"> </MenuEndTime> <Properties value="">
|
That's it. Give it a whirl in DVD Maker. You should see this:
In a future entry I'll explain what the magic XML is doing.