Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I play video files? [closed]

Tags:

c#

file

video

I like to play video files, such as AVIs, through my C# program. Is it possible to play video files like that?

like image 623
ratty Avatar asked Jan 24 '10 15:01

ratty


1 Answers

You might consider using the Audio/Video controls in Managed DirectX as a quick solution:

http://msdn.microsoft.com/en-us/library/bb324497%28VS.85%29.aspx#dx_avp_playing_a_video_file

If you need more control over the video, or better integration with your application, you can use DirectShow. There is a good C# interop library for accessing it (DirectShowLib).

One other plus of using DirectShow is that windows will handle loading the necessary codecs and rendering components necessary for a given media type.

like image 121
Alistair Evans Avatar answered Oct 30 '22 06:10

Alistair Evans