简体   繁体   English

使用DirectShow.net从.mov文件中抓取帧

[英]Grab frame from .mov file using DirectShow.net

如何使用DirectShow.net从c#.net中的.mov文件中获取帧

DirectShow and DirectShow.NET don't make it any special with .MOV files. DirectShow和DirectShow.NET对.MOV文件没有特殊要求。 You typically create a filter graph with a Sample Grabber filter that you manage, and its callback gives you frames of video stream that passes through. 通常,您使用自己管理的Sample Grabber过滤器创建过滤器图,其回调为您提供通过的视频流帧。

You might want to look at DxScan sample in DirectShow.NET, \\Samples\\Editing\\DxScan. 您可能要查看DirectShow.NET中的DxScan示例,\\ Samples \\ Editing \\ DxScan。 It grabs frames from a given movie file. 它从给定的电影文件中抓取帧。

A sample application scanning a media file looking for black frames 一个示例应用程序扫描媒体文件以查找黑框

Most of the work is done in ISampleGrabberCB.BufferCB. 大多数工作在ISampleGrabberCB.BufferCB中完成。 See the comments there. 看到那里的评论。 Also, the algorithm used to scan for black frames isn't as efficient as it could be. 而且,用于扫描黑框的算法效率不高。 However, the samples gives you an idea of how this could be done. 但是,这些示例使您对如何完成此操作有了一个想法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM