This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[BUG] MvToolsFPSmod (AviSynth) - output plays too fast with wrong number of frames
#4
The problem seems like it could be with MvToolsFPSmod.avs...

If you half the frame rate and multiply by total number of frames, you get *around* the results I'm getting: 59.94 / 2 = 29.97, 193.585 * 29.97 = 5802. I'm getting 5890 frames.

function MvToolsFPSmod(clip C, int "NewNum", int "NewDen", string "Preset")
{
Preset = Default(Preset, "Film")
P_Film = 1 P_MusicVideoClip = 2
Pset = Preset == Preset == "Film" ? P_Film : Preset == "MusicVideoClip" ? P_MusicVideoClip : P_Film
thSCD2nom= (Pset==P_Film) ? 130 : (Pset==P_MusicVideoClip) ? 255 : 130
NewNum = Default(NewNum, 60)
NewDen = Default(NewDen, 1)

FramRat = Floor(Framerate( C ))
FramRatNew = Floor(NewNum / NewDen)
NewNumN = (FramRatNew / 2 == FramRat) ? FramRatNew : FramRat*5

superfilt = MSuper(C, hpad=8, vpad=8, pel=4, sharp=2, rfilter=4)
bak = MAnalyse(superfilt, isb=true, blksize=16, blksizev=16, badSAD=1000, badrange=-3, overlap=0, overlapv=0, search=4, searchparam=0, dct=5)
fwd = MAnalyse(superfilt, isb=false, blksize=16, blksizev=16, badSAD=1000, badrange=-3, overlap=0, overlapv=0, search=4, searchparam=0, dct=5)
Flow = MFlowFps(C, superfilt, bak, fwd, num=NewNum, den=NewDen, blend=False, ml=5800, mask=0, thSCD2=thSCD2nom)

H = (FramRatNew / 2 == FramRat) ? Flow : Flow.AssumeFPS(FramRatNew * 2 , 1)
B = (FramRatNew / 2 == FramRat) ? H : H.ChangeFPS(NewNum, NewDen)

return B
}

The "FramRatNew / 2" lines are halving the frame rate.

If I change the end of the third to last line to Flow.AssumeFPS(FramRatNew * 2 , 2), then I get an output of 11782 frames, which is a bit higher than the correct 11600. This would add over 3 seconds to the length and cause the audio to go out of synch.

Of course I have no idea what I'm doing or how to correct the script.. I'm just pointing out where the problem might be, i.e. tinkering. Tongue
Reply


Messages In This Thread
RE: MvToolsFPSmod (AviSynth) - output plays too fast with wrong number of frames - by The_Tinkerer - 12.07.2020, 18:10

Forum Jump:


Users browsing this thread: 4 Guest(s)