Ask Your Question
0

How to open video file mp4/avi using opencv in android and detect faces in the video

asked 2018-01-25 01:59:37 -0500

Abdul Muheet gravatar image

I am quite new in OpenCV. I am working on a project to open/play a stored mp4/avi from the raw folder in android and detect faces in the video. For last many days i am touching many tutorial but unfortunately i am not able to get the same. Any suggestion, tutorial link etc will be appreciated. Thanks in advance. I am using OpenCV-3.4.0.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-01-25 02:23:12 -0500

berak gravatar image

you're a bit out of luck with this idea.

on android (lacking a backend like ffmpeg or gstreamer) only mjpg encoded avi files are supported, so you cannot read arbitrary video files.

then you cannot read from the raw folder directly (because it is zipped within your apk), but you would have to copy your video to sdcard manually first.

edit flag offensive delete link more

Comments

1

Yeah, I was wrong, I am getting the video from gallery obviously that are stored in SD-Card. So, with out FFmpeg, we can't accomplish the task using openCv(cv::VideoCapture etc). Am I right?

Abdul Muheet gravatar imageAbdul Muheet ( 2018-01-25 02:38:36 -0500 )edit

yes, exactly. you're limited to mjpg/avi.

berak gravatar imageberak ( 2018-01-25 02:51:20 -0500 )edit

Can you guide me, what else it will be needed after configuration to carry-out the task, which i have posted. Any advice, tutorial link...etc

Abdul Muheet gravatar imageAbdul Muheet ( 2018-01-25 02:54:42 -0500 )edit

Thanks. I am able to detect and count faces from live android mobile camera but in case of video i am confused...

Abdul Muheet gravatar imageAbdul Muheet ( 2018-01-25 03:09:16 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-01-25 01:59:37 -0500

Seen: 549 times

Last updated: Jan 25 '18