Hello World, Part 4: Script and a Movie! [Part i: The Playlist]

Now comes the exciting part — actually interacting with a movie — and the doubly-exciting part: you can now follow along with me at home!

But first, let’s get to the answer to the last part’s question: why couldn’t we end the cue on a focused-blue-button? And let my just say that I was appalled by the number of guesses I received — exactly zero! Come on, you can do better than that! 🙂

Anyway, the answer is this: We can’t end the cue on a focused-blue-button because that’s what triggers the begin of the cue. And we can’t change the begin to be a non-focused-red-button because no buttons are red until the cue fires. So we have to leave it at starting on a focused-blue-button and ending on a non-focused-red-button.

There’s also a slight problem with this approach: if the user hits the remote keys very fast, the highlight system can break down due to the way ‘ticks’ are processed in iHD. But we’ll cover that another day.

OK, moving swiftly on, here’s the new code for today’s sample. Bonus: The code for this sample (along with the previous three “Hello World” samples) is available as a ZIP file. Note that after extracting each ZIP file, you will need to copy some existing files into the right folders (basically font and WMV files) in order to make them work. These samples should all play with the Jumpstart you can download from the URL above.


First, a new file: the playlist. All HD DVD titles require a playlist, but I haven’t shown it to you yet since it was largely uninteresting for the first few samples. A playlist defines a “session” (for want of a better word) in HD DVD — when you insert a disc, the player finds an appropriate playlist and loads it. The playlist controls the player and lists all the resources it will need until you turn it off, eject the disc, or the script code on the disc programmatically executes another playlist (eg, one it has downloaded from the internet).

Note that your playlist must be called VPLSTxxx.XPL (where xxx is a number from 000 to 999) and it must be all upper-case. HD DVD is case-sensitive for filenames.

Anyway, here’s what a simple sample looks like for Part 4:

<? xml version = 1.0 encoding = UTF-8 ?>

< Playlist xmlns = http://www.dvdforum.org/2005/HDDVDVideo/Playlist majorVersion = 1 minorVersion = 0 >


  < Configuration >

    < StreamingBuffer size = 0 />

    < Aperture size = 1920×1080 />

    < MainVideoDefaultColor color = 705040 />

  </ Configuration >


  < MediaAttributeList />


  < TitleSet timeBase = 60fps defaultLanguage = en >


    < Title titleNumber = 1 titleDuration = 00:00:20:00 id = Intro

      displayName = Intro onEnd = Intro >


      < PrimaryAudioVideoClip titleTimeBegin = 00:00:00:00

        titleTimeEnd = 00:00:20:00

        src = file:///dvddisc/HVDVD_TS/movie.wmv dataSource = Disc >


        < Video track = 1 />

        < Audio track = 1 streamNumber = 1 />

      </ PrimaryAudioVideoClip >


      < ChapterList >

        < Chapter titleTimeBegin = 00:00:00:00 />

        < Chapter titleTimeBegin = 00:00:05:00 />

        < Chapter titleTimeBegin = 00:00:10:00 />

      </ ChapterList >

    </ Title >


    < PlaylistApplication description = Test language = en

      src = file:///dvddisc/ADV_OBJ/Manifest.xmf >


      < PlaylistApplicationResource multiplexed =

Comments (5)

  1. wmerydith says:

    Do you have this sample zipped up for download and use?  I’d like set it up and play with it.


  2. ptorr says:

    There is a link in the 5th paragraph 🙂


  3. wmerydith says:

    You mean the one in bold!  <blush>

  4. wmerydith says:

    In the chapter list element there are 3 chapters defined.  All with different times but I expected them to be given unique ids.  Why is that not the case?

  5. ptorr says:

    I don’t think chapters need IDs, since you can jump to them by index. The IDs might be useful for smoething else, but I’m at home without a copy of the spec right now so I can’t say for sure 😉

Skip to main content