Simple Menus

last updated: 20-Dec-2002 | introduction | anatomy of selection | menu 1 | menu 2 | conclusions | back to index

Donate! If you like using this guide, then please help with its development by donation!  You can do so by clicking on the button to the left.  The donation is handled securely via PayPal.  Thank you.

Introduction

Menus in VCDs are exactly what they sound like... they allow user interaction with the VCD, usually in the form of a choice of some sort.  The menus are invariable authored using the <selection> element in the XML file.   Click here for a comprehensive look at <selection>.

There will be no CUE/BIN sample of the simple menu to download.  The PAL/NTSC Demo VCD has an example of the simple menu.  This can be downloaded here: http://www.vcdimager.org/pub/vcdimager/examples/demovcd/

 

The Anatomy of <selection>

Figure 1 shows diagrammatically how a <selection> works.
The Anatomy of <selection>
  • The BLACK circles and lines indicate USER INTERACTION only.
  • That means the VCD will NEVER go down one of those paths unless the user presses the appropriate button on the remote control (except for a few rare and special occasions).
  • This category includes <prev>, <next>, <return>, <default>, and the <select> options.
  • The <select> interaction work by numerical key presses.  The first number is equals to what is defined in <bsn>.
  • All these user interaction specific interactions do not necessarily need to be in the <selection>.  For example, if you DON'T want the user to be able to press <next>, then you can disable it by simply leaving the <next> tag out of the <selection>.
  • The BLUE line is the path taken by the VCD player if the user does nothing.
  • That is, as soon as the <selection> starts, the VCD player plays whatever is defined in <play-item>.
  • The <play-item> is looped the number of times defined in <loop>.
  • Then, playback is paused for the time defined in <wait>.
  • After that, the VCD automatically goes to the link defined in <timeout>.
  • If either <loop> or <wait> is infinite (i.e., loop = 0 or wait = -1) then <timeout> need not be defined as it can never be reached.

 

Examples of Menus

A menu can use either a video clip or a still image as the <play-item> (or background).  This guide with demonstrate the use of both.

  1. Menu with a video clip as the background
  2. Menu with a still image as the background

 

Menu with Video Clip Background

Source files for this project include:

Thus, the following lines in the XML file are needed to reference these source files:

  <sequence-items>
    <sequence-item src="menu.mpg" id="sequence-menu"/>
    <sequence-item src="video1.mpg" id="sequence-video1"/>
    <sequence-item src="video2.mpg" id="sequence-video2"/>
    <sequence-item src="video3.mpg" id="sequence-video3"/>
  </sequence-items>

 

In this menu structure (as shown in figure 2):
  • the menu (a video clip: "sequence-menu") is looped indefinitely (as represented by the blue circular arrow)
  • pressing "1", "2" and "3" goes to video1, video2 and video3 respectively
  • after each video has finished playing, it goes back to the menu.

Thus, the <pbc> of this structure can be authored as:

<pbc>
    <selection id="menu">
      <bsn>1</bsn>
      <loop jump-timing="immediate">0</loop>
      <play-item ref="sequence-menu"/>
      <select ref="video1"/>
      <select ref="video2"/>
      <select ref="video3"/>
    </selection>

    <playlist id="video1">
      <next ref="menu"/>
      <wait>0</wait>
      <play-item ref="sequence-video1"/>
    </playlist>
    <playlist id="video2">
      <next ref="menu"/>
      <wait>0</wait>
      <play-item ref="sequence-video2"/>
    </playlist>
    <playlist id="video3">
      <next ref="menu"/>
      <wait>0</wait>
      <play-item ref="sequence-video3"/>
    </playlist>
</pbc>
Simple Menu -- figure 2

 

In this more complex menu structure (as shown in figure 3):
  • the menu (a video clip: "sequence-menu") is looped 3 times (as represented by the blue circular arrow)
  • afterwards, it waits for 1 second before it timeouts to video1
  • pressing "1", "2" and "3" goes to video1, video2 and video3 respectively.
  • pressing "default" goes to video1
  • the video clips chain to form a multitrack sequence (n = next and p = prev in figure 3)

Thus, the <pbc> of this structure can be authored as:

<pbc>
    <selection id="menu">
      <bsn>1</bsn>
      <default ref="video1"/>
      <timeout ref="video1"/>
      <wait>1</wait>
      <loop jump-timing="immediate">3</loop>
      <play-item ref="sequence-menu"/>
      <select ref="video1"/>
      <select ref="video2"/>
      <select ref="video3"/>
    </selection>

    <playlist id="video1">
      <next ref="video2"/>
      <wait>0</wait>
      <play-item ref="sequence-video1"/>
    </playlist>
    <playlist id="video2">
      <prev ref="video1"/>
      <next ref="video3"/>
      <wait>0</wait>
      <play-item ref="sequence-video2"/>
    </playlist>
    <playlist id="video3">
      <prev ref="video2"/>
      <next ref="menu"/>
      <wait>0</wait>
      <play-item ref="sequence-video3"/>
    </playlist>
</pbc>
Simple Menu - figure 3

 

Menu with Still Image Background

Source files for this project include:

Thus, the following lines in the XML file are required to reference these source files:

  <segment-items>
    <segment-item src="menu.mpg" id="segment-menu"/>
  </segment-items>
  <sequence-items>
    <sequence-item src="video1.mpg" id="sequence-video1"/>
    <sequence-item src="video2.mpg" id="sequence-video2"/>
    <sequence-item src="video3.mpg" id="sequence-video3"/>
  </sequence-items>
In this menu structure (as shown in figure 4):
  • the menu (a still image: "segment-menu") is looped once (as represented by the blue circular arrow).  Still images must only be looped once.
  • afterwards, it waits for 60 seconds before it timeouts to video1
  • pressing "1", "2" and "3" goes to video1, video2 and video3 respectively.
  • pressing "default" goes to video1
  • the video clips chain to form a multitrack sequence (n = next and p = prev in figure 4)

Thus, the <pbc> of this structure can be authored as:

<pbc>
    <selection id="menu">
      <bsn>1</bsn>
      <default ref="video1"/>
      <timeout ref="video1"/>
      <wait>60</wait>
      <loop jump-timing="immediate">1</loop>
      <play-item ref="segment-menu"/>
      <select ref="video1"/>
      <select ref="video2"/>
      <select ref="video3"/>
    </selection>

    <playlist id="video1">
      <next ref="video2"/>
      <wait>0</wait>
      <play-item ref="sequence-video1"/>
    </playlist>
    <playlist id="video2">
      <prev ref="video1"/>
      <next ref="video3"/>
      <wait>0</wait>
      <play-item ref="sequence-video2"/>
    </playlist>
    <playlist id="video3">
      <prev ref="video2"/>
      <next ref="menu"/>
      <wait>0</wait>
      <play-item ref="sequence-video3"/>
    </playlist>
</pbc>
Simple Menu -- figure 4

 

Conclusions

By following the instructions in this guide and some extrapolation, self made menus should be easily accomplished.  A simple menu is functionally the largest difference between a PBC enabled VCD versus and PBC disabled one.  It transforms a VCD from the video equivalent of an audio CD, to something that responds to human interaction.   Furthermore, it allows the VCD author full control of the manner in which the video and other media is to be displayed rather than leaving it to the whims of the stand-alone player (and/or the audience!)  The effect contributed by a simple menu is the difference between active and passive, for both the author and audience.

Once the simple menu is mastered, I strongly recommend progressing to more complex menus.  A guide on the multi-menu VCD is available here.

 


Michael Tam <vitualis (at) michaeltam.com>
anti-spam device - replace (at) with @ to send me e-mail

(c) 20 December, 2002