ILMMPEG4Encoder Interface

This is the interface for the LEAD MPEG-4 Encoder.

Interface Properties:

Type

Name

Description

long

QFactor

The quality factor used in compressing the 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.; the lower the quality factor, the better the quality. Possible values range from 1 (best) to 31 (worst).

eQuantType

QuantType

The quantization method applied. Possible values are (members of the eQuantType enumeration):

Value

Meaning

LMP4_QUANTTYPE_Linear

Use H.263 quantization.

LMP4_QUANTTYPE_NonLinear

Use MPEG quantization.

 

double

OutputFrameRate

The desired output frame rate, in frames per second. Possible values range from 1.0 to 30.0. Pass -1 to make the output frame rate the same as the input frame rate.

eOutputFormat

OutputFormat

The encoder Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder. output type. Possible values are (members of the eOutputFormat enumeration):

Value

Meaning

LMP4_OUTPUTFORMAT_mp4v

Make the encoder output type the Standard MPEG4 video media subtype.

LMP4_OUTPUTFORMAT_LMP4

Make the encoder output type the LEAD proprietary MPEG4 video subtype. This allows super compression to be used.

LMP4_OUTPUTFORMAT_XVID

Make the encoder output type the XVID video subtype.

 

VARIANT_BOOL

SuperCompression

Enables/disables super compression, LEAD’s improvement to the MPEG4 video compression. When super compression is used, compressed video size is reduced noticeably with almost the same quality, and the encoding and decoding speed is enhanced.

Files generated using this option, will not be MPEG4 compliant: they can be decoded only by the LEAD MPEG4 Video Decoder Also known as a decompressor, this is a module or algorithm to decompress data..

Possible values are:

Value

Meaning

VARIANT_TRUE

Enable super compression. This is allowed only if the output format is set to LMP4_OutputFormat_LMP4.

VARIANT_FALSE

Disable super compression.

 

long

PFrames

Specifies the number of P frames between two successive I frames *.

long

BFrames

Specifies the number of B frames between two successive P frames *.

long

SearchWidth

The search block width used when determining if motion is occurring. The larger the block, the slower the encoding process. It is not recommended to use large values. The range is from 2 to the video stream width, in pixels.

long

SearchHeight

The search block height used when determining if motion is occurring. The larger the block, the slower the encoding process. It is not recommended to use large values. The range is from 2 to the video stream height, in pixels.

eMotionAlgorithm

MotionAlgorithm

The algorithm to be used when determining if motion is occurring. Possible values are (members of the eMotionAlgorithm enumeration):

Value

Meaning

LMP4_MOTIONALGORITHM_FullSearch

Use the full motion search algorithm (testing all possibilities). This option slows down the encoding process considerably.

LMP4_MOTIONALGORITHM_FastSearch

Use fast motion search.

 

eMotionAccuracy

MotionAccuracy

Motion estimation accuracy. Possible values are (members of the eMotionAccuracy enumeration):

Value

Meaning

LMP4_MOTIONACCURACY_FullPixel

One pixel accuracy.

LMP4_MOTIONACCURACY_HalfPixel

Half pixel accuracy (faster).

 

eMotionVectorPerMacroblock

MotionVectorPerMacroblock

Specifies how many motion vectors are used in the motion estimation algorithm. Possible values are (members of the eMotionVectorPerMacroblock enumeration):

Value

Meaning

LMP4_MOTIONVECTOR_OnePerMacroblock

Use one motion vector (fast).

LMP4_MOTIONVECTOR_FourPerMacroblock

Use four motion vectors (better quality, slower encoding).

Methods:

Name

Parameters

Description

WriteToRegistry

None

This method writes all of the encoder settings to the system registry. The next time the encoder is loaded, it retrieves the settings from the registry and applies them.

 

* To increase compression performance, MPEG4 uses Temporal Compression. Temporal compression is achieved by only encoding 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-4 video stream is comprised of I Frames, B Frames and P Frames:

 

So to increase the compression of MPEG-4 more B and P frames should be used by adjusting PFrames and BFrames properties.