Handle MediaCodec video with dropped frames
I'm currently doing fast precise seeking using MediaCodec . What I currently do to skip frame by frame is, I first get the total frames: mediaInfo.totalFrames = videoTrack.getSamples().size(); Then I get the length of the video file: mediaInfo.durationUs = videoTrack.getDuration() * 1000 *1000 / timeScale; //then calling: public long getDuration() { if (mMediaInfo != null) { return (int) mMediaInfo.durationUs / 1000; // to millisecond } return -1; } Now, when I want to get the next frame I call the following: mNextFrame.setOnClickListener(new View.OnClickListener() { @Override public void