[MEncoder-users] Automating telecined/interlaced detection

Rich Felker dalias at aerifal.cx
Sun Sep 3 16:59:28 CEST 2006


On Thu, Aug 31, 2006 at 11:10:28PM -0400, Scott Fones wrote:
> Hi all,
>         
>         I'm trying to write a frontend to help automate my compression.
>         I was

I dunno what's wrong but your email message has atrociously bad
formatting. It's very hard to read.

>         hoping to autodetect whether the video is telecined or
>         interlaced.  In
>         the mplayer documentation it suggests using the pullup filter
>         with the
>         verbose flag and looking for the 3:2 pattern.
>         
>         http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-telecine.html#menc-feat-telecine-ident-telecined
>         (Last Paragraph)
>         
>         I'm a little confused though as to where the 3:2 is showing up
>         and
>         whether the pattern they talk about "0+.1.+2 and 0++1
>         alternating" is
>         the only acceptable telecine pattern.  If its not "0+.1.+2 and 0
>         ++1",
>         can I assume that its interlaced?

That pattern should appear at least somewhere if the content is 3:2
telecine, but it won't appear everywhere because there simply is no
pattern to see during still shots and some kinds of low-motion. 12 fps
content will also fail to show up exactly like that, and a good deal
of animation is 12 fps in many parts.

And of course you also have other things like 24->25 fps conversion
for PAL which sometimes uses a form of telecine, but if you're just
processing NTSC you won't see that.

>  And, is the 3:2 coming from
>         the
>         duration values that are printed out with the pattern.  For
>         instance,

Yes.

>         
>         A:   2.3 V:   2.3 A-V:  0.000 ct:  0.065  56/ 53  6% 13% 19.7% 0
>         0 80%
>         affinity: .0+.1.+2..3+
>         breaks:   |0..1..2|.3.
>         duration: 3
>         A:   2.4 V:   2.4 A-V:  0.001 ct:  0.066  57/ 54  6% 13% 19.6% 0
>         0 79%
>         affinity: .0++1..2+.3.
>         breaks:   .0..1.|2..3.
>         duration: 2
>         
>         
>         Since this has duration 3 followed by duration 2, does that make
>         it
>         telecined?  Even though it doesn't follow the same pattern?

This looks like the same pattern to me. What is different?

>         Any input would be appreciated, I'm pretty confused here.

The important thing to realize is that this pattern is nothing
_inherently_ stored in the video. The filter is forced to examine the
visual contents of the fields and make a best guess about how they
match. The output from pullup is representing these guesses: the
second | in:

         affinity: .0+.1.+2..3+
         breaks:   |0..1..2|.3.

indicates that because field 0 and 2 are much more similar than 1 and
3, 0,1,2 probably all come from the same original picture. The + signs
indicate that a field 'preferrs' one of its neighbors over the other
in the sense that the other neighbor would give a significantly worse
appearance of combing.

Whether this data is useful or sufficient for distinguishing
interlaced and telecined content, I dunno. I just wrote the verbose
output for debugging pullup's behavior on strange content so I could
see why it makes the decisions it does.

Rich




More information about the MEncoder-users mailing list