0

are there any ways to play media files inside a WinForms application without having to struggle with VLC controls or similar?

What I'd like to do is to open movies or audio files inside, say a panel, and then be able to pause, resume and stop the playback.

The only way of doing that (as I've found) is to embed VLC inside my applications, which is quite frustrating as VLC usually fails to play anything (maybe I'm doing it totally wrong though).

Anyway, I'd be happy if someone pointed me to a easy-to-use library or similar that just took care of the playback for me, (mostly) bug free

3 Answers3

0

I think there is a windows media player dll you can import in Visual studio: wmp.dll

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/7db19938-c34c-4085-bbe5-9e0725827e8c/

Don't know that will fit your needs ...

Run CMD
  • 2,937
  • 3
  • 36
  • 61
  • The problem I see with WMP it it's lack of native support for most video formats. –  Dec 19 '10 at 00:39
  • Yes you can play most files if you install codecs fo them like media.player.codec.pack.v3.9.6. it allows you to play most files from Windows media player itself, and that way even your control will work. – Shekhar_Pro Dec 19 '10 at 03:30
0

You should probably utilize DirectX for this. Alternatively, I have seen a solution using Silverlight, where Silverlight resides in a hosted web browser panel. A very dirty hack, but would be slightly more cross-platform if that's an issue. But, DirectX is where you should begin: http://msdn.microsoft.com/en-us/library/bb324497%28v=vs.85%29.aspx

drharris
  • 11,194
  • 5
  • 43
  • 56
0

Use a MediaElement if possible... i use it on WPF and its just about loading the URI for the audio/video file and it starts playing (It can even stream off internet). I think this is also available for SL, but im not quite sure :S

Machinarius
  • 3,637
  • 3
  • 30
  • 53