使用计时器播放视频并抓取帧
我在播放视频和抓取帧时遇到问题。我需要抓取帧来执行更改检测等...是否有一种方法可以定期播放视频并抓取帧(使用计时器),例如在 Windows 窗体上使用 Windows Media Player 控件?
注意:
- 我查看了 DirectShow.NET,似乎太复杂了。就为了这么一个简单的需求。所以不想走那条路,除非我绝对必须。
- AVIFile 库不会削减它,因为我需要支持多种视频格式(除 AVI 之外)
I am having trouble playing a video and grabbing frames. I need to grab frames to perform change detection among other things...Is there a way of playing a video and grabbing frames periodically (using a timer) such as using Windows Media Player control on a windows form?
N.B:
- I have looked over DirectShow.NET, seems too complicated & involved for such a simple requirement. So don;t want to head that route, unless i absolutely must.
- The AVIFile lib won't cut it since I need to support multiple video formats (other than AVI)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我过去用 DirectShow 做过类似的事情。
使用 DirectShow 您将获得更好的结果,因为您可以逐帧而不是在计时器上进行计算。
这些都是使用 DirectShow 的动作捕捉示例:
A
B
I have done something similar to this in the past with DirectShow.
You are going to get much better results with DirectShow, since you can do you calculations frame by frame rather than on a timer.
These are both examples of motion capture, that use DirectShow:
A
B