Enum DVDVideoStreamCompression
- Namespace
- VisioForge.Core.Types.MediaInfo
- Assembly
- VisioForge.Core.dll
Specifies the video compression format used for encoding DVD video streams.
public enum DVDVideoStreamCompressionFields
Other = 0-
Other or unspecified compression format not defined in the DVD-Video specification.
This value indicates a non-standard compression format or that the compression type could not be determined. Standard DVD players may not support such content.
MPEG1 = 1-
MPEG-1 video compression (ISO/IEC 11172-2), primarily used for Video CD compatibility.
MPEG-1 characteristics on DVD:
- Lower resolution: 352×288 (PAL) or 352×240 (NTSC)
- Constant bitrate: typically 1.15 Mbps
- Progressive scan only (no interlacing)
- Simpler compression algorithm than MPEG-2
- Compatible with Video CD players
MPEG-1 is included in the DVD specification for backward compatibility and is sometimes used for bonus content where longer duration is more important than video quality.
MPEG2 = 2-
MPEG-2 video compression (ISO/IEC 13818-2), the primary compression standard for DVD-Video.
MPEG-2 is the standard video codec for DVD-Video, offering:
- Full D1 resolution: up to 720×576 (PAL) or 720×480 (NTSC)
- Variable bitrate (VBR): 1-9.8 Mbps for optimal quality/size balance
- Support for both interlaced and progressive content
- Advanced motion compensation and prediction
- B-frames for better compression efficiency
- Closed GOP structure for better seeking and editing
MPEG-2 Main Profile @ Main Level (MP@ML) is used for standard DVDs, providing excellent quality for home theater viewing while fitting full-length movies on a single-layer (4.7 GB) or dual-layer (8.5 GB) disc.
Examples
// Analyze DVD compression and estimate quality
void AnalyzeVideoCompression(DVDVideoStream video, double videoBitrate)
{
switch (video.Compression)
{
case DVDVideoStreamCompression.MPEG2:
Console.WriteLine("MPEG-2 compression detected (DVD standard)");
// Evaluate quality based on bitrate and resolution
int pixels = video.SourceResolutionX * video.SourceResolutionY;
double bitsPerPixel = videoBitrate * 1_000_000 / (pixels * video.FrameRate);
string quality = bitsPerPixel switch
{
> 0.25 => "Excellent",
> 0.15 => "Good",
> 0.10 => "Fair",
_ => "Poor"
};
Console.WriteLine($"Video bitrate: {videoBitrate} Mbps");
Console.WriteLine($"Bits per pixel: {bitsPerPixel:F3}");
Console.WriteLine($"Expected quality: {quality}");
break;
case DVDVideoStreamCompression.MPEG1:
Console.WriteLine("MPEG-1 compression detected (Video CD compatible)");
Console.WriteLine("Limited to 352×288/240 resolution");
Console.WriteLine("Lower quality, suitable for extended play");
break;
case DVDVideoStreamCompression.Other:
Console.WriteLine("Non-standard compression format");
break;
}
}
Remarks
DVD video compression standards define how video data is encoded and stored on the disc. The DVD-Video specification primarily uses MPEG-2 compression, though MPEG-1 is supported for backward compatibility with Video CD and for certain low-bitrate applications.
Compression Format Comparison:
| Format | Characteristics and Usage |
|---|---|
| MPEG-2 |
- Primary DVD-Video codec - Supports up to 720×576 (PAL) or 720×480 (NTSC) - Variable bitrate: 1-9.8 Mbps - Supports interlaced and progressive video - I, P, and B frame types for efficient compression - Used for main features and high-quality content |
| MPEG-1 |
- Legacy format, Video CD compatible - Maximum 352×288 (PAL) or 352×240 (NTSC) - Constant bitrate: typically 1.15 Mbps - Progressive scan only - Lower quality but smaller file sizes - Used for long-play content or bonus features |
MPEG-2 Technical Details:
- Profiles: Main Profile @ Main Level (MP@ML) for standard DVDs
- Chroma Format: 4:2:0 color subsampling
- GOP Structure: Typically 12-15 frames (IBBPBBPBBPBB)
- Aspect Ratios: Supports both 4:3 and 16:9 with proper flagging
- Audio Sync: Maintains synchronization with multiple audio streams
Quality Considerations:
MPEG-2 on DVD typically allocates 4-8 Mbps for video, with the remaining bandwidth
used for audio (up to 6.144 Mbps) and subpictures (up to 3.36 Mbps). The total
maximum bitrate for all streams combined is 10.08 Mbps, limited by the 1× DVD drive speed.