-->

The Silverlight Guru

If you've got questions about streaming with Silverlight—or anything related to Windows media video or audio—you've come to the right place. Ben Waggoner is Microsoft's principal video strategist for Silverlight and he's well-known to those who frequent industry conferences and forums. He's the source, and he's happy to address Silverlight questions large or small in this new monthly column. Would we bring you anything less?

Ben Waggoner
For this series, we'll be fielding Silverlight questions from the Streaming Media forums for Ben to answer. Now, he's such a good-hearted person that he's already answered every Windows media question on the forum, but we'll get him to do so in more depth here. If you've got something you'd like help with, post to the forum or, even better, drop us a note at tdreier@streamingmedia.com, so we can surprise him next month with something he hasn't seen before.

Our first question comes from Matthew Quinn, who works for the Liverpool Football Club:

I'm looking to shift our live commentary service which is WMA @ 20Kbps to work with dial-up. Over years last 9 years we have gone from WMA 4.1 all the way to 9, and now I want to move to 10 Pro @ 32Kbps to retain the ability to capture dial-up users in far-off lands.

I have performed some tests on Macs and Flip4Mac seems to like WMA10 without fuss, Windows machines should just download the codec automatically but is there anything that this may cause compatibility issues with?


WMA 10 Pro's backwards compatibility makes it excellent when you're concerned about users with older software or dial-up connections, says Ben. The 32Kbps audio stream is divided into two 16kHz channels. The bottom 16kHz are encoded the same as with WMP 9 Pro, while the top 16kHz get extra data—a frequency synthesis that fills in the audio gaps. Any player that can handle WMA 9 Pro can stream the lower 16kHz. That might not sound like much, but it's twice as much data as a phone call (8kHz), so it's fine for spoken commentary.

Windows Media 9 and 10, as well as Flip4Mac, will all play the lower channel. Users that have Windows Media 11 or Silverlight 2, on the other hand, will get the full frequency range. As Ben put it in his original answer on the forum, "WMA 10 Pro LBR (32-96 Kbps) will play at half sample rate on any WMA 9 Pro decoder. Full fidelity requires an updated decoder, like those in WMP 11 and Silverlight 2."

If you'd like to build a player, get the Windows Media Porting Kit from Microsoft's licensing site. For more information, check out this StreamingMedia.com article written by Ben in 2007

Our next question comes from Ksobey:

What we are trying to achieve is a live stream using Windows Media Encoder with only audio (WMA files)—an online radio station, basically. We need the song information (title and artist, etc.) for each individual song that plays and perhaps a picture related to that song to display either in Windows Media Player or some other way (I would love suggestions on how to do this).

How would I go about doing this? Anybody have an idea?

There are two ways to approach this, says Ben. If you're using Silverlight you can create a script stream inside a WMA file. The script tells when data is valid and when the data (song and artist information) needs to be changed. To pull this off, use Windows Media Encoder, Expression Encoder, or any similar program that works with live audio, to create the stream. You'll then insert markers into the stream. Consult the Windows Media Format SDK to learn how to insert the markers. This solution has the advantage of being more flexible, and working cross-platform and cross-browser.

You can also create a web page and embed the Windows Media Player within the page. The audio stream's URL will send changes to the player, which will trigger DHTML actions to produce and show the new content. A marker in the stream lets the player know what content to load, and to refresh with new content when it sees a new marker.

You can use the same audio stream for both Silverlight and the Windows Media Player, adds Ben, so you don't need to encode your material twice to offer two streams. Just have your users click for which stream they'd like to receive.

For more information on how to do this with the Windows Media Player, Ben recommends this article from the Microsoft Developer Network.

Submit your Silverlight questions to Streaming Media’s Formats, Codecs, and Players forum, or send them directly to the author at tdreier@streamingmedia.com

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