We often generate thumbnails for pictures, in Windows Video in the view of the thumbnail also shows the picture, if a video system, then the user uploaded video, how to generate thumbnails for it? To operate the video file, the usual method is DirectX inside the driectshow, use it can achieve grab screen, grab map, capture the function of video, think of this, but also surprised at Ms Demo Vista app that gorgeous 3d effect.
The first thing you do when you want to use DirectShow in. NET is to need an assembly that can help you with the call to DirectShow, and you don't need to use COM to dispense with the registration process, which is the assembly name: Interop. DexterLib.dll, it's like any other DLL, just add a reference.
Using this DLL, you encapsulate a class that allows you to easily generate a video thumbnail, and applies to WinForm and asp.net.
The effect is as follows:
WinForm:
asp.net: