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); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)