LEADTOOLS Filters Help > Filters, Codecs and Interfaces > Video Codecs > MPEG-2 > LEAD MPEG-2 Encoder User Interface (3.0) |
The Encoder property page provides a user interface for changing the filter's attributes.
Changes will be applied only when the filters state is stopped. Changes can be set permanently by clicking Apply or OK, or abandoned by clicking Cancel. Positioning the mouse pointer over a control displays general information about that control. The property page is shown in the following figure:
The following table shows the controls and their descriptions:
Control |
Description |
Constant Bitrate radio button |
(Fixed output rate): If this radio button is selected, the compression level is constant and the storage requirements are easily predicted. This may affect the video quality of the more dynamic scenes and any pictures with lots of detail. The bit rate describes the amount of data used or transferred per second. It is directly related to the compression level. For example, a DV video (approximately 1:5 compression) would need 25 Mbit (3.12MB) per second. Using MPEG-2 compression at a bit rate = 6 Mbit/sec, the compression level will be 1:27. Therefore, the higher the bit rate, the lower the compression and the better the quality. The bit rate can be adjusted using the Bitrate edit box. Video quality also depends on the MPEG-2 profile used (4:2:2 or 4:2:0) and the distance between I frames and P frames. |
Bitrate edit box |
(Constant bitrate only) If the Constant Bitrate radio button is selected, this edit box can be used to set the bitrate in Kbits/sec. |
Use Default Bitrate check box |
(Constant bit rate only) If this is selected, the bitrate will be set to a default value in kbits/sec. Each output type (Custom MPEG-1, VCD, Custom MPEG-2, SVCD, DVD and DICOM) has its own default bitrate. This is useful for correcting a bitrate that was changed accidentally. |
Constant Quality radio button |
(Variable bit rate and Fixed video quality). If this radio button is selected the compression rate varies with scene content. For more dynamic scenes a high bit rate (low compression) is used to maintain consistent video quality. Setting a quality value in the Quality drop-down box can further control the quality. |
Quality Factor drop-down list box |
(Constant quality only) Sets the quality value for the encoded video when the Constant Quality radio button is selected. A value of 1 gives the best quality and the largest video size. A value of 31 gives the smallest file size with the lowest video quality. The default is 4. |
Variable Bitrate radio button |
If this radio button is selected, the compression rate varies with scene content. The Minimum Quality Factor, Maximum Quality Factor, Average Bitrate and Maximum Bitrate fields will control the video quality. The video quality will vary between the Minimum and Maximum quality factors, and the rate will not exceed the Maximum Bitrate. This option should be used when good video quality is required at a certain bit rate. (A common use for this is DVD creation). The best compression-quality performance results when this option is used. For this option, the compressor increases or decreases the quality factor automatically to maintain the highest quality at the desired bit rate (specified in the Average Bitrate and the Maximum Bitrate edit boxes). However, the quality factor will not go below the Minimum Quality factor or exceed the Maximum Quality factor. |
Avg Bitrate edit box |
(Variable bit rate only) Contains the average bitrate. The bitrate for the duration of the file will be equal (or very close to) the average bi rate. Simple scenes with little movement and few changes will be compressed using a lower bitrate (higher compression). Complex scenes with more movement or changes will be compressed using a higher bitrate. The highest bitrate will not exceed the maximum bitrate. If in doubt about what values to enter in these edit boxes, leave them unchanged. |
Min Quality Factor drop-down list box |
(Variable bitrate only) Sets the minimum quality value the MPEG-2 encoder should use. A value of 1 gives the best quality and the biggest video size. A value of 31 gives the smallest file size and low video quality. This quality factor will be the starting quality factor for the MPEG-2 compressor. This value should be always smaller than Maximum Quality Factor. |
Max Quality Factor drop-down list box |
(Variable bitrate only) Sets the maximum quality value the MPEG-2 encoder should use. A value of 1 gives the best quality and the biggest video size. A value of 31 gives the smallest file size and low video quality. This value should be always larger than Minimum Quality Factor. |
Output Video Type radio buttons |
The encoder is capable of generating MPEG-1 or MPEG-2 video.
|
Set Default Values command button |
When clicked, returns the selected Output VideoType to its default setting. |
Playback Frame Rate drop-down box |
Contains the allowable playback frame rates. The input video will be adjusted so it matches the selected frame rate. |
Profile drop-down box |
Contains a set of predefined profiles, or collections of compression tools used to make up the coding system. |
Level drop-down box |
Contains a set of predefined levels or source formats. |
Aspect Ratio drop-down box |
Indicates the desired aspect ratio during playback. The video will be adjusted if it does not match this desired aspect ratio, unless the Ignore Input Aspect Ratio check box is selected. |
Video Format drop-down box |
Specifies the type of TV system (NTCS or PAL) on which the file will be played. Use this option when producing a file to be played on TV, such as a DVD or VCD. |
Display Scan drop-down box |
Set to -Interlaced- if the mpeg2 file needs to be played on an interlaced device, like a TV set. Otherwise set this option to "Progressive" if the mpeg2 file needs to be played on a progressive display device like a Computer Monitor. |
Coding type drop-down box |
Frame: each video frame is encoded one frame (both even and odd rows are encoded together). Field: the even rows are encoded as one field and the odd rows are encoded as another field. This option can increase compression for interlaced videos. |
Threads drop-down box |
If Auto: the encoder will pick the best number of threads for your computer. If 'X' Encoding thread(s): the encoder will use 'X' encoding threads, where x is from 1 to 4. This property allows you to tweak the speed of the compression depending on the number of processors in your system. Encoding is faster on multiprocessor computers if more than one thread is used. |
Ignore Input Aspect Ratio check box
|
If selected, the input aspect ratio is assumed to be the same as the output aspect ratio. The encoder will not add black bars and the video can be distorted. If cleared, the input aspect ratio is assumed to be correct and the encoder will preserve the input aspect ratio when resizing or adjusting the video. Black horizontal or vertical bars may be added if the input aspect ratio does not match the output aspect ratio. |
Disable media type LMP2 check box |
If selected, the encoder will not offer the MEDIASUBTYPE_LMPG2 subtype. Only the MEDIASUBTYPE_MPEG2_VIDEO subtype will be offered. This is useful when using generic container formats like OGG that accept any media type. For example, if a conversion is performed with MPEG2EncoderFlag_DisableMediaTypeLMP2 set and OGG is used as an output format, then the MPEG2 stream will be saved using the MEDIASUBTYPE_MPEG2_VIDEO subtype. The MEDIASUBTYPE_MPEG2_VIDEO subtype can be moved to MPEG2 Program / Transport easily without video recompression. If cleared, the encoder will offer both media subtypes (MEDIASUBTYPE_MPEG2_VIDEO and MEDIASUBTYPE_LMPG2). This is the default setting. |
I Frame drop-down box |
Contains the number of frames between I frames. This value must be a multiple of the number of frames between the P frames set in the P Frame drop-down box. |
P Frame drop-down box |
Contains the number of frames between P frames. |
Notes:
The MPEG2 video streams have certain restrictions for video size, aspect ratio or frame rate. The encoder will automatically resize the video if it does not satisfy these requirements. Resizing can add horizontal or vertical black bars to ensure the output has the correct size and aspect ratio. Bresenham resizing is used.
The aspect ratio specified for MPEG2 video is the display output aspect ratio, not the aspect ratio of each individual aspect ratio. Good MPEG2 decoders will pay attention to the aspect ratio and resize the video size if it does not match the required aspect ratio. Set the aspect ratio depending on whether the video will be played on widescreen displays (16:9) or older 4:3 displays.
Examples:
A video that is 480x480 and has a 4:3 aspect ratio should be displayed as 640x480.
A video that is 480x480 and has a 16:9 aspect ratio should be displayed as 853x480.
A video that is 480x480 and has a "Square pixel" aspect ratio should be displayed as 480x480.
For more resizing options, use the LEAD Video Resize Filter.
Video Size, Aspect Ratio and Frame Rate Requirements
Output Type |
Acceptable |
Acceptable |
Acceptable |
DVD(NTSC) |
720 x 480 704 x 480 352 x 480 352 x 240 |
16 : 9 4 : 3 |
29.97 fps 23.976 fps |
DVD(NTSC) |
720 x 576 704 x 576 352 x 576 352 x 288 |
16 : 9 4 : 3 |
25 fps 24 fps |
SVCD (NTSC) |
480 x 480 |
4 : 3 16 : 9 |
29.97 fps |
SVCD (PAL) |
480 x 576 |
4 : 3 16 : 9 |
25 fps |
VCD (NTSC) |
352x240 |
Any supported by MPEG1 |
29.97 fps |
VCD (PAL) |
352 x 288 |
Any supported by MPEG1 |
25 fps |
DICOM (NTSC) |
720 x 480 or less |
4:3 (recommended) 16:9 |
29.97 fps |
DICOM (PAL) |
720 x 576 or less |
4:3 (recommended) 16:9 |
25 fps |
DICOM HDTV 720 |
1280 x 720 |
16:9 |
25 fps 29.97 fps 30 fps 50 fps 59.94 fps 60 fps
|
DICOM HDTV 1080 |
1920 x 1280 |
16:9 |
25 fps 29.97 fps 30 fps 50 fps 59.94 fps 60 fps
|
Custom MPEG2 (NTSC) |
1920 x 1152 or less |
Square Pixel 4 : 3 16 : 9 2.21 : 1 |
29.97 fps 30 fps 23.976 fps |
Custom MPEG2 (PAL) |
1920 x 1152 or less |
Square Pixel 4 : 3 16 : 9 2.21 : 1 |
25 fps 24 fps |
Table 2. Video Size, Aspect Ratio and Frame Rate Requirements