Click here to Skip to main content
15,917,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Please someone can guide me.

I need to capture video IP with MJPEG video Stream.

Must include the following, example :


I need to run it on ibMain.Emgu.CV.UI.ImageBox
C#
using AForge.Video;

private MJPEGStream VideoStream = new MJPEGStream();


 public MainForm()
        {

       VideoStream.Source = "http://192.168.1.30"; // "URL_HERE";
       VideoStream.Login = "admin";                // "USERNAME_HERE";
       VideoStream.Password = "1234";              // "PASSWORD_HERE";
       VideoStream.NewFrame += new NewFrameEventHandle (VideoStream_NewFrame);
       VideoStream.Start();

         }

        private void VideoStream_NewFrame(object sender, AForge.Video.NewFrameEventArgs eventArgs)
        {
            Bitmap FrameData = new Bitmap(eventArgs.Frame);
            MessageBox.Show("dfd11f"); 
           // pbStream.Image = FrameData;
            Image<Bgr, Byte> img = new Image<Bgr, Byte>(FrameData); // Creating image from Bitmap ??
            ibMain.Image = img;



            // ibMain.Image = FrameData;
        }

        private void VideoStream_VideoSourceError(object sender, AForge.Video.VideoSourceErrorEventArgs eventArgs)
        {
          //  Debug.WriteLine(eventArgs.Description);
              MessageBox.Show(eventArgs.Description);
        } 


Thank you for your valuable time.
Posted
Updated 12-Aug-12 4:56am
v4
Comments
[no name] 12-Aug-12 8:58am    
What is the problem? What have you tried? Where is the code that demonstrates your problem?

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900