I'm writing an app that captures a video from the camera of the Android device. I'm trying to get all the frames of a video without repeating frames and store them in some kind of list. By "without repeating frames", I mean this:
If I call MediaMetadataRetriever.getFrameAtTime(time, OPTION)
, there is a chance that two calls to this method can return the same frame if time
hasn't changed much. I want to increment time
enough before the next call to getFrameAtTime()
such that I don't get the same frame again.
Obviously, I also want to make sure I don't miss any frames.
One way to do this is to get the frames per second of the video and increment time
by the frequency of frame capture. But how would I get the frames per second of the video I captured?
Or how else would I accomplish this?