Summary of Results:
I have conducted tests using a crafted p24 source that contains motion objects travelling at various speeds. By single-stepping through frames I have confirmed that the following completely avoid telecine judder.
For p24 progressive videos (Blu-rays)
ffmpeg -i IN -vf "telecine=pattern=5,bwdif=mode=send_frame" OUT
For p24 soft telecined videos (DVDs)
ffmpeg -i IN -vf "fps=24000/1001,telecine=pattern=5,bwdif=mode=send_frame" OUT
Details:
telecine=pattern=5 transcodes the p24 source, IN, to 60 FPS, OUT, with P (progressive) & C (combed) frames as follows:
P P C P P P P C P P
That's 2 combed frames out of 10 (20%) that are separated by 4 progressive frames, whereas regular telecine has 2 combed frames out of 5 (40%) and that abut (P P C C P -- combing is much more noticable). Also, there's no cadence (i.e., no judder), whereas regular telecine has 10% judder @ 6Hz and is very noticable, called "telecine judder".
bwdif=mode=send_frame decombs the 2 combed frames. Actually, it indescriminately decombs all 10 frames, but decombing a progressive frame doesn't hurt much. I'm on the hunt for a programmable decomber that can be told to decomb only frames 3 & 8.
fps=24000/1001 forces ffmpeg to ignore MPEG frame rate metadata (frame_rate_code in the MPEG header). It's needed for soft telecined videos (i.e., almost all DVD movies mastered after July, 1999). Explanation: frame_rate_code specifies 30 FPS, but that's the intended frame rate of playback, not the frame rate that's actually on the disc. The frames on the disc are actually p24.
You should skip most of this topic starter because I thought that I could create judder-free, 60 FPS video via the 'fieldmatch' filter. Well, it turns out that 'fieldmatch' doesn't function like I thought, and it turns out the task is easer than I thought: The 'telecine' filter has a simple 'pattern' parameter that works wonderfully, but there's a problem applying it to soft telecined sources. Read on...
I'm updating this because I have more info. For what it's worth, I still haven't gotten any response on the ffmpeg-user list.
UPDATE
Well, I guess the fieldmatch filter doesn't copy (cpnbu) fields. It instead makes tries at decombing based on a cpnbu menu (passed as a parameter).
Does ffmpeg have a mechanism to *copy* fields based on the same cpnbu criteria that fieldmatch employs?
ORIGINAL POST
From a video architecture standpoint, what I'm trying to do is take a 30 FPS stream (2-3-2-3), double it to 60 FPS (4-6-4-6) by simple frame repeat, then process the 60 FPS stream by reshuffling the fields according to A cpnbu template string (ccbcpupccc) that is, in this case, 10 frames long (in other words, a 10 frame repeat).
You might ask: Why do I want to do this? To eliminate judder that's present when original 24 FPS streams are displayed on 60Hz TVs.
You know how having a 120Hz TV makes for straightforward 24 FPS and 30 FPS display without judder? I thought about that for a long time and I think the same should be possible with a 60 FPS stream, but at the field level instead of at the frame level. After all, 60 FPS has 120 fields per second, does it not? "120" is the magic number, is it not?
A 30 FPS telecine has 3 progressive frames + 2 interlaced frames per 1/6 second as follows:
Code: Select all
P P I I P @ 30 FPS.
Code: Select all
P P I P P P P I P P @ 60 FPS.
ORIGINAL MESSAGE
I posted the following to the ffmpeg-user list and got no response -- big surprise there, eh? Is HB doing anything like this? Can it be pursuaded to do this?
Objective:
Create a telecine that is judder free.
Mental Preparation:
Here are the 2 flavors of telecines (which I call "t30")
Code: Select all
p24 = [A/a__________][B/b__________][C/c__________][D/d__________]
t30e = [A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] ...2-3 pull-down
t30o = [A/a_______][A/b_______][B/c_______][C/c_______][D/d_______] ...3-2 pull-down
|<--------------------------1/6s-------------------------->|
Action:
Starting with t30e (i.e., 2-3 pull-down), make a 60 FPS that's judder free.
Code: Select all
t30e = [A/a_______][B/b_______][B/c_______][C/d_______][D/d_______] ...2-3-2-3
t60e = [A/a_][A/a_][B/b_][B/b_][B/c_][B/c_][C/d_][C/d_][D/d_][D/d_] ...2x FPS
(c) (c) (b) (c) (p) (u) (p) (c) (c) (c) ...fieldmatch, top matching
t60 = [A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] ...5-5-5-5 result
Action:
Starting with t30o (i.e., 3-2 pull-down), make a 60 FPS that's judder free.
Code: Select all
t30o = [A/a_______][A/b_______][B/c_______][C/c_______][D/d_______] ...3-2-3-2
t60o = [A/a_][A/a_][A/b_][A/b_][B/c_][B/c_][C/c_][C/c_][D/d_][D/d_] ...2x FPS
(c) (c) (c) (u) (p) (u) (c) (n) (c) (c) ...fieldmatch, top matching
t60 = [A/a_][A/a_][A/b_][B/b_][B/b_][C/c_][C/c_][C/d_][D/d_][D/d_] ...5-5-5-5
So using the appropriate fieldmatch, judder-free 60 FPS can be achieved from either t30e or t30o.
I assume this has not been tried before.
Can someone try it or help me to construct the appropriate command line?
Regards,
Mark.
PS: If this works, I'll next try to apply it (or something similar) to a 30 FPS stream that is a mix of telecine & NTSC interlace (such as found in "Making of" movie extras).