Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extract Video frames in Android

I wanted to know if it is possible to extract frames from a running Video in Android? I need to extract frames at regular intervals and send them for further processing.

Would someone be able to find an answer for me?

Thanks,

Abhi

like image 252
Abhishek Sharma Avatar asked Jan 26 '10 20:01

Abhishek Sharma


1 Answers

You can use MediaMetadataRetriever:

I'm currently using it, by calling:

mediaMetadataRetriever.getFrameAtTime(timeUs,MediaMetadataRetriever.OPTION_CLOSEST);

I get the frame's bitmap.

Note that it's only supported since: API Level 10.

like image 75
Oren Bengigi Avatar answered Oct 18 '22 21:10

Oren Bengigi