Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

i am using VIVOTEK IP camera. I am trying to interface it with OPENCV. internet explorer shows fine video at this url, after entering username and password.

the code is given below

const std::string videoStreamAddress ="http://192.168.100.128/main.html";

//i have also tried "http://username:pasword@192.168.100.128/main.html" but the same
//result 
//and also tried ""http://192.168.100.128" i.e without "main.html"

if(!vcap.open(videoStreamAddress))
{

    std::cout << "Error opening video stream or file" << std::endl;


    }

I got the following error

 warning: Error openong file <../../modules/highgui/src/cap_ffmpeg_impl.hpp:529>
 Error opening video stream or file 

what can be the problem?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
212 views
Welcome To Ask or Share your Answers For Others

1 Answer

The URL which you have given is the problem. You can use url something like this

"http://username:password@ipOfCamera/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=30&.mjpg" 

Or another option is to download iSpy software and use IP camera wizard where it finds the URL for you and gives the best choice for the camera you are using. I did use this approach. Heres the code which worked for me. as far as you want to get the live feed from the IP Camera. Here's the list of URL which can be used to get the video from your IP Camera..


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...