View Single Post
Old 26th July 2018, 17:42   #66  |  Link
bradwiggo
Registered User
 
Join Date: Jun 2018
Posts: 51
Quote:
Originally Posted by poisondeathray View Post
For that script, you enter the desired framerate (59.94)

Code:
FFVideoSource("test1.mkv")
jm_fps(59.94)
So if FFVideoSource is loading the video correctly at 23.976, jm_fps will interpolate that to 59.94

It interpolates from the fps avisynth "thinks" the source is. That is partially determined by the source filter

So if you have a source filter that returns an "off" frame rate, you could possibly get the wrong results

You can use info() to "see" what avisynth "thinks" the framerate is, with the video only . It will print out an overlay on top. Some source filters have problems with some sources or containers, and you might have to make adjustments . That might have caused some of the issues you were seeing earlier and in the videohelp thread . (But another difference for sure, is the scenechange blending vs. duplicates)

eg.
Code:
FFVideoSource("test1.mkv")
Info()

When you align clips, or compare them in different tabs, or stack them - it's very easy to see something is "off" right away . Or that they match.
Is that defining the framerate for this script:

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


function jm_fps(clip source, float "fps", int "BlkSize", int "Dct")
{
fps = default(fps, 25.000)
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
}
Also, what does jm mean? Is it just a variable that we set to certain values?
bradwiggo is offline   Reply With Quote