M
M
mIka012021-10-25 01:06:02
CCTV
mIka01, 2021-10-25 01:06:02

How to get bitmap from ip camera?

Hello, how to work with ip camera?
I need to make a function that accepts the ip of the camera and returns a bitmap file.

I usually use the library AForge.Video.

MJPEGStream stream;
        public Form1()
        {
            InitializeComponent();
            stream = new MJPEGStream("http://185.10.80.33:8082/cgi-bin/faststream.jpg");
            stream.NewFrame += GetNew;
            stream.Start();
        }
        void GetNew(object sender, NewFrameEventArgs eventArg)
        {
            Bitmap bmp = (Bitmap)eventArg.Frame.Clone();
            pictureBox1.Image = bmp;
        }


But as you can see, this doesn't work.

Thank you in advance for your response.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mIka01, 2021-10-25
@mIka01

string url = " 185.10.80.33:8082/record/current.jpg?rand=313886 ";
PictureBox picbox = new PictureBox();
picbox.Load(url);
Bitmap bitmapRemote = (Bitmap)picbox.Image;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question