View Single Post
Old 26th July 2018, 17:56   #68  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by poisondeathray View Post
We probably posted at the same time; have a look at the post above it explains some things

The function is defined in the stuff below in that script. You have to call the function to use it in the script. jm_fps(something) . If I used jm_fps(120) it would interpolate to 120 fps

You could have "named" the function anything like jm_fps2 or brads_function() or whatever





"jm" is for our buddy John Meyer . He posted a few times in this thread. That manolito version is a variation on one he posted years ago (by you guessed it, manolito)
Code:
# Motion Protected FPS converter script by johnmeyer from Doom9
# Slightly modified interface by manolito
# Requires MVTools V2 and RemoveGrain
# Also needs fftw3.dll in the System32 or SysWOW64 folder for Dct values other than 0
LoadPlugin("C:\Users\bradw\Downloads\masktools2-v2.2.17\x86\masktools2.dll")
LoadPlugin("C:\Users\bradw\Downloads\mvtools-v2.5.11.22\mvtools2.dll")
LoadPlugin("C:\Users\bradw\Downloads\RgTools-0.97\x86\RgTools.dll")
LoadPlugin("C:\Users\bradw\Downloads\GRunT101\GRunT.dll")
LoadPlugin("C:\Users\bradw\Downloads\MeGUI-2836-32\tools\avisynth_plugin\svpflow1.dll")
LoadPlugin("C:\Users\bradw\Downloads\MeGUI-2836-32\tools\avisynth_plugin\svpflow2.dll")
PluginPath = "C:\Users\bradw\Downloads\MeGUI-2836-32\tools\lsmash\"
LoadPlugin(PluginPath+"LSMASHSource.dll")

Function jm_fps(clip source, float "fps", int "BlkSize", int "Dct") {
    fps = default(fps, 23.976)
    fps_num = int(fps * 1000)
    fps_den = 1000
    BlkSize = default(BlkSize, 16)
    Dct = default(Dct, 0)
    prefiltered = RemoveGrain(source, 22)
    super = MSuper(source, hpad = 16, vpad = 16, levels = 1, sharp = 1, rfilter = 4) # one level is enough for MRecalculate
    superfilt = MSuper(prefiltered, hpad = 16, vpad = 16, sharp = 1, rfilter = 4)    # all levels for MAnalyse
    backward = MAnalyse(superfilt, isb = true, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
    forward = MAnalyse(superfilt, isb = false, blksize = BlkSize, overlap = 4, search = 3, dct = Dct)
    forward_re = MRecalculate(super, forward, blksize = 8, overlap = 2, thSAD = 100)
    backward_re = MRecalculate(super, backward, blksize = 8, overlap = 2, thSAD = 100)
    out = MFlowFps(source, super, backward_re, forward_re, num = fps_num, den = fps_den, blend = true)#, ml = 200, mask = 2)
    return out
}

DCT     = 0    # EDIT: 1 is SLOW
BLKSIZE = 16

c=LSMASHVideoSource("C:\Users\bradw\Documents\source.mkv")

Return jm_fps(c,fps=c.FrameRate*2,blkSize=BLKSIZE,dct=DCT)
That is my current script, is that right, as it is slightly different to the one you posted. You had the number in blue as 25, I set it to 23.976 as I believe that is the framerate of the source.

Quote:
If I used jm_fps(120) it would interpolate to 120 fps
If you wanted to do that would you change the text in red to that?
bradwiggo is offline   Reply With Quote