Before we start our analysis we should review what we're looking for in terms of DVD-Video compliance. Any files that we can analyze with DGIndex have to be either MPEG-2 or MPEG-1. For DVD-Video compliance they need to have a legal resolution/framerate combination, bitrate, and audio format. There are three basic types of data streams that may be included on a DVD - Video, Audio, and Subpicture (normally used for subtitles). Since we don't have any subtitles and we're making a very basic disc, we won't have to worry about subpicture streams. That leaves us with video and audio streams to deal with for now.
All the streams that playback simultaneously for a given DVD title are discrete, meaning each one comes from a distinct and self-contained file. In order to keep them synchronized during playback and allow random access
it's necessary to multiplex them together. Multiplexing, or muxing, consists of dividing each stream into segments a fraction of a second long, and then weaving these sections together so that the first segment of video is followed by the first segment of the first audio stream, followed by each additional audio stream (up to 8), followed by each subpicture stream (up to 32). The second segment follows, written like the first with the second video segment followed by the second segment from each audio stream and then the same for each subpicture stream.
In order to make sure a DVD player can read all the information required to play each segment, the maximum bitrate for all streams combined, called the mux-rate, is set at 10.08Mbps (10,080,000 bits per second).
Audio requirements are slightly different for PAL and NTSC, although we'll treat them the same because the preferred formats are. Audio that's legal for DVD-Video is LPCM (Linear Pulse Code Modulation which is uncompressed), AC-3 (Dolby Digital), MPA (MPEG Audio), and DTS (Digital Theater Surround). LPCM and AC-3 are considered mandatory formats for both PAL and NTSC. Mandatory refers to the fact that all players with the DVD-V logo must be able to handle them. Legal formats that aren't mandatory are called optional. Players may, but don't have to handle DTS, or MPA for NTSC. Although MPA is a mandatory format for PAL, due to decoder issues MPA isn't as desirable as AC-3.
Video for DVD needs to have properties that match either PAL or NTSC televisions. That means the resolution and framerate need to be correct. For PAL this means a framerate of 25fps and resolution of 720x576, 704x576, 352x576, or 352x288. NTSC video needs to have a framerate of 29.97fps. Legal NTSC resolutions are 720x480, 704x480, 352x480, and 352x240. The video must also have an aspect ratio matching either SDTV (Standard Definition TV) or HDTV (High Definition TV). This means either 1.33 or 1.78. It must be encoded as MPEG-2, unless the lowest resolution for either television system is used, in which case MPEG-1 is required. Although DVD is intended to be an interlaced technology, MPEG-1 files are always progressive.
The MPEG video files must conform to a set of property ranges defined as an MPEG profile called Main@Main. MPEG compression can have different levels of precision (more precision = higher quality), and a profile primarily sets ranges for the precision of different properties. This way a particular decoder chip can be designed to work with only video that conforms to a standard set of properties. Fortunately using Main Profile @ Main Level, as DVD-Video does, is the default for MPEG-2 video and DVD's Full D1 (720x576/480) is the standard resolution for digitizing television signals. This means that most encoding tools are able to do the job.
The video frame may have an aspect ratio that matches either SDTV (Standard Definition TV) or HDTV. SDTV is either a PAL or NTSC compatible signal, and has an AR of 1.33 (1.33:1 or 4:3). HDTV has an AR of 1.78 (1.78:1 or 16:9). Although pure video signals will have one of those two aspect ratios natively, film generally uses aspect ratios of 1.37, 1.66, 1.85, 2.21, or 2.35. Full frame, or 1.37:1 AR film is easily converted to 1.33:1 SDTV. 1.66:1 and 1.85:1 AR film can have a very small amount of picture removed at the edges to fit HDTV. 2.35:1 film would require too much trimming to fit HDTV's 1.78:1 AR without losing an unacceptably large amount of picture. Instead it, and sometimes 2.21:1 AR film have borders added above and below the original film frame to give them the correct 1.78:1 AR.
Video streams will be constrained to a bitrate no higher than 10.08Mbps less the audio bitrate. Assuming AC-3 audio, which is what we'll be using, all the audio on our DVD should end up being 96kbps for mono or either 192kbps or 224kbps for stereo. Video has an additional bitrate limit of 9.8Mbps. Since our audio won't have a high enough bitrate to cause problems using that bitrate we don't have to take the audio bitrate into account, but we will have to figure out what size the eventual audio files will be so we can use that in future calculations.
MPEG video is composed of some pictures that are complete, and others that require those complete pictures to be drawn. Frames (pictures) that are complete by themselves are called I frames. Other frames are P and B frames. An I frame followed by one or more P and B frames is a Group Of Pictures, or GOP. DVD specs have rules about the size of these GOPs. For PAL you can only have 15 frames per GOP. On NTSC discs you may have as many as 18 frames per GOP.