-->
Save your seat for Streaming Media NYC this May. Register Now!

Best Practices for Windows Media Encoding

Windows Media Audio 9.2 Lossless
The WMA 9.2 Lossless codec is, as the name implies, a lossless audio codec. A lossless audio codec's output is bit-for-bit identical to its input. Essentially, it's a more efficient alternative to PCM (uncompressed) encoding, and functionally equivalent to Zipping up a .WAV file.

The flip side of lossless encoding is that there's no bit rate control possible—each second of audio takes as many or as few bits as it needs. Hence the codec is only available in Quality VBR mode. Perfect silence takes up very little bandwidth, while white noise takes up as much as uncompressed. Typical savings are around 2:1 for music and 4:1 for TV/movie soundtracks.

In general, WMA 9.2 Lossless shouldn't be used for WMV files for streaming, obviously, as they are CBR. And WMA 9 and 10 Pro can provide incredible sounding audio at lower bit rates, and transparent compression at lower bit rates than WMA Lossless.

Data Rate Modes
Constant Bit Rate (CBR)
In essence, a CBR file is one where the average bit rate (ABR) and peak bit rate (PBR) are identical. This is appropriate for when peak bit rate is the primary constraint, required with real-time streaming, and typically used with devices where the speed of the decoder is the limit.

However, the constant rate is within a certain window of time, the buffer duration. So, a 200Kbps clip with a five-second buffer means that any five seconds of the file has to be at or below 200Kbps per second. But any individual second could go quite a bit higher than that.

1-Pass
1-pass CBR is required for live streaming (webcasting), of course. It's also the fastest bit rate-limited mode available in Windows Media (the bit rate-limited VBR modes are 2-pass only). Note that 1-pass CBR encoding can be significantly improved by the use of the Lookahead registry key parameter, described in a document linked at the end of this article.

2-Pass2-pass encoding essentially lets the encoder see into the future, ramping the bit rate up and down as needed to account for future changes. With the v11 codecs, it always provides at least as good quality as 1-pass CBR, and will often provide significantly more consistent quality with variable content. And with the v11 codecs, the first pass is much faster than the second pass or a single pass would be, so going to 2-pass doesn't double encode time—it's more typically a 20% increase. So, the 2-pass should generally be used instead of 1-pass for CBR except for live streaming.

Variable Bit Rate (VBR)
The essential difference between CBR and VBR is that VBR files have a peak bit rate higher than the average bit rate. This lets a VBR file be more efficient for file size, since it can distribute bits throughout the file to provide optimal quality. You can also think of the difference as "CBR maintains bit rate by varying quality, and VBR maintains quality by varying bit rate."

1-Pass Quality-Limited VBR
1-pass quality-limited VBR is a pure VBR—you just specify the quality, and each frame takes as many bits as needed. The final file size can vary tremendously depending on complexity, and there's no limit on peak bit rate at all. Obviously, this makes quality-limited VBR a poor choice for content distribution. However, it's a great mode for archiving content, and since it is 1-pass, it can be captured in real time on a sufficiently powerful box.

Streaming Covers
Free
for qualified subscribers
Subscribe Now Current Issue Past Issues