[MPlayer-users] Re: [-] Re: [-] Re: [-] TV-recording with mencoder, "video-buffer full"

D Richard Felker III dalias at aerifal.cx
Tue Mar 1 19:03:09 CET 2005

On Tue, Mar 01, 2005 at 11:44:23AM +0100, Matthias Wieser wrote:
> > > > (but also adds edge ghosting from the other field -- very ugly!)
> > >
> > > I have never seen those edge ghosting. Do you have screenshots?
> >
> > Yep, I'll make one right now:
> >
> > http://brightrain.aerifal.cx/~dalias/lavcdeint_sucks.jpg
> >
> > This shows 3 frames from telecined content, so you see how the 'ghost'
> > of one appears in another.
> Could it be that this effect is caused by ntsc? I have never seen anything 

Nope. It's fundamental to what pp=fd does, which is equivalent to
linear-interpolating the missing lines of field-0, and then adding an
edge-detected (think "edge detect" command in gimp) copy of field-1 on
top of that. It's absolutely absurd!

The only reason anyone likes this absurd filter is that, if the two
fields already line up to make one still image (or in parts of the
image where this is the case), the filter acts almost like the
identity operator, since the edge-detected copy of field-1 makes up
for what was lost by interpolating and throwing away field-1.

> like that (but I dont't watch Manga films).

The word is anime. Manga means graphic novels (aka comic books).

You're right that I did cheat slightly by using anime as an example.
Live real-world video is more forgiving, for two reason:

1. Fewer sharp edges. Or in other words, the edge-detected copy of
   field-1 is extremely faint.
2. There are fewer areas of solid color, more noise to mask the error
   introduced by this nonsensical ghost.

Of course, these first reason also means that pp=fd is less important
and less useful for real-world content, because the contribution from
the edge-detected field-1 is hardly doing anything to improve the
image, since its magnitude is so small. To state it as two points:

A. The weaker the sharp edges, the closer pp=fd becomes to pp=li, in
   which case it's no better than throwing away a field.
B. The stronger the sharp edges, the more ugly ghost artifacts pp=fd
   will introduce.

Either way, you simply can't win. :(

> > Also notice how bad the thin nearly horizontal lines get aliased
> > by the filter.
> But probably less ugly than when using pp=md or pp=ci.

Using pp=ci is 100% pointless. It's equivalent to capturing only one
field, then scaling it up to full height with vf_scale, which just
wastes a huge number of bits encoding redundant information. You'd be
better off using single-field capture and not upscaling, just storing
an aspect header instead.

The destructiveness on those horizontal lines is slightly worse with
pp=md, yes. That's because md's critical flaw is that is destroys all
isolated local extrema. It should be possible to make a similar filter
without this flaw, at a very minor cost to cpu time. Once I tried
this, but I was trying to do too many other fancy things too so I
didn't get any good tests with just the basic ideas.

> Have you done some comparisons with kerndeint?

Yes, it's much less destructive.

> > The only remotely correct deinterlacer in MPlayer is vf_tfields. :)
> > But it's only usable with MEncoder, and requires nasty hacks to trick
> > to make it get the framerate right.
> A year ago it worked quite well. But I had to use a higher bitrate to get 
> reasonable quality. Now I do most TV recordings at 25fps.

It's a shame..you're losing half the framerate. :(
tfields output looks really beautiful on the PAL DV I tried using it
on a while back.


More information about the MPlayer-users mailing list