Some of the more esoteric terms and concepts you may come across in DVDVideo.

DVD-Video requires files in MPEG-2 program stream format, with a pack size of 2048 bytes, the same size as a sector on the disc. Packs are in turn grouped together into a "VOBU" (Video Object Unit): this always begins with a pack for the navigation stream, followed by packs for the other streams (video, audio, subpicture). Thus, the multiplexing happens between packs in a VOBU, and the VOBU is the smallest unit that a player/decoder can work with at once. A VOBU should contain at least one complete GroupOfPictures, with the maximum GOP length being 18 frames/36 fields for NTSC, and 15 frames/30 fields for PAL. Typically each VOBU contains one GOP with a length of 0.5 seconds.

One or more consecutive VOBUs make up a cell. This is the basic unit of playback in DVD-Video. A cell can have associated program instructions in the virtual machine language, for example telling the player to keep looping the same cell, or jump to another cell.

The cell structure is used, among other things, to define parts of titles (PTTs), which ordinary users know as "chapters". Why they couldn't just call them chapters in the spec, I don't know...

A program chain (PGC) defines a sequence of cells and the program instructions associated with them. It also defines the palette of 16 colours available for use in subpictures. Typically one PGC defines one title (or menu) on the disc, though it is possible to chain multiple PGCs together (hence the name) to make up a title. PGCs are kept in the IFO file.

A PGC can also specify prohibited operations--that is, the user is not allowed to use controls like the fast-forward button to skip over this PGC. This is used to do things like display those obnoxious copyright warnings, and distributor logos. Some discs in the US even have ads that the viewer is forced to watch before getting to the content that they bought the disc for.

The first program chain (FPC) is a special PGC that contains commands that are executed when the disc is inserted into the player. This typically contains a command like "jump to main menu", or perhaps "jump to copyright warning sequence", which in turn jumps to the main menu.

Navigation Stream

The navigation stream contains a system header plus two kinds of packets: presentation control information (PCI) and data search information (DSI).

The PCI contains button and action definitions and subpicture highlight settings--remember that the subpictures themselves are stored in their own streams.

The DSI contains offsets to preceding and following VOBUs at various predefined time differences, used for trick play (scan forward/backward) functions.

More on Subpictures

The palette of 16 available colours (from which the subpicture uses 4) is defined in the header of the PGC.

A subpicture stream actually consists of a series of drawing commands. These commands do not make up a programming language--there are no variables or conditionals etc. They are simply interpreted in linear sequence. Commands do things like "set colours", "set contrast (transparency)" and "draw pixels into this rectangular area". Thus, transparent areas of the subpicture are defined simply by not drawing into them.

Subpicture pixels are run-length compressed, and the complete subpicture image must fit into less than 65536 bytes. Any image that cannot be compressed to fit within this restriction (in the worst case, an image could take up to 103680 bytes for PAL or 86400 bytes for NTSC) is simply not allowed.

Alternative subpicture streams can not only be used for subtitles in alternative languages, they can also be alternative ways of presenting the same information depending on how a widescreen (16:9) movie is presented on a 4:3 screen. In this situation, the player may either “letterbox” the movie (show it scaled to fit the width of the screen, centred with unused black areas above and below), or do “pan and scan” (scaled to fit the full height of the screen, with parts chopped off at the sides to follow dynamically-changing offset information encoded in the MPEG video stream), and each option can have its own version of a subpicture stream. In all cases, the subpicture coordinates fill the visible screen, not necessarily the video area. In particular in the letterboxed case, the subpicture coordinates still fill the 4:3 screen, so they can appear in the black areas.

More on Menus

Menus are implemented as subpictures superimposed on top of a video background. There is a single subpicture defining the appearance of all menu buttons, with a set of 4 colours appropriate to their default (non-selected) state. Two additional sets of 4 colours each, to be used in the highlighted and selected (when the user presses the "OK" or "Enter" button on the remote with a menu button selected) states respectively, are specified in PCI packets in the navigation stream. The actual area of each button is defined as a rectangle in a field in the PCI packet; this is what selects what portion of the subpicture to show in which colours when a button is in a particular state.

More on Buttons

Buttons are built in terms of subpictures, but have additional constraints. Every button must belong to a button group, of which there can be no more than three in a menu. All buttons in the same group share the same colour scheme.

Each button definition in the PCI packet also lists the adjacent buttons (if any) in each of the up, down, left and right directions. This is used to switch the button selection when the user presses the corresponding key on the remote.

A button can be defined as an auto-action button. That is, the button function is invoked as soon as it is selected by the user, without having to press the "OK" key on the remote. This is used, for example, for "next page" and "previous page" options to implement multi-page menus.

More on Audio

DVD-Video is based on MPEG-2 files, and can use MPEG (specifically, MPEG Audio Layer 2) for its audio format. But it also allows for other audio formats: Dolby AC-3, DTS and uncompressed linear PCM (LPCM).

Instead of defining extensions to the MPEG audio stream format to cater for these options, DVD-Video puts these in an additional private stream in the MPEG file.

lib/main.php:944: Notice: PageInfo: Cannot find action page

lib/main.php:839: Notice: PageInfo: Unknown action