开发者

getting specific video frame

I have been browsing around here (stack overflow) attempting to find a stable way to get images (an array of pixels) out of video files in general. In C# .NET I have found:

http://www.codeproject.com/KB/graphics/ExtractVideoFrames.aspx

Which is almost exactly what I am looking for but I keep getting this error:

Could not load file or assembly 'Interop.DexterLib,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
or one of its dependencies. An attempt was made to load
a program with an incorrect format.

Everything compiles fine but when run the .net runtime does not like 'Interop.DexterLib', I have double checked that it is in the bin with the exe and the project has them linked properly and compiles fine.

After some googleing the error seems to revolve around x86 .dlls and running them in x64 bit operating systems. To negate this they recommended building for x86, VS2010 does not have this option as they replaced it with "Any CPU"? Is this the problem? and is there any good way to fix it?

Is there a better way to get video frames in C#, I have looked at DirectShow.Net and for the life of me I cannot understand what is going on within direct show. I have yet to find a solution as simple as this (if it would work).

My final objective is to be able to get frames from 2 video fi开发者_开发技巧les in byte arrays... modify them, and then save them back to a new video. First things first is getting the video into memory.


Something is wrong with your Visual Studio. My 2010 has these options:

getting specific video frame


You can use corflags to make your 64 bit assembly compatible with x86 platform

Corflags description


The MediaDet from that article is part of DirectShow. Just use DirectShow.NET and your linking problems will go away. If you need to save modified frames to another video, you'll have to build a DirectShow graph, using just MediaDet will not help you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜