Opencv read video stream from Zoneminder

asked 2013-11-12 12:41:28 -0500

nevermore gravatar image

Hello all,

I'm trying to read and display a video stream from Zoneminder on Ubuntu.

I am using eclipse with opencv. The code is here:

#include <cv.h>
#include <highgui.h>
using namespace cv;
int main(int argc, char *argv[])

   { Mat frame;
     namedWindow("video", 1);

//the next line is to capture the video stream of the URL from Zoneminder

      VideoCapture cap("");
     while ( cap.isOpened() )
         cap >> frame;
         if(frame.empty()) break;

         imshow("video", frame);
         if(waitKey(30) >= 0) break;

    return 0;

Note that I copied the URL( from the image information on the monitor of zoneminder.

This code works for my webcam, as well as other ip cameras. I also tested the URL in VLC, and it works fine.

Does anyone know what should I do to read the video stream from Zoneminder?

Thank you very much!

edit retag flag offensive close merge delete