Log in

View Full Version : Conditional decimation


thetoof
20th December 2008, 10:27
Hi.
The idea comes from here (http://forum.doom9.org/showthread.php?p=1221663#post1221663) and where I need help is with the automation of such decimation.

Goals:
- Compare current_frame to previous_frame
- Compare current_frame to next_frame
- Keep current_frame if : different than previous_frame (motion) AND duplicate of next_frame (see link to understand why this is needed)
- Ensure that whatever happens (even if there are many duplicates, which is very common in anime), 3 frames out of 5 will be decimated to ensure 23.976 CFR (this is where my knowledge of ScriptClip is unsufficient to find a viable solution)

For now, what I can think of is giving the user a preview of the 5 possible patterns (following script)... but it fails if there's a pattern break + automation makes things easier.
a=selectevery(5,0,3)
b=selectevery(5,1,4)
c=selectevery(5,0,2)
d=selectevery(5,1,3)
e=selectevery(5,2,4)
stackvertical(stackhorizontal(a,b,c),stackhorizontal(d,e,e.blackness()))
Thanks