Class DVDVideoAttributes
- Namespace
- VisioForge.Core.Types.MediaInfo
- Assembly
- VisioForge.Core.dll
Represents the comprehensive video format attributes of DVD content, including resolution, aspect ratio, frame rate, and encoding details.
public class DVDVideoAttributesInheritance
Derived
Inherited Members
Examples
// Analyze DVD video format
void AnalyzeVideoFormat(DVDVideoAttributes video)
{
// Determine video system
string system = video.FrameRate switch
{
25 => "PAL (625/50)",
29 or 30 => "NTSC (525/60)",
23 or 24 => "Film (24fps)",
_ => "Unknown"
};
Console.WriteLine($"Video System: {system}");
Console.WriteLine($"Resolution: {video.SourceResolutionX}×{video.SourceResolutionY}");
Console.WriteLine($"Aspect Ratio: {video.AspectRatio.Item1}:{video.AspectRatio.Item2}");
Console.WriteLine($"Compression: {video.Compression}");
// Check for widescreen content
if (video.AspectRatio.Item1 == 16 && video.AspectRatio.Item2 == 9)
{
Console.WriteLine("Widescreen content detected");
if (video.PanscanPermitted)
Console.WriteLine(" - Pan & Scan display allowed on 4:3 TVs");
if (video.LetterboxPermitted)
Console.WriteLine(" - Letterbox display allowed on 4:3 TVs");
}
// Check for closed captions
if (video.Line21Field1InGOP || video.Line21Field2InGOP)
{
Console.WriteLine("Closed captions available");
}
// Determine if this is film or video content
if (video.IsFilmMode)
{
Console.WriteLine("Film source (24fps with pulldown)");
}
else
{
Console.WriteLine("Video source (native frame rate)");
}
}
Remarks
DVD video attributes define the technical characteristics of the video stream stored on a DVD. These attributes are crucial for proper playback and display, as they inform the player how to decode and present the video content. The DVD specification supports specific combinations of resolutions, frame rates, and aspect ratios to ensure compatibility across all DVD players.
DVD Video Standards:
-
NTSC (525/60): Used in North America, Japan
- Resolutions: 720×480, 704×480, 352×480, 352×240
- Frame rates: 29.97 fps (interlaced), 23.976 fps (progressive) -
PAL (625/50): Used in Europe, Australia
- Resolutions: 720×576, 704×576, 352×576, 352×288
- Frame rates: 25 fps (interlaced or progressive)
Aspect Ratio and Display:
DVDs store video in specific resolutions but include metadata about how it should be displayed.
The actual pixel aspect ratio (PAR) differs from the display aspect ratio (DAR):
- 4:3 content: Standard TV format, displayed as-is
- 16:9 content: Widescreen, can be displayed as:
- Anamorphic: Full resolution stretched horizontally
- Letterbox: Black bars added within 4:3 frame
- Pan & Scan: Cropped to 4:3, following action
Compression and Quality:
DVDs primarily use MPEG-2 compression, though MPEG-1 is supported for lower quality content.
The video bitrate typically ranges from 3-9.8 Mbps, with an average around 5-7 Mbps for movies.
Higher motion content requires higher bitrates to maintain quality.
Special Features:
- Line 21 data: Closed caption information for hearing impaired
- Film mode flags: Indicate 24fps film content with 3:2 pulldown
- Source letterboxing: Pre-letterboxed content information
Properties
AspectRatio
Gets or sets the display aspect ratio (W:H) of the video content.
public Tuple<int, int> AspectRatio { get; set; }Property Value
Remarks
The aspect ratio defines the proportional relationship between the video's width and height as it should appear on screen. This is the Display Aspect Ratio (DAR), which may differ from the Storage Aspect Ratio (SAR) due to non-square pixels.
Standard DVD aspect ratios:
- 4:3 (1.33:1) - Traditional TV format
- 16:9 (1.78:1) - Widescreen TV format
Compression
Gets or sets the video compression format used for encoding the video stream.
public DVDVideoStreamCompression Compression { get; set; }Property Value
Remarks
DVD primarily uses MPEG-2 compression, which provides:
- Variable bitrate (VBR) encoding for efficient space usage
- Support for interlaced and progressive video
- B-frames for better compression efficiency
- Bitrates from 1-9.8 Mbps (average 4-8 Mbps for movies)
MPEG-1 is supported for compatibility but offers lower quality and is typically used only for bonus content or Video CD compatibility modes.
FrameHeight
Gets or sets the frame height in lines (rows of pixels).
public int FrameHeight { get; set; }Property Value
Remarks
This represents the total number of scan lines, including:
- Active video lines (visible picture)
- Vertical blanking interval (VBI)
- Overscan areas (typically not displayed)
The actual visible resolution is typically specified by SourceResolutionY, while FrameHeight includes the full transmitted signal.
FrameRate
Gets or sets the frame rate in frames per second.
public int FrameRate { get; set; }Property Value
Remarks
DVD supports several standard frame rates:
- 23/24 fps - Film content (actually 23.976 fps for NTSC)
- 25 fps - PAL video standard
- 29/30 fps - NTSC video standard (actually 29.97 fps)
Film content (24 fps) on NTSC DVDs uses 3:2 pulldown to convert to 29.97 fps. The IsFilmMode flag indicates when this conversion is present.
IsFilmMode
Gets or sets a value indicating whether the content originated from film (24/25 fps) or video cameras.
public bool IsFilmMode { get; set; }Property Value
Remarks
This flag helps video processors optimize playback:
-
Film Mode (true):
- Content shot at 24 fps (cinema) or 25 fps (PAL film)
- Progressive frames (not interlaced)
- May use 3:2 pulldown for NTSC (24→29.97 fps)
- Can be deinterlaced more effectively -
Camera/Video Mode (false):
- Content shot at video frame rates
- Typically interlaced (50i or 59.94i)
- Native video timing, no pulldown
Modern displays use this information to apply appropriate deinterlacing algorithms and motion processing, resulting in smoother playback of film content.
IsSourceLetterboxed
Gets or sets a value indicating whether the source video is pre-letterboxed within the encoded frame.
public bool IsSourceLetterboxed { get; set; }Property Value
Remarks
When true, the video has been letterboxed at the source, meaning black bars are encoded as part of the video image rather than added by the player. This affects how subtitles and menu overlays are positioned:
- Subtitles must be placed within the active picture area
- Menu highlights are constrained to the visible image
- The player cannot remove the letterbox bars
Pre-letterboxing was sometimes used for films with extreme aspect ratios (2.35:1) to ensure consistent presentation, but it wastes encoding bandwidth on black pixels.
LetterboxPermitted
Gets or sets a value indicating whether the picture can be shown as letterbox if the display aspect ratio is 4 x 3.
public bool LetterboxPermitted { get; set; }Property Value
Remarks
Letterboxing preserves the original widescreen aspect ratio by adding black bars above and below the picture on 4:3 displays. This ensures viewers see the complete image as the director intended, though at a smaller size.
When this flag is true, 4:3 TV owners can choose to view widescreen content with letterbox bars, seeing the full width of the original image. This is often preferred by film enthusiasts who want to see the complete composition.
Line21Field1InGOP
Gets or sets a value indicating whether there is user data in line 21, field 1 of the video signal.
public bool Line21Field1InGOP { get; set; }Property Value
Remarks
Line 21 is part of the vertical blanking interval (VBI) in NTSC video and is used to carry closed caption data for the hearing impaired. Field 1 typically contains the primary caption channel (CC1/CC2).
This data is encoded in the Group of Pictures (GOP) header in the MPEG stream, allowing closed captions to be synchronized with the video content.
Line21Field2InGOP
Gets or sets a value indicating whether there is user data in line 21, field 2 of the video signal.
public bool Line21Field2InGOP { get; set; }Property Value
Remarks
Field 2 of Line 21 typically contains secondary caption channels (CC3/CC4) or additional data services. This allows DVDs to provide multiple caption options, such as different languages or descriptive captions for the visually impaired.
Both fields together can provide up to 4 different caption channels, enabling rich accessibility features for diverse audiences.
PanscanPermitted
Gets or sets a value indicating whether the picture can be shown as pan-scan if the display aspect ratio is 4 x 3.
public bool PanscanPermitted { get; set; }Property Value
Remarks
Pan-scan is a method of adjusting widescreen content for 4:3 displays by cropping the sides and following the action. A human operator determines which portion of the widescreen frame to show at each moment, ensuring important action remains visible.
When this flag is true, 4:3 TV owners can choose to view the content in pan-scan mode, filling their entire screen but losing some picture information on the sides. This was important during the transition from 4:3 to 16:9 displays.
SourceResolutionX
Gets or sets the horizontal source resolution in pixels.
public int SourceResolutionX { get; set; }Property Value
Remarks
DVD horizontal resolutions and their typical uses:
- 720 pixels - Full D1 resolution, highest quality, most common
- 704 pixels - Cropped D1, removes analog blanking areas
- 352 pixels - Half D1, used for long-play modes or bonus content
The 720-pixel format includes pixels for analog blanking compatibility, while 704 pixels represents the active picture area. 352 pixels provides exactly half the horizontal resolution for reduced bitrate requirements.
SourceResolutionY
Gets or sets the vertical source resolution in pixels (lines).
public int SourceResolutionY { get; set; }Property Value
Remarks
DVD vertical resolutions by system:
- NTSC:
- 480 lines: Full resolution (interlaced or progressive)
- 240 lines: Half resolution (SIF - Source Input Format) - PAL:
- 576 lines: Full resolution
- 288 lines: Half resolution (SIF)
Half-resolution formats are primarily used for Video CD compatibility or extended play modes where reduced quality is acceptable.