Ask Your Question

Revision history [back]

OpenCV on Android using NDK: Fail on using cvCaptureFromFile open MP4 file

I'm using Eclipse ADT with NDK developing a Android Application involving OpenCV.

I tried

CvCapture *inputVideo = cvCaptureFromFile(location);

In the native cpp file, but it always gives input NULL.

I have make sure that location is a char* point to a MP4 file on my Android Phone and READ_EXTERNAL_STORAGE permission is given.

(which is actually a MP4 file generated by Android built-in Camera Software and could be open by build-in Video Software)

I tried VideoCapture::VideoCapture, the cpp version of cvCaptureFromFile but still video.isOpen() is False always.

Is it like actually OpenCV does not support MP4 on Android or I need to come with other software?

click to hide/show revision 2
retagged

updated 2014-05-06 01:00:43 -0600

berak gravatar image

OpenCV on Android using NDK: Fail on using cvCaptureFromFile open MP4 file

I'm using Eclipse ADT with NDK developing a Android Application involving OpenCV.

I tried

CvCapture *inputVideo = cvCaptureFromFile(location);

In the native cpp file, but it always gives input NULL.

I have make sure that location is a char* point to a MP4 file on my Android Phone and READ_EXTERNAL_STORAGE permission is given.

(which is actually a MP4 file generated by Android built-in Camera Software and could be open by build-in Video Software)

I tried VideoCapture::VideoCapture, the cpp version of cvCaptureFromFile but still video.isOpen() is False always.

Is it like actually OpenCV does not support MP4 on Android or I need to come with other software?