View Single Post
Old 27th August 2017, 01:42   #19  |  Link
MysteryX
Soul Architect
 
MysteryX's Avatar
 
Join Date: Apr 2014
Posts: 2,559
I was looking for a way to fix duplicate frames and the solution was to replace them with frame interpolation, and I found FillDropsI from johnmeyer -- except that it uses basic interpolation without artifact masking. So I thought.. how about modifying it to use FrameRateConverter for interpolation?

Any comments on this?

I want to add "keep", 1 to keep 1st frame and interpolate the 2nd, and 2 to keep 2nd frame and interpolate the first, because in the video I'm testing the 2nd frame is better. I tried simply replacing the function YDifferenceFromPrevious with YDifferenceToNext but that didn't work. Any idea how to get that to work? Also is there a way to interpolate without separating fields? I might give better interpolation on whole frames, but I wasn't successful at doing that.

Once this script is polished I'll release it in the same script file.

Code:
function InterpolateDoubles(clip c, float "thr", string "preset")
{
    thr = default(thr, .1)
    preset = default(preset, "normal")

    even       = c.SeparateFields().SelectEven()
    even_flow  = FrameRateConverter(even, Preset=preset, FrameDouble=true).SelectOdd()

    odd        = c.SeparateFields().SelectOdd()
    odd_flow   = FrameRateConverter(odd,  Preset=preset, FrameDouble=true).SelectOdd()

    even_fixed = ConditionalFilter(even, even_flow, even, "YDifferenceFromPrevious()", "lessthan", string(thr))
    odd_fixed  = ConditionalFilter(odd,  odd_flow,  odd,  "YDifferenceFromPrevious()", "lessthan", string(thr))

    Interleave(even_fixed, odd_fixed)
    return Weave()
}
Running this script before mClean kind of works but it freezes (no MT)

Last edited by MysteryX; 27th August 2017 at 03:47.
MysteryX is offline   Reply With Quote