Welcome to MSDN Blogs Sign in | Join | Help

Silverlight Video Player with Source Code

Here's a link to a silverlight video player with all the basic features like progress/seek slider, full screen toggle, play/pause/resume, etc. The player is meant to be relatively simple while still sporting the basic features you'd expect in a video player. Thanks to Nick Kramer (project manager at Microsoft) for creating this player.

A few notes:
- This code is targeted at Silverlight 3 Beta. For example, it uses CacheMode property to improve performance of stretching video.
- All the code is in MainPage.xaml & MainPage.xaml.cs, the other files are pure VS defaults
- Tim Heuer started 2 versions of the SL2VideoPlayer on CodePlex (http://sl2videoplayer.codeplex.com) -- one is *very* full featured (captions, markers, etc.) -- while there also is a fork called 'min' which does exactly what this one does here.
- Known limitations -- no adaptive streaming, not common to all sites.  Minimal keyboard support (you can actually tab around but there's no focus rects), minimal accessibility support.

Published Monday, May 04, 2009 6:54 PM by snoutholder

Comments

# Silverlight SDK : Silverlight Video Player with Source Code

# Видео-плеер на Silverlight 3 с исходным кодом

Thank you for submitting this cool story - Trackback from progg.ru

Tuesday, May 05, 2009 1:12 AM by progg.ru

# re: Silverlight Video Player with Source Code

Just a minor correction :-) -- there are 2 versions of the SL2VideoPlayer (http://sl2videoplayer.codeplex.com) -- one is *very* full featured (captions, markers, etc.) -- while there also is a fork called 'min' which does exactly what this one does here.  

Tuesday, May 05, 2009 2:10 AM by timheuer

# re: Silverlight Video Player with Source Code

Thanks Tim, I updated the post per your correction.

Wednesday, May 06, 2009 5:32 PM by snoutholder

# 0. Silverlight hardware acceleration leads to performance slowdown in video playback

Hello everyone,

today I was heavily experimenting with Silverlight 3 video player that was recommend on Silverlight SDK blog for having a SL 3 funcionality. My goal was to produce GPU accelerated player for our high quality (848x480, 16:9, 1500 kbit/s, VBR, VC-1) video publishing needs

The player is mentioned here:

http://blogs.msdn.com/silverlight_sdk/archive/2009/05/04/silverlight-video-player-source-code.aspx

I was able to compile player with VS 2008 and SL 3 Tools for VS 2008. However, after many hours of toil, here are surprising results.

The two biggest issues that I encountered are as follows.

1. The accelerated version is slower than non-acceleration. Why and what to do now? I have followed all the advices. Green tint on controls but not on video area seems to indicate that GPU acceleration is on. Also I have the black box with numbers when I use EnableFrameRateCounter=true.

2. The tint supposed to indicate non-accelerated areas is green in this case and not red as documented everywhere else. Why is that?

I have tested on several machines both low end and high end with both AMD and Nvidia graphics. Results are same everywhere and the slower the machine the more of a slowdown with hardware acceleration.

Please help, this is an unhappy situation. I am big fan of Silverlight but I have to admit to being disappointed. Can it be that you rushed out SL3 RTW out too quickly? Why not Beta 2, why not RC? Why such artificial dates like July 10 and not a quality driven release?

Fellow Silverlight programmer,

Jan Sichula

(Slovak Republic)

http://sichula.temelios.sk/ (English website for friends – family photos, videos and newsletter archive)

Tuesday, July 21, 2009 12:37 PM by Jan.Sichula
Anonymous comments are disabled
 
Page view tracker