Android VideoCapture from video file always return null

asked 2014-03-18 04:34:29 -0500

updated 2014-03-31 10:47:18 -0500

Andrey Pavlenko gravatar image

I use example code as following to try open MP4 video file and put some text to video file but open result always return failed.

extern "C"
{
//.... something code............

const char* arrURL = "mnt/sdcard/Download/VID_20140317_104750.mp4";
string source(arrURL);

VideoCapture inputVideo;              // Open input
//inputVideo.open(source);

if (!inputVideo.open(source)) -> alway return false here...
{
    env->ReleaseStringUTFChars(URL, arrURL);
    env->ReleaseStringUTFChars(sInputText, arrInputText);
    return;
}
//....

i used eclipse CDT - juno, NDK-r9, OpenCV 2.4.8 do everyone can help me answer some questions? - VideoCapture can not be supported on android? - Do you know any other solution on android? (not FFMPEG lib)

Thanks

edit retag flag offensive close merge delete

Comments

1

videocapture can't read or write video-files on android due to the (hold your hat) missing ffmpeg backend

berak gravatar imageberak ( 2014-03-18 04:37:33 -0500 )edit

how to capture from file? hope your help!

dodatbkit gravatar imagedodatbkit ( 2014-03-20 04:10:00 -0500 )edit

Hello dodatbkit, Did you fix this problem? I also got this problem in my android project!!!

JimmyChen gravatar imageJimmyChen ( 2014-09-06 14:24:07 -0500 )edit