[MPlayer-users] feature request

Robert Henney robh at rut.org
Wed Apr 27 23:25:49 CEST 2005


> On Wed, Apr 27, 2005 at 08:16:04PM +0200, Konrad Materka wrote:
> > Dnia 27-04-2005, ?ro o godzinie 17:49 +0100, Johan van den Dorpe
> > napisa?(a):
> > 
> > > What about being able to step backwards?
> > 
> > It was intended to be implemented in mplayey G2 (Generation 2), but last
> > news about it was from July (August?) 2004. Long time ago. :-(
> 
> No it wasn't. This sort of feature is inherently not possible without
> a huge seek-and-decode chain for each step. It will probably never be
> implemented in any movie player simply because it doesn't belong. If
> you need this function, decode all frames to jpeg files and look at
> them with an image browser, or use a specialized nle program.

cache thrashing and the unidirectional nature of the decoding are certain 
to hinder any attempt to implement a feature such as this.

putting the cache thrashing aside for now, one way to lessen the seeking
difficulty would be to keep a short history of the position of keyframes
encountered while playing.  then the nearest keyframe previous to the frame
that is n frames earlier than the current frame by the number of frames to 
jump backwards can be found out with little effort.  an alternative to 
keeping the keyframe history is to do the more rigorous search for the
last keyframe position when the first stepping back a frame, and keep that
position memorized until leaving the framestepping state.

keyframe occurence is not exactly predictable and what constitutes a keyframe
may not be clear from codec to codec.  another hurdle, and no good solutions
I can think of for.

one thing in our favor here is that no one expects seeking backwards to be
the same as playing backwards.  even with terrible inefficiency and the poor 
resulting performance of such a feature, something that would allow backing
up by n frames would be thought of as invaluable by many.

getting the sound re-synced quickly after leaving the framesetting state is 
another potential difficulty.  stepping forward right now does enough
damage to the A/V sync, and stepping backwards can only be worse.




More information about the MPlayer-users mailing list