Skip to content

Instantly share code, notes, and snippets.

@rlaphoenix
Last active April 4, 2024 21:27
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlaphoenix/eaa987f7fd365fcd6803576746471b8d to your computer and use it in GitHub Desktop.
Save rlaphoenix/eaa987f7fd365fcd6803576746471b8d to your computer and use it in GitHub Desktop.
The DVD-Video Bible, Written by @rlaphoenix

The DVD-Video Bible by PHOENiX

Table of Contents

Ref# Subject
1 Introduction
2 Analog Color Television Standards
3 Video Fields
4 Field and Frame rates
5 Telecine
6 Pulldown
7 Pullup

1. Introduction

First of all, DVD has many purposes including Video, Music, Music Videos, or data in general. DVD-Video is the distinction that it contains video and is aimed at video consumption on a DVD-Video player. Everything I talk about here is specifically about DVD-Video even if I don't specify that.

If you are unfamiliar with any term while reading, refer to the other subjects in the Table of Contents or the Term legend.

A. Quick look at support sheets

Video

Video MPEG-2 Part 2 MPEG-1 Part 2
Resolution (720/704/352) x (standards scan-line height) (352) x (standards scan-line height / 2)
Bitrate cap (kbit/s) 9,800 1,856
Bitrate mode CBR, VBR CBR, VBR
Profile@Level support Main@Main, Simple@Main --
Scan type support Progressive, Interlaced, or a mix of both Progressive
GOP max length NTSC: 36 fields, PAL: 18 fields NTSC: 18 frames, PAL: 15 frames
Aspect ratio 4:3, 16:9 4:3, 16:9
Playback Frame rate CFR, Interlaced, field/s rate must match standards field refresh frequency
Encoded Frame rate VFR or CFR, if it's not meeting playback rate's conditions, must use Pulldown flags

Audio

Audio PCM Dolby DTS Dolby Digital MPEG-1 Audio Layer II
Channels 1 to 8 2.0, 2.1, 5.0, 5.1, 6.1 1 to 5.1(6) 1 to 7.1
Max audio track bit rate (kbit/s) per title 6,144 2.0: 277.25
2.1: 503.25
5.x: 754.5
6.1: 1509.75
448 912
Sampling Rate (kHz) 48, 96 48, 96 48 48
Bits per sample 16, 20, 24 ? ? ?
Decoding Support Required Yes No Yes Only PAL player's require support

Color

Color Supported options
Color Spaces YCbCr
Chroma Subsampling 4:2:0
Bit depth (bits per plane) 8
Color primaries and transfer characteristics NTSC: #4 (ITU-R BT.470 M) or #6 (SMPTE 170 M)
PAL: #5 (ITU-R BT.470 B or G)
Matrix coefficients (RGB to YCbCr) #5 (ITU-R BT.470 B or G) or #6 (SMPTE 170 M)

Other features

Other features Limit
Bitrate cap per title 10.08 Mbit/s
Bitrate cap per angle 8 Mbit/s
Bitrate cap for subtitles 3.36 Mbit/s
Title count per disc 99
Video tracks per title 1
Audio tracks per title 8
Subtitle tracks per title 32
Chapters per title 99

B. More information

There's plenty more information available on the DVD-Video Wikipedia Page. It's worth reading up on the File system, Directory and file structure, Container, and more.

This bible is specifically showing you cut down formatted chunks of information that is more related to encoding, decoding and what not.

2. Analog Color Television Standards

Feature NTSC PAL
Signal type Interlaced Interlaced
Field refresh frequency 59.94 Hz (60/1.001) 50 Hz (50/1)
Fields per second 59.94 (60/1.001) 50 (50/1)
Frames per second 29.97 (30/1.001) 25 (25/1)
Frame scan-line count 525 625
Frame Scan-line height 480 576
Pros Temporal resolution and frame rate Vertical resolution

DVD-Video was aimed for compatibility for at-the-time standard analog color television standards. Not all CRT's are alike, they each have a standard to follow. Modern display's can be used if the display still uses SCART connection or by using DVD players that provide a modern HDMI output.

The DVD must be encoded to be compatible with the CRT it's aimed for use on, which is why DVD uses region-locking, to help ensure a DVD is only sold where it is supported by the CRT.

So which type of DVD should you get if you have the option?

My personal recommendation is to get a DVD that is made for whatever standard is used in the DVD's original production country. For example, American Dad! (2005) is an American animated comedy that was animated primarily overseas but managed in the Americas that is part of the NTSC region, the PAL DVD's I have taken a look at of American Dad! are upscales and possibly transcoded from NTSC resolution, this came with it compression artifacts, color inaccuracies, 4%~ speedup and edge-halo making it much much worse to watch even though it's resolution is higher.

3. Video Fields

A video field, usually just referred to as "field", is an image that was split from a frame.

A field can be either the odd-numbered or even-numbered lines of a frame. When weaved back together results in one frame commonly termed interlaced.

Old television sets and monitors

CRT Television sets would display each field by overlapping them after another at the Television standard's polling-Hz.

They have a unique effect where the previous fields would slowly fade out after being scanned, this caused an effect of showing each field and barely being noticable as each field tended to blend together and produce a smooth motion effect.

Modern displays

Modern displays expect progressive-scan (full-frame, no fields) scanning. When they are given interlaced footage, the fields are acted as if they are full frames instead of part-frames as the unique effect on CRT Television sets does not exist in progressive-scan displays.

Displaying on modern displays

If the footage provided is played as is, it will show each field one after another, meaning the frame-rate will be double, but frame-height will be half the height. Since it will be alternating odd and even frames it will look as if the footage is shifting up and down by 1 pixel every frame.

If the footage is played by weaving each field together, you will often notice what's termed as combing or mice-teeth (often called interlacing interchangeably) on high motion scenes but frame-rate and frame height will be correct.

So what's the answer? There isn't and never will be a perfect solution, you cannot recover information that doesn't exist and expect it to look perfect. However, there are various ways to make it watchable on modern displays:

  • Weave - Show both fields per frame, it's often done by default by software or when displaying it on video players. Results in noticeable mice-teeth.
  • Bob - Simply show each field as a frame, the height of the result will be half the height of the video as explained before each field is half the information (half the pixels vertically) of one frame.
  • Discard/Odd or Even Fields Only - Delete every odd or even field and stretch the frame to double the height to achieve the original height. This should never be used, you will always lose 50% of the information vertically.
  • Blend/Average/Combine Fields - Both fields are overlaid together, Tends to look as if frames were blended. Often also only done on the mice-teeth areas. It's a good cheap result if speed is everything to you.

There are various more methods out there but these are the most commonly looked into.

4. Field and Frame rates

So how would one take a video that isn't compliant with the DVD field/frame rate and make it compatible? The answer is Telecine/Pulldown.

For example if you want to take a 24 frame/s video (Progressive FILM) and prepare it for NTSC consumption:

  1. Attain 24000/1001 frame/s by deleting 1 in every 1000 frames or slowing down the video by 1.001 frame/s.
  2. Attain 60000/1001 field/s (30000/1001 frame/s) by applying Pulldown 2:3.

More information on Telecine and Pulldown can be found below.

5. Telecine

Telecine (/ˈtɛləsɪni/ or /ˌtɛləˈsɪniː/) is the process of transferring motion picture film into video, [Wikipedia].

A. Telecine types

Soft-Telecine

The film frames are stored on the video at the original film rate in the original progressive format, untouched, with special flags inserted into the MPEG-2 video stream that instructs the DVD player to repeat certain fields so as to accomplish the required pulldown during playback. Only MPEG-2 (MPEG version 2) supports Soft-Telecine. Soft-Telecine video's retain more information as they aren't interlaced resulting in a better condition video. IVTC'ing is not required.

Hard-Telecine

The DVD video is encoded and stored at the playback framerate (30000/1001 frame/s for NTSC, 25 frame/s for PAL), which is already telecined by duplicating the fields with a pulldown technique. Since it's encoded interlaced, some information may be lost on interlaced frames resulting in a lower condition video. IVTC'ing is required if you want to obtain the original FILM frame rate.

Inverse-Telecine

Inverse-Telecine (a.k.a. ivtc, reverse telecine) is the same process as pullup but specific to the process of telecined video back to FILM frame rate.

6. Pulldown

Pulldown is the process of creating specific amounts of fields from the given frames to change the frame rate. It is somewhat standardised. Pulldown is simply a string of digits seperated with :.

Syntax

Pulldown x:y:z Each number represents a frame and the number represents the amount of fields to create from that frame.

Examples

Pulldown 2:3 (2 cycle pulldown):

This is commonly used for FILM to NTSC frame rates. The frame rate would first need to be 24000/1001 for FILM to NTSC specifically however, and that can be achieved by either deleting 1 in every 1000 frames or slowing down the video by 1.001 frame/s.

With Pulldown 2:3 it creates two fields from the first frame, and three fields from the second frame. This results in 2+3=5 fields being returned from 2 frames, two more frames will need to be provided to return 10 fields (5 frames) from the total 4 frames.

visual example

Pulldown 2:2:2:2:2:2:2:2:2:2:2:3 (12 cycle pulldown):

This is commonly used for FILM to PAL frame rates. This is much more efficient than FILM to NTSC as no slowdown or frame deletions are needed, however it seems that this Pulldown is somewhat modern and most DVD's out there would have converted frame rates by other means, the popular one being speeding the video and audio up by about 4%.

With Pulldown 2:2:2:2:2:2:2:2:2:2:2:3 it creates two fields for the first 11 frames, and three fields from the 12th frame. It essentially adds 1 more field for the last frame. This results in 2+2+2+2+2+2+2+2+2+2+2+3=25 fields being returned from 12 frames, 12 more frames will need to be provided to return 50 fields (25 frames) from the total 24 frames.

7. Pullup

Pullup (a.k.a reverse pulldown, inverse-pulldown) is the process of removing the frames (or fields) created by pulldown from videos, reconstructing the original frame rate. This is usually done to remove duplicate frames to save file space and compress-ability but isn't strictly speaking necessary.


Term legend

Term Meaning
CBR Constant bit rate
CFR Constant frame rate
GOP Group of pictures
VBR Variable bit rate
VFR Variable frame rate

Written by PHOENiX · v0.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment