2013-05-09 78 views
0

我正在使用VIVOTEK IP攝像頭。我正試圖與OPENCV進行交互。在輸入用戶名和密碼後,Internet Explorer會在此URL顯示精美的視頻。帶有opencv的IP攝像頭:錯誤ffmpeg

的代碼如下

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

//i have also tried "http://username:[email protected]/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; 


    } 

給我有以下錯誤

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

什麼可能是問題嗎?

回答

0

您提供的URL是問題所在。您可以使用網址像這樣

"http://username:[email protected]/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=30&.mjpg" 

或者另一種選擇是下載ISPY軟件,並用網絡攝像機嚮導,它找到的網址給你,並給出了您所使用的相機的最佳選擇。我確實使用了這種方法。 Heres the code which worked for me.只要你想從網絡攝像機得到實時信息。 Here's the list of URL which can be used to get the video from your IP Camera.