MPEG Encoder

MPEG which stands for Moving Picture Experts Group, is the nickname given to a family of International Standards used for coding audio-visual information in a digital compressed format.

AVS/Express 6.0 has a new MPEG encoder that improves both encoding quality and encoding speed. The existing image_capture macro has been extended to include new GUI controls to enable the user to control some of the MPEG encoding parameters. The user can choose either constant bitrate/variable quality mode (CBR) and control the bitrate of the movie or the user can choose variable bitrate/constant (VBR) quality mode and control the quality of the movie. On Windows, the encoder is MMX and SSE accelerated.

The encoder is not tightly integrated into the rest of the animator library; it's a separate DLL on Windows and a separate shared library on Unix. Furthermore, the encoder uses a "plugin" interface that is the same as that used by the well-known bbMPEG encoder. The bbMPEG encoder can be downloaded from the bbMPEG home page. This makes it possible for for users to upgrade their encoder on Windows merely by downloading a new version of the DLL and replacing the one that comes with AVS/Express.

There is one crucial difference between using the AVS/Express version of the DLL and using the download version of the DLL. The download version of the DLL has its own integrated GUI. The integrated GUI has the advantage that it allows detailed control over the myriad MPEG encoding parameters and a help system that explains some of the parameters. The disadvantage is that any encoding settings done through AVS/Express will be ignored. Any parameter that a user can set through the AVS/Express GUI (discussed in the next section) can be set through bbMPEG's integrated GUI, but users may be surprised to find that their settings in the AVS/Express GUI have no effect.

High-level animator macros

The new encoder does not entail any new user-visible macros. The existing image_capture macro, in the ANIM_MODS library, has been extended. The image_capture macro works much as before; the chief user-visible changes are new GUI controls to enable the user to control some of the MPEG encoding parameters.

The first movie control is an option menu labeled "Mode" that allows the user to choose the encoding type. The choices are "AVI" and "MPEG-1", which have the same meaning as before.

The next movie control is the movie name, which is exactly the same as before.

When in AVI mode, there are no other movie controls, other than the "Generate Movie" button at the bottom. When in MPEG-1 mode, there are some new controls. The first new control is the "Bitrate/Quality" option menu. The first choice is "default settings", which results in CBR mode with a bitrate of 1.8 mbps. The second choice is "Specify Bitrate", which forces CBR mode and allows the user to choose a fixed bitrate (the quality will vary). The third choice is "Specify Quality", which forces VBR and allows the user to choose a fixed quality level, (the bitrate will vary).

When in the Bitrate/Quality choice is "Specify Bitrate", the next control is a slider that controls the bitrate in million bits per second (mbps). Its operation is self-explanatory.

When in the Bitrate/Quality choice is "Specify Quality", the next control is a slider that controls the quality. This is actually the MPEG macroblock quantization level. Valid values are from 2 to 31. Low values of this variable mean higher quality and higher bitrate, so 2 is the highest quality and 31 is the lowest quality.

When the Bitrate/Quality choice is either "Specify Bitrate" or "Specify Quality", the next control is a slider that controls the MPEG VBV buffer size in units of 16k bits. The meaning of this parameter is confusing because it is used to help predict if the MPEG decoder might suffer buffer overflows or underflows. VBV buffer over/under flows are more commonly a problem when in CBR mode. If significant artifacts are present in the generated movie, try increasing this parameter.

The last movie control is the "Generate Movie" button, which works exactly the same as before.

Mid-level animator macros.

There are no new mid-level macros, but the imcapParam macro, in the ANIM_MACROS library, has been extended to support new MPEG parameters.
 

int movie_mode
This parameter previously existed. It means 0 for AVI and 1 for MPEG-1. The default is 1.
If the mode is AVI, the MPEG compression is not used at all and the rest of the parameters discussed here
are not relevant.

int movie_vbr
Variable bitrate (VBR) flag. 0 means CBR mode; encoding with a constant bitrate/variable quality algorithm.
1 means VBR mode; encoding with a variable bitrate/constant quality algorithm.

float movie_bitrate
Bitrate when in CBR mode. Units are bits per second multiplied by 1e6, so a value of 0.5 would mean
a bitrate of 500,000 bps. A value of 0.0 gives the defaults that are appropriate for the given movie_mode.
Ignored when in VBR mode.

int movie_quality
MPEG macroblock quantization level when in VBR mode. Valid values are from 2 to 31. Low values
of this variable mean higher quality and higher bitrate. 0 means use the default value. Ignored when in CBR mode.

int movie_buffer
Size of the MPEG Video Buffering Verifier buffer multiples of 16 kbits. This parameter is
is used to help predict if the MPEG decoder might suffer buffer overflows or underflows.
Sensible values are from 20 to 200. 0 means use the default value.

Low-level animator modules.

There are no new low-level modules, but the ImagCap module, in the ANIM library, has been extended to support new MPEG parameters.

int LMovieMode
This parameter previously existed. It means 0 for AVI (only on Windows) and 1 for MPEG-1. The default is 1.
If the mode is AVI, the MPEG compression is not used at all and the rest of the parameters discussed here
are not relevant.

int LMovieVariableRate
Variable bitrate (VBR) flag. 0 means CBR mode; encoding with a constant bitrate/variable quality algorithm.
1 means VBR mode; encoding with a variable bitrate/constant quality algorithm.

int LMovieBitRate
Bitrate when in CBR mode. Units are bits per second (not scaled). A value of 0 gives the defaults that
are appropriate for the given movie_mode. Ignored when in VBR mode.

int LMovieQuality
MPEG macroblock quantization level when in VBR mode. Valid values are from 2 to 31. Low values
of this variable mean higher quality and higher bitrate. 0 means use the default value. Ignored when in CBR mode.

int LMovieBuffer
Size of the MPEG Video Buffering Verifier buffer multiples of 16 kbit. This parameter is used
to help predict if the MPEG decoder might suffer buffer overflows or underflows.
Sensible values are from 20 to 200. 0 means use the default value.

Integration/Compatibility issues

Currently the IBM/AIX compiler is not able to compile the new encoder, due to its lack of support for C++ namespaces. On the IBM, the old AVS/Express encoder from version 5.1 is still used.
 

*note: It is recommended that you update to the latest version of Windows Media Player available for your OS.