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 filter's 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:

mpeg2-3.png

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.

  • When the MPEG-1 radio button is checked, MPEG-1 compression is used. When selected, only the Custom MPEG-1 or VCD MPEG-1 options are available.

    • Custom MPEG-1 lets you control all the MPEG-1 compression options. A custom MPEG-1 file may or may not be compatible with VCD.

    • VCD (Video on CD) lets you create VCD-compatible files. VCD-compatible files use MPEG-1 compression, but have certain restrictions on compression options, the video size ( 352x240 for NTSC or 352x288 for PAL) and frame rate. The encoder will automatically resize the video if VCD output type is selected and the size of the video being compressed is not correct.

  • When the MPEG-2 radio button is checked, MPEG-2 compression is used. When selected, Custom MPEG-2, SVCD, DVD 1 and DVD 2 are available.

    • Custom MPEG-2 lets you control all the MPEG-2 compression options. A custom MPEG-2 file may or may not be compatible with SVCD or DVD.

    • SVCD (Super Video CD) lets you create SVCD-compatible files. SVCD files use MPEG-2 compression, but have certain restrictions on compression options, video size (480x480 for NTSC or 480x576 for PAL), aspect ratio (4:3 or 16:9) and frame rate (29.97fps for NTSC, 25fps for PAL). The encoder will automatically resize the video if SVCD output type is selected and the size of the video being compressed is not correct.

    • DVD lets you create DVD-compatible files that can be put on a 1-hour DVD. DVD files use MPEG-2 compression, but have certain restrictions on compression options, video size (must be 720x480 for NTSC or 720x576 for PAL), aspect ratio (16:9 or 4:3) and frame rate. The encoder will automatically resize the video if DVD output type is selected and the size of the video being compressed is not correct.

    • DICOM lets you create Digital Imaging and Communications in Medicine (DICOM) compatible mpeg2 files. The mpeg2 encoder setting is based on DICOM Part 5: Data Structures and Encoding (PS 3.5-2004), Supplement 42: MPEG2 Transfer Syntax and "Supplement 137: MPEG2 MP@HL Transfer Syntax".  

      • For SD, the video size must be less than 720x480 (NTSC) or 720x576 (PAL).

      • For HD, the video size must be 1920x1080 or 1280x720. The bitrate is typically between 15 to 40 Mbit/s and it must not exceed 80MBit/s.

      The encoder will automatically resize the video if DICOM output type is selected and the size of the video being compress is not correct.

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.

Enable Precision TimeStamps check box

If the Enable Precision TimeStamps check box is selected, the encoder will add precision time stamps to each compressed frame.

If the Enable Precision TimeStamps check box is cleared, the encoder will not add precision time stamps to each compressed frame (this is the default).

Refer to the Precision Time Stamps topic for more information on precision time stamps.

Current radio button

If this button is selected, the start value for the precision time sta.will be current time when the compression starts, this is equivalent of setting the precision time stamp start value to -1 (this is the default).

Precision time stamps value is in microseconds since Jan 1, 1970 and is relative to Coordinates Universal Time (UTC)

This property is only available if the Enable Precision TimeStamps check box is selected.

Custom radio button

If this button is selected, the start value for the precision time will be a custom value presented as a date-time value, and can be changed by clicking the Change button.

Precision time stamps value is in microseconds since Jan 1, 1970 and is relative to Coordinates Universal Time (UTC)

This property is only available if the Enable Precision TimeStamps check box is selected.

Change Button

Click this button to display a date-time selection dialog, The custom precision time will be viewed in the dialog and the value can be changed.

This button is only available if the Enable Precision TimeStamps check box is checked and custom radio button is enabled

The Custom Date-Time note below includes a figure that displays an example dialog.

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
Video Size

Acceptable
Aspect Ratio

Acceptable
Frame Rate

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

Custom Date-Time

To customize the start value of the precision time stamp, click the Change button to open a Date and Time Selector dialog, as shown in the following figure:

 

customdatetimeselector.png
 

The Date format must be in the form of M:D:Y. Use the spin edit boxes to change the values. Values for the Month (M) are between 1 and 12. Values for the Day (D)  are between 1 and 31. Values for the Year must be above 1970.

The Time format must be in the form of H:M:S. Use the spin edit boxes to change the values. Values for the Hour (H) are between 1 and 12. Values for the Minute (M) are between 0 and 59. Values for the Second (S) are between 0 and 59. AM or PM must be selected in the combo box.

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Filters C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.