Understanding Codecs


We demonstrated in chapter 1 how quickly audio and video can consume bandwidth when converted to a digital format. You might recall that an uncompressed movie streamed at 30 frames per second with a resolution of 640 x 480 pixels would require 105 Mbps. Add to that 1 Mbps for audio and 4 Mbps for network overhead, and you have an unrealistic number, no matter how much bandwidth you have available.

The only way to stream this content over common Internet bandwidths is to compress the content to a reasonable size. You can compress content by applying compression algorithms to the data, taking into account the desired output quality and available bandwidth. Before the content is played, it is decompressed using decompression algorithms. These compression and decompression algorithms are called codecs, and the same codec that compresses the content during the encoding process must decompress the content during playback.

Codecs can be divided into two categories: lossy and lossless. Lossy compression methods discard redundant information, thereby changing enough of the original data that it is not possible to recreate the original during playback. Lossless compression methods use a kind of shorthand to represent redundant information. Because all of the redundant information is preserved, the original content can be recreated during playback.

Because all information is preserved during compression, lossless compression methods produce the highest-quality sound or video. But only lossy methods are capable of compressing data enough to achieve the low bit rates necessary for streaming on the Internet. Most of the Windows Media Audio and Video codecs are lossy.

Codecs are designed with a particular type of content in mind, such as video, applications video (screen images), music, or voice content. Because of this specialization, a codec rarely works efficiently for any type of media other than that for which it was designed. 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.

If you have used previous versions of Windows Media Encoder, you are already familiar with the audio, video, and screen codecs. All of them have been updated for Windows Media 9 Series to improve quality and efficiency, and are explained below.

Windows Media Audio 9 Codec

The Windows Media Audio 9 codec is the most popular codec for creating Windows Media Audio (WMA) files when only audio is used. The decoding portion of the codec (or bit stream syntax) was frozen more than four years ago, and only the encoding portion has been improved since then. Maintaining backward compatibility has been critical to support the consumer electronics manufacturers who choose to build devices that play WMA, and the Windows Media Audio 9 codec represents the third generation of backward-compatible improvements. You can play most audio content encoded with the Windows Media Audio 9 codec in Windows Media Player 6.4 and later.

In the Windows Media Audio 9 codec, five encoding modes are supported. The one-pass constant-bit-rate (CBR) encoding mode has been improved with rate control and masking algorithms. These algorithms enable the codec to intelligently predict which frequencies are inaudible. Those that are deemed inaudible are not encoded, therefore preserving bits in order to reduce file size. The Windows Media Audio 9 codec also includes new two-pass and variable-bit-rate (VBR) modes that further enhance quality over the one-pass mode.

For any of the codecs, one-pass CBR encoding is applicable to live encoding and transmission, while two-pass CBR is recommended for off-line encoding applications, such as on-demand streaming. The VBR modes are appropriate when the compressed clips will be downloaded and then played on the user’s device, since the bit rate fluctuations are higher and require longer buffering delays. There is also a peak-constrained VBR encoding mode, which also requires two encoding passes, that is meant for playback on devices with a constrained reading speed. The Windows Media Audio 9 codec supports all of these encoding modes.

Note that content encoded using VBR encoding with the Windows Media Audio 9 codec may have glitches or silence during playback in Windows Media Player version 6.4. For Windows Media Player version 7.1 and later, content encoded with the Windows Media Audio 9 codec does not require the user to download the codec.

The Windows Media Audio 9 codec also supports a large list of encoding settings for mono and stereo audio, with bit rates ranging from 5 Kbps to 320 Kbps, and sampling rates ranging from 8 KHz to 48 KHz. At the typical CD sampling rate (44.1 KHz), most users select bit rates between 48 Kbps to 192 Kbps to achieve CD-like quality, depending on their sensitivity to compression artifacts and bandwidth availability.

Windows Media Audio 9 Professional Codec

The Windows Media Audio 9 Professional codec is the first Windows Media codec for audio that supports high-resolution (up to 24 bits per audio sample, and sampling rates of up to 96 KHz), and multiple channels (up to 8 discrete channels) for typical 5.1 or 7.1 speaker configurations in high-end home systems or commercial digital theaters.

This codec is designed for encoding multi-channel music and movie sound tracks at Internet broadband rates. Windows Media Audio 9 Professional codec can encode 5.1 channels at as low as 128 Kbps, although 192 Kbps provides excellent quality while leaving plenty of bandwidth for encoding video for broadband delivery.

As with the Windows Media Audio 9 codec, the Windows Media Audio 9 Professional codec supports five encoding modes: one-pass CBR, two-pass CBR, one-pass quality-based VBR, two-pass bit-rate-based VBR, and two-pass peak-constrained VBR. In addition, Windows Media Audio 9 Professional allows near-lossless compression at its highest-quality VBR setting.

For more information about encoding 5.1 audio content, see the CD at the back of this book.

Windows Media Audio 9 Voice

Windows Media Audio 9 Voice is a brand new codec that compresses mono-only audio at very low bit rates, which is useful for transmitting digital media through low-bit-rate modem or ISDN connections. The supported bit rates range from 4 to 20 Kbps and from 8 to 22 KHz, respectively. At this time, Windows Media Audio 9 Voice only supports one-pass CBR encoding mode.

When encoding audio at very low bit rates, some codecs will generally produce better quality on music, while others will produce better quality on speech. Windows Media Audio 9 Voice is a unique hybrid codec that uses an automatic classifier to detect voice and music, and applies the appropriate coding mode for each segment. When the content contains audio and speech, the mode selected depends on the dominant type of audio. The encoder also provides a manual mode so you can select the desired mode for any given segment of your audio.

Windows Media Audio 9 Lossless

Windows Media Audio 9 Lossless can compress a wide variety of audio sources, from CD resolution and sampling rates up to 24-bit, 96 KHz, 5.1 channel audio.

The Windows Media Audio 9 Lossless codec is integrated into the CD Copy function of Windows Media Player 9 Series and can achieve compression ratios of about 2:1 for stereo content. Multi-channel, high-resolution audio clips can often be compressed losslessly with higher ratios.

Windows Media Video 9 Codec

The Windows Media Video 9 codec enables you to encode high-quality video for delivery over a full range of bandwidths, and supports all five encoding modes.

Windows Media Video 9 achieves 15 to 50 percent compression improvements over version 8, and the improvements tend to be greater at higher bit rates. With the compression efficiency of Windows Media Video 9, you can achieve broadcast-quality BT.601 video at about 2 Mbps, and high-quality, high-definition video (720p, for example) at high-end broadcast or DVD rates (4 to 6 Mbps). All the broadcast formats are supported, including the high-definition 720p and 1080i variants.

The decoder portion of the Windows Media Video 9 codec also includes a frame interpolation feature. Frame interpolation, also known as video smoothing, is the process of creating intermediate video frames based on the data in two consecutive frames of encoded video. In effect, frame interpolation increases the frame rate of encoded video at the time of decoding. You can use frame interpolation to improve the smoothness of playback for video streams with low frame rates.

Because frame interpolation is a decoding feature, it does not involve any special encoding options and adds no overhead to the content. You can enable video smoothing using the Windows Media Format SDK or from the Video Acceleration Settings in Windows Media Player.

Windows Media Video 9 Screen Codec

The Windows Media Video 9 Screen codec is designed for capturing moving images of a computer desktop for the purposes of creating a demonstration. The entire desktop can be coded and transmitted at rates as low as 28 Kbps, although when there are images embedded in the desktop application, the bit rate is usually around 100 Kbps. Windows Media Video 9 Screen is much improved over earlier versions of the codec in both image quality and CPU usage, and it now supports one-pass VBR and one-pass CBR encoding.

start sidebar
MPEG-4 Compatibility

Does Microsoft support MPEG-4 video in Windows Media 9 Series? With the ISO MPEG-4 codec, Microsoft supports the video portion of the MPEG-4 standard. The ISO MPEG-4 codec is compliant with the video simple profile and interoperates with MPEG-4 video codecs developed independently by other companies.

Although Windows Media 9 Series only installs the ISO MPEG-4 decoder, it is possible to use the encoder portion of the codec when you import an MPEG-4 profile from an earlier version of the encoder or when the codec is already resident on your computer. It is recommended, however, that you use Windows Media Video 9 instead. Windows Media Video 9 is not compliant with the MPEG-4 standard, but does provide better video quality for a given bit rate.

end sidebar




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