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

FFmpeg trac at avcodec.org
Fri Apr 3 22:32:57 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):

 Replying to [comment:26 pdr0]:
 > Replying to [comment:25 markfilipak]:
 > > I did this:
 > > ffmpeg -i 23.976p.mp4 -vf "telecine=pattern=5" telecine=pattern=5.mkv
 > >
 > > When I play telecine=pattern=5.mkv via MPV, and I single-step, it is
 doing exactly what I expected and wanted.
 > >
 > > I did this:
 > > ffmpeg -i 23.976p.mp4 -vf "telecine=pattern=5,bwdif=mode=send_frame"
 telecine=pattern=5,bwdif=mode=send_frame.mkv
 > >
 > > The problem with telecine=pattern=5,bwdif=mode=send_frame.mkv is that
 in each 1/6sec, all 10 frames are being decombed instead of just the 2
 frames that actually are combed.
 > > P P C P P P P C P P
 > > Decombing a progressive picture shouldn't do anything, but apparently
 it is (very slight). But so what?
 > >
 > > So, this 5-5-5-5 DOES appear to be doing what I want.
 >
 > You would need a deinterlacer that either deinterlaces based on specific
 frames (e.g. every nth frame), or based on a combing threshold. The former
 can be problematic if there is a cadence break ...

 telecine=pattern=5 takes care of cadence. There is '''zero cadence'''. So
 (assuming that the 1st frame is frame 1), 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).

 > ... The latter is adaptive but some types of content might be
 incorrectly deinterlaced, or some missed
 >
 > But the judder would be no different when 60fps is returned . If you
 single rate deinterlace , with top field first, in frames notation you
 would get AAABBCCCDD . BFF would return AABBBCCDDD . This is 3:2 frame
 repeats or 2:3 frame repeats. In terms of cadence, that's the same as 24pN
 displayed on a 60Hz display

 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. 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?) :-)

 The whole point of this ticket is that 'telecine=pattern=5' works for BD
 movies but not for DVD movies because -- my best guess -- 'telecine' is
 looking at the MPEG header's 'frame_rate_code' nibble, seeing '0100'
 (i.e., 30/1.001), and then miscalculating PTS advance so that the
 resulting video (but not the audio) runs 20% fast. I appreciate that
 'telecine' has to look at the specified frame rate, but, in my humble
 opinion, it should also look for soft telecine metadata and automatically
 adjust (to 24/1.001) if it finds soft telecine. Since I've found that
 there's a '-r:v 24000/1001' (or '-vf fps=24000/1001') workaround, this is
 not an urgent issue, but it is, in my humble opinion, an issue that
 shouldn't be dismissed as "wontfix".

 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.?

 May I also mention that I sincerely appreciate the time spent here
 replying to me. I'm not crazy -- at least, I don't think I'm crazy. :-)

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


More information about the FFmpeg-trac mailing list