Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get MJPG stream video from android IPWebcam using opencv

I am using the IP Webcam program on android and receiving it on my PC by WiFi. What I want is to use opencv in Visual Studio, C++, to get that video stream, there is an option to get MJPG stream by the following URL: http://MyIP:port/videofeed How to get it using opencv?

like image 808
maximus Avatar asked Sep 01 '11 04:09

maximus


2 Answers

Old question, but I hope this can help someone (same as my answer here)

OpenCV expects a filename extension for its VideoCapture argument, even though one isn't always necessary (like in your case).

You can "trick" it by passing in a dummy parameter which ends in the mjpg extension:

So perhaps try:

VideoCapture vc;
ipCam.open("http://MyIP:port/videofeed/?dummy=param.mjpg")
like image 192
errollw Avatar answered Nov 01 '22 09:11

errollw


Install IP Camera Adapter and configure it to capture the videostream. Then install ManyCam and you'll see "MPEG Camera" in the camera section.(you'll see the same instructions if you go to the link on how to setup IPWebCam for skype) Now you can access your MJPG stream just like a webcam through openCV. I tried this with OpenCV 2.2 + QT and works well. Think this helps.

like image 42
Sanj Avatar answered Nov 01 '22 10:11

Sanj