[MPlayer-DOCS] RFC: mencoder with interlacing/telecine howto (draft 1)

D Richard Felker III dalias at aerifal.cx
Mon Jan 5 21:20:51 CET 2004


On Mon, Jan 05, 2004 at 01:00:30AM -0800, Corey Hickey wrote:
> D Richard Felker III wrote:
> >On Sat, Jan 03, 2004 at 07:02:25PM -0800, Corey Hickey wrote:
> >
> >It is possible (deinterlace to 60fps). However, such files will not
> >compress well at all, and they'll take insane cpu power to decode. To
> >make one you need to use -vf tfields, which is buggy with G1... :)
> >
> 
> I tried it out as I was writing the draft, but it kept crashing. I tried
> a different source now, so I wrote a paragraph into the doc with a
> warning.

Yes, it's not supposed to be able to work in G1, but it does somehow
anyway. You have to use both -fps and -ofps. Actually I have no idea
why this works, but apparently it does...

> >It also has interlaced motion vector support now too, which you should
> >enable.
> 
> What is the option name? I couldn't find it in the manpage.

ilme

> >While you're mentioning cropping, crop height and offset must _always_
> >be a multiple of 4 for 4:2:0 video. If not you'll mess it up bad.
> 
> Does it only have to be a multiple of 4 for interlaced/telecined video,
> or do you mean that to apply to all 4:2:0?

Only for non-progressive pictures. Cropping to a multiple of 2 should
be fine for entirely progressive video, unless I'm forgetting
something.

> >>Filmdint
> >>TODO: DESCRIBE FILMDINT (I haven't used filmdint yet, but it ought to be 
> >>good)
> >
> >
> >It's ok, but IMO it tries to deinterlace rather than doing inverse
> >telecine too often (much like settop DVD players & progressive TVs)
> >which gives ugly flickering and other artefacts. If you're going to
> >use it, you at least need to spend some time tuning the options and
> >watching the output first to make sure it's not messing up.
> >
> 
> Hoping you don't mind, I quoted this paragraph and attributed it to you.

OK, let's just be sure to change it if/when filmdint improves. You
should also try it yourself and see if you agree with my assessment.
It might be much better on live content than animation; the only
telecined DVDs I have are anime.

> >>--Mixed progressive and interlaced--
> >>
> >>There are two options for dealing with this category, each of which is a
> >>compromise. You should decide based on the duration/location of each type.
> >>
> >>1. Treat it as progressive. The interlaced parts will look interlaced, 
> >>and some
> >>  of the interlaced frames will have to be dropped, resulting in a bit of
> >>  uneven jumpiness. You can use a postprocessing filter if you want to, 
> >>  but it
> >>  may adversely affect the progressive parts.
> >>
> >>2. Treat it as interlaced. Some frames of the progressive parts will need 
> >>to be
> >>  duplicated, resulting in uneven jumpiness. Again, deinterlacing filters 
> >>  may
> >>  degrade the progressive parts.
> >
> >
> >Yes, alas mencoder (G1) doesn't support variable-fps output. I would
> >strongly recommend against option 1. The best approach (aside from
> >using a different program to encode) would be to leave output at 29.97
> >fps.
> 
> Why is option 1 so bad? It would seem to me to be a matter of what parts
> you want to look best, and the relative proportions of each type. To me,
> at least, the duplication of frames in 23.976 -> 29.97 looks just about
> as the dropping of frames from 29.97 -> 23.976; that may just be a
> personal preference, though.

Dropping 2 interlaced fields creates a time discontinuity of 2 fields,
which is more sharply noticable than a discontinuity of 1 frame at
30fps. (Even though they're both by the same amount of time, the 30fps
video is already 'choppy' compared to the 60fps.) If you're going to
deinterlace the interlaced parts down to 30fps, it probably doesn't
matter, but if you want to keep the interlacing (for display on an
interlaced device), it's very bad to drop.

> >If the interlaced scenes are mostly low-motion, you could try -vf
> >pp=lb or l5 and see if you think the output is acceptable. This will
> >blend away the combing without throwing away half the picture, so it
> >will temporally blur interlaced content, but on the other hand it
> >won't do serious damage to progressive frames.
> 
> Now that I think about it, would it be out of the question to use pullup
> to telecine the progressive content,

You mean softpulldown? :)

> deinterlace everything with -pp=lb,
> and encode at 29.97? I know that will do slightly awful things to the
> progressive parts,

No, it will look absolutely awful. The _only_ reason pp=lb is
tolerable is that the two fields in interlaced video come only 1/60
second apart, so except with _very_ fast motion, the blurring will
only be minor. If you linear-blend fields that are 1/24 second apart
in time, you will get _huge_ ghosts with every little bit of motion,
which will be very noticable to the viewer and waste lots of bits
(since motion est won't handle them well).

> but when I'm watching a movie I tend to be distracted
> more by what appear to be uneven framerates (from duplicated frames)
> than by a bit of picture degradation. Back before you wrote detc I had
> encoded a few telecined movies with pp=lb, and they didn't look
> prohibitively bad.

I've seen it done (by myself in testing, and in some bad anime rips)
and it really is horrible. Please, never recommend this to anyone.
I've found that even pp=fd creates ugly ghosts on telecined content
(but the ghosts are "outlines" instead of solid).

Rich




More information about the MPlayer-DOCS mailing list