ILMH263Encoder Interface

This is the interface for the LEAD H263 Encoder.

Interface Properties:

Type

Property name

Description

VARIANT_BOOL

UseQuality

Set to TRUE to use quality-based compression (VBR = variable bitrate). In this case, the quality is given by the UsePredefinedQuality, PredefinedQuality and QualityFactor properties.

Set to FALSE to use bitrate-based compression (CBR = constant bitrate). In this case, the bitrate is given by the PredefinedBitrate and BitrateValue properties.

VARIANT_BOOL

UsePredefinedQuality

(Used only if UseQuality is TRUE). Set to TRUE to use a predefined quality through PredefinedQuality.

Set to FALSE to use a custom quality factor through CustomQuality.

eQUALITY

PredefinedQuality

(Used only if UseQuality is TRUE and UsePredefinedQuality is TRUE). Use this property to choose one of the predefined quality options. See the eQUALITY enumeration for possible values.

long

CustomQuality

(Used only if UseQuality is TRUE and UsePredefinedQuality is FALSE). Use a custom quality factor. The value ranges from 1 (best quality, lowest compression) to 31 (worst quality, highest compression).

VARIANT_BOOL

UsePredefinedBitrate

(Used only if UseQuality is FALSE). Set to TRUE to use a predefined bitrate through PredefinedBitrate.

Set to FALSE to use a custom bitrate through CustomBitrate.

eBITRATE

PredefinedBitrate

(Used only if UseQuality is FALSE and UsePredefinedBitrate is TRUE). Use this value to set the desired compressed video rate to one of the predefined bitrates. See the eBITRATE enumeration for possible values.

long

CustomBitRate

(Used only if UseQuality is FALSE and UsePredefinedBitrate is FALSE). Use this value to set the desired compressed video rate in bits per second.

VARIANT_BOOL

UsePredefinedSpeed

Set to TRUE to use a predefined speed through PredefinedSpeed.

Set to FALSE to control the speed using the UseUnrestrictedMotionVector, UseAdvancedIntraCoding, UseAdvancedPredictionMode, UseDeblockingFilter properties.

eSPEED

PredefinedSpeed

(Used only if UsePredefinedSpeed is TRUE). Use this property to set the speed to one of the predefined values. See the eBITRATE enumeration for possible values.

VARIANT_BOOL

UseUnrestrictedMotionVector

(Used only if UsePredefinedSpeed is FALSE). If TRUE, motion vectors are allowed to point outside the picture. The edge pixels are used as prediction for the "not existing" pixels. With this mode, a significant gain is achieved if there is movement across the edges of the picture, especially for the smaller movies.

VARIANT_BOOL

UseDeblockingFilter

(Used only if UsePredefinedSpeed is FALSE). If TRUE, the blocky artifacts generated at higher compression are reduced by using an adaptive filter across block boundaries. Use this option to improve the video quality at low bit rate (high compression).

VARIANT_BOOL

UseAdvancedIntraCoding

(Used only if UsePredefinedSpeed is FALSE). If TRUE, the compression efficiency for INTRA macroblock encoding is improved by using spatial prediction for DCT (Discrete Cosine Transform) coefficient values.

VARIANT_BOOL

UseAdvancedPredictionMode

(Used only if UsePredefinedSpeed is FALSE). If TRUE, Overlapped Block Motion Compensation (OBMC) is used for the luminance part of P-pictures. Four 8x8 vectors instead of one 16x16 vector are used for some of the macroblocks in the picture. The encoder has to decide which type of vectors to use. Four vectors use more bits, but give better prediction (compression).

long

InputFrameRate

(Read-only). Use this property to obtain input frame rate in frame/sec, which can be used to determine how to set the OutputFrameRate property.

float

OutputFrameRate

Use this property to control the output frame rate. You can set the output frame rate to be the same as the input frame rate (-1) or you can set it to particular output frame rate (if > 0). Note that you should set the output frame rate to be less than the input frame rate (to get better compression). It is not very useful to set the output frame rate to the less than the input frame rate.

VARIANT_BOOL

UseRTP

If TRUE, the encoder packetizes an H.263 video stream with Real-Time Transport Protocol (RTP) headers. This option should be used when transmitting H.263 video streams over the Internet.

VARIANT_BOOL

UseSuperCompression

Set to TRUE, to enable the high compression mode, which is a non-standard extension introduced by LEAD Technologies, Inc. to the H.263 compression algorithm. This will generate smaller video, but only the LEAD H.263 Decoder can decode this video. The video generated in this mode has a small quality degradation (especially when there is text), but the compression gain is significant. This mode is very useful for achieving lower bitrates.

Set to FALSE to disable this mode. The default is FALSE.

eIDISTANCEUNIT

IDistanceUnit

If set to UNIT_FRAMES, the IDistance property sets the distance between I frames in frames.

If set to UNIT_SECONDS, the IDistance property sets the distance between I frames in seconds.

long

IDistance

Use this to set the interval for I frames. The IDistanceUnit property contains the unit for this property (seconds or frames). The distance between two consecutive I frames is sometimes referred to as the Key Frame interval. I (Intraframe) frames are encoded independently without any reference to a previous frame or forward frame. All the frames between I frames are P and B frames. P (Predictive) frames are encoded using the previous frame as reference. P frames are compressed more than I frames. B (Bi-directional) frames are encoded using both previous and next frames as reference and they are better compressed than I and P frames.

If distance between I frames increases, the compression ratio increases. However, a large distance between I frames has its disadvantages:

  • If some I frame is lost before reaching the decoder (typically due to a noisy or an unreliable channel), the decoder has to wait a long time without displaying anything until the next I frame comes.

  • A large key frame interval will make seeking, or searching through the video data, slower.

long

PDistance

Use this to set the number of B frames between two consecutive P frames. The unit for this property is always frames. If set to 0, the compressor will generate only I and P frames.

VARIANT_BOOL

SorensonOutput

Set to TRUE, to generate Sorenson video used by Flash (FLV) files. This video is a modified form of the H.263 compression. Set to FALSE to generate regular H.263 video. The default is FALSE.

eQUALITY enumeration

Value

Description

PERFECTQUALITY

[0] Very good quality.

Equivalent to a custom quality factor of 4.

QUALITYMOREIMPORTANTTHANSIZE

[1] Good quality, better compression than PERFECTQUALITY.

Equivalent to a custom quality factor of 5.

QUALITYSIZEEQUALLYIMPORTANT

[2] Good quality, better compression than QUALITYMOREIMPORTANTTHANSIZE.

Equivalent to a custom quality factor of 6.

SIZEMOREIMPORTANTTHANQUALITY

[3] Decent quality, better compression than QUALITYSIZEEQUALLYIMPORTANT.

Equivalent to a custom quality factor of 9.

HIGHESTCOMPRESSION

[4] Highest compression (lowest quality).

Equivalent to a custom quality factor of 31.

eBITRATE enumeration

Value

Description

MODEM_56K

[0] 56K modem. Equivalent to bitrate of 56000.

ISDN_128K

[1] 128K ISDN line. Equivalent to bitrate of 128000.

ISDN_256K

[2] 256K ISDN line. Equivalent to bitrate of 256000.

DSL_384K

[3] 384K DSL line. Equivalent to bitrate of 384000.

CABLE_768

[4] 768K Cable line. Equivalent to bitrate of 768000.

T1_1500K

[5] T1 line. Equivalent to bitrate of 1500000.

WIRELESS_802_11B_11M

[6] Wireless 801.11b network card. Equivalent to bitrate of 11000000.

T3_45M

[7] T3 line. Equivalent to bitrate of 45000000.

WIRELESS_802_11G_54M

[8] Wireless 801.11g network card. Equivalent to bitrate of 54000000.

LAN_100M

[9] 100Mbps network card. Equivalent to bitrate of 100000000.

LAN_1G

[10] 1Gbps network card. Equivalent to bitrate of 1000000000.

 

eSPEED enumeration

Value

Description

HIGHQUALITY

[0] High quality option. All the settings are turned on.

QUALITYMOREIMPORTANTTHANSPEED

[1] Good quality. Turn on all the options except the deblocking filter.

QUALITYSPEEDEQUALLYIMPORTANT

[2] Compromise between quality and speed. Only Unrestricted MV and Advanced Prediction modes are turned on.

SPEEDMOREIMPORTANTTHANQUALITY

[3] Favor speed at the expense of quality. Only Unrestricted MV is on.

HIGHSPEED

[4] Highest speed. No optional mode is turned on.

 

eIDISTANCEUNIT enumeration

Value

Description

UNIT_FRAMES

[0] The unit for the IDistance property is frames.

UNIT_SECONDS

[1] The unit for the IDistance property is seconds.

 

Constants   

Type

Value

Description

long

MINQUALITYFACTOR

[1] The minimum value for CustomQuality. This will generate the highest quality video and the lowest compression.

long

MAXQUALITYFACTOR

[31] The maximum value for CustomQuality. This will generate the lowest quality video and the highest compression.