Ask Your Question
0

VideoCapture device on Android

asked 2013-06-13 09:55:25 -0500

stephanmg gravatar image

Dear users,

i'm successfully using my Camera on Android (native C++ OpenCV) for capturing images from my Hardware Camera.

Nevertheless I cannot read with cv::VideoCapture from a videofile on my SD card on my Android phone... the videofile I have converted to the correct format for OpenCV, nevertheless the videofile is not recognized and cannot be played.

1) I read some posts that suggest to install "FFmpeg" Codecs on the Android device - but how, and is this possible at all?

some guy from #android-dev on Freenode suggested:

2) <anonymous> stephanmg, if you want to use ffmpeg decoders, yes, you should statically link libavcodec/libavformat into your opencv library so it'll have the decoders available.

My question is: How can i read videofiles with cv::VideoCapture from a file, analogous to the case which i succesfully could manage, that is to read and process images which i captured from my hardware camera.

All the best, Stephan

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-07-01 08:39:53 -0500

stephanmg gravatar image

Dear Alexander,

thank's for your reply.

So, i do not necessarily need to use FFMPEG, i just want to read in videofiles on Android with OpenCV natively. Is there any other approach how I can do this?

All the best, Stephan

edit flag offensive delete link more

Comments

There is no compatible video i/o back-ends on Android platform. The only available solution is FFMPEG.

Alexander Smorkalov gravatar imageAlexander Smorkalov ( 2013-07-09 08:37:42 -0500 )edit
0

answered 2013-06-28 08:49:38 -0500

OpenCV4Android does not support FFMPEG and does not include VideoCapture back-end for it. The only solution is to build OpenCV and FFMPEG manually. There is unofficial branch with FFMPEG integration on Android, but it is very very old. You can try to update the code to the current OpenCV version and finish integration.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2013-06-13 09:55:25 -0500

Seen: 1,658 times

Last updated: Jul 01 '13