IP Camera with opencv: error ffmpeg

自作多情 提交于 2020-01-17 01:35:06

问题


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?


回答1:


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..



来源:https://stackoverflow.com/questions/16455345/ip-camera-with-opencv-error-ffmpeg

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!