<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"><channel><title>Ben Waggoner</title><atom:link rel="self" type="application/rss+xml" href="http://www.on10.net/blogs/benwagg/feed/ipod/default.aspx" /><itunes:summary>This blog focuses on Silverlight from a media technology perspective. It also covers encoding in supported formats, particularly Windows Media.
</itunes:summary><itunes:author>benwaggoner</itunes:author><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/Channel10/images/feedimage.png</url><title>Ben Waggoner</title><link>http://on10.net/blogs/benwagg/</link></image><itunes:image href="http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/Channel10/images/feedimage.png" /><itunes:category text="Technology" /><description>This blog focuses on Silverlight from a media technology perspective. It also covers encoding in supported formats, particularly Windows Media.
</description><link>http://on10.net/blogs/benwagg/</link><language>en-us</language><pubDate>Wed, 26 Nov 2008 01:03:58 GMT</pubDate><lastBuildDate>Wed, 26 Nov 2008 01:03:58 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3143.743, Culture=neutral, PublicKeyToken=null)</generator><item><title>Custom Slider for Silverlight 2 Media Players available for download</title><description>&lt;p&gt;Sorry it's taken so long, but we've now got the &lt;a href="http://on10.net/blogs/benwagg/New-Custom-Slider-for-Silverlight-2-media-players/"&gt;Custom Slider for Silverlight 2 Media Players&lt;/a&gt; up on MSDN.&lt;/p&gt;
&lt;p&gt;Unlike the snippits I included earlier, this is a full project that can be modified. It’s being made available under the &lt;a href="http://msdn.microsoft.com/en-us/library/cc512463.aspx"&gt;Microsoft Public License&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://code.msdn.microsoft.com/SL2MediaSlider"&gt;Code Gallery Page&lt;/a&gt; &lt;br /&gt;
&lt;a href="http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=SL2MediaSlider&amp;amp;DownloadId=3912"&gt;Project Download&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;&lt;img src="http://on10.net/24156/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Custom-Slider-for-Silverlight-2-Media-Players-available-for-download/</comments><itunes:summary>Sorry it's taken so long, but we've now got the Custom Slider for Silverlight 2 Media Players up on MSDN.
Unlike the snippits I included earlier, this is a full project that can be modified. It’s being made available under the Microsoft Public License.
Code Gallery Page 
Project Download
Enjoy!</itunes:summary><link>http://on10.net/blogs/benwagg/Custom-Slider-for-Silverlight-2-Media-Players-available-for-download/</link><pubDate>Wed, 26 Nov 2008 01:03:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Custom-Slider-for-Silverlight-2-Media-Players-available-for-download/</guid><evnet:views>646</evnet:views><evnet:viewtrackingurl>http://on10.net/24156/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Sorry it's taken so long, but we've now got the Custom Slider for Silverlight 2 Media Players up on MSDN.
Unlike the snippits I included earlier, this is a full project that can be modified. It’s being made available under the Microsoft Public License.
Code Gallery Page 
Project Download
Enjoy!</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>1</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Custom-Slider-for-Silverlight-2-Media-Players-available-for-download/RSS/</wfw:commentRss><trackback:ping>http://on10.net/24156/Trackback.aspx</trackback:ping><category>C#</category><category>silverlight</category><category>XAML</category></item><item><title>Netflix&amp;rsquo;s Neil Hunt shares encoding workflow info</title><description>&lt;p&gt;Now, this is a blog post! Neil Hunt, Chief Product Officer for Netflix, has just put up a &lt;a href="http://blog.netflix.com/2008/11/encoding-for-streaming.html"&gt;great blog post&lt;/a&gt; talking about their encoding workflow for their video streaming services.&lt;/p&gt;
&lt;p&gt;It’s full of awesomeness, but I wanted to excerpt the section describing their 1st gen, 2nd gen, and HD encoding settings and workflow.&lt;/p&gt;
&lt;blockquote&gt;
&lt;h2&gt;First Generation Encoding &lt;/h2&gt;
&lt;p&gt;Our first set of encodes are based on WMV3 and WMA in ASF with WMDRM10 (Janus). We chose these standards because the Janus components have been widely adopted by our CE partners such as Roku, LG Electronics, Samsung, TiVo, and of course Microsoft Xbox. &lt;br /&gt;
We encode most content at 500, 1000, 1600, and 2200kbps VBR, but some titles whose source quality merits it have also been encoded at 3400kbps. The highest bitrate encodes are fit into 720x480 non-square pixels (the usual 1.2 PAR for widescreen content, 0.9 PAR for 4:3), but optimum encoding at lower bitrates is achieved with fewer pixels. Encoded films are normally at 24fps to match the source, while shot-to-video and mixed material is de-interlaced to 30fps (or 25fps for PAL content).&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Netflix has been using anamorphic video all along, which I think is an underused feature of Windows Media and other formats. When you’re limited to 720x480 pixels, you want to encode all the pixels you’ve got, without having to synthesize any extra.&lt;/p&gt;
&lt;blockquote&gt;
&lt;h2&gt;Second Generation Encoding &lt;/h2&gt;
&lt;p&gt;The new Silverlight player (that some users are helping us test as I write) uses VC1 Advanced Profile encoding with PlayReady DRM. A key property is that each GOP header includes frame size and resolution, which allows us to assemble a stream on the fly from different bitrate encodes as your broadband bandwidth fluctuates. (Another key feature is more coverage, including Intel Macs and Firefox users.) We expect to switch completely to the new player later this year. &lt;br /&gt;
The VC1 encoders are more efficient than the WMV3 encoders, so we are currently encoding VC1AP at slightly lower birates: 375, 500, 1000, and 1500kbps, all square pixel. At some point we are likely to add a couple more resolutions of non-square pixel encodes capturing the original pixel-aspect-ratio of the source. &lt;br /&gt;
We are also re-wrapping the VC1AP encodes in WMDRM10 for CE devices, which will gradually switch to the more efficient encodes in future firmware upgrades.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is a great example of the improved efficiency of the VC-1 Encoder SDK and tools based on it. Not all Windows Media/VC-1 encoding is equal; the latest tools can offer a very meaningful reduction in bitrate required for a give quality level, improving user experiences and the cost of delivering the content.&lt;/p&gt;
&lt;p&gt;The new encodes are backwards compatible to older hardware and software encoders, so even older devices can take advantage of the improvements. &lt;/p&gt;
&lt;blockquote&gt;
&lt;h2&gt;High Definition Encodes &lt;/h2&gt;
&lt;p&gt;Today we have rights to deliver about 400 streams in HD (720p). More titles will be added over time. We experimented with first-generation WMV3 encodes at 4000kbps and 5500kbps, but settled on second-generation HD encodes with VC1AP at 2600kbps and 3800kbps, which extends their accessibility down to lower home broadband connections. As with SD, encodes of film material are at 24fps, and encodes of shot-to-video material are at 30fps (or 25fps for PAL), rather than the 60fps that would come from a Blu-ray disc - we judged the 60fps content as too expensive of bandwidth for now. In general, these encodes are definitively better than SD, but won't challenge well-executed Blu-ray encodes - that would require a bitrate out of reach for most domestic broadband today. We believe Moore's law will drive home broadband higher and higher enabling full 1080p60 encodes in a few years.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There’s codecs for you – a good 720p experience at 3800 Kbps, which is probably a little below the average 480p bitrate used for MPEG-2 on the DVDs that fly around the nation in those Netflix envelopes.&lt;/p&gt;
&lt;p&gt;I’m not that worried about 1080p60 encoding myself. The vast majority of fictional content is shot 24p, including 99% at least of Blu-ray discs. While Blu-ray players may output 60p, the encodes, and hence bitrate requirements, are still 1080p. I find that typical film content in VC-1 wants around 6-8 Mbps for a 1080p24 experience enough better than 720p to be worth the trouble.&lt;/p&gt;
&lt;p&gt;I just got my Xbox set up to handle the Netflix streams – now I’ve got to go check out some of those &lt;a href="http://www.netflix.com/WiHD?lnkctr=hdgenre"&gt;400 HD titles&lt;/a&gt;! Hmm. Pan’s Labyrinth and Heroes.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Anyway, it’s great stuff. I love it when partners can share this kind of detail about what they’re doing.&lt;/p&gt;&lt;img src="http://on10.net/24108/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Netflixrsquos-Neil-Hunt-shares-encoding-workflow-info/</comments><itunes:summary>Now, this is a blog post! Neil Hunt, Chief Product Officer for Netflix, has just put up a great blog post talking about their encoding workflow for their video streaming services.
It’s full of awesomeness, but I wanted to excerpt the section describing their 1st gen, 2nd gen, and HD encoding settings and workflow.

First Generation Encoding 
Our first set of encodes are based on WMV3 and WMA in ASF with WMDRM10 (Janus). We chose these standards because the Janus components have been widely adopted by our CE partners such as Roku, LG Electronics, Samsung, TiVo, and of course Microsoft Xbox. 
We encode most content at 500, 1000, 1600, and 2200kbps VBR, but some titles whose source quality merits it have also been encoded at 3400kbps. The highest bitrate encodes are fit into 720x480 non-square pixels (the usual 1.2 PAR for widescreen content, 0.9 PAR for 4:3), but optimum encoding at lower bitrates is achieved with fewer pixels. Encoded films are normally at 24fps to match the source, while shot-to-video and mixed material is de-interlaced to 30fps (or 25fps for PAL content).

Netflix has been using anamorphic video all along, which I think is an underused feature of Windows Media and other formats. When you’re limited to 720x480 pixels, you want to encode all the pixels you’ve got, without having to synthesize any extra.

Second Generation Encoding 
The new Silverlight player (that some users are helping us test as I write) uses VC1 Advanced Profile encoding with PlayReady DRM. A key property is that each GOP header includes frame size and resolution, which allows us to assemble a stream on the fly from different bitrate encodes as your broadband bandwidth fluctuates. (Another key feature is more coverage, including Intel Macs and Firefox users.) We expect to switch completely to the new player later this year. 
The VC1 encoders are more efficient than the WMV3 encoders, so we are currently encoding VC1AP at slightly lower birates: 375, 500, 1000, and 1500kbps, all square pixel. At some point we are likely to add a couple more resolutions of non-square pixel encodes capturing the original pixel-aspect-ratio of the source. 
We are also re-wrapping the VC1AP encodes in WMDRM10 for CE devices, which will gradually switch to the more efficient encodes in future firmware upgrades.

This is a great example of the improved efficiency of the VC-1 Encoder SDK and tools based on it. Not all Windows Media/VC-1 encoding is equal; the latest tools can offer a very meaningful reduction in bitrate required for a give quality level, improving user experiences and the cost of delivering the content.
The new encodes are backwards compatible to older hardware and software encoders, so even older devices can take advantage of the improvements. 

High Definition Encodes 
Today we have rights to deliver about 400 streams in HD (720p). More titles will be added over time. We experimented with first-generation WMV3 encodes at 4000kbps and 5500kbps, but settled on second-generation HD encodes with VC1AP at 2600kbps and 3800kbps, which extends their accessibility down to lower home broadband connections. As with SD, encodes of film material are at 24fps, and encodes of shot-to-video material are at 30fps (or 25fps for PAL), rather than the 60fps that would come from a Blu-ray disc - we judged the 60fps content as too expensive of bandwidth for now. In general, these encodes are definitively better than SD, but won't challenge well-executed Blu-ray encodes - that would require a bitrate out of reach for most domestic broadband today. We believe Moore's law will drive home broadband higher and higher enabling full 1080p60 encodes in a few years.

There’s codecs for you – a good 720p experience at 3800 Kbps, which is probably a little below the average 480p bitrate used for MPEG-2 on the DVDs that fly around the nation in those Netflix envelopes.
I’m not that worried about 1080p60 encoding myself. The vast majority of fictional content is shot 24p, including 99% at least of Blu-ray discs. While Blu-ray players may output 60p, the encodes, and hence bitrate requirements, are still 1080p. I find that typical film content in VC-1 wants around 6-8 Mbps for a 1080p24 experience enough better than 720p to be worth the trouble.
I just got my Xbox set up to handle the Netflix streams – now I’ve got to go check out some of those 400 HD titles! Hmm. Pan’s Labyrinth and Heroes.
 
Anyway, it’s great stuff. I love it when partners can share this kind of detail about what they’re doing.</itunes:summary><link>http://on10.net/blogs/benwagg/Netflixrsquos-Neil-Hunt-shares-encoding-workflow-info/</link><pubDate>Thu, 20 Nov 2008 01:50:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Netflixrsquos-Neil-Hunt-shares-encoding-workflow-info/</guid><evnet:views>891</evnet:views><evnet:viewtrackingurl>http://on10.net/24108/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Now, this is a blog post! Neil Hunt, Chief Product Officer for Netflix, has just put up a great blog post talking about their encoding workflow for their video streaming services. It’s full of awesomeness, but I wanted to excerpt the section describing their 1st gen, 2nd gen, and HD encoding settings and workflow. First Generation Encoding Our first set of encodes are based on WMV3 and WMA in ASF with WMDRM10 (Janus). We chose these standards because the Janus components have been widely adopted by our CE partners such as Roku, LG Electronics, Samsung, TiVo, and of course Microsoft Xbox. We…</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>1</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Netflixrsquos-Neil-Hunt-shares-encoding-workflow-info/RSS/</wfw:commentRss><trackback:ping>http://on10.net/24108/Trackback.aspx</trackback:ping><category>compression</category><category>HD</category><category>Netflix</category><category>silverlight</category><category>VC-1</category><category>WMV</category></item><item><title>Silverlight 2 launch party in Portland tonight</title><description>&lt;p&gt;
				&lt;a href="http://pdxux.net/default.aspx"&gt;PDXUX.Net&lt;/a&gt; is hosting a &lt;a href="http://pdxux.net/2008/November.aspx"&gt;Silverlight 2 launch party&lt;/a&gt; in Portland tonight, at &lt;a href="http://www.north.com/blog/"&gt;North&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://timheuer.com/blog/"&gt;Tim Heuer&lt;/a&gt; will be the featured presenter, and I’ll come in and do fifteen minutes or so of media demos. There will be ample time for mingling and Q&amp;amp;A as well.&lt;/p&gt;
&lt;p&gt;Sorry it’s such a last minute announce – we only just worked out the plan.&lt;/p&gt;&lt;img src="http://on10.net/24015/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Silverlight-2-launch-party-in-Portland-tonight/</comments><itunes:summary>
				PDXUX.Net is hosting a Silverlight 2 launch party in Portland tonight, at North.
Tim Heuer will be the featured presenter, and I’ll come in and do fifteen minutes or so of media demos. There will be ample time for mingling and Q&amp;amp;A as well.
Sorry it’s such a last minute announce – we only just worked out the plan.</itunes:summary><link>http://on10.net/blogs/benwagg/Silverlight-2-launch-party-in-Portland-tonight/</link><pubDate>Wed, 12 Nov 2008 00:06:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Silverlight-2-launch-party-in-Portland-tonight/</guid><evnet:views>879</evnet:views><evnet:viewtrackingurl>http://on10.net/24015/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>	PDXUX.Net is hosting a Silverlight 2 launch party in Portland tonight, at North.
Tim Heuer will be the featured presenter, and I’ll come in and do fifteen minutes or so of media demos. There will be ample time for mingling and Q&amp;amp;A as well.
Sorry it’s such a last minute announce – we only just worked out the plan.</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>0</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Silverlight-2-launch-party-in-Portland-tonight/RSS/</wfw:commentRss><trackback:ping>http://on10.net/24015/Trackback.aspx</trackback:ping><category>party</category><category>silverlight</category><category>Tim Heuer</category></item><item><title>Building high-performance Silverlight Media Players</title><description>&lt;h1&gt;Overview&lt;/h1&gt;
&lt;p&gt;So, I get involved in a ton of conversations with various internal and external customers about building Silverlight media players. The great thing about Silverlight is that it's deep, and provides lots of ways to build complex applications that include media playback. The flip side of that is that, like all software engineering, there's plenty of sub-optimal ways to do thing that can have a negative impact on media playback performance.&lt;/p&gt;
&lt;p&gt;While it's tempting to assume everyone's got a hopping dual-core machine these days, that's not the case. When we reviewed the demographics for the NBC Olympics player we were surprised at what a big chunk of the home users had older, slower, &amp;lt; 2 GHz single-core PCs. We were also somewhat surprised by how fast average broadband has gotten. It's not unusual for consumer to now be bound by CPU power more than bandwidth power as far as the highest bitrate they can play.&lt;/p&gt;
&lt;p&gt;That said, don't go overboard – plenty of these techniques are just best practices, but some can limit the complexity of the player you can build. Unless you’re getting dropped frames on the target platforms, easier playback scenarios can support all kinds of effects. Just make sure that the payoff in improved user experience from using the more advanced techniques is worth the perf hit.&lt;/p&gt;
&lt;h1&gt;Fast Path&lt;/h1&gt;
&lt;p&gt;First up, let's talk about getting players on the Fast Path - this is when Silverlight doesn't have to do any scaling or compositing of the video rectangle, saving a good chunk of CPU power as well as memory bandwidth. Again, these are really about HD content – SD and below should have plenty of perf even on older machines.&lt;/p&gt;
&lt;h2&gt;No scaling&lt;/h2&gt;
&lt;p&gt;The video's MediaElement should be exactly the size it was encoded at. The simplest way to do that is to just remove the Height and Width elements from the MediaElement. The perf differential is really just scaling versus no scaling; there's no significant advantage to using scaling tricks like exact 2x or 3x scaling, or just scaling on one axis. Just leaving Height= and Width= blank in the MediaElement is probably the easiest way to turn off scaling.&lt;/p&gt;
&lt;p&gt;Note that this applies to non-square pixel encoded video. For example, 720x480 encoded as 4:3 won't ever use the fast path; you'd have to encode as square pixel 640x480 instead.&lt;/p&gt;
&lt;p&gt;And this applies to scaling down as much as scaling up. Playing 640x480 video at 320x240 will actually take more CPU than just leaving it at 640x480.&lt;/p&gt;
&lt;p&gt;If you’re building a video browser that plays multiple video streams at once, it can be worth it to provide low resolution thumbnails at the display size; that’ll allow a lot more clips to be played at once.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Pixel-aligned&lt;/h2&gt;
&lt;p&gt;The pixels also need to be exactly aligned with the grid, so no decimal coordinates. Pixel Snapping will do this for you automatically in Silverlight 2.&lt;/p&gt;
&lt;h2&gt;MediaElement, not VideoBrush&lt;/h2&gt;
&lt;p&gt;VideoBrush can enable some great effects like mirroring, but isn't compatible with Fast Path. Unless you’re doing something that requires VideoBrush, stick with MediaElement.&lt;/p&gt;
&lt;h1&gt;General XAML tips&lt;/h1&gt;
&lt;h2&gt;Frame Rate&lt;/h2&gt;
&lt;p&gt;The default frame rate of a Silverlight application is 60 fps, while most media encoded for Silverlight is 30 fps or less. Setting the fps of the application to that of the media. That’ll provide better performance, and and make the video and GUI elements seem more in sync.&lt;/p&gt;
&lt;h2&gt;Don't use Windowless&lt;/h2&gt;
&lt;p&gt;Windowless mode has a slight perf hit on Windows (it doesn't have a significant impact on Mac). Windowless mode is mainly used to mix Silverlight with HTML or other web elements in the same part of the screen.&lt;/p&gt;
&lt;h2&gt;Minimize overlays&lt;/h2&gt;
&lt;p&gt;While the fast path can operate with overlays, they do take additional CPU to process, so minimize the use and size of overlays to what’s useful. Even an invisible object that overlaps the video, like a play control set to transparent, still gets composited. Instead, when the control is going to go invisible, have it move entirely outside of the video rectangle. As long as it's not overlapping the media, no problem.&lt;/p&gt;
&lt;h2&gt;Keep MediaElement opaque&lt;/h2&gt;
&lt;p&gt;Speaking of keeping rendering of transparent elements to a minimum, you definitely want the video itself to be opaque, particularly at bigger frame sizes. Even a hint of transparency will require additional processing of every pixel of every frame.&lt;/p&gt;
&lt;h1&gt;&lt;/h1&gt;
&lt;h1&gt;&lt;/h1&gt;
&lt;h1&gt;Media Encoding&lt;/h1&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;Constrain video peak bitrate&lt;/h2&gt;
&lt;p&gt;The main factors in CPU load for video decoding are how many pixels/second are being displayed (height * width * frames per second), and what the peak data rate of the video is.&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;With a CBR (Constant Bitrate) encode, the peak and average bitrate are identical. The only variability is the buffer duration. Using a very long duration buffer (like 20 seconds) can make for a data rate spike within the buffer that can make for challenging encoding. &lt;/li&gt;
    &lt;li&gt;With a VBR (Variable Bitrate) encode, the peak is higher than the average. There’s no rule about what the difference is. Typically the peak is at least 1.5x the average, but it can go a lot higher. &lt;/li&gt;
    &lt;li&gt;A Buffer Window 1-2x your keyframe interval is a good starting point. You don’t want a buffer smaller than the keyframe rate, as the keyframes can wind up be starved for bits, resulting in the “blur-in” effect when the quality drops after a scene change. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you want to calibrate what VBR peak bitrate you can use on a particular system, it works to test with CBR. Just find out the bitrate + buffer duration you can use with CBR, and use that as the peak bitrate and buffer duration with your VBR encodes.&lt;/p&gt;
&lt;p&gt;For high bitrate content where the perf ceiling of the peak buffer is a more important limitation than average bitrate, go ahead and use CBR encoding. That generally provides better results than VBR when the peak would be much less than 1.5x the average.&lt;/p&gt;
&lt;h2&gt;Encode audio at 44.1 KHz mono or stereo&lt;/h2&gt;
&lt;p&gt;Silverlight’s internal audio pipeline runs at 44.1 KHz, so even if the audio comes in at a higher rate, you should resample to 44.1 KHz on encode. If you have a lower sample rate source, it’s fine to leave it at that.&lt;/p&gt;
&lt;p&gt;And while WMA 10 Professional supports 5.1 and 7.1 audio, Silverlight 2 always mixes down to stereo. So if you’re targeting Silverlight only, convert multichannel sources to stereo before encoding. This also enables the much more efficient WMA 10 Pro codec.&lt;/p&gt;
&lt;h2&gt;Crop letterboxing&lt;/h2&gt;
&lt;p&gt;This shouldn’t be news, but don’t encode non-image parts of the video frame, like letterboxing. A 640x480 frame with standard 1.85:1 letterboxing can be cropped and encoded at 640x352 without losing any visual information, but making encoding and decoding faster (36% fewer pixels need to be processed). Silverlight is more than capable of drawing the black rectangles for you client-side if you must have them.&lt;/p&gt;
&lt;h2&gt;Use Inverse Telecine with 3:2 pulldown&lt;/h2&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;p&gt;If the source content was sourced from 24p film, but transferred to 29.97i video with &lt;a href="http://en.wikipedia.org/wiki/3:2_pulldown#2:3_pulldown" target="_blank"&gt;3:2 pulldown&lt;/a&gt;, the video file will see a repeating pattern of three progressive and two interlaced frames. Instead of deinterlacing that video (with the inevitable artifacts) and encoding at 29.97, inverse telecine can restore the original 24p, eliminating deinterlacing artifacts, the framerate judder from the 24 to 30 remapping, and providing more bits per frame. And, of course, it’s 25% easier to decode and display 24 frames a second than 30. Make sure to turn the Silverlight application’s frame rate  down to 24 fps as well.&lt;/p&gt;
&lt;h2&gt;Encode as square pixel for fast path&lt;/h2&gt;
&lt;p&gt;If you’re shooting for the fast path, note that the scaling required for playing back anamorphic video will turn it off. If you have 16:9 720x480 source, you want to play back in a 848x480 window (16:9 480p) , you’ll need to encode at 848x480 if you want to get the fast path.&lt;/p&gt;
&lt;p&gt;Depending on the design of your player and the performance of the system, it’ll vary as to whether you’re better off decoding fewer pixels (720x480 instead of 848x480), but losing the fast path. Testing both ways on your target platforms is, as always, the best thing to do.&lt;/p&gt;
&lt;h2&gt;Encode anamorphic sources as anamorphic for non-fast path&lt;/h2&gt;
&lt;p&gt;If you’re not going for the fast path, you might as well encode content authored as anamorphic, as anamorphic. For example, the DVCPROHD codec is internally 960x720 in 720p mode. That would be compressed as 1280x720 for 720p playback in square pixels. But since the source is only 960 wide, encoding at 960x720 (set to a 16:9 aspect ratio) will be 33% more efficient in terms of bitrate and decode performance. Depending on the platform, that can be well-worth the sacrifice of Fast Path.&lt;/p&gt;
&lt;h1&gt;Silverlight 2 specific&lt;/h1&gt;
&lt;h2&gt;Just use Silverlight 2&lt;/h2&gt;
&lt;p&gt;Silverlight 2 has a bunch of &lt;a href="http://on10.net/blogs/benwagg/Silverlight-2-RC0-is-out/" target="_blank"&gt;perf improvements&lt;/a&gt; over Silverlight 1.0, the most notable being a faster VC-1 decoder and better scaling performance (with &lt;a href="http://on10.net/blogs/benwagg/Demo-of-Silverlight-2-scaling-quality-improvements/" target="_blank"&gt;better quality&lt;/a&gt; to boot). The latter means that not using the Fast Path has less of an impact in Silverlight 2 than before.&lt;/p&gt;
&lt;p&gt;The good news is that Silverlight automatically updates, so you don’t need to do anything specific to force this. It can be worth it to retest Silverlight 1.0 and Silverlight 2 Beta applications in Silverlight 2 to see if suggested system requirements can be lowered.&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;Use Andre &amp;amp; Akshay’s Custom Slider&lt;/h2&gt;
&lt;p&gt;Our Silverlight teammates Andre Michaud and Akshay Johar have build a custom slider that offers better performance for video playback, particularly with streaming content. This one doesn’t continuously generate valueChanged events, which would then turn into new seeks in the media file. Instead, it waits to issue them until either mouse up on the slider thumb or slider tracker, or just the last seek of a bunch of them if they come at once. So, the user can wiggle the mouse willly-nilly, but it won’t turn into a seek until the movement slows down, or they let go.&lt;/p&gt;
&lt;p&gt;The code was in my &lt;a href="http://on10.net/blogs/benwagg/New-Custom-Slider-for-Silverlight-2-media-players/" target="_blank"&gt;previous blog post&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;&lt;/h2&gt;
&lt;h2&gt;Use Expression Encoder 2 Service Pack 1 Templates&lt;/h2&gt;
&lt;p&gt;The new Expression Encoder 2 SP1 (which I really need to blog about, but then I should blog about Adaptive Streaming first, which is going to be another long post…) adds new Silverlight 2 templates. These implement the described best practices, including using the fast path if the Job Output’s Stretch Mode=None, and a less manic slider.&lt;/p&gt;
&lt;h1&gt;&lt;a href="http://on10.net/Link/3d6fa2f6-e15a-4301-9aee-a75057654edc/"&gt;&lt;img width="391" height="557" title="image" border="0" alt="image" src="http://on10.net/Link/0237f94c-df5d-49b1-bf43-91197e696f2b/" /&gt;&lt;/a&gt; &lt;/h1&gt;
&lt;h1&gt;Test early, test often, test on your target platforms&lt;/h1&gt;
&lt;p&gt;This was one of my most-used articles of wisdom imparted to me by the legendary &lt;a href="http://playbacktime.com/author/administrator/" target="_blank"&gt;Charles Wiltgen&lt;/a&gt; of &lt;a href="http://kinoma.com/" target="_blank"&gt;Kinoma&lt;/a&gt;. In any project, you want to define your minimum and recommended system specs. You need to have machines of those specs available to test to make sure they actually work. It’s obvious, but often missed. And for complex players with a lot of custom XAML, a Core 2 Extreme can get away with suboptimal design that’ll turn an older P4  into a &lt;a href="http://en.wikipedia.org/wiki/Filmstrip" target="_blank"&gt;filmstrip&lt;/a&gt; emulator (and you don’t even get that “beep”).&lt;/p&gt;&lt;img src="http://on10.net/23940/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Building-high-performance-Silverlight-Media-Players/</comments><itunes:summary>Overview
So, I get involved in a ton of conversations with various internal and external customers about building Silverlight media players. The great thing about Silverlight is that it's deep, and provides lots of ways to build complex applications that include media playback. The flip side of that is that, like all software engineering, there's plenty of sub-optimal ways to do thing that can have a negative impact on media playback performance.
While it's tempting to assume everyone's got a hopping dual-core machine these days, that's not the case. When we reviewed the demographics for the NBC Olympics player we were surprised at what a big chunk of the home users had older, slower, &amp;lt; 2 GHz single-core PCs. We were also somewhat surprised by how fast average broadband has gotten. It's not unusual for consumer to now be bound by CPU power more than bandwidth power as far as the highest bitrate they can play.
That said, don't go overboard – plenty of these techniques are just best practices, but some can limit the complexity of the player you can build. Unless you’re getting dropped frames on the target platforms, easier playback scenarios can support all kinds of effects. Just make sure that the payoff in improved user experience from using the more advanced techniques is worth the perf hit.
Fast Path
First up, let's talk about getting players on the Fast Path - this is when Silverlight doesn't have to do any scaling or compositing of the video rectangle, saving a good chunk of CPU power as well as memory bandwidth. Again, these are really about HD content – SD and below should have plenty of perf even on older machines.
No scaling
The video's MediaElement should be exactly the size it was encoded at. The simplest way to do that is to just remove the Height and Width elements from the MediaElement. The perf differential is really just scaling versus no scaling; there's no significant advantage to using scaling tricks like exact 2x or 3x scaling, or just scaling on one axis. Just leaving Height= and Width= blank in the MediaElement is probably the easiest way to turn off scaling.
Note that this applies to non-square pixel encoded video. For example, 720x480 encoded as 4:3 won't ever use the fast path; you'd have to encode as square pixel 640x480 instead.
And this applies to scaling down as much as scaling up. Playing 640x480 video at 320x240 will actually take more CPU than just leaving it at 640x480.
If you’re building a video browser that plays multiple video streams at once, it can be worth it to provide low resolution thumbnails at the display size; that’ll allow a lot more clips to be played at once.
&amp;nbsp;
&amp;nbsp;
Pixel-aligned
The pixels also need to be exactly aligned with the grid, so no decimal coordinates. Pixel Snapping will do this for you automatically in Silverlight 2.
MediaElement, not VideoBrush
VideoBrush can enable some great effects like mirroring, but isn't compatible with Fast Path. Unless you’re doing something that requires VideoBrush, stick with MediaElement.
General XAML tips
Frame Rate
The default frame rate of a Silverlight application is 60 fps, while most media encoded for Silverlight is 30 fps or less. Setting the fps of the application to that of the media. That’ll provide better performance, and and make the video and GUI elements seem more in sync.
Don't use Windowless
Windowless mode has a slight perf hit on Windows (it doesn't have a significant impact on Mac). Windowless mode is mainly used to mix Silverlight with HTML or other web elements in the same part of the screen.
Minimize overlays
While the fast path can operate with overlays, they do take additional CPU to process, so minimize the use and size of overlays to what’s useful. Even an invisible object that overlaps the video, like a play control set to transparent, still gets composited. Instead, when the control is going to go invisible, have it move entirely outside of the video rectangle. As long as it's not overlapping the media, no problem.
Keep MediaElement opaque
Speaking of keeping rendering of transparent elements to a minimum, you definitely want the video itself to be opaque, particularly at bigger frame sizes. Even a hint of transparency will require additional processing of every pixel of every frame.


Media Encoding


Constrain video peak bitrate
The main factors in CPU load for video decoding are how many pixels/second are being displayed (height * width * frames per second), and what the peak data rate of the video is.

    With a CBR (Constant Bitrate) encode, the peak and average bitrate are identical. The only variability is the buffer duration. Using a very long duration buffer (like 20 seconds) can make for a data rate spike within the buffer that can make for challenging encoding. 
    With a VBR (Variable Bitrate) encode, the peak is higher than the average. There’s no rule about what the difference is. Typically the peak is at least 1.5x the average, but it can go a lot higher. 
    A Buffer Window 1-2x your keyframe interval is a good starting point. You don’t want a buffer smaller than the keyframe rate, as the keyframes can wind up be starved for bits, resulting in the “blur-in” effect when the quality drops after a scene change. 

If you want to calibrate what VBR peak bitrate you can use on a particular system, it works to test with CBR. Just find out the bitrate + buffer duration you can use with CBR, and use that as the peak bitrate and buffer duration with your VBR encodes.
For high bitrate content where the perf ceiling of the peak buffer is a more important limitation than average bitrate, go ahead and use CBR encoding. That generally provides better results than VBR when the peak would be much less than 1.5x the average.
Encode audio at 44.1 KHz mono or stereo
Silverlight’s internal audio pipeline runs at 44.1 KHz, so even if the audio comes in at a higher rate, you should resample to 44.1 KHz on encode. If you have a lower sample rate source, it’s fine to leave it at that.
And while WMA 10 Professional supports 5.1 and 7.1 audio, Silverlight 2 always mixes down to stereo. So if you’re targeting Silverlight only, convert multichannel sources to stereo before encoding. This also enables the much more efficient WMA 10 Pro codec.
Crop letterboxing
This shouldn’t be news, but don’t encode non-image parts of the video frame, like letterboxing. A 640x480 frame with standard 1.85:1 letterboxing can be cropped and encoded at 640x352 without losing any visual information, but making encoding and decoding faster (36% fewer pixels need to be processed). Silverlight is more than capable of drawing the black rectangles for you client-side if you must have them.
Use Inverse Telecine with 3:2 pulldown

If the source content was sourced from 24p film, but transferred to 29.97i video with 3:2 pulldown, the video file will see a repeating pattern of three progressive and two interlaced frames. Instead of deinterlacing that video (with the inevitable artifacts) and encoding at 29.97, inverse telecine can restore the original 24p, eliminating deinterlacing artifacts, the framerate judder from the 24 to 30 remapping, and providing more bits per frame. And, of course, it’s 25% easier to decode and display 24 frames a second than 30. Make sure to turn the Silverlight application’s frame rate  down to 24 fps as well.
Encode as square pixel for fast path
If you’re shooting for the fast path, note that the scaling required for playing back anamorphic video will turn it off. If you have 16:9 720x480 source, you want to play back in a 848x480 window (16:9 480p) , you’ll need to encode at 848x480 if you want to get the fast path.
Depending on the design of your player and the performance of the system, it’ll vary as to whether you’re better off decoding fewer pixels (720x480 instead of 848x480), but losing the fast path. Testing both ways on your target platforms is, as always, the best thing to do.
Encode anamorphic sources as anamorphic for non-fast path
If you’re not going for the fast path, you might as well encode content authored as anamorphic, as anamorphic. For example, the DVCPROHD codec is internally 960x720 in 720p mode. That would be compressed as 1280x720 for 720p playback in square pixels. But since the source is only 960 wide, encoding at 960x720 (set to a 16:9 aspect ratio) will be 33% more efficient in terms of bitrate and decode performance. Depending on the platform, that can be well-worth the sacrifice of Fast Path.
Silverlight 2 specific
Just use Silverlight 2
Silverlight 2 has a bunch of perf improvements over Silverlight 1.0, the most notable being a faster VC-1 decoder and better scaling performance (with better quality to boot). The latter means that not using the Fast Path has less of an impact in Silverlight 2 than before.
The good news is that Silverlight automatically updates, so you don’t need to do anything specific to force this. It can be worth it to retest Silverlight 1.0 and Silverlight 2 Beta applications in Silverlight 2 to see if suggested system requirements can be lowered.


Use Andre &amp;amp; Akshay’s Custom Slider
Our Silverlight teammates Andre Michaud and Akshay Johar have build a custom slider that offers better performance for video playback, particularly with streaming content. This one doesn’t continuously generate valueChanged events, which would then turn into new seeks in the media file. Instead, it waits to issue them until either mouse up on the slider thumb or slider tracker, or just the last seek of a bunch of them if they come at once. So, the user can wiggle the mouse willly-nilly, but it won’t turn into a seek until the movement slows down, or they let go.
The code was in my previous blog post.

Use Expression Encoder 2 Service Pack 1 Templates
The new Expression Encoder 2 SP1 (which I really need to blog about, but then I should blog about Adaptive Streaming first, which is going to be another long post…) adds new Silverlight 2 templates. These implement the described best practices, including using the fast path if the Job Output’s Stretch Mode=None, and a less manic slider.
 
Test early, test often, test on your target platforms
This was one of my most-used articles of wisdom imparted to me by the legendary Charles Wiltgen of Kinoma. In any project, you want to define your minimum and recommended system specs. You need to have machines of those specs available to test to make sure they actually work. It’s obvious, but often missed. And for complex players with a lot of custom XAML, a Core 2 Extreme can get away with suboptimal design that’ll turn an older P4  into a filmstrip emulator (and you don’t even get that “beep”).</itunes:summary><link>http://on10.net/blogs/benwagg/Building-high-performance-Silverlight-Media-Players/</link><pubDate>Mon, 03 Nov 2008 23:33:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Building-high-performance-Silverlight-Media-Players/</guid><evnet:views>1761</evnet:views><evnet:viewtrackingurl>http://on10.net/23940/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Overview So, I get involved in a ton of conversations with various internal and external customers about building Silverlight media players. The great thing about Silverlight is that it's deep, and provides lots of ways to build complex applications that include media playback. The flip side of that is that, like all software engineering, there's plenty of sub-optimal ways to do thing that can have a negative impact on media playback performance. While it's tempting to assume everyone's got a hopping dual-core machine these days, that's not the case. When we reviewed the demographics for the…</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>6</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Building-high-performance-Silverlight-Media-Players/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23940/Trackback.aspx</trackback:ping><category>media players</category><category>programming</category><category>silverlight</category></item><item><title>NetFlix Silverlight player now in open Beta</title><description>&lt;p&gt;Just a quick note - &lt;a href="http://blog.netflix.com/2008/10/opt-in-for-new-netflix-movie-player.html"&gt;NetFlix is offering an open beta &lt;/a&gt;for their new Silverlight-based player.&lt;br /&gt;
&lt;br /&gt;
It's an opt-in, and once you opt-in, you need to use Silverlight on all your machines you use for "Watch Instantly."&lt;/p&gt;
&lt;blockquote dir="ltr"&gt;
&lt;h2 class="date-header"&gt;Friday, October 31, 2008&lt;/h2&gt;
&lt;a name="4108363928728240522"&gt;&lt;/a&gt;
&lt;h3 class="post-title entry-title"&gt;&lt;a href="http://blog.netflix.com/2008/10/opt-in-for-new-netflix-movie-player.html"&gt;Opt-in for the new Netflix movie player&lt;/a&gt; &lt;/h3&gt;
&lt;div class="post-header-line-1"&gt;&lt;/div&gt;
&lt;div class="post-body entry-content"&gt;Hi, Brent here with an update on our new player for the Mac and PC. We're past the first phase of our beta already, so I'd like to give you a chance to join in. But before doing so you need to consider the following:&lt;br /&gt;
&lt;/div&gt;
&lt;div class="post-body entry-content"&gt;
&lt;ul&gt;
    &lt;li&gt;There may be bugs. We are logging all errors, but if you run into problems you can help out by posting details here in the blog comments. &lt;/li&gt;
    &lt;li&gt;Not all movies are available to watch with Silverlight. You may notice errors or lower than normal quality when watching certain titles. &lt;/li&gt;
    &lt;li&gt;Our new player works on PCs and Intel-based Macs. &lt;/li&gt;
    &lt;li&gt;Windows users should be aware that if you opt in, you will need to use Silverlight on all the machines you use to watch instantly.&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;p&gt;Once you get up and running check out some of our newest content. We recently added a lot more movies, as well as recent episodes of many TV shows including Heroes, CSI and NCIS. You’ll find all these movies &amp;amp; TV episodes under the “Watch Instantly” tab of the website.&lt;br /&gt;
&lt;br /&gt;
So here’s the opt-in link:&lt;br /&gt;
&lt;a href="http://www.netflix.com/silverlightoptin"&gt;www.netflix.com/silverlightoptin&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Enjoy! &lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div class="post-footer-line post-footer-line-1"&gt;Posted by Brent at &lt;a href="http://blog.netflix.com/2008/10/opt-in-for-new-netflix-movie-player.html" class="timestamp-link" title="permanent link" rel="bookmark"&gt;1:45 PM&lt;/a&gt;&lt;/div&gt;
&lt;/blockquote&gt;&lt;img src="http://on10.net/23938/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/NetFlix-Silverlight-player-now-in-open-Beta/</comments><itunes:summary>Just a quick note - NetFlix is offering an open beta for their new Silverlight-based player.

It's an opt-in, and once you opt-in, you need to use Silverlight on all your machines you use for "Watch Instantly."

Friday, October 31, 2008

Opt-in for the new Netflix movie player 

Hi, Brent here with an update on our new player for the Mac and PC. We're past the first phase of our beta already, so I'd like to give you a chance to join in. But before doing so you need to consider the following:



    There may be bugs. We are logging all errors, but if you run into problems you can help out by posting details here in the blog comments. 
    Not all movies are available to watch with Silverlight. You may notice errors or lower than normal quality when watching certain titles. 
    Our new player works on PCs and Intel-based Macs. 
    Windows users should be aware that if you opt in, you will need to use Silverlight on all the machines you use to watch instantly.


Once you get up and running check out some of our newest content. We recently added a lot more movies, as well as recent episodes of many TV shows including Heroes, CSI and NCIS. You’ll find all these movies &amp;amp; TV episodes under the “Watch Instantly” tab of the website.

So here’s the opt-in link:
www.netflix.com/silverlightoptin

Enjoy! 

Posted by Brent at 1:45 PM
</itunes:summary><link>http://on10.net/blogs/benwagg/NetFlix-Silverlight-player-now-in-open-Beta/</link><pubDate>Mon, 03 Nov 2008 19:18:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/NetFlix-Silverlight-player-now-in-open-Beta/</guid><evnet:views>1619</evnet:views><evnet:viewtrackingurl>http://on10.net/23938/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Just a quick note - &lt;a href="http://blog.netflix.com/2008/10/opt-in-for-new-netflix-movie-player.html"&gt;NetFlix is offering an open beta &lt;/a&gt;for their new Silverlight-based player.&lt;br /&gt;
&lt;br /&gt;
It's an opt-in, and once you opt-in, you need to use Silverlight on all your machines you use for "Watch Instantly."&lt;br /&gt;
&lt;br /&gt;</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>0</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/NetFlix-Silverlight-player-now-in-open-Beta/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23938/Trackback.aspx</trackback:ping><category>Netflix</category><category>silverlight</category></item><item><title>New Custom Slider for Silverlight 2 media players</title><description>&lt;p&gt;My Silverlight teammates Akshay Johar and Andre Michaud have built a new custom slider for use in Silverlight 2 media players.&lt;/p&gt;
&lt;p&gt;When you scrub the default slider in a MediaElement today, it generates a whole slew of valueChanged events, resulting in a huge number of seeks per second. This can confuse media playback, particularly when streaming from Windows Media Services, which then gets flooded with many requests a second.&lt;/p&gt;
&lt;p&gt;Essentially it detects a “crazy mode” scrub, and quietly ignores it while the “crazy mode” is in place. Once out of this mode, it happily sends and receives a successful seek.&lt;/p&gt;
&lt;p&gt;So, the player only fires ValueChanged on mouse up (on the slider thumb or the slider tracker), or the final seek request of a cluster that comes in at once.&lt;/p&gt;
&lt;p&gt;It’s also uses Tim Heuer’s &lt;a href="http://timheuer.com/blog/archive/2008/09/08/customizing-slider-enable-move-mouse-to-point.aspx" target="_blank"&gt;absolute value slider&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Now, let me try this new &lt;a href="http://get.live.com/writer/overview" target="_blank"&gt;Windows Live Writer&lt;/a&gt; plug-in for &lt;a href="http://gallery.live.com/liveItemDetail.aspx?li=1f57bd9b-a692-4593-9e9e-e2962d9c0eee&amp;amp;bt=9&amp;amp;pl=8" target="_blank"&gt;Insert Code Snippet&lt;/a&gt; for the C# code.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;(EDIT)&lt;/strong&gt; A sample project is also now &lt;a href="http://http://on10.net/blogs/benwagg/Custom-Slider-for-Silverlight-2-Media-Players-available-for-download/"&gt;available for download&lt;/a&gt;.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span&gt; 1:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 2:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Net;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 3:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Windows;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 4:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Windows.Controls;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 5:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Windows.Documents;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 6:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Windows.Ink;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 7:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Windows.Input;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 8:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Windows.Media;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 9:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Windows.Media.Animation;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 10:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Windows.Shapes;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 11:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Windows.Controls.Primitives;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 12:&lt;/span&gt; &lt;span&gt;using&lt;/span&gt; System.Windows.Threading;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 13:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 14:&lt;/span&gt; &lt;span&gt;namespace&lt;/span&gt; VirtualizedSlider&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 15:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 16:&lt;/span&gt;     &lt;span&gt;public&lt;/span&gt; &lt;span&gt;class&lt;/span&gt; CustomSlider : Slider&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 17:&lt;/span&gt;     {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 18:&lt;/span&gt;         &lt;span&gt;public&lt;/span&gt; Thumb horizontalThumb;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 19:&lt;/span&gt;         &lt;span&gt;private&lt;/span&gt; FrameworkElement horizontalLeftTrack;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 20:&lt;/span&gt;         &lt;span&gt;private&lt;/span&gt; FrameworkElement horizontalRightTrack;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 21:&lt;/span&gt;         &lt;span&gt;private&lt;/span&gt; &lt;span&gt;double&lt;/span&gt; oldValue = 0, newValue = 0, prevNewValue = 0;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 22:&lt;/span&gt;         &lt;span&gt;public&lt;/span&gt; &lt;span&gt;event&lt;/span&gt; RoutedPropertyChangedEventHandler&amp;lt;&lt;span&gt;double&lt;/span&gt;&amp;gt; MyValueChanged;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 23:&lt;/span&gt;         &lt;span&gt;public&lt;/span&gt; &lt;span&gt;event&lt;/span&gt; RoutedPropertyChangedEventHandler&amp;lt;&lt;span&gt;double&lt;/span&gt;&amp;gt; MyValueChangedInDrag;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 24:&lt;/span&gt;         &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 25:&lt;/span&gt;         &lt;span&gt;private&lt;/span&gt; DispatcherTimer dragtimer = &lt;span&gt;new&lt;/span&gt; DispatcherTimer();&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 26:&lt;/span&gt;         &lt;span&gt;private&lt;/span&gt; &lt;span&gt;double&lt;/span&gt; dragTimeElapsed = 0;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 27:&lt;/span&gt;         &lt;span&gt;private&lt;/span&gt; &lt;span&gt;const&lt;/span&gt; &lt;span&gt;short&lt;/span&gt; DragWaitThreshold = 200, DragWaitInterval = 100;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 28:&lt;/span&gt;         &lt;span&gt;public&lt;/span&gt; Rectangle progressRect = &lt;span&gt;null&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 29:&lt;/span&gt;         &lt;span&gt;private&lt;/span&gt; &lt;span&gt;bool&lt;/span&gt; dragSeekJustFired = &lt;span&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 30:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 31:&lt;/span&gt;         &lt;span&gt;public&lt;/span&gt; CustomSlider()&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 32:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 33:&lt;/span&gt;             &lt;span&gt;this&lt;/span&gt;.ValueChanged += &lt;span&gt;new&lt;/span&gt; RoutedPropertyChangedEventHandler&amp;lt;&lt;span&gt;double&lt;/span&gt;&amp;gt;(CustomSlider_ValueChanged);&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 34:&lt;/span&gt;             dragtimer.Interval = &lt;span&gt;new&lt;/span&gt; TimeSpan(0, 0, 0, 0, DragWaitInterval);&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 35:&lt;/span&gt;             dragtimer.Tick += &lt;span&gt;new&lt;/span&gt; EventHandler(dragtimer_Tick);&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 36:&lt;/span&gt;             &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 37:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 38:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 39:&lt;/span&gt;         &lt;span&gt;void&lt;/span&gt; dragtimer_Tick(&lt;span&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 40:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 41:&lt;/span&gt;             dragTimeElapsed += DragWaitInterval;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 42:&lt;/span&gt;             &lt;span&gt;if&lt;/span&gt; (dragTimeElapsed &amp;gt;= DragWaitThreshold)&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 43:&lt;/span&gt;             {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 44:&lt;/span&gt;                 RoutedPropertyChangedEventHandler&amp;lt;&lt;span&gt;double&lt;/span&gt;&amp;gt; handler = MyValueChangedInDrag;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 45:&lt;/span&gt;                 &lt;span&gt;if&lt;/span&gt; ((handler != &lt;span&gt;null&lt;/span&gt;) &amp;amp;&amp;amp; (newValue != prevNewValue))&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 46:&lt;/span&gt;                 {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 47:&lt;/span&gt;                     handler(&lt;span&gt;this&lt;/span&gt;, &lt;span&gt;new&lt;/span&gt; RoutedPropertyChangedEventArgs&amp;lt;&lt;span&gt;double&lt;/span&gt;&amp;gt;(oldValue, newValue));&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 48:&lt;/span&gt;                     dragSeekJustFired = &lt;span&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 49:&lt;/span&gt;                     prevNewValue = newValue;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 50:&lt;/span&gt;                 }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 51:&lt;/span&gt;                 dragTimeElapsed = 0;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 52:&lt;/span&gt;             }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 53:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 54:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 55:&lt;/span&gt;         &lt;span&gt;void&lt;/span&gt; CustomSlider_ValueChanged(&lt;span&gt;object&lt;/span&gt; sender, RoutedPropertyChangedEventArgs&amp;lt;&lt;span&gt;double&lt;/span&gt;&amp;gt; e)&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 56:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 57:&lt;/span&gt;             oldValue = e.OldValue;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 58:&lt;/span&gt;             newValue = e.NewValue;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 59:&lt;/span&gt;             &lt;span&gt;if&lt;/span&gt; (horizontalThumb.IsDragging)&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 60:&lt;/span&gt;             {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 61:&lt;/span&gt;                 dragTimeElapsed = 0;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 62:&lt;/span&gt;                 dragtimer.Stop();&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 63:&lt;/span&gt;                 dragtimer.Start();&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 64:&lt;/span&gt;                 dragSeekJustFired = &lt;span&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 65:&lt;/span&gt;             }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 66:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 67:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 68:&lt;/span&gt;         &lt;span&gt;public&lt;/span&gt; &lt;span&gt;override&lt;/span&gt; &lt;span&gt;void&lt;/span&gt; OnApplyTemplate()&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 69:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 70:&lt;/span&gt;             &lt;span&gt;base&lt;/span&gt;.OnApplyTemplate();&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 71:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 72:&lt;/span&gt;             horizontalThumb = GetTemplateChild(&lt;span&gt;"HorizontalThumb"&lt;/span&gt;) &lt;span&gt;as&lt;/span&gt; Thumb;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 73:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 74:&lt;/span&gt;             horizontalLeftTrack = GetTemplateChild(&lt;span&gt;"LeftTrack"&lt;/span&gt;) &lt;span&gt;as&lt;/span&gt; FrameworkElement;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 75:&lt;/span&gt;             horizontalRightTrack = GetTemplateChild(&lt;span&gt;"RightTrack"&lt;/span&gt;) &lt;span&gt;as&lt;/span&gt; FrameworkElement;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 76:&lt;/span&gt;             progressRect = GetTemplateChild(&lt;span&gt;"progressRect"&lt;/span&gt;) &lt;span&gt;as&lt;/span&gt; Rectangle;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 77:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 78:&lt;/span&gt;             &lt;span&gt;if&lt;/span&gt; (horizontalLeftTrack != &lt;span&gt;null&lt;/span&gt;) horizontalLeftTrack.MouseLeftButtonDown += &lt;span&gt;new&lt;/span&gt; MouseButtonEventHandler(OnMoveThumbToMouse);&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 79:&lt;/span&gt;             &lt;span&gt;if&lt;/span&gt; (horizontalRightTrack != &lt;span&gt;null&lt;/span&gt;) horizontalRightTrack.MouseLeftButtonDown += &lt;span&gt;new&lt;/span&gt; MouseButtonEventHandler(OnMoveThumbToMouse);&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 80:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 81:&lt;/span&gt;             horizontalThumb.DragCompleted += &lt;span&gt;new&lt;/span&gt; DragCompletedEventHandler(DragCompleted);&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 82:&lt;/span&gt;             progressRect.Width = &lt;span&gt;this&lt;/span&gt;.Width;            &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 83:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 84:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 85:&lt;/span&gt;         &lt;span&gt;private&lt;/span&gt; &lt;span&gt;void&lt;/span&gt; OnMoveThumbToMouse(&lt;span&gt;object&lt;/span&gt; sender, MouseButtonEventArgs e)&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 86:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 87:&lt;/span&gt;             e.Handled = &lt;span&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 88:&lt;/span&gt;             Point p = e.GetPosition(&lt;span&gt;this&lt;/span&gt;);&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 89:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 90:&lt;/span&gt;             &lt;span&gt;if&lt;/span&gt; (&lt;span&gt;this&lt;/span&gt;.Orientation == Orientation.Horizontal)&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 91:&lt;/span&gt;             {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 92:&lt;/span&gt;                 Value = (p.X - (horizontalThumb.ActualWidth / 2)) / (ActualWidth - horizontalThumb.ActualWidth) * Maximum;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 93:&lt;/span&gt;             }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 94:&lt;/span&gt;             RoutedPropertyChangedEventHandler&amp;lt;&lt;span&gt;double&lt;/span&gt;&amp;gt; handler = MyValueChanged;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 95:&lt;/span&gt;             &lt;span&gt;if&lt;/span&gt; (handler != &lt;span&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 96:&lt;/span&gt;             {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 97:&lt;/span&gt;                 handler(&lt;span&gt;this&lt;/span&gt;, &lt;span&gt;new&lt;/span&gt; RoutedPropertyChangedEventArgs&amp;lt;&lt;span&gt;double&lt;/span&gt;&amp;gt;(oldValue, Value));&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 98:&lt;/span&gt;             }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 99:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 100:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 101:&lt;/span&gt;         &lt;span&gt;private&lt;/span&gt; &lt;span&gt;void&lt;/span&gt; DragCompleted(&lt;span&gt;object&lt;/span&gt; sender, DragCompletedEventArgs e)&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 102:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 103:&lt;/span&gt;             dragtimer.Stop();&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 104:&lt;/span&gt;             dragTimeElapsed = 0;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 105:&lt;/span&gt;             RoutedPropertyChangedEventHandler&amp;lt;&lt;span&gt;double&lt;/span&gt;&amp;gt; handler = MyValueChanged;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 106:&lt;/span&gt;             &lt;span&gt;if&lt;/span&gt; ((handler != &lt;span&gt;null&lt;/span&gt;) &amp;amp;&amp;amp; (!dragSeekJustFired))&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 107:&lt;/span&gt;             {&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 108:&lt;/span&gt;                 handler(&lt;span&gt;this&lt;/span&gt;, &lt;span&gt;new&lt;/span&gt; RoutedPropertyChangedEventArgs&amp;lt;&lt;span&gt;double&lt;/span&gt;&amp;gt;(oldValue, &lt;span&gt;this&lt;/span&gt;.Value));&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 109:&lt;/span&gt;             }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 110:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 111:&lt;/span&gt;     }&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 112:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;And here’s the XAML from the progressSliderStyle, demonstrating how the custom slider knows about mouse clicks on the track (the “LeftTrack” and “RightTrack” rectangles inserted in the template handle this):&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span&gt; 1:&lt;/span&gt; &amp;lt;Setter Property=&lt;span&gt;"Template"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 2:&lt;/span&gt;                  &amp;lt;Setter.Value&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 3:&lt;/span&gt;                      &amp;lt;ControlTemplate TargetType=&lt;span&gt;"Slider"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 4:&lt;/span&gt;                          &amp;lt;Grid x:Name=&lt;span&gt;"Root"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 5:&lt;/span&gt;                              &amp;lt;Grid.Resources&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 6:&lt;/span&gt;                                  &amp;lt;ControlTemplate x:Key=&lt;span&gt;"RepeatButtonTemplate"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 7:&lt;/span&gt;                                      &amp;lt;Grid x:Name=&lt;span&gt;"Root"&lt;/span&gt; Opacity=&lt;span&gt;"0"&lt;/span&gt; Background=&lt;span&gt;"Transparent"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 8:&lt;/span&gt;                                  &amp;lt;/ControlTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 9:&lt;/span&gt;                              &amp;lt;/Grid.Resources&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 10:&lt;/span&gt;                              &amp;lt;vsm:VisualStateManager.VisualStateGroups&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 11:&lt;/span&gt;                                  &amp;lt;vsm:VisualStateGroup x:Name=&lt;span&gt;"CommonStates"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 12:&lt;/span&gt;                                      &amp;lt;vsm:VisualState x:Name=&lt;span&gt;"Normal"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 13:&lt;/span&gt;                                      &amp;lt;vsm:VisualState x:Name=&lt;span&gt;"MouseOver"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 14:&lt;/span&gt;                                      &amp;lt;vsm:VisualState x:Name=&lt;span&gt;"Disabled"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 15:&lt;/span&gt;                                          &amp;lt;Storyboard&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 16:&lt;/span&gt;                                              &amp;lt;DoubleAnimation Storyboard.TargetName=&lt;span&gt;"Root"&lt;/span&gt; Storyboard.TargetProperty=&lt;span&gt;"(UIElement.Opacity)"&lt;/span&gt; To=&lt;span&gt;"0.5"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 17:&lt;/span&gt;                                          &amp;lt;/Storyboard&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 18:&lt;/span&gt;                                      &amp;lt;/vsm:VisualState&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 19:&lt;/span&gt;                                  &amp;lt;/vsm:VisualStateGroup&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 20:&lt;/span&gt;                              &amp;lt;/vsm:VisualStateManager.VisualStateGroups&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 21:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 22:&lt;/span&gt;                              &amp;lt;!-- Horizontal Template --&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 23:&lt;/span&gt;                              &amp;lt;Grid x:Name=&lt;span&gt;"HorizontalTemplate"&lt;/span&gt; Background=&lt;span&gt;"{TemplateBinding Background}"&lt;/span&gt;&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 24:&lt;/span&gt;                                  &amp;lt;Grid.ColumnDefinitions&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 25:&lt;/span&gt;                                      &amp;lt;ColumnDefinition Width=&lt;span&gt;"Auto"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 26:&lt;/span&gt;                                      &amp;lt;ColumnDefinition Width=&lt;span&gt;"Auto"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 27:&lt;/span&gt;                                      &amp;lt;ColumnDefinition Width=&lt;span&gt;"*"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 28:&lt;/span&gt;                                  &amp;lt;/Grid.ColumnDefinitions&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 29:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 30:&lt;/span&gt;                                  &amp;lt;!-- Track Layer --&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 31:&lt;/span&gt;                                  &amp;lt;Rectangle x:Name=&lt;span&gt;"progressRect"&lt;/span&gt; Stroke=&lt;span&gt;"#FFA3AEB9"&lt;/span&gt; StrokeThickness=&lt;span&gt;"{TemplateBinding BorderThickness}"&lt;/span&gt; Fill=&lt;span&gt;"Red"&lt;/span&gt; Grid.Column=&lt;span&gt;"0"&lt;/span&gt; Grid.ColumnSpan=&lt;span&gt;"3"&lt;/span&gt; Height=&lt;span&gt;"3"&lt;/span&gt; Width=&lt;span&gt;"5"&lt;/span&gt; RadiusX=&lt;span&gt;"1"&lt;/span&gt; RadiusY=&lt;span&gt;"1"&lt;/span&gt; Margin=&lt;span&gt;"5,0,5,0"&lt;/span&gt; Canvas.ZIndex=&lt;span&gt;"1"&lt;/span&gt; Visibility=&lt;span&gt;"Collapsed"&lt;/span&gt; HorizontalAlignment=&lt;span&gt;"Left"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 32:&lt;/span&gt;                                  &amp;lt;Rectangle Stroke=&lt;span&gt;"#FFA3AEB9"&lt;/span&gt; StrokeThickness=&lt;span&gt;"{TemplateBinding BorderThickness}"&lt;/span&gt; Fill=&lt;span&gt;"#FFE6EFF7"&lt;/span&gt; Grid.Column=&lt;span&gt;"0"&lt;/span&gt; Grid.ColumnSpan=&lt;span&gt;"3"&lt;/span&gt; Height=&lt;span&gt;"3"&lt;/span&gt; RadiusX=&lt;span&gt;"1"&lt;/span&gt; RadiusY=&lt;span&gt;"1"&lt;/span&gt; Margin=&lt;span&gt;"5,0,5,0"&lt;/span&gt;  Canvas.ZIndex=&lt;span&gt;"0"&lt;/span&gt; /&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 33:&lt;/span&gt;  &lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 34:&lt;/span&gt;                                  &amp;lt;!-- Repeat Buttons + Thumb --&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 35:&lt;/span&gt;                                  &amp;lt;RepeatButton x:Name=&lt;span&gt;"HorizontalTrackLargeChangeDecreaseRepeatButton"&lt;/span&gt; IsTabStop=&lt;span&gt;"False"&lt;/span&gt; Template=&lt;span&gt;"{StaticResource RepeatButtonTemplate}"&lt;/span&gt; Grid.Column=&lt;span&gt;"0"&lt;/span&gt; Canvas.ZIndex=&lt;span&gt;"1"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 36:&lt;/span&gt;                                  &amp;lt;Rectangle x:Name=&lt;span&gt;"LeftTrack"&lt;/span&gt; Grid.Column=&lt;span&gt;"0"&lt;/span&gt; Fill=&lt;span&gt;"#00FFFFFF"&lt;/span&gt; Cursor=&lt;span&gt;"Hand"&lt;/span&gt; Canvas.ZIndex=&lt;span&gt;"1"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 37:&lt;/span&gt;                                  &amp;lt;Thumb Height=&lt;span&gt;"18"&lt;/span&gt; x:Name=&lt;span&gt;"HorizontalThumb"&lt;/span&gt; Width=&lt;span&gt;"11"&lt;/span&gt; Grid.Column=&lt;span&gt;"1"&lt;/span&gt; IsTabStop=&lt;span&gt;"True"&lt;/span&gt; Canvas.ZIndex=&lt;span&gt;"1"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 38:&lt;/span&gt;                                  &amp;lt;RepeatButton x:Name=&lt;span&gt;"HorizontalTrackLargeChangeIncreaseRepeatButton"&lt;/span&gt; IsTabStop=&lt;span&gt;"False"&lt;/span&gt; Template=&lt;span&gt;"{StaticResource RepeatButtonTemplate}"&lt;/span&gt; Grid.Column=&lt;span&gt;"2"&lt;/span&gt; Canvas.ZIndex=&lt;span&gt;"1"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 39:&lt;/span&gt;                                  &amp;lt;Rectangle x:Name=&lt;span&gt;"RightTrack"&lt;/span&gt; Grid.Column=&lt;span&gt;"2"&lt;/span&gt; Fill=&lt;span&gt;"#00FFFFFF"&lt;/span&gt; Cursor=&lt;span&gt;"Hand"&lt;/span&gt; Canvas.ZIndex=&lt;span&gt;"1"&lt;/span&gt;/&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 40:&lt;/span&gt;                              &amp;lt;/Grid&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 41:&lt;/span&gt;                          &amp;lt;/Grid&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 42:&lt;/span&gt;                      &amp;lt;/ControlTemplate&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 43:&lt;/span&gt;                  &amp;lt;/Setter.Value&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span&gt; 44:&lt;/span&gt;              &amp;lt;/Setter&amp;gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;img src="http://on10.net/23884/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/New-Custom-Slider-for-Silverlight-2-media-players/</comments><itunes:summary>My Silverlight teammates Akshay Johar and Andre Michaud have built a new custom slider for use in Silverlight 2 media players.
When you scrub the default slider in a MediaElement today, it generates a whole slew of valueChanged events, resulting in a huge number of seeks per second. This can confuse media playback, particularly when streaming from Windows Media Services, which then gets flooded with many requests a second.
Essentially it detects a “crazy mode” scrub, and quietly ignores it while the “crazy mode” is in place. Once out of this mode, it happily sends and receives a successful seek.
So, the player only fires ValueChanged on mouse up (on the slider thumb or the slider tracker), or the final seek request of a cluster that comes in at once.
It’s also uses Tim Heuer’s absolute value slider.
Now, let me try this new Windows Live Writer plug-in for Insert Code Snippet for the C# code.

(EDIT) A sample project is also now available for download.


 1: using System;
 2: using System.Net;
 3: using System.Windows;
 4: using System.Windows.Controls;
 5: using System.Windows.Documents;
 6: using System.Windows.Ink;
 7: using System.Windows.Input;
 8: using System.Windows.Media;
 9: using System.Windows.Media.Animation;
 10: using System.Windows.Shapes;
 11: using System.Windows.Controls.Primitives;
 12: using System.Windows.Threading;
 13:  
 14: namespace VirtualizedSlider
 15: {
 16:     public class CustomSlider : Slider
 17:     {
 18:         public Thumb horizontalThumb;
 19:         private FrameworkElement horizontalLeftTrack;
 20:         private FrameworkElement horizontalRightTrack;
 21:         private double oldValue = 0, newValue = 0, prevNewValue = 0;
 22:         public event RoutedPropertyChangedEventHandler&amp;lt;double&amp;gt; MyValueChanged;
 23:         public event RoutedPropertyChangedEventHandler&amp;lt;double&amp;gt; MyValueChangedInDrag;
 24:         
 25:         private DispatcherTimer dragtimer = new DispatcherTimer();
 26:         private double dragTimeElapsed = 0;
 27:         private const short DragWaitThreshold = 200, DragWaitInterval = 100;
 28:         public Rectangle progressRect = null;
 29:         private bool dragSeekJustFired = false;
 30:  
 31:         public CustomSlider()
 32:         {
 33:             this.ValueChanged += new RoutedPropertyChangedEventHandler&amp;lt;double&amp;gt;(CustomSlider_ValueChanged);
 34:             dragtimer.Interval = new TimeSpan(0, 0, 0, 0, DragWaitInterval);
 35:             dragtimer.Tick += new EventHandler(dragtimer_Tick);
 36:             
 37:         }
 38:  
 39:         void dragtimer_Tick(object sender, EventArgs e)
 40:         {
 41:             dragTimeElapsed += DragWaitInterval;
 42:             if (dragTimeElapsed &amp;gt;= DragWaitThreshold)
 43:             {
 44:                 RoutedPropertyChangedEventHandler&amp;lt;double&amp;gt; handler = MyValueChangedInDrag;
 45:                 if ((handler != null) &amp;amp;&amp;amp; (newValue != prevNewValue))
 46:                 {
 47:                     handler(this, new RoutedPropertyChangedEventArgs&amp;lt;double&amp;gt;(oldValue, newValue));
 48:                     dragSeekJustFired = true;
 49:                     prevNewValue = newValue;
 50:                 }
 51:                 dragTimeElapsed = 0;
 52:             }
 53:         }
 54:  
 55:         void CustomSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs&amp;lt;double&amp;gt; e)
 56:         {
 57:             oldValue = e.OldValue;
 58:             newValue = e.NewValue;
 59:             if (horizontalThumb.IsDragging)
 60:             {
 61:                 dragTimeElapsed = 0;
 62:                 dragtimer.Stop();
 63:                 dragtimer.Start();
 64:                 dragSeekJustFired = false;
 65:             }
 66:         }
 67:  
 68:         public override void OnApplyTemplate()
 69:         {
 70:             base.OnApplyTemplate();
 71:  
 72:             horizontalThumb = GetTemplateChild("HorizontalThumb") as Thumb;
 73:  
 74:             horizontalLeftTrack = GetTemplateChild("LeftTrack") as FrameworkElement;
 75:             horizontalRightTrack = GetTemplateChild("RightTrack") as FrameworkElement;
 76:             progressRect = GetTemplateChild("progressRect") as Rectangle;
 77:  
 78:             if (horizontalLeftTrack != null) horizontalLeftTrack.MouseLeftButtonDown += new MouseButtonEventHandler(OnMoveThumbToMouse);
 79:             if (horizontalRightTrack != null) horizontalRightTrack.MouseLeftButtonDown += new MouseButtonEventHandler(OnMoveThumbToMouse);
 80:  
 81:             horizontalThumb.DragCompleted += new DragCompletedEventHandler(DragCompleted);
 82:             progressRect.Width = this.Width;            
 83:         }
 84:  
 85:         private void OnMoveThumbToMouse(object sender, MouseButtonEventArgs e)
 86:         {
 87:             e.Handled = true;
 88:             Point p = e.GetPosition(this);
 89:  
 90:             if (this.Orientation == Orientation.Horizontal)
 91:             {
 92:                 Value = (p.X - (horizontalThumb.ActualWidth / 2)) / (ActualWidth - horizontalThumb.ActualWidth) * Maximum;
 93:             }
 94:             RoutedPropertyChangedEventHandler&amp;lt;double&amp;gt; handler = MyValueChanged;
 95:             if (handler != null)
 96:             {
 97:                 handler(this, new RoutedPropertyChangedEventArgs&amp;lt;double&amp;gt;(oldValue, Value));
 98:             }
 99:         }
 100:  
 101:         private void DragCompleted(object sender, DragCompletedEventArgs e)
 102:         {
 103:             dragtimer.Stop();
 104:             dragTimeElapsed = 0;
 105:             RoutedPropertyChangedEventHandler&amp;lt;double&amp;gt; handler = MyValueChanged;
 106:             if ((handler != null) &amp;amp;&amp;amp; (!dragSeekJustFired))
 107:             {
 108:                 handler(this, new RoutedPropertyChangedEventArgs&amp;lt;double&amp;gt;(oldValue, this.Value));
 109:             }
 110:         }
 111:     }
 112: }


 
And here’s the XAML from the progressSliderStyle, demonstrating how the custom slider knows about mouse clicks on the track (the “LeftTrack” and “RightTrack” rectangles inserted in the template handle this):


 1: &amp;lt;Setter Property="Template"&amp;gt;
 2:                  &amp;lt;Setter.Value&amp;gt;
 3:                      &amp;lt;ControlTemplate TargetType="Slider"&amp;gt;
 4:                          &amp;lt;Grid x:Name="Root"&amp;gt;
 5:                              &amp;lt;Grid.Resources&amp;gt;
 6:                                  &amp;lt;ControlTemplate x:Key="RepeatButtonTemplate"&amp;gt;
 7:                                      &amp;lt;Grid x:Name="Root" Opacity="0" Background="Transparent"/&amp;gt;
 8:                                  &amp;lt;/ControlTemplate&amp;gt;
 9:                              &amp;lt;/Grid.Resources&amp;gt;
 10:                              &amp;lt;vsm:VisualStateManager.VisualStateGroups&amp;gt;
 11:                                  &amp;lt;vsm:VisualStateGroup x:Name="CommonStates"&amp;gt;
 12:                                      &amp;lt;vsm:VisualState x:Name="Normal"/&amp;gt;
 13:                                      &amp;lt;vsm:VisualState x:Name="MouseOver"/&amp;gt;
 14:                                      &amp;lt;vsm:VisualState x:Name="Disabled"&amp;gt;
 15:                                          &amp;lt;Storyboard&amp;gt;
 16:                                              &amp;lt;DoubleAnimation Storyboard.TargetName="Root" Storyboard.TargetProperty="(UIElement.Opacity)" To="0.5"/&amp;gt;
 17:                                          &amp;lt;/Storyboard&amp;gt;
 18:                                      &amp;lt;/vsm:VisualState&amp;gt;
 19:                                  &amp;lt;/vsm:VisualStateGroup&amp;gt;
 20:                              &amp;lt;/vsm:VisualStateManager.VisualStateGroups&amp;gt;
 21:  
 22:                              &amp;lt;!-- Horizontal Template --&amp;gt;
 23:                              &amp;lt;Grid x:Name="HorizontalTemplate" Background="{TemplateBinding Background}"&amp;gt;
 24:                                  &amp;lt;Grid.ColumnDefinitions&amp;gt;
 25:                                      &amp;lt;ColumnDefinition Width="Auto"/&amp;gt;
 26:                                      &amp;lt;ColumnDefinition Width="Auto"/&amp;gt;
 27:                                      &amp;lt;ColumnDefinition Width="*"/&amp;gt;
 28:                                  &amp;lt;/Grid.ColumnDefinitions&amp;gt;
 29:  
 30:                                  &amp;lt;!-- Track Layer --&amp;gt;
 31:                                  &amp;lt;Rectangle x:Name="progressRect" Stroke="#FFA3AEB9" StrokeThickness="{TemplateBinding BorderThickness}" Fill="Red" Grid.Column="0" Grid.ColumnSpan="3" Height="3" Width="5" RadiusX="1" RadiusY="1" Margin="5,0,5,0" Canvas.ZIndex="1" Visibility="Collapsed" HorizontalAlignment="Left" /&amp;gt;
 32:                                  &amp;lt;Rectangle Stroke="#FFA3AEB9" StrokeThickness="{TemplateBinding BorderThickness}" Fill="#FFE6EFF7" Grid.Column="0" Grid.ColumnSpan="3" Height="3" RadiusX="1" RadiusY="1" Margin="5,0,5,0"  Canvas.ZIndex="0" /&amp;gt;
 33:  
 34:                                  &amp;lt;!-- Repeat Buttons + Thumb --&amp;gt;
 35:                                  &amp;lt;RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="0" Canvas.ZIndex="1"/&amp;gt;
 36:                                  &amp;lt;Rectangle x:Name="LeftTrack" Grid.Column="0" Fill="#00FFFFFF" Cursor="Hand" Canvas.ZIndex="1"/&amp;gt;
 37:                                  &amp;lt;Thumb Height="18" x:Name="HorizontalThumb" Width="11" Grid.Column="1" IsTabStop="True" Canvas.ZIndex="1"/&amp;gt;
 38:                                  &amp;lt;RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}" Grid.Column="2" Canvas.ZIndex="1"/&amp;gt;
 39:                                  &amp;lt;Rectangle x:Name="RightTrack" Grid.Column="2" Fill="#00FFFFFF" Cursor="Hand" Canvas.ZIndex="1"/&amp;gt;
 40:                              &amp;lt;/Grid&amp;gt;
 41:                          &amp;lt;/Grid&amp;gt;
 42:                      &amp;lt;/ControlTemplate&amp;gt;
 43:                  &amp;lt;/Setter.Value&amp;gt;
 44:              &amp;lt;/Setter&amp;gt;

</itunes:summary><link>http://on10.net/blogs/benwagg/New-Custom-Slider-for-Silverlight-2-media-players/</link><pubDate>Tue, 28 Oct 2008 22:13:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/New-Custom-Slider-for-Silverlight-2-media-players/</guid><evnet:views>2022</evnet:views><evnet:viewtrackingurl>http://on10.net/23884/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>&lt;p&gt;My Silverlight teammates Akshay Johar and Andre Michaud have built a new custom slider for use in Silverlight 2 media players.&lt;/p&gt;
&lt;p&gt;When you scrub the default slider in a MediaElement today, it generates a whole slew of valueChanged events, resulting in a huge number of seeks per second. This can confuse media playback, particularly when streaming from Windows Media Services, which then gets flooded with many requests a second.&lt;/p&gt;
&lt;p&gt;Essentially it detects a “crazy mode” scrub, and quietly ignores it while the “crazy mode” is in place.&lt;/p&gt;</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>3</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/New-Custom-Slider-for-Silverlight-2-media-players/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23884/Trackback.aspx</trackback:ping><category>C#</category><category>silverlight</category><category>XAML</category></item><item><title>Silverlight 2 powering Netflix on Mac</title><description>&lt;p&gt;It's been discussed for a while, but the time is now - Netflix has just announced &lt;a href="http://netflix.mediaroom.com/index.php?s=43&amp;amp;item=288"&gt;Silverlight 2 will power their streaming video service&lt;/a&gt;, which had been Windows-only until now. Silverlight 2 adds support for &lt;a href="http://search.live.com/results.aspx?q=playready+silverlight+&amp;amp;src=IE-SearchBox&amp;amp;Form=IE8SRC" target="_blank"&gt;PlayReady&lt;/a&gt; &lt;a href="http://www.microsoft.com/silverlight/overview/media.aspx" target="_blank"&gt;DRM&lt;/a&gt;, so we now have the same DRM support on Mac and Windows. The &lt;a href="http://www.xbox.com/en-US/community/events/e32008/articles/0714-netflixteamup.htm?WText.camp=Marketplace&amp;amp;WText.campSrc=RSS" target="_blank"&gt;service will be available on Xbox 360&lt;/a&gt; as well.&lt;/p&gt;
&lt;p&gt;You have to be a Netflix subscriber of course, but the content is commercial-free and much higher quality than the various free video services. They encode up to a full 720x480, in proper 4:3 or 16:9, at a range of bitrates. The higher rates definitely outperform standard def cable and satellite in video quality.&lt;/p&gt;
&lt;p&gt;Lots of good stuff in the press release, but I had a couple of things I wanted to call out (bolding mine).&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Netflix, Inc. (NASDAQ: NFLX), the world's largest online movie rental service, today announced it has begun the deployment of Microsoft Silverlight to enhance the instant watching component of the Netflix service and to allow subscribers for the first time to watch movies and TV episodes instantly on their Intel-based Apple Macintosh computers. &lt;strong&gt;The deployment, which will initially touch a small percentage of new Netflix subscribers, is the first step in an anticipated roll-out of the new platform to all Netflix subscribers by the end of the year.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Note that this won’t be immediately available to all customers.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Silverlight is designed for delivery of cross-platform, cross-browser media experiences inside a Web browser. It is expected that Netflix members who watch movies and TV episodes instantly on their computers will enjoy a faster, easier connection and a more robust viewing experience with Silverlight, due to the quality built directly into the player. &lt;strong&gt;Among the viewing enhancements with the new player is a breakthrough in timeline navigation that vastly improves the use of fast-forwarding and rewinding. The new Netflix player takes advantage of PlayReady DRM, which is built into Silverlight, for the playback of protected content on both Windows-based PCs and on Macs. That had not been possible with previous generation technologies.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is one of the first big rollouts of PlayReady with Silverlight in the USA. When you see the new navigation, it’s a real testament to the difference between a media player plugin like the WMP OCX, and a rich application runtime that plays media well like Silverlight.&lt;/p&gt;
&lt;p&gt;The rich user experience support and DRM, what else does Silverlight bring to the equation? One big thing is that PlayReady DRM supports http delivery of pre-encrypted content, unlike other platforms that require a proprietary streaming server and protocol be used to deliver protected content, applying DRM on the fly. Pre-encrypted content is both more scalable (since the encryption processing is only done once, not per user), and more secure (since an in-the-clear media file doesn’t need to be transmitted and stored on the server).&lt;/p&gt;
&lt;p&gt;There’s been two big technical challenges in web video for the last dozen years or so.&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;How do we deliver the best experience to each user, in a world of variable bandwidth and hardware power &lt;/li&gt;
    &lt;li&gt;How do we deliver that experience as cost effectively as possible, enabling new business models in video distribution. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;We’re at the point now where a user with a fast connection and a decent computer should have a darn good video and audio experience. Netflix is a testament to what’s possible as the cost to deliver a MB of video gets low enough, from a business perspective. While finally delivering a user experience better than VideoCD.&lt;/p&gt;&lt;img src="http://on10.net/23869/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Silverlight-2-powering-Netflix-on-Mac/</comments><itunes:summary>It's been discussed for a while, but the time is now - Netflix has just announced Silverlight 2 will power their streaming video service, which had been Windows-only until now. Silverlight 2 adds support for PlayReady DRM, so we now have the same DRM support on Mac and Windows. The service will be available on Xbox 360 as well.
You have to be a Netflix subscriber of course, but the content is commercial-free and much higher quality than the various free video services. They encode up to a full 720x480, in proper 4:3 or 16:9, at a range of bitrates. The higher rates definitely outperform standard def cable and satellite in video quality.
Lots of good stuff in the press release, but I had a couple of things I wanted to call out (bolding mine).

Netflix, Inc. (NASDAQ: NFLX), the world's largest online movie rental service, today announced it has begun the deployment of Microsoft Silverlight to enhance the instant watching component of the Netflix service and to allow subscribers for the first time to watch movies and TV episodes instantly on their Intel-based Apple Macintosh computers. The deployment, which will initially touch a small percentage of new Netflix subscribers, is the first step in an anticipated roll-out of the new platform to all Netflix subscribers by the end of the year.

Note that this won’t be immediately available to all customers.

Silverlight is designed for delivery of cross-platform, cross-browser media experiences inside a Web browser. It is expected that Netflix members who watch movies and TV episodes instantly on their computers will enjoy a faster, easier connection and a more robust viewing experience with Silverlight, due to the quality built directly into the player. Among the viewing enhancements with the new player is a breakthrough in timeline navigation that vastly improves the use of fast-forwarding and rewinding. The new Netflix player takes advantage of PlayReady DRM, which is built into Silverlight, for the playback of protected content on both Windows-based PCs and on Macs. That had not been possible with previous generation technologies.

This is one of the first big rollouts of PlayReady with Silverlight in the USA. When you see the new navigation, it’s a real testament to the difference between a media player plugin like the WMP OCX, and a rich application runtime that plays media well like Silverlight.
The rich user experience support and DRM, what else does Silverlight bring to the equation? One big thing is that PlayReady DRM supports http delivery of pre-encrypted content, unlike other platforms that require a proprietary streaming server and protocol be used to deliver protected content, applying DRM on the fly. Pre-encrypted content is both more scalable (since the encryption processing is only done once, not per user), and more secure (since an in-the-clear media file doesn’t need to be transmitted and stored on the server).
There’s been two big technical challenges in web video for the last dozen years or so.

    How do we deliver the best experience to each user, in a world of variable bandwidth and hardware power 
    How do we deliver that experience as cost effectively as possible, enabling new business models in video distribution. 

We’re at the point now where a user with a fast connection and a decent computer should have a darn good video and audio experience. Netflix is a testament to what’s possible as the cost to deliver a MB of video gets low enough, from a business perspective. While finally delivering a user experience better than VideoCD.</itunes:summary><link>http://on10.net/blogs/benwagg/Silverlight-2-powering-Netflix-on-Mac/</link><pubDate>Tue, 28 Oct 2008 00:38:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Silverlight-2-powering-Netflix-on-Mac/</guid><evnet:views>1727</evnet:views><evnet:viewtrackingurl>http://on10.net/23869/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>It's been discussed for a while, but the time is now - Netflix has just announced Silverlight 2 will power their streaming video service, which had been Windows-only until now. Silverlight 2 adds support for PlayReady DRM, so we now have the same DRM support on Mac and Windows. The service will be available on Xbox 360 as well. You have to be a Netflix subscriber of course, but the content is commercial-free and much higher quality than the various free video services.</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>5</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Silverlight-2-powering-Netflix-on-Mac/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23869/Trackback.aspx</trackback:ping><category>compression</category><category>Netflix</category><category>Playready</category><category>silverlight</category><category>Theory</category><category>xbox 360</category></item><item><title>Final Olympics numbers</title><description>&lt;p&gt;People kept asking me about this on my just completed tour of Asia, so here’s a blog post that’s got the final numbers for the NBCOlympics.com video delivery with Silverlight.&lt;/p&gt;
&lt;p&gt;The data is from the &lt;a href="http://www.microsoft.com/presspass/presskits/silverlight/docs/SilverlightQS.doc"&gt;Silverlight 2 Customer Evidence and Quote Sheet&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;During the 17 days of the games, the site had&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;51.9 million unique visitors (106% more than Athens and Torino combined) &lt;/li&gt;
    &lt;li&gt;1.3 billion page views &lt;/li&gt;
    &lt;li&gt;75.5 million video streams initiated (601% more than Athens and Torino combined) &lt;/li&gt;
    &lt;li&gt;9.9 million hours of video watched (equivalent of 1,126 years of video). &lt;/li&gt;
    &lt;li&gt;More than 27 minutes per user average viewing time (compared to 3 minutes for sites using other streaming video technologies) &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And these great quotes from Perkins Miller, Senior Vice President, Digital Media, NBC Sports and Olympics:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;“NBC had plans to create the most ambitious online video event in history — more than 2,200 hours of Olympic coverage in 25 sports in less than 17 days – with 3,500 hours on demand. NBC needed to ensure the experience was versatile, stable, and — above all — engaging and entertaining.”&lt;/p&gt;
&lt;p&gt;NBC Sports chose Silverlight 2 because “with such a vast number of events and hours of live and on-demand video, we needed a scalable, flexible platform that would deliver an immersive and engaging experience.”&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Beyond the NBC in the USA, Silverlight was used for Olympics coverage in other countries, including:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;France (&lt;a href="http://www.francetelevisions.fr/index.php" target="_blank"&gt;FranceTV&lt;/a&gt;) &lt;/li&gt;
    &lt;li&gt;Netherlands (&lt;a href="http://www.nos.nl/nos/voorpagina/" target="_blank"&gt;NOS&lt;/a&gt;) &lt;/li&gt;
    &lt;li&gt;Russia (&lt;a href="http://news.sportbox.ru/" target="_blank"&gt;Sportbox.ru&lt;/a&gt;) &lt;/li&gt;
    &lt;li&gt;Italy (&lt;a href="http://www.rai.it/" target="_blank"&gt;RAI&lt;/a&gt;) &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Silverlight was a great coming-of-age story for Silverlight as we prepared to launch Silverlight 2. The“does Silverlight scale” and “will customers install it” questions have largely gone away in the last couple of months.&lt;/p&gt;&lt;img src="http://on10.net/23797/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Final-Olympics-numbers/</comments><itunes:summary>People kept asking me about this on my just completed tour of Asia, so here’s a blog post that’s got the final numbers for the NBCOlympics.com video delivery with Silverlight.
The data is from the Silverlight 2 Customer Evidence and Quote Sheet.
During the 17 days of the games, the site had

    51.9 million unique visitors (106% more than Athens and Torino combined) 
    1.3 billion page views 
    75.5 million video streams initiated (601% more than Athens and Torino combined) 
    9.9 million hours of video watched (equivalent of 1,126 years of video). 
    More than 27 minutes per user average viewing time (compared to 3 minutes for sites using other streaming video technologies) 

And these great quotes from Perkins Miller, Senior Vice President, Digital Media, NBC Sports and Olympics:

“NBC had plans to create the most ambitious online video event in history — more than 2,200 hours of Olympic coverage in 25 sports in less than 17 days – with 3,500 hours on demand. NBC needed to ensure the experience was versatile, stable, and — above all — engaging and entertaining.”
NBC Sports chose Silverlight 2 because “with such a vast number of events and hours of live and on-demand video, we needed a scalable, flexible platform that would deliver an immersive and engaging experience.”

Beyond the NBC in the USA, Silverlight was used for Olympics coverage in other countries, including:

    France (FranceTV) 
    Netherlands (NOS) 
    Russia (Sportbox.ru) 
    Italy (RAI) 

Silverlight was a great coming-of-age story for Silverlight as we prepared to launch Silverlight 2. The“does Silverlight scale” and “will customers install it” questions have largely gone away in the last couple of months.</itunes:summary><link>http://on10.net/blogs/benwagg/Final-Olympics-numbers/</link><pubDate>Mon, 20 Oct 2008 01:49:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Final-Olympics-numbers/</guid><evnet:views>1744</evnet:views><evnet:viewtrackingurl>http://on10.net/23797/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>People kept asking me about this on my just completed tour of Asia, so here’s a blog post that’s got the final numbers for the NBCOlympics.com video delivery with Silverlight.</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>2</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Final-Olympics-numbers/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23797/Trackback.aspx</trackback:ping><category>NBC</category><category>NBCOlympics.com</category><category>olympics</category><category>silverlight</category></item><item><title>Silverlight 2 Released!</title><description>&lt;p&gt;It was a long time coming, but today was the day. Silverlight 2 was released to the web today!&lt;/p&gt;
&lt;p&gt;I'm in &lt;a href="http://maps.live.com/default.aspx?v=2&amp;amp;FORM=LMLTCC&amp;amp;cp=22.5364~114.113&amp;amp;style=h&amp;amp;lvl=16&amp;amp;tilt=-90&amp;amp;dir=0&amp;amp;alt=-1000&amp;amp;phx=0&amp;amp;phy=0&amp;amp;phscl=1&amp;amp;ss=yp.shangri-la%2C%20hotel~pg.1~sst.0&amp;amp;encType=1" target="_blank"&gt;Shenzen&lt;/a&gt;, where it's after midnight, so I'll just list a few links.&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;First, &lt;a href="http://weblogs.asp.net/scottgu/archive/2008/10/14/silverlight-2-released.aspx" target="_blank"&gt;Scott Guthrie's blog&lt;/a&gt; has, as always, the best summary of what's new and interesting in Silverlight 2. &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://silverlight.net/" target="_blank"&gt;Silverlight.net&lt;/a&gt; has been updated, particularly the &lt;a href="http://silverlight.net/GetStarted" target="_blank"&gt;Get Started&lt;/a&gt; section which has links to all the downloads you need. &lt;/li&gt;
    &lt;li&gt;Which in particular includes &lt;a href="http://go.microsoft.com/fwlink/?LinkId=129043" target="_blank"&gt;Blend 2 SP1&lt;/a&gt; &lt;/li&gt;
    &lt;li&gt;We're also working with &lt;a href="http://www.soyatec.com/" target="_blank"&gt;Soyatec&lt;/a&gt; to build &lt;a href="http://www.eclipse4sl.org/" target="_blank"&gt;Eclipse support for Silverlight&lt;/a&gt;. &lt;/li&gt;
    &lt;li&gt;I covered the &lt;a href="http://on10.net/blogs/benwagg/Silverlight-2-RC0-is-out/" target="_blank"&gt;new media features&lt;/a&gt; in this post, with &lt;a href="http://on10.net/blogs/benwagg/Demo-of-Silverlight-2-scaling-quality-improvements/" target="_blank"&gt;examples here&lt;/a&gt;.&lt;/li&gt;
    &lt;li&gt;We even got covered in a &lt;a href="http://www.nytimes.com/external/venturebeat/2008/10/13/13venturebeat-microsofts-silverlight-2-coming-tomorrow-99012.html"&gt;New York Times article&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Anyway, enjoy!&lt;/p&gt;&lt;img src="http://on10.net/23761/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Silverlight-2-Released/</comments><itunes:summary>It was a long time coming, but today was the day. Silverlight 2 was released to the web today!
I'm in Shenzen, where it's after midnight, so I'll just list a few links.

    First, Scott Guthrie's blog has, as always, the best summary of what's new and interesting in Silverlight 2. 
    Silverlight.net has been updated, particularly the Get Started section which has links to all the downloads you need. 
    Which in particular includes Blend 2 SP1 
    We're also working with Soyatec to build Eclipse support for Silverlight. 
    I covered the new media features in this post, with examples here.
    We even got covered in a New York Times article.

Anyway, enjoy!</itunes:summary><link>http://on10.net/blogs/benwagg/Silverlight-2-Released/</link><pubDate>Tue, 14 Oct 2008 16:24:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Silverlight-2-Released/</guid><evnet:views>1798</evnet:views><evnet:viewtrackingurl>http://on10.net/23761/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>It was a long time coming, but today was the day. Silverlight 2 was released to the web today! I'm in Shenzen, where it's after midnight, so I'll just list a few links.</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>2</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Silverlight-2-Released/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23761/Trackback.aspx</trackback:ping><category>China</category><category>silverlight</category><category>silverlight 2</category></item><item><title>Demo of Silverlight 2 scaling quality improvements</title><description>&lt;p&gt;My colleague Donald Karlov did a A/B compare for me showing the quality improvement for scaling between Silverlight 2 Beta 2 and the new &lt;a href="http://on10.net/blogs/benwagg/Silverlight-2-RC0-is-out/"&gt;Silverlight 2 RC0&lt;/a&gt;. Check this detail of a shot from an encode I did of &lt;a href="http://www.bigbuckbunny.org/"&gt;Big Buck Bunny&lt;/a&gt;, scaled to 2.5x (640x360 to 1600x900 – a pretty common scaling ratio for full-screen playback on a smaller LCD or a laptop).&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;h1&gt;Silverlight 1.0 through Silverlight 2 Beta 2&lt;/h1&gt;
&lt;p&gt;&lt;a href="http://on10.net/Link/74325041-b879-4b06-8b87-bbc245543613/"&gt;&lt;img width="600" height="400" title="SL2B2-scaling" alt="SL2B2-scaling" src="http://on10.net/Link/ab14c9d0-f101-4f6c-b0f4-29bedcce5761/" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h1&gt;Silverlight 2 RC0 and later&lt;/h1&gt;
&lt;p&gt;&lt;a href="http://on10.net/Link/f09f3f5b-6ca2-4ee5-88f8-6eda507759ad/"&gt;&lt;img width="600" height="400" title="SL2-RTM-Scaling" alt="SL2-RTM-Scaling" src="http://on10.net/Link/c8cb7bf3-875e-4c9e-aedb-68955c6bfe1f/" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Note the improvements in detail, and the elimination of some stray pixels at the edge of the butterfly wing. Most shots won’t be as dramatically improved, but all will be helped at least somewhat.&lt;/p&gt;
&lt;p&gt;And even with the better quality, playback CPU load dropped by 10-15%, due to better perf in the scaler and decoder.&lt;/p&gt;&lt;img src="http://on10.net/23667/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Demo-of-Silverlight-2-scaling-quality-improvements/</comments><itunes:summary>My colleague Donald Karlov did a A/B compare for me showing the quality improvement for scaling between Silverlight 2 Beta 2 and the new Silverlight 2 RC0. Check this detail of a shot from an encode I did of Big Buck Bunny, scaled to 2.5x (640x360 to 1600x900 – a pretty common scaling ratio for full-screen playback on a smaller LCD or a laptop).
 
Silverlight 1.0 through Silverlight 2 Beta 2
 
Silverlight 2 RC0 and later
 
 
Note the improvements in detail, and the elimination of some stray pixels at the edge of the butterfly wing. Most shots won’t be as dramatically improved, but all will be helped at least somewhat.
And even with the better quality, playback CPU load dropped by 10-15%, due to better perf in the scaler and decoder.</itunes:summary><link>http://on10.net/blogs/benwagg/Demo-of-Silverlight-2-scaling-quality-improvements/</link><pubDate>Thu, 02 Oct 2008 21:03:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Demo-of-Silverlight-2-scaling-quality-improvements/</guid><evnet:views>2149</evnet:views><evnet:viewtrackingurl>http://on10.net/23667/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>My colleague Donald Karlov did a A/B compare for me showing the quality improvement for scaling between Silverlight 2 Beta 2 and the new &lt;a href="http://on10.net/blogs/benwagg/Silverlight-2-RC0-is-out/"&gt;Silverlight 2 RC0&lt;/a&gt;. Check this detail of a shot from an encode I did of &lt;a href="http://www.bigbuckbunny.org/"&gt;Big Buck Bunny&lt;/a&gt;, scaled to 2.5x (640x360 to 1600x900 – a pretty common scaling ratio for full-screen playback on a smaller LCD or a laptop).</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>0</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Demo-of-Silverlight-2-scaling-quality-improvements/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23667/Trackback.aspx</trackback:ping><category>Big Buck Bunny</category><category>silverlight</category><category>silverlight 2</category><category>video quality</category></item><item><title>Silverlight 2 RC0 is out</title><description>The first public release canditate (RCo) for Silverlight 2 is now &lt;a href="http://silverlight.net/GetStarted/sl2rc0.aspx"&gt;available for download &lt;/a&gt;by developers. While anyone can install it, the main goal is for developers to make sure they aren't hit by any breaking changes for Silverlight 2 RTM so they can fix any issues. No one will be auto-updated to this release. Users will be auto-updated to Silverlight 2's final release when it's posted.&lt;br /&gt;
&lt;br /&gt;
All Silverlight 1.0 projects should work fine, but there may be some Silverlight 2 Beta projects that require updates.&lt;br /&gt;
&lt;br /&gt;
For the media folks, there's a couple of new things I want to mention.&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;There's a new scaling algorithm that's a lot faster and much higher quality - a nice compromise when you can get it! &lt;/li&gt;
    &lt;li&gt;Additional optimizations have been done for the VC-1 video decoder, so playback will be faster. The gains are biggest for content using B-frames. &lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since the default Expression Encoder templates have "always on" scaling and its presets use B-frames by default, the above will provide a nice performance boost for existing content. The above are "always on" features - you don't need to update anything to take advantage of them. So expect smoother frame rates on lower-end machines.&lt;br /&gt;
&lt;br /&gt;
Further information:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://download.microsoft.com/download/6/f/e/6fe1f43d-9d0c-4346-ad08-602df9bcb3cf/BreakingChangesBetweenBeta2andRelease.doc"&gt;Silverlight 2 breaking changes .doc file
    &lt;li&gt;&lt;a href="http://www.microsoft.com/silverlight/resources/readme.aspx?v=2.0.30923"&gt;Silverlight 2 ReadMe&lt;/a&gt; &lt;/li&gt;
    &lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2008/09/25/silverlight-2-release-candidate-now-available.aspx"&gt;ScottGu's Blog post on RC0&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;EDIT: Added ScottGu link&lt;/p&gt;&lt;img src="http://on10.net/23656/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Silverlight-2-RC0-is-out/</comments><itunes:summary>The first public release canditate (RCo) for Silverlight 2 is now available for download by developers. While anyone can install it, the main goal is for developers to make sure they aren't hit by any breaking changes for Silverlight 2 RTM so they can fix any issues. No one will be auto-updated to this release. Users will be auto-updated to Silverlight 2's final release when it's posted.

All Silverlight 1.0 projects should work fine, but there may be some Silverlight 2 Beta projects that require updates.

For the media folks, there's a couple of new things I want to mention.

    There's a new scaling algorithm that's a lot faster and much higher quality - a nice compromise when you can get it! 
    Additional optimizations have been done for the VC-1 video decoder, so playback will be faster. The gains are biggest for content using B-frames. 

Since the default Expression Encoder templates have "always on" scaling and its presets use B-frames by default, the above will provide a nice performance boost for existing content. The above are "always on" features - you don't need to update anything to take advantage of them. So expect smoother frame rates on lower-end machines.

Further information:

    Silverlight 2 breaking changes .doc file
    Silverlight 2 ReadMe 
    
    ScottGu's Blog post on RC0

EDIT: Added ScottGu link</itunes:summary><link>http://on10.net/blogs/benwagg/Silverlight-2-RC0-is-out/</link><pubDate>Wed, 01 Oct 2008 15:01:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Silverlight-2-RC0-is-out/</guid><evnet:views>1938</evnet:views><evnet:viewtrackingurl>http://on10.net/23656/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>The first public release canditate (RCo) for Silverlight 2 is now &lt;a href="http://silverlight.net/GetStarted/sl2rc0.aspx"&gt;available for download &lt;/a&gt;by developers. While anyone can install it, the main goal is for developers to make sure they aren't hit by any breaking changes for Silverlight 2 RTM so they can fix any issues.&lt;br /&gt;
&lt;br /&gt;
All Silverlight 1.0 projects should work fine, but there may be some Silverlight 2 Beta projects that require updates.&lt;br /&gt;
&lt;br /&gt;
For the media folks, there's a couple of new things I want to mention...&lt;br /&gt;</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>1</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Silverlight-2-RC0-is-out/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23656/Trackback.aspx</trackback:ping><category>compression</category><category>developers</category><category>Expression Encoder</category><category>silverlight</category><category>silverlight 2</category><category>VC-1</category></item><item><title>First MediaStreamSource example is up</title><description>My colleague Larry Olson has posted the &lt;a href="http://code.msdn.microsoft.com/ManagedMediaHelpers"&gt;first public demo project for MediaStreamSource&lt;/a&gt;. This new Silverlight 2 feature enables file parsers and network protocols to be implemented in managed code inside of Silverlight, thus enabling support beyond the built-in native formats. Since MSS passes off the compressed media samples to the native decoders, it should offer nearly the same performance as a native code implementation (parsers aren't that expensive). But since it runs inside of the Silverlight managed code sandbox, support for new formats and protocols can be just added into player's .XAP package file, and will be completely transparent to the end user.&lt;br /&gt;
&lt;br /&gt;
MediaStreamSource is one of the biggest enabling features in Silverlight 2. At IBC, people came up with all kinds of crazy, awesome, and even useful ideas of what to do with it beyond anything I'd ever imagined. Really, the only big limitation is that you can't use UDP packets, as they're not supported by the Silverlight networking stack.&lt;br /&gt;
&lt;br /&gt;
Some people have had trouble finding the MSDN docs about MSS, so I'll list them here as well:&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.mediastreamsource(VS.95).aspx"&gt;MediaStreamSource Class&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.mediastreamsource_members(VS.95).aspx"&gt;MediaStreamSource Members&lt;/a&gt;&lt;br /&gt;&lt;img src="http://on10.net/23651/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/First-MediaStreamSource-example-is-up/</comments><itunes:summary>My colleague Larry Olson has posted the first public demo project for MediaStreamSource. This new Silverlight 2 feature enables file parsers and network protocols to be implemented in managed code inside of Silverlight, thus enabling support beyond the built-in native formats. Since MSS passes off the compressed media samples to the native decoders, it should offer nearly the same performance as a native code implementation (parsers aren't that expensive). But since it runs inside of the Silverlight managed code sandbox, support for new formats and protocols can be just added into player's .XAP package file, and will be completely transparent to the end user.

MediaStreamSource is one of the biggest enabling features in Silverlight 2. At IBC, people came up with all kinds of crazy, awesome, and even useful ideas of what to do with it beyond anything I'd ever imagined. Really, the only big limitation is that you can't use UDP packets, as they're not supported by the Silverlight networking stack.

Some people have had trouble finding the MSDN docs about MSS, so I'll list them here as well:

MediaStreamSource Class
MediaStreamSource Members</itunes:summary><link>http://on10.net/blogs/benwagg/First-MediaStreamSource-example-is-up/</link><pubDate>Wed, 01 Oct 2008 14:04:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/First-MediaStreamSource-example-is-up/</guid><evnet:views>1853</evnet:views><evnet:viewtrackingurl>http://on10.net/23651/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>My colleague Larry Olson has posted the first public demo project for MediaStreamSource. This new Silverlight 2 feature enables file parsers and network protocols to be implemented in managed code inside of Silverlight, thus enabling support beyond the built-in native formats. Since MSS passes off the compressed media samples to the native decoders, it should offer nearly the same performance as a native code implementation (parsers aren't that expensive). But since it runs inside of the Silverlight managed code sandbox, support for new formats and protocols can be just added into player's…</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>1</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/First-MediaStreamSource-example-is-up/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23651/Trackback.aspx</trackback:ping><category>Larry Olson</category><category>MediaStreamSource</category><category>silverlight</category></item><item><title>Expression Encoder Service Pack 1 preview</title><description>&lt;a href="http://www.clarkezone.net/"&gt;James Clarke &lt;/a&gt;has a &lt;a href="http://blogs.msdn.com/expressionencoder/archive/2008/09/23/8962401.aspx"&gt;blog post up &lt;/a&gt;describing some of the new features in the forthcoming Expression Encoder 2 Service Pack 1.&lt;br /&gt;
&lt;br /&gt;
It's got some great new stuff, and we're demoing it here at &lt;a href="http://streamingmedia.com/west/"&gt;Streaming Media West &lt;/a&gt;this week.&lt;br /&gt;
&lt;br /&gt;
Read the whole post - there's lots of good stuff in there. A couple of my favories are&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
    &lt;li&gt;A new Silverlight 2 base player using .NET. Among other things, this will enable players that display the video at 100% scale by default, improving quality and performance.&lt;/li&gt;
    &lt;li&gt;New A/B compare modes. Awesome stuff for high-touch encoding and codec tweaking&lt;/li&gt;
    &lt;li&gt;Some even more VC-1 advanced options for High Codec Nerditry.&lt;/li&gt;
    &lt;li&gt;The first public release of Microsoft H.264 compression technology.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Anyway, a lot of good stuff for a SP1. I'm looking forward to it.&lt;/p&gt;&lt;img src="http://on10.net/23596/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Expression-Encoder-Service-Pack-1-preview/</comments><itunes:summary>James Clarke has a blog post up describing some of the new features in the forthcoming Expression Encoder 2 Service Pack 1.

It's got some great new stuff, and we're demoing it here at Streaming Media West this week.

Read the whole post - there's lots of good stuff in there. A couple of my favories are


    A new Silverlight 2 base player using .NET. Among other things, this will enable players that display the video at 100% scale by default, improving quality and performance.
    New A/B compare modes. Awesome stuff for high-touch encoding and codec tweaking
    Some even more VC-1 advanced options for High Codec Nerditry.
    The first public release of Microsoft H.264 compression technology.

Anyway, a lot of good stuff for a SP1. I'm looking forward to it.</itunes:summary><link>http://on10.net/blogs/benwagg/Expression-Encoder-Service-Pack-1-preview/</link><pubDate>Wed, 24 Sep 2008 03:19:00 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Expression-Encoder-Service-Pack-1-preview/</guid><evnet:views>1826</evnet:views><evnet:viewtrackingurl>http://on10.net/23596/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>&lt;a href="http://www.clarkezone.net/"&gt;James Clarke &lt;/a&gt;has a &lt;a href="http://blogs.msdn.com/expressionencoder/archive/2008/09/23/8962401.aspx"&gt;blog post up &lt;/a&gt;describing some of the new features in the forthcoming Expression Encoder 2 Service Pack 1.&lt;br /&gt;
&lt;br /&gt;
It's got some great new stuff, and we're demoing it here at &lt;a href="http://streamingmedia.com/west/"&gt;Streaming Media West &lt;/a&gt;this week.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>2</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Expression-Encoder-Service-Pack-1-preview/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23596/Trackback.aspx</trackback:ping><category>compression</category><category>Expression Encoder</category><category>H.264</category><category>silverlight</category><category>VC-1</category></item><item><title>Ben's IBC Schedule</title><description>&lt;p&gt;So, if you're coming to &lt;a target="_blank" href="http://www.microsoft.com/resources/mediaandentertainment/ibc2008/default.mspx"&gt;IBC&lt;/a&gt;, come swing by the &lt;a target="_blank" href="http://www.ibc.org/cgi-bin/exhib_detail_cms.cgi?db_id=3634&amp;amp;floorplan=yes"&gt;Topaz Lounge&lt;/a&gt; and say hello. I'll be demoing on the below schedule, alternating between the Silverlight Formats pod and floating between pods answering questions. And yes, we'll be showing &lt;a target="_blank" href="http://on10.net/blogs/benwagg/H264-and-AAC-support-coming-in-Silverlight/"&gt;H.264 playback in Silverlight&lt;/a&gt; at the Formats pod.&lt;/p&gt;  &lt;p&gt;The Topaz Lounge is a little out of the way, but that means it's not nearly as deafening as the show floor. Last year we had a complementary coffee/soda bar set up.&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h1&gt;Friday, September 12th&lt;/h1&gt;  &lt;h2&gt;11:45am - 3:00pm: Silverlight Formats&lt;/h2&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h1&gt;Saturday, September 13th&lt;/h1&gt;  &lt;h2&gt;9:15 am - 1:30pm: Floating&lt;/h2&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h1&gt;Sunday, September 14th&lt;/h1&gt;  &lt;h2&gt;9:15 am - 1:30pm: Silverlight Formats&lt;/h2&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h1&gt;Monday, September 15th&lt;/h1&gt;  &lt;h2&gt;1:30pm - 6:00pm: Silverlight Formats&lt;/h2&gt;  &lt;p&gt; &lt;/p&gt;  &lt;h1&gt;Tuesday, September 16th&lt;/h1&gt;  &lt;h2&gt;9:15 am - 12:30pm: Floating&lt;/h2&gt;&lt;img src="http://on10.net/23488/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/Bens-IBC-Schedule/</comments><itunes:summary>So, if you're coming to IBC, come swing by the Topaz Lounge and say hello. I'll be demoing on the below schedule, alternating between the Silverlight Formats pod and floating between pods answering questions. And yes, we'll be showing H.264 playback in Silverlight at the Formats pod.  The Topaz Lounge is a little out of the way, but that means it's not nearly as deafening as the show floor. Last year we had a complementary coffee/soda bar set up.        Friday, September 12th  11:45am - 3:00pm: Silverlight Formats     Saturday, September 13th  9:15 am - 1:30pm: Floating     Sunday, September 14th  9:15 am - 1:30pm: Silverlight Formats     Monday, September 15th  1:30pm - 6:00pm: Silverlight Formats     Tuesday, September 16th  9:15 am - 12:30pm: Floating</itunes:summary><link>http://on10.net/blogs/benwagg/Bens-IBC-Schedule/</link><pubDate>Wed, 10 Sep 2008 16:54:17 GMT</pubDate><guid isPermaLink="true">http://on10.net/blogs/benwagg/Bens-IBC-Schedule/</guid><evnet:views>1820</evnet:views><evnet:viewtrackingurl>http://on10.net/23488/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>So, if you're coming to IBC, come swing by the Topaz Lounge and say hello. I'll be demoing on the below schedule, alternating between the Silverlight Formats pod and floating between pods answering questions. And yes, we'll be showing H.264 playback in Silverlight at the Formats pod.  The Topaz&amp;#8230;</evnet:previewtext><dc:creator>benwaggoner</dc:creator><itunes:author>benwaggoner</itunes:author><slash:comments>0</slash:comments><wfw:commentRss>http://on10.net/blogs/benwagg/Bens-IBC-Schedule/RSS/</wfw:commentRss><trackback:ping>http://on10.net/23488/Trackback.aspx</trackback:ping></item><item><title>H.264 and AAC support coming in Silverlight</title><description>&lt;p&gt;So, our big &lt;a href="http://www.microsoft.com/presspass/features/2008/sep08/09-09silverlight.mspx"&gt;IBC press announcement&lt;/a&gt; went out this morning. Lots of blog-worthy stuff in there, but as a compression nerd, it's the codec stuff I'm going to talk about first.&lt;/p&gt;
&lt;p&gt;The big news is that, yes, we're going to add support for MPEG-4 to Silverlight, in the version coming after the fast-approaching fall release of Silverlight 2. Specifically, this will be H.264 for video and AAC for audio.&lt;/p&gt;
&lt;h1&gt;Why?&lt;/h1&gt;
&lt;p&gt;So, why MPEG-4 support in Silverlight? It's pretty straightforward, really. We have customers with libraries of H.264 content they wanted to publish to Silverlight, but didn't want to reencode to VC-1. Silverlight's strengths go far beyond media playback, and customers wanted the choice to deploy a wide variety of existing content within Silverlight. Silverlight aspires to provide as much choice as feasible as to how Silverlight can be authored and delivered. H.264 support is something we'd considered for past versions, but there were higher priority features we needed to deliver first. Silverlight 2 provides us a very rich base for delivering web apps, so we can start spreading our wings a bit.&lt;/p&gt;
&lt;h1&gt;What?&lt;/h1&gt;
&lt;p&gt;We've got more technical details we'll be sharing at IBC and later, but today, I'll just quote the details from &lt;a href="http://weblogs.asp.net/scottgu/"&gt;Scott Guthrie's&lt;/a&gt; interview:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;b&gt;PressPass: Will you be showing or announcing anything new at the IBC conference this week?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Guthrie: Yes. At IBC 2008 we will be demonstrating a technology preview of H.264 video and Advanced Audio Coding (AAC) audio playback support in Silverlight, and H.264 authoring using Microsoft Expression Encoder and Windows Server 2008 for delivery. Until now, Silverlight has supported the SMPTE VC-1 and Windows Media formats, as well as MP3 for audio, enabling customers to take advantage of broad support across the Windows Media ecosystem, including third-party tools, service providers and content delivery networks.&lt;/p&gt;
&lt;p&gt;We’ve always wanted Silverlight to support a variety of formats, so today we’re announcing that H.264 and AAC support will be available in a future version of Silverlight, which will offer content owners greater flexibility and choice to deliver video and audio.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;PressPass: Historically, people have associated Microsoft with VC-1. Does this signal a change in direction?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Guthrie: &lt;/b&gt;No. Although we have been working with VC-1 for some time, it’s not widely recognized that Microsoft has also been an active participant in the standardization of H.264/MPEG AVC for many years, and we’ve included H.264 support in several Microsoft products. Microsoft’s Gary Sullivan was the chairman of the Joint Video Team (JVT), which developed the H.264 standard, and he recently accepted an Emmy Award on behalf of the JVT.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;PressPass: Does this mean that Silverlight is moving away from Windows Media?&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Guthrie:&lt;/b&gt; Not at all. This is about offering our customers more choice. Media producers and distributors around the world have enjoyed the high quality, flexibility and affordability of Windows Media formats for over a decade. As a testament to its pervasiveness, Windows Media can be found in almost every conceivable media scenario from desktop home video to feature films and TV broadcasts.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Again, don't read this as as a big change around our strategy for media formats. We've long-supported WMV and MPEG-4 side-by-side in products like Xbox and Zune. As I &lt;a href="http://on10.net/blogs/benwagg/Technical-Emmy-for-H264MPEG-4-AVC/"&gt;posted last week&lt;/a&gt;, Microsoft has been contributing to H.264 since its inception.&lt;/p&gt;
&lt;p&gt;This doesn't represent any change in our support for Windows Media. Windows Media continues to work well for today's Silverlight customers. I expect (not a goal, just a prediction) that the majority of Silverlight content will remain in WMV well after we release MPEG-4 support.&lt;/p&gt;
&lt;p&gt;In particular, VC-1 will likely remain the codec of choice for HD for some time. Comparing VC-1 Advanced Profile to H.264 High Profile with all the bells and whistles turned on, VC-1 only needs about half as many MIPS per pixel for playback. This won't matter as much for lower resolution content, or podcasting stuff that's in the simpler Baseline profile, but makes for a big reduction in system requirements for 720p and higher.&lt;/p&gt;
&lt;h1&gt;Where/When can I learn more?&lt;/h1&gt;
&lt;p&gt;If you're at IBC, &lt;a href="http://www.microsoft.com/resources/mediaandentertainment/ibc2008/default.mspx"&gt;swing by&lt;/a&gt;! If you want a head start on using MPEG-4 in Silverlight, feel free contact me directly. And we'll have plenty of more technical info to share down the road a bit.&lt;/p&gt;&lt;img src="http://on10.net/23480/WebViewBug.aspx?EVT=0" height="1" width="1" alt="" /&gt;</description><comments>http://on10.net/blogs/benwagg/H264-and-AAC-support-coming-in-Silverlight/</comments><itunes:summary>So, our big IBC press announcement went out this morning. Lots of blog-worthy stuff in there, but as a compression nerd, it's the codec stuff I'm going to talk about first.
The big news is that, yes, we're going to add support for MPEG-4 to Silverlight, in the version coming after the fast-approaching fall release of Silverlight 2. Specifically, this will be H.264 for video and AAC for audio.
Why?
So, why MPEG-4 support in Silverlight? It's pretty straightforward, really. We have customers with libraries of H.264 content they wanted to publish to Silverlight, but didn't want to reencode to VC-1. Silverlight's strengths go far beyond media playback, and customers wanted the choice to deploy a wide variety of existing content within Silverlight. Silverlight aspires to provide as much choice as feasible as to how Silverlight can be authored and delivered. H.264 support is something we'd considered for past versions, but there were higher priority features we needed to deliver first. Silverlight 2 provides us a very rich base for delivering web apps, so we can start spreading our wings a bit.
What?
We've got more technical details we'll be sharing at IBC and later, but today, I'll just quote the details from Scott Guthrie's interview:

PressPass: Will you be showing or announcing anything new at the IBC conference this week?