|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Hi,
I am programmatically running Windows Media encoder to create various .wmv files, that I then publish on a publishing point and link to from an HTML page. However, my links are purely text based. I would like to have thumbnails (like they have on online video websites) that link to the videos. So, I would also like to be able to prgrammatically extract an "image" from the .wmv that I can use as a thumbnail / image on the HTML page that links to the video. How can I do this?
Thanks a lot!
|
|
Hi janefield.
You can use the WMSDK to recover the first frame of every file. Simply do (in pseudocode:)
CComPtr<IIWMReader> pReader; CComPtr<INSSBuffer> pINSBuff;
pReader->Open(file); pReader->GetNextSample(videoStreamNumber, pInsBuff, times....);
Then in pInsBuff you will have the bits of the image. You can configure the OutputProps of the reader to configure the color space (RGB24, YUV, etc) and the size of the bitmap. Default is RGB24 and original image size. You also have to discover the videoStreamNumber (obtaining a profile from the reader and examining every stream in it).
Vegethalia.
-------------------------------------------------- http://www.pleyhades.com
|
|
|