Using libavcodec, I would like to implement a logic for reverse playback (and frame by frame in reverse) in my video player app. I am thinking to use some buffering method, and store a whole GOP (4 seconds) in a RAM buffer while playing in normal mode. When the user wants to reverse playback, I will simply use the stored frames, rendering them backwards and fill the buffer with the previous GOP (on another thread, of course) while the user uses reverse playback. I am aware this will be memory consuming, but with current hardware capabilities... I do have a second idea. At the moment, I am dropping all the rendered frames in playback mode. When the user wants to reverse playback, I will request the previous I-frame and all the P-frames until the current frame, decode them, fill the buffer and start playing backward. The previous GOP will be requested while playing backwards, and buffer fullfilled.

Is there any other point I can start with? Another idea or some hints?

Thank you a lot for reading this
Libav-user mailing list

Reply via email to