-4

What is the best way to make a video player using C# so that we can take the required snapshot by using button.

Hem Poudyal
  • 321
  • 6
  • 16

4 Answers4

3

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.

Community
  • 1
  • 1
Mustafa Ekici
  • 7,263
  • 9
  • 55
  • 75
2

The best one I know for stuff like this is DirectShow.NET, its quite easy to use and will allow you to take screenshots.

sa_ddam213
  • 42,848
  • 7
  • 101
  • 110
0

Easiest way is using Windows Media Player Control in WinForms

Using the Windows Media Player Control with Microsoft Visual Studio
Embedding the Windows Media Player Control in a C# Solution

EDIT: For capturing a screenshot check this discussion
Capture frame from video

Yakup Ünyılmaz
  • 404
  • 3
  • 11
0

You can use WPF MediaElement. For taking a snapshot, you can use RenderTargetBitmap to capture the current video frame from the MediaElement. See this link.

Matthias
  • 5,574
  • 8
  • 61
  • 121