0

i meet a problem about how to save a video stream from a wifi camera.

i made a robot with a wifi camera, and then i use c# to create a application to control my robot so it can run around the house and i can see my house via the camera. but this is just the beginning, now i want to save the stream from the camera (the only thing i know is url, it is like: http://192.168.8.1:8083/?action=snapshot)

so now i want to know how to save the stream, or save as pictures, maybe 5 pictures per second?

save as pictures is better, so i can analysis these pictures because i want to use it for deep-learning using cuda.

[code]

    private void buttonCamera_Click(object sender, EventArgs e)
    {
        timer1.Enabled = true;
    }

    private void timer1_Tick(object sender, EventArgs e)
    {
        pictureBox1.ImageLocation = CameraIP; 
        // ip is http://192.168.1.1:8080/?action=snapshot
    }

[/code]

this is part of my code, i create a button named camera, when i click it, the stream from camera will be displayed in the picturebox.

and now what i want to do is to capture the stream maybe 5 pictures per second and save them as jpg

i dont know the fps of the stream, this is another thing i dont know how to get it

  • Welcome to Stack Overflow! Can you please elaborate your question having your effort like code or something so that people could get your problem early and help you? Thanks! – Enamul Hassan Jul 24 '16 at 01:09
  • Use FFMPEG : http://stackoverflow.com/questions/16259588/how-to-dump-raw-rtsp-stream-to-file –  Jul 24 '16 at 01:10
  • forget one thing, i use picturebox to show the stream, so i dont know if picturebox has some function can capture and save pictures – jeffrey lee Jul 24 '16 at 01:27

1 Answers1

0

The AForge library contains anything you need.

The JPEGStream class can help you this way: it retrieve jpeg pictures from a video stream. You can specify a capture interval and hook the the NewFrame event to save your picture.

Larry
  • 16,649
  • 8
  • 71
  • 100
  • thank you, already finished my work last year on August i use timer and " var img = new Bitmap(pictureBox1.Image); " to save image from camera – jeffrey lee Feb 04 '17 at 06:53