Log in

View Full Version : Detecting and removing progressive pulldown with FFmpeg


zambelli
5th January 2017, 20:08
When 24p films get broadcast on 720p60 channels in North America, they get converted to 60p by using a 3:2:3:2 pulldown pattern, so that for every 4 unique film frames there are 10 video frames. Like this:

ABCD --> AABBBCCDDD

Some broadcast encoders do this by using repeat flags (therefore leaving the original 24p cadence intact and relying on decoders to produce 60p output), but many just encode it as native 60p.

I'm looking for ways with FFmpeg to:

Analyze and detect unique and repeated frames in a source. The idet video filter has a function for finding repeated fields, but it only works on fields - I'd like something similar for frame-based sources.
Once detected (could be dual pass), reverse the progressive pulldown to restore the native 24p sequence. Existing fieldmatch, dejudder and decimate all seem to work exclusively with interlaced 3:2 pulldown (30i) sources. Is there a way to make them work with progressive pulldown?


Thanks!

poisondeathray
10th January 2017, 18:12
Did you try "pullup" ?

-vf pullup,fps=24000/1001


Another approach might be to select even or odd (drop half the frames), then the regular decimate (1 in 5)