[MPlayer-dev-eng] mencoder frame skip behavior broken

D Richard Felker III dalias at aerifal.cx
Tue Feb 18 03:55:33 CET 2003


On Tue, Feb 18, 2003 at 02:08:44AM +0100, Johannes Guenther wrote:
> D Richard Felker III wrote:
> > I've been working on a filter for true inverse telecine
> 
> Ah. So there is no need to enhance the vf_ivtc posted by me some days
> ago?

Well I don't know. You claim your filter does something different,
which isn't actually inverse telecine but rather dropping duplicate
frames, and IMHO that's very useful in its own right.

However, my work was prompted and somewhat inspired by your posts. I
got to looking at things, and realized that the Serial Experiments
Lain DVDs I'm trying to encode to mpeg4, which I was just
deinterlacing with pp=md, are actually telecined. But not exactly.
Instead of just being telecined normally, it looks like the hand-drawn
animation was done at film framerate, then telecined and mixed
digitally with all the computer graphics and digital effects.

So it's something of a mess to get a clean stream out of, since it's a
mix of telecine and genuine 29.97 fps material. The lossless way would
be to encode at 29.97 fps with duplicate frames instead of the
telecine (like the movie you have with every 4th frame duplicated),
but personally I'd rather have the hand-drawn animation play smoothly
at the intended framerate than keep all the frames of CG (in fact the
CG is very noisy/chaotic/experimental looking, so you never notice the
missing frames), and lower framerate leads to lower quantizers.

So to make a long story short, I spent a good bit of time over the
past 2 days making a new filter to detect and sync to telecine,
reconstructing the frame split across bottom/top fields of 2 frames.
Because of the nature of the content I'm working with (lots of splices
between progressive and telecine footage), the filter has to quickly
detect the beginning and end of telecine sequences. It does this based
on 3 main principles:

* The first telecine frame will be nearly identical to the previous
  frame in the top field, and (unless there's no motion) very
  different in the bottom field.

* The top field of the second telecine frame will match more closely
  with the bottom field of the previous frame than with its own bottom
  field.

* The two telecine frames should have a very high degree of high
  frequency vertical noise, while the other three frames should have
  minimal noise at this frequency.

Right now my filter does all its work in one pass, so it's at a small
disadvantage in that it can't use the properties of both telecine
frames to detect where telecine sequences start. It makes up for this
by continuously trying to resync, but there are still a few frames it
messes up on.

If your or anyone else has some telecine material I could experiment
with, it would be very helpful. I imagine the threshold parameters and
stuff I use are good in general for anime but probably need
significant adjustment for anything else. Just upload samples to mphq!
:)

Rich




More information about the MPlayer-dev-eng mailing list