I have designed an winform application (c#) to play a video using microsoft.directx.audiovideoplayback in a picturebox.Now I want to extract each of the frames or bitmap images of the video while it is being played.Is there any way to achieve it?
Asked
Active
Viewed 1,633 times
1 Answers
1
Video playback (AudioVideoPlayback based in particular) does not use bitmaps to stream and present video. In order to extract individual frames you need a more powerful video API to stream and decompress video. One of the typical approaches is to use DirectShow.NET library (both it and AudioVideoPlayback use DirectShow API on the back end) and Sample Grabber there to get you individual frames using SampleCB
callback. The data you obtain there can be converted to bitmaps.
See:
-
thanks for the suggestion.I tried the same using directshow.netlibrary but it requires using a dll file named "interop.quartztypelib.dll"or"quartztypelib.dll".This is not available in VISUAL STUDIO 2012 and i searched over the internet but could not find any site to download this dll file for free.And it also seems like this particular dll file is not safe to use or its generally not reccomended.Is there any risk factor associated with using this dll file?please help me out from this confusion and a way to safely download this dll file .Thanks in advance for your help and time. – Amy segenuelle Dec 30 '14 at 11:52
-
Standard Windows API + [DirectShow.NET](http://sourceforge.net/projects/directshownet/files/) should have all you need. You can start checking with samples included there. – Roman R. Dec 30 '14 at 12:03