LEAD MPEG-2 Encoder Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder.compressor Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder., this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder. (2.0)

The LEAD MPEG-2 Encoder Filter is a DirectShow filter for compressing video data using the MPEG-2 (ISO/IEC 13818-2) or MPEG-1 (ISO 11172-2) standard. The LEAD MPEG-2 Decoder Also known as a decompressor, this is a module or algorithm to decompress data. is a DirectShow filter for decompressing MPEG-2 video data.

MPEG-1 is the older standard and achieves higher compression than MPEG-2 (but at lower quality). MPEG-1 compression is used in VCD (video on CD).

MPEG-2 is the newer standard and has lower compression than MPEG-1 but the quality is much better than MPEG-1. MPEG-2 is a high quality video compression algorithm and is best suited for applications with higher bit rates or high-bandwidth usage. The most common applications include DVD-Videos, SVCD and digital TVs. The compressed video data can be stored inside MPEG, AVI, or Ogg files with the option of saving the file with or without the audio data.

The compression options for the LEAD MPEG-2 Encoder can be set manually through the encoder property page. The compression options can also be set programmatically using the ILMMPEG2Encoder interface.

Filter Interfaces

ILMMPEG2Encoder, ILMMCommon

Interface ID

IID_ILMMPEG2Encoder

Input Media Types

Type:
MEDIATYPE_Video
Subtypes:
MEDIASUBTYPE_YV12
MEDIASUBTYPE_YUY2
MEDIASUBTYPE_UYVY
MEDIASUBTYPE_RGB32
MEDIASUBTYPE_RGB24

Output Media Types

Type:
MEDIATYPE_Video
Subtype:
MEDIASUBTYPE_MPEG2_VIDEO
MEDIASUBTYPE_LMPG2

Filter CLSID

CLSID_LMMPEG2Encoder

Property Page CLSID

CLSID_LMMPEG2EncoderProperty

Executable

LENCMPG2.dll, DSKernel2.dll

Filter category

CLSID_VideoCompressorCategory

Header

ILEncMPEG2_2.h

 

Levels and Profiles

A MPEG-2 encoder capable of handling all resolutions, bit rates and frame rates up to HDTV would be too expensive for many simpler applications or hardware implementations. Therefore, the MPEG-2 standard was subdivided into levels and profiles. The MPEG-2 standard allows for four source formats, or Levels, to be coded; ranging from Limited Definition (todays VCR quality), to full HDTV, each with a range of bit rates. In addition to this flexibility in source formats, MPEG-2 allows for different Profiles. Each profile offers a collection of compression tools that together make up the coding system. A different profile means that a different set of compression tools is available. The four levels, including frame size and maximum bit rate, are defined in the following table:

Level

Maximum Frame size

(PAL / NTSC)

Maximum Bitrate

Significance

Low

352x288

352x240

4 Mb/s

CIF, consumer tape equiv.

Main

720x576

720x480

15 Mb/s

ITU-R 601, Studio TV

High 1440

1440x1152

1440x1080

60 Mb/s

4x 601, consumer HDTV

High

1920x1152

1920x1080

80 Mb/s

PROD. SMPTE

Most of today's work is done at the Main Level, which is designated for standard video. Within this level, the Main profile is used for many applications. The MPEG-2 encoder will automatically adjust the level if the video being encoded is bigger than the maximum size for the current level.

I Frames and P Frames

To increase the compression performance, MPEG-2 uses Temporal Compression. Temporal compression is achieved by encoding only the difference between successive frames instead of the frames themselves. This means that frames cannot be considered in isolation. A given picture is constructed from the prediction from a previous picture, and may be used to predict the next picture. An MPEG-2 video stream The portion of the file holding the video data. The video data might be compressed to save disk space. The data has to be decompressed using a video decompressor before you can play (see) it. is comprised of I Frames, B Frames and P Frames:

To increase the compression of MPEG-2, more B and P frames should be used. You do so by adjusting the "I Frame" and "P Frame" options on the Encoder property page:

For example if I frame is 12, and P Frame is 3, then video stream looks like the following:

I B B P B B P B B P B B I B B P B B P B B P B B ..

The distance between I frames must be a multiple of the distance between the P frames. The LEAD MPEG-2 Encoder will automatically adjust these values to preserve this relationship.

LEAD MPEG-2 Encoder User Interface

 

This filter is included as part of the following modules:

LEAD MPEG-2 Video Codec Module