Page 1 of 1

How to open and play video from mpeg file

PostPosted: Mon Feb 23, 2009 6:21 pm
by kathsunil
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

Re: How to open and play video from mpeg file

PostPosted: Tue Feb 24, 2009 8:47 am
by andrew.kirillov
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.