[FFmpeg-trac] #8590(undetermined:closed): 'telecine=pattern' error for p24, soft telecined sources

FFmpeg trac at avcodec.org
Sat Apr 4 03:16:07 EEST 2020


#8590: 'telecine=pattern' error for p24, soft telecined sources
-------------------------------------+-------------------------------------
             Reporter:  markfilipak  |                    Owner:
                 Type:  defect       |                   Status:  closed
             Priority:  normal       |                Component:
                                     |  undetermined
              Version:  unspecified  |               Resolution:  invalid
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by markfilipak):

 Thank you so much. I'm afraid I taxed the patience of some on ffmpeg-user.

 Replying to [comment:28 pdr0]:
 > Replying to [comment:27 markfilipak]:
 > > what I want is deinterlace of every 5th frame, starting with frame 3
 (i.e., the 'C's in the 'P P C P P P P C P P' sequence).
 >
 > >I thought that the resulting deinterlaced frame would be a line-doubled
 version of the pixel-by-pixel mean of the 2 fields -- now that I write
 that, is that 'blended'? -- because that's what I visualized when I
 dreamed up this whole scheme. It's my rather unsophisticated opinion that
 whatever is done to remove combing will be okay because the result is
 visible for only 1/60s. Even no deinterlace looks pretty damn good in my
 test videos (based on the transcodes of the p24 video that you so
 graciously provided), and way better than what my 60Hz TV displays when
 it's fed p24. (Did I mention that I hate judder more than any other video
 flaw?) :-)
 >
 > I understand what you're saying - that you want to deinterlace only
 combed frames.
 >
 > You can blend deinterlace as a general approach, but I don't think
 ffmpeg has one specifically for blend deinterlacing.
 >
 > Blend deinterlacing is generally frowned upon, because it produces
 blurry, ghosted results and does not really produce smoother motion.

 Ordinarily, at 30 FPS, 2-3-2-3 pull-down, of course I agree. But consider
 this: At 30 FPS, the 2 combed frames abut, so blending is 5/12s long and
 repeats @ 6Hz. But at 60 FPS, 5-5-5-5 pull-down, the 2 combed frames are
 separated by 4 progressive frames, so blending is 1/60s plus 1/60s
 separated by 1/15s and blending repeats @ 12Hz. From my experience based
 on experimentation, each combed frame is so brief that, even not
 deinterlaced, they are unnoticable. You can reproduce it using the p24
 that you gave me and 'telecine=pattern=5' (but without the deinterlace
 part). I'm going to try to attach a 2MB comparison.

 > This can be visually more disturbing than the original judder. You can
 argue that it might be slightly more smooth, but not much. Some people
 would say the visual disturbance makes it worse. "strobes" would be a
 common description.
 >
 > In frames notation, where each letter is a progressive frame, and where
 (AB) or (CD) is a blended frame 50/50 mix you would get
 >
 >
 > {{{
 > AA(AB)BBCC(CD)DD
 > }}}
 >
 >
 > You decide for yourself. I uploaded the test video with blend
 deinterlacing (of combed frames only) "blenddeint_combedonly.mp4"

 I just viewed it. I see no blending. I see frames 3, 8, 13, 18, etc.
 combed but not blended. That's exactly what I got and what you will see in
 my attachment (if I can attach a 2MB file).

 > And yes, there is still judder , because you don't have a blend inserted
 between BB , CC  (BC), so there is a perceptual jump in motion compared to
 AA(AB)BB , or CC(CD)DD .

 I think that most of what you're seeing as judder is actually twitter from
 the combing. I think it would disappear if the combed fields could
 actually be blended. Certainly, if it is judder, there's less of it than
 for any other telecine scheme.

 Mentally visualizing this stuff is mind bending, isn't it? :-)

 The reason I say it's twitter, not judder, is that if you do the
 calculations of average temporal location of the temporal center of the
 pictures and their durations, the cadence really is
 1/15s-1/15s-1/15s-1/15s.

 > > You certainly know what you're talking about. What you describe is
 what I'm seeing. Frankly, it surprises me that deinterlace is favoring the
 1st field.
 >
 > This is expected behaviour. When single rate deinterlacing, you can
 decide which field to keep, top or bottom. Top field means you would get
 the 1st of the field pair (the A field), so you end up with 3:2 . Bottom
 means you select bottom (the b field), you'd get the 2:3 cadence. You can
 choose by selecting the field order. Top is default (and should be for HD
 formats by convention)

 I understand (though I'm sure you mean the 60 FPS analog of 3:2). However,
 with 5-5-5-5 pull-down, and if only the combed frames were blended, then
 those 2 frames would not favor the 1st field or the 2nd field but
 something in between.

 > > If there's a filter that can blend frames 3, 8, 13, 18, etc. I expect
 that using it (instead of 'bwdif=mode=send_frame') would yield the best
 results possible (which is what I originally visualized). I'm sorry I'm
 not an ffmpeg guru; at least, not yet. Is there such a programmable
 blender? For example, maybe splitting in a '-filter_complex' and
 selectively merging via some sort of blender that operates only on frames
 3, 8, 13, 18, etc.?
 > >
 > I don't think ffmpeg has blend deinterlacing.

 Damn. What about while the 'telecine' output is still in fields? Can 2
 fields be blended within a complex_filter?

 > You can't just blend the telecine output and replace specific frames,
 because you'd get combed blends, not frame blends (as if frame blends
 weren't bad enough...)

 "Combed blends"? Sorry, I don't know what you mean.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8590#comment:29>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list