AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

How to open and play video from mpeg file

Forum to discuss AForge.NET Framework, its features, API, how-tos, etc.

How to open and play video from mpeg file

Postby kathsunil » Mon Feb 23, 2009 6:21 pm

Is it possible to open and play mpeg file using aforge.net.
I get an error with the code

FileVideoSourcer vs = new FileVideoSource(Filename);
vs.NewFrame += new NewFrameEvntHander(Video_Frame);
vs.start();

void video_Frame(obj--------)
{
Bitmap bit = events.Frame;
}

Can anyone help me please:: with some code I am new to programming.
Thank you
kathsunil
 
Posts: 4
Joined: Wed Feb 18, 2009 6:56 pm

Re: How to open and play video from mpeg file

Postby andrew.kirillov » Tue Feb 24, 2009 8:47 am

Hello,

If the file can be played in Windows Media Player, then it should be possible to play it using FileVideoSource class, since they both use the same - DirectShow.

kathsunil wrote:I get an error with the code

What kind of error do you get with your code? Is it compilation error or run time error? Try the sample from docs.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3453
Joined: Fri Jan 23, 2009 9:12 am
Location: UK




Return to AForge.NET Framework