从MPEG文件中获取帧 [英] Getting frames out of an MPEG file
问题描述
我需要按顺序从MPEG文件(扩展名为.mpg)中获取静止图像.
我查找了Web和MSDN库,但没有找到合适的解决方案.过去,我曾在.avi文件上使用Windows的Video和IMediaDet来执行此任务,但它们不支持我的MPEG文件.
我想要一些应有的简单内容,最好使用标准的.NET功能.
理想情况下,
I need to get still images from an MPEG file (.mpg extension), in sequential order.
I have looked up the Web and MSDN Library but found no suitable solution. I had used Video for Windows and IMediaDet in the past for this task on .avi files, but they don''t support my MPEG files.
I want something as simple as it deserves to be, preferably using standard .NET features.
Ideally,
FrameReader* Reader= new FrameReader("MyFile.mpg");
while (Reader.NextFrame())
{
Bitmap* Frame= Reader.GetFrame();
...
}
Reader.Close();
而不是用DirectX或类似的代码编写代码. (好的,我知道我在做梦,但是我确定在200行代码下可以找到解决方案.)
rather than headaches coding with DirectX or similar. (All right, I know I am dreaming, but I am sure there are solutions under the 200 lines of code.)
推荐答案
您之前看过这个吗:
从视频文件中提取帧 [
Did you look at this before:
Extract Frames from Video Files[^]
这篇关于从MPEG文件中获取帧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!