Ask Your Question

neutrino's profile - activity

2016-07-27 11:23:23 -0600 commented answer Capturing IP camera stream with VideoCapture in Android

Is there any known workaround other than JavaCV?

2016-07-27 11:22:47 -0600 commented question Capturing IP camera stream with VideoCapture in Android

yeah sorry, edited that one out

2016-07-27 10:59:43 -0600 received badge  Editor (source)
2016-07-27 10:57:42 -0600 asked a question Capturing IP camera stream with VideoCapture in Android

I would like to capture an IP camera stream with VideoCapture in Android. I am using the latest OpenCV v3.1 which reportedly supports mjpg stream capture.

Below is how I am trying to open the stream, which does not work. I have also tried passing the IP address into the VideoCapture constructor.

String ipAddress = "http://IP:PORT/axis-cgi/mjpg/video.cgi?resolution=320x240&.mjpg";

VideoCapture capture = new VideoCapture();
capture.open(ipAddress);

if(!capture.isOpened()){
    Log.e(TAG, "Not opened");
}

Also, my AndroidManifest.xml contains the internet access permission:

<uses-permission android:name="android.permission.INTERNET" />

Is there anything else I am missing? Should there perhaps be some kind of sleep() or some callback to notify once the stream connects and only then capture incoming frames?

Any similar issues seem to be missing the dummy mjpg parameter at the end of the IP adddress which is not the case here.

2016-07-25 08:55:03 -0600 commented question VideoCapture android doing nothing ?

@berak what do you mean only from webcams? how is is different from a video stream?

2016-07-25 03:44:51 -0600 commented question Why OpenCV4Android VideoCapture cannot open filename in android

Have you resolved this issue?