What is the best way to make a video player using C# so that we can take the required snapshot by using button.
4 回答
its not easy to make pure video player in c#, btw you have to you use c++ libraries, anyway best is to find a library, vlc has some dll to inject it in your c# application. Here is more info..
Hmm if you want just snapshot by code.. now its more different, you can use EmguCv for that. Its opencv wrapper for .net.
我所知道的最好的一个是DirectShow.NET,它非常易于使用,并且允许您截取屏幕截图。
最简单的方法是在WinForms中
使用 Windows Media Player 控件 在 Microsoft Visual Studio
中使用 Windows Media Player 控件 在 C# 解决方案中嵌入 Windows Media Player 控件
编辑:要捕获屏幕截图,请查看此讨论
从视频中捕获帧
您可以使用 WPF MediaElement。要拍摄快照,您可以使用 RenderTargetBitmap 从 MediaElement 捕获当前视频帧。请参阅此链接。