I have been trying to generate a thumbnail for Videos after they get added to an Asset Library in Sharepoint 2010 installed in a 64-bit Windows Server 2008 using Event Receivers. This seems to be a pain in the ass for me! :(. I first tried to do it by using MediaItem data type and generating a Thumbnail from it using Expression Encoder object model which is available by adding reference to Expression Encoder 3 SDK dll’s. The problem over here is that Expression Encoder is available only in 32-bit and 64-bit is not available. So, I’m not able to implement it in Sharepoint 2010 which is a 64-bit product. I have also found that none of the Products that are created to generate Thumbnails in Sharepoint were successful to implement this in 64-bit. Hope I be the first one to make it possible! 🙂
I’m updating this post almost after 2 years after getting some replies from viewers for a solution. Well, I did finally accomplish this functionality somehow though not with a perfect solution. One of my clients was so adamant to get this accomplished.
So, what I did was,
- Created an ItemAdded event receiver for the Assets library which would download the video when the user has uploaded it and stores it in a predefined location in the server.
- After it downloads the video it would call a Web service by passing the path of the video file as parameter.
- The Web service would generate a thumbnail image from the video using the Expression Encoder API, and then stores the image in a predefined path in the server, deletes the downloaded video and passes the path of the image in the server as a return value to the event receiver. Thanks.