Re: How to create thumbnails
- From: Matthew McDermott <MatthewMcDermott@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 2 May 2008 05:03:01 -0700
Alessandro,
I am interested in generating thumbnails too. I was wondering if there is a
way to do this "on the fly". Here is the scenario.
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.
I think the only way to do this is to render a Media Player Control on the
page for each result. (Though this sounds painful...) I might try it with a
Silverlight control instead.
Do you have any ideas for better options?
TIA!
--
Matthew McDermott, MVP
Principal Consultant
Catapult Systems, Inc.
"Alessandro Angeli" wrote:
From: "AndrewAtUnicorn".
We have a system that ingests thousands of video files a
day. I need this system to be able to create a thumbnail
from a specified position (seconds) in a WMV file. Right
now we do this by playing the file, programatically
pausing after x seconds, and capturing a screen shot
which is then saved programmatically. This doesn't work
so well much of the time.
I need a better way, can anyone give me any suggestions?
Our encoder is programmed in C# using the Windows Media
Encoder SDK.
The easiest way is to use the MediaDet object. You can
import its automation wrapper in .NET:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c_Summer_03/directX/htm/mediadetobject.asp
or create a full managed wrapper for it from the C++
interface definitions:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c_Summer_03/directX/htm/mediadetobject.asp
The DirectShow.NET project on sf.net might have the wrapper
ready.
Otherwise, you can use the WM[Sync]Reader object in the WMF
runtime (see the WindowsMediaFormat SDK) but you will need
to write a managed wrapper for and DirectShow.NET can only
help so far.
Last, you can use DirectShow through DirectShow.NET:
1. create an empty graph
2. insert a SampleGrabber into the graph
3. configure the SampleGrabber to only accept the
uncompressed video format you like
4. call RenderFile()
5. remove the clock
7. seek to media
8. run and the grabber will provide you with the bitmap
You might also want to mute the audio or add a second
grabber that accepts any kind of audio that you can just
throw away.
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
- Follow-Ups:
- Re: How to create thumbnails
- From: Alessandro Angeli
- Re: How to create thumbnails
- From: babgvant
- Re: How to create thumbnails
- Prev by Date: To assign IP for adrress streaming
- Next by Date: Audio at times desynchronizes with Video on live stream...
- Previous by thread: To assign IP for adrress streaming
- Next by thread: Re: How to create thumbnails
- Index(es):
Loading