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

Best Practices for Windows Media Encoding

Article Featured Image
Article Featured Image

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 bottom of this article.

2-Pass
2-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.

2-Pass Bit Rate VBR (Constrained)
2-pass bit rate VBR (constrained) is the optimal encoding mode for when the playback environment can handle a peak bit rate higher than the average bit rate. This is typical of content that is distributed as files instead of streams, be it off a web server or a file on a disc. Almost every web video WMV file not targeted to run on Windows Media Services should be using Constrained VBR.

With previous versions of the codec, we recommended that 1-pass CBR be used for HD content, since there was a problem with occasional dropped frames with 2-pass at high bit rates. This issue has been addressed in the v11 codec, and 2-pass VBR can now be used for HD content. This can result in big savings in file size.

2-Pass Bit Rate VBR
The unconstrained 2-pass bit rate VBR mode is just the same as constrained VBR, but without any peak constraint. This means that playability isn’t predictable, and n most cases the constrained mode should be be used instead.

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