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

D Richard Felker III dalias at aerifal.cx
Tue Feb 18 23:45:30 CET 2003


On Tue, Feb 18, 2003 at 04:27:44PM -0500, D Richard Felker III wrote:
> On Tue, Feb 18, 2003 at 07:01:37PM +0000, Jason Lunz wrote:
> > dalias at aerifal.cx said:
> > > If your or anyone else has some telecine material I could experiment
> > > with, it would be very helpful. I imagine the threshold parameters and
> > 
> > Do you have the dolby trailers? They're pretty good examples of
> > cleanly-telecined video. google for dolby-city.vob (there are other
> > trailers named dolby-*.vob) and try your filter on them. A perfect
> > inverse telecine on these videos should yield nothing but clean
> > progressive frames.
> 
> I found them, and for the most part my filter does fine. Of course it
> can't do anything with the all-black time before the video starts.
> Also with the default thresholds I used for Lain, it failed to
> properly detect the first telecined frame and instead caught the
> second one of the sequence, but it quickly realized its error and
> resynced for the rest of the video. Adjusting the thresholds slightly
> or else using a 2-pass approach should resolve the problem.
> 
> Since no one has objected to my proposed mencoder fix, I'll probably
> commit it soon. I might wait a few days to commit the detc
> (de-telecine) filter, though, since it's not yet configurable, and I
> don't want to pollute the cvs logs with lots of useless spam as I
> tweak it.

Hmm, on second thought, I might just drop that patch to mencoder and
the muxer layer. It is brain damaged for mencoder not to work with
filters that depend on temporal information when skipping frames, but
the more I think about it, it's also brain damaged on the user's part
to rely on mencoder's frame skip for adjusting framerate, since it's
not at all intelligent or discriminating in which frames it drops.

So, for now I've added a check to vf_detc.c that just ensures that at
least one frame gets dropped every 5 frames (during telecine sequences
that will be the two duplicate fields; in progressive mode, it's just
every fifth frame). This seems to be working well; mencoder's own
frame skip isn't kicking in at all. Plus, this has the added benefit
that the rest of the filter chain after detc doesn't get run on
dropped frames, so encoding is somewhat faster.

At some point I'll probably work on improving things so that (at least
in the upcoming 2pass mode) detc tries to drop the frames with the
least motion during progressive sequences; this will optimize both for
the case where it's actually telecine content but just too little
motion to detect interlacing, and the case where it's real progressive
material (since the frame with the least motion will probably be the
least noticable one to drop).

Rich



More information about the MPlayer-dev-eng mailing list