Itay
Itay

Reputation: 73

mediacodec ExtractMpegFramesTest example mismatch

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)

Upvotes: 3

Views: 816

Answers (2)

fadden
fadden

Reputation: 52303

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.

Upvotes: 3

jpm
jpm

Reputation: 3430

You can use MediaMetadataRetriever.getFrameAtTime in order to extract frames from a video file. It's available since API level 10.

Upvotes: 0

Related Questions