I am reading a video file using DataInputStream. I am then using a byte array to read data one by one for each frame and then displaying them consecutively. My question is, what if I wanted to see a previous frame again, or a future frame for that matter? Is it possible to step back in the stream, or is any other way possible?
I would use a memory mapped approach for this. If you know what the size of each frame is, and it's fixed, there is no reason why you can skip (forward/backwards) and simply map in that frame (or sequence of frames).