Group:  English: Entertainment ยป microsoft.public.windowsmedia.tools
Thread: Thumbnails / Images / Snapshots of .wmv files

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Thumbnails / Images / Snapshots of .wmv files
janefield2002[ at ]yahoo.com 30.04.2007 03:58:51
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!

Re: Thumbnails / Images / Snapshots of .wmv files
vegethalia <vegethalia[ at ]gmail.com> 30.04.2007 06:57:34
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

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net