Generating Video Thumbails dynmically+End of show Event

Jul 28, 2011 at 7:55 AM

Hi, I've 2 questions please:

1-how to let the playlist in the player generate image thumbnails DYNAMICALLY for all videos in playlist?

I've seen articles that uses WriteableBitmap with MediaElement, but doesn't this work for only SINGLE video? and will it support all MPP video formats?


2-Is there an event to know if current viewed video is Done (end of Show) ?



Jul 28, 2011 at 2:02 PM

1. There are some major limitations on generating thumbnails for videos that will make what you want to do impossible. It's much better to generate them outside the player either way.

Silverlight will only allow you to generate a thumbnail for a video that is currently being displayed to the user. Doing anything else will either result in an empty bitmap or an SecurityException being thrown. I have tried every conceivable way before for a project, we landed on generating the thumbnails at render time and using the BIF file format for storing them. You cannot say, create a new media element that is not displayed to the user, jump to a position and then get the thumbnail. 

Even if this would work, another huge downside would be the bandwidth usage. You would be downloading videos over and over again to users computers even if they may never watch them. This would dramatically increase bandwidth usage for the servers and the user. 

2. There is the MediaEnded event