I'm trying to get all frames from a video using MediaMetadataRetriever and getFrameAt() method.
Using FFMPEG, I've got the following information :
Video frame counts : 234 frames
Video duration in milliseconds : 90000
int counter = 0; long mVideoDuration = 9000; for (long i = 0; i < mVideoDuration * 1000; i += 1000) { Bitmap thumbnail = mMediaMetadataRetriever.getFrameAtTime(i); }
The above code does not work, it's loop for almost 8944 times, and this is too much, I don't want to get all these frames, I just want to get the 234 frames.
getFrameAtIndex() WORKS VERY WELL, but due to API level compatibility, I would like to make it work with getFrameAt() method