Encoding Modes


Using Windows Media Encoder, you can encode audio and video content at either a constant bit rate (CBR) or a variable bit rate (VBR). The mode to use depends on the scenario you are targeting.

start sidebar
Choosing the Right Codec

With so many codecs to choose from, how do you decide which is best for your encoding needs? Because codecs are designed with a particular type of content in mind, any single codec rarely works efficiently for all typse of media. A codec that works well for music, for example, can produce good-quality speech, but probably will not compress the speech content to its absolute minimum size. For this reason, speech and music usually are handled by different codecs.

Windows Media Encoder 9 Series attempts to choose the best codec for you based on the information you provide when setting up your session. This information includes the destination of the encoded content, the encoding mode (CBR or VBR), the bit rate, and so on. But you can always change the selected codec by clicking the Edit button on the Compression tab of the Properties dialog box.

Which audio codec should you use? For typical stereo broadcast and Internet broadband applications, use the Windows Media Audio 9 codec. If the audio or film contains a high-resolution or multi-channel track, then use Windows Media Audio 9 Professional. Use Windows Media Audio 9 Voice for low-bit-rate delivery over dial-up modem or ISDN, and use Windows Media Audio 9 Lossless when you want to minimize compression artifacts.

Which video codec is best? In the vast majority of cases, including broadband applications, use the Windows Media Video 9 codec. The Windows Media Video 9 Screen codec is intended for more limited scenarios, such as when you want to encode mouse movements for computer application training.

end sidebar

Constant Bit Rate Encoding

CBR encoding is designed to work most effectively in a streaming scenario. As its name implies, this mode encodes content at a fairly constant bit rate. The amount of bit rate fluctuation is constrained by the buffer size specified during encoding (typically five seconds). The same bit rate is applied to all of the content being encoded, regardless of complexity. This is ideal for streaming because you can ensure that your stream stays within the required bandwidth limits.

The drawback of CBR encoding is that the quality of the encoded stream fluctuates because some pieces of content are more difficult to compress than others. A “talking head” video—just a person talking, such as a reporter during a newscast—is relatively simple to compress because there isn’t a lot of movement and the scene doesn’t change. A car race, however, is fast moving and requires more bits to encode each scene. In CBR encoding, the same number of bits would be applied to both types of content, which could mean that the talking head gets more bits than it really needs and the car race doesn’t get enough. Generally, these quality fluctuations are more pronounced at lower bit rates.

With CBR encoding, you can do one- or two-pass encoding. With one-pass encoding, the content passes through the encoder once, and compression is applied as the content is encountered. With two-pass encoding, the content is analyzed during the first pass, and then encoded in the second pass based on the data gathered during the first pass. Two-pass encoding can result in better quality because the encoder can allocate the bits more effectively within the window specified by the buffer. However, two-pass encoding takes longer because the encoder goes through all of the content twice. Two-pass encoding is not available for live broadcasts or when sourcing from devices unless you have enabled device control.

Variable Bit Rate Encoding

VBR encoding is most suited to scenarios in which preserving the quality of the source is more important than restricting the bandwidth or file size. For example, use VBR encoding when you are archiving content, or when you plan to distribute the content for downloading and playing either locally or on a device that has a constrained reading speed, such as a CD or DVD player. (You can also use the peak VBR encoding mode when you plan to stream the content.)

With VBR encoding, the bit rate fluctuates over the course of the stream, according to the complexity of the content. This is most advantageous when encoding content that is a mix of simple and complex data, such as video that switches between slow and fast motion. With VBR encoding, fewer bits are automatically allocated to less complex portions of the content, leaving enough bits available to encode more complicated portions. This means that content that has consistent complexity (for example, a “talking head” news story) would not benefit from VBR encoding.

When used on mixed content, VBR encoding produces a much better encoded output given the same file size when compared to CBR encoding. In some cases, you can end up with a VBR-encoded file that has the same quality as a CBR-encoded file, but with only half the file size.

There are three VBR encoding modes:

  • Quality-based VBR encoding

  • Bit rate-based VBR encoding

  • Peak bit rate-based VBR encoding

Quality-based VBR Encoding

This is the preferred method when you want to guarantee the quality of your encoded content, such as when you are archiving content. With quality-based VBR encoding, you specify a desired quality level (from 0 to 100). Then, during encoding, the bit rate fluctuates according to the complexity of the stream—a higher bit rate is used for intense detail or high motion, and a lower bit rate is used for simpler content.

The advantage of quality-based VBR encoding is that quality remains consistent across all streams for which you specify the same quality setting. The disadvantage is that you cannot predict the file size or bandwidth requirements of the encoded content before encoding. Quality-based VBR encoding uses one-pass encoding. It is recommended that you use quality settings of 91 and above with this mode.

Bit Rate-based VBR Encoding

This mode enables you to achieve the highest possible quality level while staying within a predictable average bandwidth. Use this mode when you are planning to create files that can be downloaded before being played, or to control the size of the output file.

With bit rate-based VBR encoding, you specify the desired average bit rate. At any point, the bit rate may exceed the average bit rate but the overall bit rate does not exceed the average bit rate. Bit rate-based VBR encoding uses two-pass encoding. In the first pass, the data complexities are analyzed. Then, in the second pass, the quality level is set to achieve the average bit rate. Bit rate-based VBR encoding is not suitable for live broadcasts.

Peak Bit Rate-based VBR Encoding

This option is best when the content will be played back on a device that has a constrained reading speed, such as a CD or DVD player. This mode is similar to bit rate-based VBR encoding, except that you also specify the peak bit rate. The encoder then determines the image quality that can be achieved without exceeding the peak bit rate. The bit rate does fluctuate during encoding, but does not exceed the specified peak bit rate. This enables content to be played in low-bit-rate streaming scenarios or on devices with limited computing power. Peak bit rate-based VBR encoding uses two-pass encoding.

Choosing the right encoding mode can be confusing. The choice really depends on the method with which you will distribute your content, as shown in the following table:

Encoding mode

When to use

One-pass CBR

Use for live broadcasts, when streaming to earlier versions of the Player or to devices, or for progressive downloads from a Web server.

Two-pass CBR

Use for on-demand streaming of files.

Quality-based VBR

Use for content you want to archive.

Bit rate-based VBR

Use when you plan to have users download your files for local playback on a computer.

Peak bit rate-based VBR

Use when you plan to distribute your content on CDs or DVDs.




Microsoft Windows Media Resource Kit
Microsoft Windows Media Resource Kit (Pro-Resource Kit)
ISBN: 0735618070
EAN: 2147483647
Year: 2005
Pages: 258

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net