问题
I tried to run This example from bigflake and I think that there is a mismatch.
they write "ExtractMpegFramesTest.java (requires 4.1, API 16) " so the minimum API required is 16, but I look over the code and they use "import android.opengl.EGL14;" which required minimum API 17.
Has anyone encountered this problem and succeeded to solve it?(succeeded to save 10 frames on Android 4.1 device)
回答1:
I've updated the site to have two copies of the source file, one that uses EGL 1.0 and one that uses EGL 1.4. I did a quick test with the SDK, creating an app for API 16, to confirm that it's no longer using post-4.1 APIs. I haven't tried it on an actual device running 4.1 however.
回答2:
You can use MediaMetadataRetriever.getFrameAtTime in order to extract frames from a video file. It's available since API level 10.
来源:https://stackoverflow.com/questions/20495863/mediacodec-extractmpegframestest-example-mismatch