What a difference a half-decade makes! Live VC-1 today and at launch

A recent conversation over at the Streaming Media Advanced list sparked a rant from me about the importance of comparing implementations of codecs, not just codecs.

To that end, I thought I'd do a demo to show how much improvement there's been in Windows Media since the launch of Windows Media 9 Series back in 2003.

A recent conversation over at the Streaming Media Advanced list sparked a rant from me about the importance of comparing implementations of codecs, not just codecs.

To that end, I thought I'd do a demo to show how much improvement there's been in Windows Media since the launch of Windows Media 9 Series back in 2003.

Below, you'll find two streams, encoded with the same settings but with tools from different eras. The streams are both

  • Live encoding from a preprocessed file (so that preprocessing differences don't matter)
  • And yes, it's the "Lady Washington" footage again.
  • 640x360
  • 29.97 fps
  • 600 Kbps video
  • 64 Kbps 44.1 stereo WMA audio
  • 5 second buffer
  • Keyframe every 5 seconds

The difference is that the first is encoded with the original Windows Media Video 9 codec (ala just Windows Media Player 9 installed, like a stock Windows XP SP2 machine), and the second with the VC-1 Encoder SDK implementation in Expression Encoder 2. Pretty dramatic differences, I hope!

 Live Windows Media 2003Live Windows Media 2008
Silverlight embedded page2003 in Silverlight2008 in Silverlight
Direct link to WMV
(right-click to download)
2003 direct WMV link2008 direct WMV link

...reminding me that I really need to blog how to make a Silverlight dual media player that can play two versions of the same clip in sync.

So, what makes this big difference? There's been a huge amount of work and three major releases (Format SDK 9.5 and 11, and VC-1 Encoder SDK) since then, so I won't give a complete list, but a few of the highlights.

  • 4-way threading instead of 2-way threading, doubling performance on modern machines.
  • Lots of SSE2 and SSE3 optimizations to improve performance.
  • "Adaptive Complexity" that dynamically adjusts the complexity of the encoder, to make sure it's always using all available CPU power, without ever dropping frames. This compares to the old default live complexity of 1 (out of a 0-4 range).
  • Using B-frames (supported in the old decoder, but not used in the original encoder) which improve compression efficiency and enable efficient encoding of flash frames.
  • Lookahead Rate Control, where the codec buffers a few frames into the future, so it knows when it needs to start saving some bits for an upcoming keyframe, or when it's save to use a lot of bits on a few challenging frames.

A lot of the above are about performance. With offline encoding, better performance just makes for faster encoding. But for live encoding, it helps quality, because it allows the codec to do more math per pixel to find the optimum way to encode that file.

So, how big a difference is this? Below is a graph showing the Quantization Parameter (QP) for the two encodes. QP is a measure of how encoded each frame is, with higher values more highly compressed. In VC-1, the range is 0-31. A good rule of thumb is that QP of much below 8 looks pretty good, and QP of 8 or above...won't. Now, a live SD encode at 600 Kbps is pretty darn aggressive, so there's plenty of spots where both encodes certainly show artifacts. And quality varies a lot throughout the file as the the complexity of the video goes up and down, as this is a Constant Bitrate (CBR) encode. Note the relatively low QPs near the end of the file, where the easy credits scroll comes in.

But still, the modern VC-1 implementation (in red) with all of the above is dramatically better. While the old encoder (in blue) spikes all the way up to the maximum QP of 31, the new one is typically several QP lower, and maxes out at a QP of 20 instead.

QP-chart

That said, man, my Excel-fu sure has declined over the years. Hard to believe I used to teach classes on making good-looking Excel charts back in the early 90's. Anyway, just remember that lower is better, and red is our current stuff.

Tags:

Follow the Discussion

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.