Re: How to create thumbnails



From: "Matthew McDermott"

I am generating search results from WMV files that have
been indexed with an Audio Video IFilter. The IFilter
extracts WMV properties like Title, Artist, Description,
etc. I would like to show a thumbnail of the video.

If you are only interested in WMV, the easiest way to
extract a frame is to use the WMSyncReader object provided
by the WindowsMediaFormat runtime (see the WMF SDK): you
open the file in the reader, seek to whatever point you want
and read 1 frame, which by default you will get as a
decompressed bitmap. Since the reader will seek to a
keyframe regardless of the time you specified, the seek
operation will be fast (as long as the file is indexed).

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


.


Loading