how to apply flip animation to imageviews in android?

Android: What is the best way to decode H264 encoded mp4 files and get the necessary frames to create an animation?

  • Standard Media Metadata Retriever doesn't help. If often can't decode frames.

  • Answer:

    You may use android.media.MediaCodec to get frame data, suggest to decode into a SurfaceTexture, render in OpenGL ES and glReadPixels back or just use shader to render the animation on fly. Another way is to use JNI to invoke FFmpeg lib which is a little over-killing.

Wu Yang at Quora Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.