Ask Your Question

Revision history [back]

OpenCV VideoCapture Android

I am trying to read a video file (MP4) using OpenCV on Android Studio. I have OpenCV 343 installed in my application. I know that the file exists at that filepath because I am able to read and process the file using FFmpeg, MediaExtractor and other libraries but when I do a videoCapture(filepath) and then try to read the captured video frames into a matrix using the read() method, the output is always false and the matrix does not contain any frames.

I'm able to read the video using Python OpenCV libraries and videoCapture works fine there. Could anyone please tell me if there is something I need to ensure to get this to work in AndroidStudio/Java?

Thanks