[MPlayer-users] Idea for backwards frame seek

Chris Stratton cs11102 at yahoo.com
Tue Jan 16 23:25:26 CET 2007


Appologies if this has been covered before, but I did do a search... have a bit of an idea, and am willing to take a try at implementing it, so am merely looking for comments/guidance.

I'd like a way to smoothly frame seek forward and backwards in arbitrary video sources over a range of a few seconds, as I do a lot of sports movement study.  There are a number of players that do this well with uncompressed video, or with compressed video having fairly frequent i-frames.  For example, if I use mencoder to re-encode to mpeg4 with an iframe interval of 10, I can work with that.  But the extra step is annoying.  If I have something on a DVD, I don't want to re-encode it, I want to study it in its current format.

What I was thinking is that instead of the rather inelegant seek back to previous i-frame and then reconstruct forward method used by most players which feature frame rewind, what about retaining a history of decompressed frames in a circular buffer?  I figure a decompressed is about a megabyte, so a modern PC ought to be able to hold 3-10 seconds in memory.  

An ideal implementation would interact with mplayer's seek functions to fill the buffer during longer forwards and backwards seeks.  But for just initial experiments, I'd be interested in trying to simply hack in a buffer between decompressor and display, with custom keys that pause mplayer and only permit advance/rewind within my buffer.

Any thoughs on if this is workable?

Points to where in the source to try experimentally making the insertion?

(I hope it doesn't matter, but I will probably be working with the mingw build)

Chris


 
---------------------------------
Don't get soaked.  Take a quick peak at the forecast 
 with theYahoo! Search weather shortcut.


More information about the MPlayer-users mailing list