An alternative solution to replace the getFrameAt method of Android MediaMetadataRetriever. FrameGrabber uses MediaCodec to decode video frame and use OpenGL to convert the video frame as RGB Bitmap. As Android MediaMetadataRetriever does not guarantee to return result when calling getFrameAtTime, this FrameGrabber can be used to extract video frame with frame accuracy..
FrameGrabber is hosted in the following web site
https://github.com/kswlee/FrameGrabber
If you think the Android project FrameGrabber listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
The following table is the detailed list of FrameGrabber.
Item | Value |
---|---|
Java File Count | 7 |
Target SDK Version | 18 |
Minimum SDK Version | 17 |
Activity Count | 1 |
jar files used | android-support-v4.jar android-support-v4.jar |
Required Permissions | android.permission.READ_EXTERNAL_STORAGE android.permission.WRITE_EXTERNAL_STORAGE |
Asset File Names | assets\frameCount.mp4 |
FrameGrabber has the following Java source files.
com.tam.gl.GLHelper.java com.tam.gl.GLUtil.java com.tam.gltest.MainActivity.java com.tam.media.FrameGrabber.java com.tam.media.VideoDecoder.java com.tam.utils.BitmapUtil.java