libxvid


Xvid MPEG-4 Part 2 encoder wrapper.

This encoder requires the presence of the libxvidcore headers and library during configuration. You need to explicitly configure the build with --enable-libxvid --enable-gpl.

The native mpeg4 encoder supports the MPEG-4 Part 2 format, so users can encode to this format without this library.

The following options are supported by the libxvid wrapper. Some of the following options are listed but are not documented, and correspond to shared codec options. See for their documentation. The other shared options which are not listed have no effect for the libxvid encoder.

'b'
'g'
'qmin'
'qmax'
'mpeg_quant'
'threads'
'bf'
'b_qfactor'
'b_qoffset'
'flags'

Set specific encoding flags. Possible values:

'mv4'

Use four motion vector by macroblock.

'aic'

Enable high quality AC prediction.

'gray'

Only encode grayscale.

'gmc'

Enable the use of global motion compensation (GMC).

'qpel'

Enable quarter-pixel motion compensation.

'cgop'

Enable closed GOP.

'global_header'

Place global headers in extradata instead of every keyframe.

'trellis'
'me_method'

Set motion estimation method. Possible values in decreasing order of speed and increasing order of quality:

'zero'

Use no motion estimation (default).

'phods'
'x1'
'log'

Enable advanced diamond zonal search for 16x16 blocks and half-pixel refinement for 16x16 blocks. 'x1' and 'log' are aliases for 'phods'.

'epzs'

Enable all of the things described above, plus advanced diamond zonal search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion estimation on chroma planes.

'full'

Enable all of the things described above, plus extended 16x16 and 8x8 blocks search.

'mbd'

Set macroblock decision algorithm. Possible values in the increasing order of quality:

'simple'

Use macroblock comparing function algorithm (default).

'bits'

Enable rate distortion-based half pixel and quarter pixel refinement for 16x16 blocks.

'rd'

Enable all of the things described above, plus rate distortion-based half pixel and quarter pixel refinement for 8x8 blocks, and rate distortion-based search using square pattern.

'lumi_aq'

Enable lumi masking adaptive quantization when set to 1. Default is 0 (disabled).

'variance_aq'

Enable variance adaptive quantization when set to 1. Default is 0 (disabled).

When combined with 'lumi_aq', the resulting quality will not be better than any of the two specified individually. In other words, the resulting quality will be the worse one of the two effects.

'ssim'

Set structural similarity (SSIM) displaying method. Possible values:

'off'

Disable displaying of SSIM information.

'avg'

Output average SSIM at the end of encoding to stdout. The format of showing the average SSIM is:

Average SSIM: %f

For users who are not familiar with C, %f means a float number, or a decimal (e.g. 0.939232).

'frame'

Output both per-frame SSIM data during encoding and average SSIM at the end of encoding to stdout. The format of per-frame information is:

       SSIM: avg: %1.3f min: %1.3f max: %1.3f

For users who are not familiar with C, %1.3f means a float number rounded to 3 digits after the dot (e.g. 0.932).

'ssim_acc'

Set SSIM accuracy. Valid options are integers within the range of 0-4, while 0 gives the most accurate result and 4 computes the fastest.