Open wangchenyan opened 6 years ago
"What can't you do?
Create JPEGs from a movie. No - this is no decoder. The MP4 Parser doesn't know how to do that. Create a movie from JPEGs" I bet you're trolling right?
This is not impossible. But you will have to use this library in combination with FFmpegMediaMetadataRetriever
.
Let me explain:
You can get time between each frame by doing the following:
totalFrames = videoTrack.getSamples().size();
durationUs = videoTrack.getDuration() * 1000 *1000 / timeScale;
int intervals = Integer.parseInt(String.valueOf(durationUs / frames));
Above, intervals
will provide you the intervals (in ms) between each frame. You can now pass these intervals to FFmpegMediaMetadataRetriever
and retrieve all the frames from the video.
Please close this issue.
thanks