[MPlayer-dev-eng] [PATCH] mencoder precised/exact seeking

Trent Piepho xyzzy at speakeasy.org
Fri Apr 13 01:46:50 CEST 2007

On Thu, 12 Apr 2007, Rich Felker wrote:
> On Thu, Apr 12, 2007 at 05:46:27AM -0700, Trent Piepho wrote:
> > On Wed, 11 Apr 2007, Rich Felker wrote:
> > > > Of course this is very slow, and most filters don't care about missing
> > > > frames, so your patch is an improvement in almost all cases.
> > >
> > > It's not. There's a correct way to do skipping involving vfctls, where
> > > the softskip filter is inserted after all the filters that need to see
> > > all frames. Copy that code.
> >
> > There is still the problem of decoding every frame during a skip, instead
> > of just seeking over them.  If softskip is the first filter it is still
> > very slow to decode every frame just to drop it without using it.
> Skipping decoding is impossible. When you get to the frame you finally
> need you won't be able to decode it because you'll be missing the
> previous frame.

As I understand it, the patch seeks to to closest keyframe and then decodes
from there.  Of course you cannot seek to a non-keyframe and then decode it
correctly, but that doesn't mean you can't seek over many frames.

> > telecine filter doesn't see that.  Why does it need to see the hour of
> > material before what I want to encode?
> As the length of the pre-interval it sees increases, the probability
> that it will have the same phase decisions as if it had infinite
> lookback approaches 1. However knowing what length is needed is
> difficult and there is no clear answer in the general case...

I suppose it depends on the filter.  In many cases, the telecine pattern of
that which is getting cut (commercials) is utterly different than what is
not being skipped.  So the filter seeing every frame could actually be

My point is there exist filters which do want to see every frame when
encoding and so should go after softskip, yet don't need see frames that
are edited out.

IMHO, the default for hr-edl-seek should be "seek to keyframe and then
decode", with the option to enable "decode all frames" for those few cases
that really need it.

More information about the MPlayer-dev-eng mailing list