Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
Thread Tools | Search this Thread | Display Modes |
4th December 2018, 22:08 | #41 | Link | ||
Registered User
Join Date: Jun 2015
Location: France
Posts: 46
|
Quote:
https://forum.doom9.org/showthread.p...27#post1620927 Quote:
And the same processed by FrameSurgeon : There's a panning movement and some jerkiness in that shot so it's understandable that the interpolated frame is still blurry, but here it looks like FrameSurgeon is trying hard to mix the two adjacent frames and produces those fuzzy edges, which look definitely worse than simply blending the frames as Morph does. Could there be a way to adjust this behaviour by tweaking some parameters in the FrameSurgeon script ? |
||
5th December 2018, 03:36 | #42 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Wanna give this a whirl. Morpheus.Avs Code:
/* Morpheus(), Just like you dreamed it to be :) Interpolate frames using a Command list of frames in String or in file. Req RT_Stats v1.43+, Avs+ or GScript, Grunt, MvTools, RemoveGrain, CallCmd (optional, auto deletes DBase). Planar YUV. Function Morpheus(clip c,String Cmd,Bool "Inclusive"=True, \ Int "SPad"=16, Int "SSharp"=1, Int "SRFilter"=4, [* MSuper *] \ Int "ABlkSize"=16, Int "AOverlap"=4, Int "ASearch"=3,Int "ADct"=0, [* MAnalyse *] \ Int "RBlkSize"=8, Int "ROverlap"=2, Int "RthSAD"=100, [* MRecalculate *] \ Float "Iml"=200.0, Bool "IBlend"=True, Int "IthSCD1"=400, Int "IthSCD2"=130, [* MFlowInter *] \ Bool "Show"=True ) Args:- Cmd, No default. If first character is Asterisk, then is a command string list, otherwise a command list filename. Commands consist of frame numbers, Frame numbers can be either COMMA(,) or SPACE separated and can be followed by a # comment (one interpolation command per line). If Inclusive == True then commands must be start and end of frames to Interpolate, eg 10,11 # Two frames, frame 10 and 11 are to be interpolated using frames 9 and 12 as source. 15 # single frame interpolated at frame 15, with src frames 14 and 16. 20,-2 # Two frames interpolated at frames 20 and 21 with Src frames 19 and 22. If Inclusive == False (Exclusive) then command frames must be those either side of Interpolated frames ie src frames. 9,12 # Two frames, frame 10 and 11 are to be interpolated using frames 9 and 12 as source. 14,16 # single frame interpolated at frame 15, with src frames 14 and 16. 19,22 # Two frames interpolated at frames 20 and 21 with Src frames 19 and 22. Inclusive, Default True. If True, Commands specify the start and end frames to interpolate (single start frame allowed). If False, Commands specify the TWO source frames used to create the interpolated frames that lie between them. MvTools2 Args, for Interpolation. MSuper args: SPad, Default 16, See MvTools MSuper(hpad=8,vpad=8) [We use same for both]. SSharp, Default 1, See MvTools MSuper(sharp=2) SRFilter, Default 4, See MvTools MSuper(rfilter=2) MAnalyse args: ABlkSize, Default 16, See MvTools MAnalyse(BlkSize=8,BlkSizeV=8) [We use same for both]. AOverLap, Default 4, See MvTools MAnalyse(OverLap=0) ASearch, Default 3, See MvTools MAnalyse(Search=4) ADct, Default 0, See MvTools MAnalyse(Dct=0). Using other than default value can be VERY slow. MRecalculate args: RBlkSize, Default 8, See MvTools MRecalculate(BlkSize) NOTE, RBlkSize = 0 Will Switch OFF MRecalculate, probably a bit faster at possible expense of quality. ROverlap, Default 2, See MvTools MRecalculate(Overlap) RthSAD, Default 100, See MvTools MRecalculate(thSAD=200) MFlowInter args: Iml, Default 200.0, See MvTools MFlowInter(ml=100.0) IBlend, Default True, See MvTools MFlowInter(Blend=True). Blend or copy frame at scene change. IthSCD1, Default 400, See MvTools MFlowInter(thSCD1=400) : (0 < IthSCD1 <= (8*8)*255) IthSCD2, Default 130, See MvTools MFlowInter(thSCD1=130) : (0 < IthSCD1 <= 255) Threshold which sets how many blocks have to change for the frame to be considered as a scene change. It is ranged from 0 to 255, 0 meaning 0 %, 255 meaning 100 %. Default is 130 (which means 51.0%). Used by MvTools2 MFlowInter during interpolation. Show, Default False. Show Interpolated frames. Remainder are MvTools Interpolation args, See MvTools. */ Function Morpheus(clip c,String Cmd,Bool "Inclusive", \ Int "SPad", Int "SSharp", Int "SRFilter", [* MSuper *] \ Int "ABlkSize", Int "AOverlap", Int "ASearch",Int "ADct", [* MAnalyse *] \ Int "RBlkSize", Int "ROverlap", Int "RthSAD", [* MRecalculate *] \ Float "Iml", Bool "IBlend", Int "IthSCD1", Int "IthSCD2", [* MFlowInter *] \ Bool "Show" \ ) { c myName="Morpheus: " IsAvsPlus=(FindStr(UCase(versionString),"AVISYNTH+")!=0) HasGScript=RT_FunctionExist("GScript") HasGRunt =RT_FunctionExist("GScriptClip") HasMvTools=RT_FunctionExist("MSuper") HasRemoveGrain=RT_FunctionExist("RemoveGrain") HasCallCmd =RT_FunctionExist("CallCmd") IsAvs26=VersionNumber>=2.6 Assert(IsAvsPlus || HasGScript,RT_String("%sNeed either GScript or AVS+",myName)) Assert(HasGRunt,RT_String("%sNeed GRunt:-https://forum.doom9.org/showthread.php?t=139337 ",myName)) Assert(HasMVTools,RT_String("%sNeed MvTools2:-http://forum.doom9.org/showthread.php?t=131033",myName)) Assert(HasRemoveGrain,RT_String("%sNeed RemoveGrain",myName)) Assert(IsYV12||(IsAvs26&&(IsY8||IsYV16||IsYV24)),RT_String("%sOnly Standard v2.6 Planar Supported (excepting YV411)",myname)) Assert(Cmd!="",String("%sCmd cannot be ''",myName)) Inclusive = Default(Inclusive,True) SPad = Default(SPad,16) SSharp = Default(SSharp,1) SRFilter= Default(SRFilter,4) ABlkSize = Default(ABlkSize,16) AOverlap= Default(AOverlap,4) ASearch = Default(ASearch,3) ADct = Default(ADct,0) RBlkSize = Default(RBlkSize,8) ROverlap= Default(ROverlap,2) RthSAD = Default(RthSAD,100) Iml = Default(Iml,200.0) IBlend = Default(IBlend,True) IthSCD1 = Default(IthSCD1,400) IthSCD2= Default(IthSCD2,130) Show = Default(Show,False) #### FuncS=""" Function ChrIsNul(String S) {return RT_Ord(S)== 0} Function ChrIsHash(String S) {return RT_Ord(S)==35} Function ChrIsStar(String S) {return RT_Ord(S)==42} Function ChrIsComma(String S) {return RT_Ord(S)==44} Function ChrIsHyphen(String S) {return RT_Ord(S)==45} Function ChrIsDigit(String S) {C=RT_Ord(S) return C>=48&&C<=57} Function ChrEatWhite(String S) {i=1 C=RT_Ord(S,i) While(C==32||C>=8&&C<=13) {i=i+1 C=RT_Ord(S,i)} return i>1?MidStr(S,i):S} Function ChrEatDigits(String S) {i=1 C=RT_Ord(S,i) While(C>=48&&C<=57) {i=i+1 C=RT_Ord(S,i)} return i>1?MidStr(S,i):S} Function Fn@@@(clip c,String DB,Bool Show,String Fmt1,String Fmt2) { c n=current_frame if(RT_DBaseGetField(DB,n,0)) { # Is an Interpolated frame Start = RT_DBaseGetField(DB,n,1) # Start of Interpolated Frames (Inclusive) End = RT_DBaseGetField(DB,n,2) # End of Interpolated Frames (Inclusive) Count = End - Start + 1 # Count of Interpolated frames in this run Index = n-Start # Index into Count (0 relative, 0 -> Count-1) OFrms=4 # Max number of frames to use from either side of Interpolated run (Src Frames, before & after) LS=Max(Start-OFrms,0) LCnt=Start-LS RCnt=Min(c.FrameCount-1-End,OFrms) TmpC = c.Trim(LS,-LCnt) + c.Trim(End+1,-RCnt) # Src used for interpolation, (with some extra frames[higher quality sometimes]) FixFrm=LCnt-1 # Frame where Interpolated frame will be created Prefilt=TmpC.RemoveGrain(22) Pad=SPad@@@ Sharp=SSharp@@@ srfilter=SRFilter@@@ Ablksize=ABlkSize@@@ AOverLap=AOverLap@@@ ASearch=ASearch@@@ ADct=ADct@@@ Super=TmpC.MSuper(hpad=Pad,vpad=Pad,levels=1,sharp=Sharp,rfilter=srfilter) Superfilt=Prefilt.MSuper(hpad=Pad,vpad=Pad,sharp=Sharp,rfilter=srfilter) bv=Superfilt.MAnalyse(isb=true ,blksize=Ablksize,overlap=AOverLap,search=ASearch,delta=1,dct=ADct) fv=Superfilt.MAnalyse(isb=False ,blksize=Ablksize,overlap=AOverLap,search=ASearch,delta=1,dct=ADct) RBlkSize=RBlkSize@@@ if(RBlkSize>0) { ROverLap=ROverLap@@@ RthSAD=RthSAD@@@ bv=Super.MRecalculate(bv,blksize=RBlkSize,overlap=ROverLap,thSAD=RthSAD) fv=Super.MRecalculate(fv,blksize=RBlkSize,overlap=ROverLap,thSAD=RthSAD) } TmpC=TmpC.MFlowInter(Super,bv,fv,time=100.0*(Index+1)/(Count+1),ml=Iml@@@,blend=IBlend@@@,thSCD1=IthSCD1@@@,thSCD2=IthSCD2@@@) TmpC.Trim(FixFrm,-1) # Interpolated Frame to return if(Show) { RT_Subtitle(Fmt2,n,Index+1,Count) } } Else if(Show) { RT_Subtitle(Fmt1,n) } Return Last } if(ChrIsStar(CMD)) { CMD=MidStr(CMD,2) } else { Cmd=RT_GetFullPathName(Cmd) Assert(Exist(CMD),RT_String("%sCMD File does not exist",myName)) CMD=RT_ReadTxtFromFile(CMD) } LINES=RT_TxtQueryLines(CMD) FC=Framecount DB = RT_GetFullPathName("~@@@_"+RT_LocalTimeString+".DB") RT_DBaseAlloc(DB,FrameCount,"bii") for(i=0,LINES-1) { SS=RT_TxtGetLine(CMD,i).ChrEatWhite S=SS if(!S.ChrIsNul && !S.ChrIsHash) { if(S.ChrIsDigit) { StartF = S.RT_NumberValue EndF=StartF S=S.ChrEatDigits.ChrEatWhite if(S.ChrIsComma) {S=S.MidStr(2).ChrEatWhite} IsNeg = S.ChrIsHyphen if(IsNeg) {S=S.MidStr(2).ChrEatWhite} if(S.ChrIsDigit) { EndF=S.RT_NumberValue if(IsNeg) { Assert(Inclusive,RT_String("%sCMD: Error@Line_%d, Exclusive End Frame Cannot be -ve\n%s",myName,i+1,SS)) EndF=StartF+EndF-1 } S=S.ChrEatDigits } Else if(!Inclusive) { Assert(False,RT_String("%sCMD: Error@Line_%d, Exclusive must have End Frame\n%s",myName,i+1,SS)) } Else if(IsNeg) { Assert(False,RT_String("%sCMD: Error@Line_%d, Expecting End Frame\n%s",myName,i+1,SS)) } Start_I = (Inclusive) ? StartF : StartF+1 End_I = (Inclusive) ? EndF : EndF-1 Assert(Start_I>0,RT_String("%sCMD: Error@Line_%d, Illegal Start frame\n%s",myName,i+1,SS)) Assert(End_I<FC-1,RT_String("%sCMD: Error@Line_%d, EndFrame(%d)+1 Out Of Clip\n%s",myName,i+1,End_I+1,SS)) Inclusive \ ? Assert(Start_I<=End_I,RT_String("%sCMD: Error@Line_%d, StartFrame(%d) <= EndFrame(%d)\n%s",myName,i+1,Start_I,End_I,SS)) \ : Assert(StartF<EndF-1,RT_String("%sCMD: Error@Line_%d, None to interpolate, Start(%d) End(%d)\n%s",myName,i+1,StartF,EndF,SS)) for(n=Start_I,End_I) { RT_DBaseSet(DB,n,True,Start_I,End_I) } S=S.ChrEatWhite } if(!S.ChrIsHash) { Assert(S.ChrIsNul,RT_String("%sCMD: Error@Line_%d, *** NON-PARSE ***\n'%s'",myName,i+1,SS)) } } } Global SPad@@@=SPad Global SSharp@@@=SSharp Global SRFilter@@@=SRFilter Global ABlkSize@@@=ABlkSize Global AOverLap@@@=AOverLap Global ASearch@@@=ASearch Global ADct@@@=ADct Global RBlkSize@@@=RBlkSize Global ROverLap@@@=ROverLap Global RthSAD@@@=RthSAD Global Iml@@@=Iml Global IBlend@@@=IBlend Global IthSCD1@@@=IthSCD1 Global IthSCD2@@@=IthSCD2 ### Fmt1="%d]" Fmt2="%d] I%d/%d" ARGS = "DB,Show,Fmt1,Fmt2" ScriptLine = "Fn@@@("+ARGS+")" Last.GScriptClip(ScriptLine, local=true, args=ARGS) """ GIFunc="MORPHEUS" # Function Name, Supply unique name for your multi-instance function. GIName=GIFunc+"_InstanceNumber" # Name of the Instance number Global RT_IncrGlobal(GIName) # Increment Instance Global (init to 1 if not already exists) GID = GIFunc + "_" + String(Eval(GIName)) InstS = RT_StrReplace(FuncS,"@@@","_"+GID) # Write Debug GScript File to current directory (line numbers will correspond to error messages) # RT_WriteFile("DEBUG_"+GID+".TXT","%s",InstS) HasGScript ? GScript(InstS) : Eval(InstS,"GS_EVAL") # Use GSCript if installed (loaded plugs override builtin) # if CallCmd available, Auto delete DBase file on clip closure. HasCallCmd?CallCmd(close=RT_String("""CMD /C chcp 1252 && del "%s" """,DB), hide=true, Synchronous=7):NOP Return Last } Code:
Colorbars(Pixel_type="YV12").KillAudio.ShowFrameNumber INCLUSIVE=True SHOW=True INCLUSIVE_CMD="""* # <<<<==== Asterisk(Star) is first character, ie is a String Command, else is a Filename. 10 11 # This Is a Comment 15 20 -2 """ EXCLUSIVE_CMD="""* # <<<<==== Asterisk(Star) is first character, ie is a String Command, else is a Filename. 9 12 14 16 19 22 """ # Select Inclusive or Exclusive CMD depending upon value of INCLUSIVE CMD = (INCLUSIVE) ? INCLUSIVE_CMD : EXCLUSIVE_CMD Morpheus(Cmd,Inclusive=INCLUSIVE,Show=SHOW)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 9th December 2018 at 11:58. |
|
5th December 2018, 07:34 | #43 | Link | |
Registered User
Join Date: Jun 2015
Location: France
Posts: 46
|
Quote:
Morpheus : FrameSurgeon (retried today on the same frame) : I'm not sure what the "Final" switch is for in FrameSurgeon. |
|
5th December 2018, 11:52 | #44 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
The FINAL Switch in FrameSurgeon, if true then does the edits for real. Otherwise, it only marks frames to DELETE (they are still there and are marked with a "DUMMY DELETE" type big red subtitle & border). Below added to first post in Sawbones/FrameSurgeon thread. When Final=False, Delete commands appear like so (marked for deletion only, only deleted for real when Final=True) Set FINAL=False when using SawBones. Reason:- If a frame were deleted for real in FrameSurgeon, then any deletes following that frame would (in sawbones) all be off by 1 frame. Off by 1 frame thing would not affect non delete edits, as deletes are processed only after all other edits are done. (SawBones/VirtualDub2, have no idea what Avisynth has deleted before clip was loaded into VirtualDub) One additional advantage of the Dummy Delete frames is that you can see what will be deleted when FINAL=True. SawBones/FrameSurgeon:- https://forum.doom9.org/showthread.p...light=sawbones EDIT: The MvTools type defaults are different in FrameSurgeon and Morpheus (something for you to play with), Someone said not so long ago that MvTools arg, TrueMotion=False is better on HD clips (but dont remember where it was posted, nor what if any other tweaks may give better results for HD). Also, FrameSurgeon calculates interpolation clips before frame serving commences (quicker) whereas Morpheus calcs in real time. Morpheus real time mode can by concatenating source frames, with some extra source frames (eg 3 frames before first interp frame, and 3 frames after last interp frame) can produce a better result in some rarer cases according to other people (leastwise I aint ever been able to see better results yet with my lousy eyes). FrameSurgeon precalc mode cannot do the extra source frames trick (and never will be able to). EDIT: I decided not to bother trying to fix the Morph() plug, Jenyok functions sometimes have 'undocumented features', and tend to be a bit big and cumbersome, and I aint likely to use them. Also, Morph() style method tends to crap out after something like 70 function calls with system exceptions, reason I did Morpheus() which should easily handle thousands of interpolation seqs.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 5th December 2018 at 14:07. |
|
5th December 2018, 15:27 | #45 | Link | |||
Registered User
Join Date: Jun 2015
Location: France
Posts: 46
|
Quote:
Quote:
Quote:
As for its current malfunction, it's most likely related with some problematic plugin or configuration issue on my system, as it used to work as intended. So do you know which plugins it relies on, and if one of them was updated recently, which could have changed the function's behaviour ? I just compared the current Avisynth+ directory in my system partition with a Macrium Reflect backup made on September 29th, using WinMerge, only the differences are displayed : The "Setup Log 2018-10-26 #001.txt" file indicates that "AviSynthPlus-MT-r2728.exe" (included in StaxRip) has been installed on that date. Before that, I most likely had "AviSynthPlus-r1576.exe" installed. EDIT : Is it normal that all the pictures I uploaded since yesterday are (still) marked “pending approval”, and don't appear where they should ? |
|||
5th December 2018, 16:15 | #46 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Code:
All SawBones Keyboard commands that are inserted into NotePad command Text file:- CTRL/F1 CopyFromPrevious frame to current frame (ie replace source current frame n with source frame n - 1. (CP n) CTRL/F2 CopyFromNext frame to current frame (ie replace source current frame n with source frame n + 1. (CN n) CTRL/1 Replace current frame with same frame from FX1 clip. (FX1 n) CTRL/2 Replace current frame with same frame from FX2 clip. (FX2 n) CTRL/3 Replace current frame with same frame from FX3 clip. (FX3 n) CTRL/4 Replace current frame with same frame from FX4 clip. (FX4 n) CTRL/5 Replace current frame with same frame from FX5 clip. (FX5 n) CTRL/6 Replace current frame with same frame from FX6 clip. (FX6 n) CTRL/7 Replace current frame with same frame from FX7 clip. (FX7 n) CTRL/8 Replace current frame with same frame from FX8 clip. (FX8 n) CTRL/9 Replace current frame with same frame from FX9 clip. (FX9 n) CTRL/SHIFT/1 Replace range with same range from FX1 clip. (FX1 s,e) CTRL/SHIFT/2 Replace range with same range from FX2 clip. (FX2 s,e) CTRL/SHIFT/3 Replace range with same range from FX3 clip. (FX3 s,e) CTRL/SHIFT/4 Replace range with same range from FX4 clip. (FX4 s,e) CTRL/SHIFT/5 Replace range with same range from FX5 clip. (FX5 s,e) CTRL/SHIFT/6 Replace range with same range from FX6 clip. (FX6 s,e) CTRL/SHIFT/7 Replace range with same range from FX7 clip. (FX7 s,e) CTRL/SHIFT/8 Replace range with same range from FX8 clip. (FX8 s,e) CTRL/SHIFT/9 Replace range with same range from FX9 clip. (FX9 s,e) CTRL/SHIFT/ALT/1 Interpolate current frame n using source n-1 and n+1 as source frames. (I1 n) CTRL/SHIFT/ALT/2 Interpolate 2 frames starting at current frame n, using source n-1 and n+2 as source frames. (I2 n) CTRL/SHIFT/ALT/3 Interpolate 3 frames starting at current frame n, using source n-1 and n+3 as source frames. (I3 n) CTRL/SHIFT/ALT/4 Interpolate 4 frames starting at current frame n, using source n-1 and n+4 as source frames. (I4 n) CTRL/SHIFT/ALT/5 Interpolate 5 frames starting at current frame n, using source n-1 and n+5 as source frames. (I5 n) CTRL/SHIFT/ALT/6 Interpolate 6 frames starting at current frame n, using source n-1 and n+6 as source frames. (I6 n) CTRL/SHIFT/ALT/7 Interpolate 7 frames starting at current frame n, using source n-1 and n+7 as source frames. (I7 n) CTRL/SHIFT/ALT/8 Interpolate 8 frames starting at current frame n, using source n-1 and n+8 as source frames. (I8 n) CTRL/SHIFT/ALT/9 Interpolate 9 frames starting at current frame n, using source n-1 and n+9 as source frames. (I9 n) CTRL SHIFT ALT / Interpolate Range. Ie in Avisynth Inclusive mode, where range is 100,101 [2 frames] then result = (I2 100) The specified range start and end are the outer bad frames. You can change this key combination used for "Interpolate Range" by changing the ini file item "KEY_InterpolateRange=^+!{/}", to something else, in sequence they are CTRL(^) SHIFT(+), ALT(!) and '/' keys pressed together. The Sawbones.ini file is created upon first use of the executable. CTRL/DELETE Delete current frame. (DEL n) [FrameSurgeon Frame/Range deletes are processed AFTER ALL interpolations/replacements] CTRL/SHIFT/DELETE Delete range (DEL s,e) NOTE. If using below "Save & Refresh" with Avisynth loaded script, then DO NOT USE ANY delete commands within SawBones UNLESS, you call FrameSurgeon with arg "FINAL=FALSE". The FrameSurgeon arg FINAL=FALSE, causes FrameSurgeon to NOT actually delete frames, it will only MARK those frames as being targetted for deletion (the frames will show some kind of DUMMY_DELETE text subtitled onto those frames). If you do not call FrameSurgeon with FINAL=FALSE, then FrameSurgeon will indeed delete the frames, but VDub2/Sawbones will have no idea that it has been done, and further replacements or deletions will be on the WRONG ranges. IMPORTANT:- See also below Save & Refresh command. Code:
Supported commands In SCmd and Cmd. (where n=frame number, s= range start frame, e=range end frame, d is a digit, '1' to '9', i is a count. NOTE, e range End Frame behaves as in trim eg -20 means 20 frames starting at frame s, e=0 means to last frame):- "CP n" CopyFromPrevious ie replace source clip c frame n with source clip c frame n - 1. "CN n" CopyFromNext ie replace source clip c frame n with source clip c frame n + 1. # "I1 n" Interpolate 1 frame n (using source frames n-1 and n+1 as Interpolation source frames, (Id commands Planar, YUY2 only). "I2 n" Interpolate 2 frames starting at frame n, (using source frames n-1 and n+2). "I3 n" Interpolate 3 frames starting at frame n, (using source frames n-1 and n+3). "I4 n" Interpolate 4 frames starting at frame n, (using source frames n-1 and n+4). "I5 n" Interpolate 5 frames starting at frame n, (using source frames n-1 and n+5). "I6 n" Interpolate 6 frames starting at frame n, (using source frames n-1 and n+6). "I7 n" Interpolate 7 frames starting at frame n, (using source frames n-1 and n+7). "I8 n" Interpolate 8 frames starting at frame n, (using source frames n-1 and n+8). "I9 n" Interpolate 9 frames starting at frame n, (using source frames n-1 and n+9). "I n" Interpolate 1 frame n (using source frames n-1 and n+1 as Interpolation source frames. "I s,e" Interpolate range s to e (max range 9 frames, using source frames s-1 and e+1 as source frames). "I s,-i" Interpolate frame count i, range s to s+i-1, (i max 9 frames, using source frames s-1 and s+i as source frames). # "FXd n" Replace frame n with same frame from FXd clip, eg "FX3 100" replace source frame 100 with same frame from FX3 clip. "FXd s,e" Replace range s to e with same range from FXd clip. "FXd s,0" Replace range s to end of clip with same range from FXd clip. "FXd s,-i" Replace frame count i, range s to s+i-1, with same range from FXd clip. (the hyphen '-' indicates that i is a count rather than the end frame of a range). # "DEL n" Delete frame n (Deletes are processed AFTER ALL Interpolations/replacements) "DEL s,e" Delete frames s to e "DEL s,0" Delete frames s to end of clip. "DEL s,-i" Delete frame count i, range s to s+i-1. "-n" Delete frame n "-s,e" Delete frames s to e "-s,0" Delete frames s to end of clip. "-s,-i" Delete frame count i, range s to s+i-1. NOTE, FrameSurgeon frame/range deletes have a 1ms linear FadeOut/FadeIn at splices simulating zero crossing, to prevent 'Cracks' in audio. Quote:
So far as I remember Morph only uses MvTools2 and builtin stuff. Maybe condition that caused problem was just a script error that occurs in rare circumstance. (that would be my guess, ie undocumented feature). JFYI, modding the various mvtools arg options in both FrameSurgeon and Morpheus would also produce different results, thats what they are for, defaults are not always optimum, nor are they ever always likely to be. [EDIT: eg, ADct in Morpheus (default 0) is supposed to usually produce better quality if 1, but is much slower (see MvTools docs)] A Moderator once said that it is a good idea to Report your own post when waiting approval (little red triangle on bottom left of post). Post #42 Updated.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 5th December 2018 at 17:00. |
||
5th December 2018, 18:15 | #47 | Link | ||||
Registered User
Join Date: Jun 2015
Location: France
Posts: 46
|
Quote:
Quote:
Quote:
Quote:
Could it be related with multithreading, since apparently the newly installed version of Avisynth+ is multithreaded ? Can I check that without re-installing the former version, by adding a “threads=1” switch somewhere ? (I already have “threads=1” in the source loading line, and Morph produces the same result with LWLibavVideoSource or FFVideoSource.) |
||||
5th December 2018, 23:25 | #48 | Link | ||||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Quote:
Quote:
Experimentation, and hard work is probably best way to understanding, although Zorr has 'Avisynth Optimizer' thread in Avisynth Development forum. Quote:
Only suggestion to re-install old stuff and check, then maybe start thread with concrete and provable and repeatable results. EDIT: For HD, might wanna try in Morpheus, ABlksize=24(or 32,Default16), and maybe RBlkSize=16.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 6th December 2018 at 17:04. |
||||
6th December 2018, 19:01 | #49 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
https://forum.doom9.org/showthread.p...07#post1855907
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
|
6th December 2018, 23:31 | #50 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
New Version Morpheus, added one helluva lot of args, give it a whirl (Incl TrueMotion).
Morpheus.avs v0.02 Part 1 of 2. Code:
/* Morpheus() v0.02, Just like you dreamed it to be :) Interpolate frames using a Command list of frames in String or in file. Req RT_Stats v1.43+, Avs+ or GScript, Grunt, MvTools, RemoveGrain, CallCmd (optional, auto deletes DBase). Planar YUV. Function Morpheus(clip c,String Cmd,Bool "Inclusive"=True, \ Int "Prefilter"=1, [* Prefilter *] \ Int "SPad"=16, Int "SPel"=2, Bool "SChroma"=True, [* MSuper *] \ Int "SSharp"=1, Int "SRFilter"=4, [* MSuper *] \ Int "ABlkSize"=c.Width>1920?32:c.Width>1100?24:c.Width>720?16:8, Int "ABlkSizeV"=ABlkSize, [* MAnalyse *] \ Int "ASearch"=3, Int "ASearchParam"=2, Int "APelSearch"=SPel, [* MAnalyse *] \ Bool "AChroma"=SChroma, Bool "ATrueMotion"=ABlksize<16, [* MAnalyse *] \ Int "AOverlap"=4, Int "AOverlapV"=AOverlap, [* MAnalyse *] \ Int "ADct"=0, Bool "ATryMany"=False, [* MAnalyse *] \ Int "RthSAD"=100, Int "RBlkSize"=ABlkSize/4*2, Int "RBlkSizeV"=RBlkSize, [* MRecalculate *] \ Int "RSearch"=ASearch, Int "RSearchParam"=ASearchParam, [* MRecalculate *] \ Bool "RChroma"=AChroma, Bool "RTrueMotion"=ATrueMotion, [* MRecalculate *] \ Int "ROverlap"=RBlkSize>2?2:0, Int "ROverlapV"=ROverlap, Int "RDct"=ADct, [* MRecalculate *] \ Float "Iml"=200.0, Bool "IBlend"=True, [* MFlowInter *] \ Int "IthSCD1"=400, Int "IthSCD2"=130, [* MFlowInter *] \ Bool "Show"=False \ ) Args:- Cmd, No default. If first character is Asterisk, then is a command string list, otherwise a command list filename. Commands consist of frame numbers, Frame numbers can be either COMMA(,) or SPACE separated and can be followed by a # comment (one interpolation command per line). If Inclusive == True then commands must be start and end of frames to Interpolate, eg 10,11 # Two frames, frame 10 and 11 are to be interpolated using frames 9 and 12 as source. 15 # single frame interpolated at frame 15, with src frames 14 and 16. 20,-2 # Two frames interpolated at frames 20 and 21 with Src frames 19 and 22. If Inclusive == False (Exclusive) then command frames must be those either side of Interpolated frames ie src frames. 9,12 # Two frames, frame 10 and 11 are to be interpolated using frames 9 and 12 as source. 14,16 # single frame interpolated at frame 15, with src frames 14 and 16. 19,22 # Two frames interpolated at frames 20 and 21 with Src frames 19 and 22. Inclusive, Default True. If True, Commands specify the start and end frames to interpolate (single start frame allowed). If False, Commands specify the TWO source frames used to create the interpolated frames that lie between them. MvTools2 Args, for Interpolation. Prefilter, Default 1 (0->2). 0=c.Blur(0.6), 1=c.RemoveGrain(22), 2=c.RemoveGrain(1).RemoveGrain(22) Applied to src to produce prefiltered clip for MSuper (avoid noise when getting initial vectors) RemoveGrain(1) = Undot : RemoveGrain(22)~=MedianBlur MSuper args: SPad, Default 16, See MvTools MSuper(hpad=8,vpad=8) [We use same for both]. SPel, Default 2. SChroma, Default True. SSharp, Default 1, See MvTools MSuper(sharp=2) SRFilter, Default 4, See MvTools MSuper(rfilter=2) MAnalyse args: ABlkSize, Default c.Width>1920?32:c.Width>1100?24:c.Width>720?16:8, See MvTools MAnalyse(BlkSize=8). if c.Width>1920 then 32 Else if c.Width>1100 then 24 Else if c.Width>720 then 16 Else 8 ABlkSizeV, Default ABlkSize. ASearch, Default 3, See MvTools MAnalyse(Search=4) ASearchParam, Default 2. APelSearch, Default SPel. AChroma, Default SChroma ATrueMotion, Default ABlksize<16 Then True Else False. See MvTools MAnalyse(truemotion=true) AOverLap, Default 4, See MvTools MAnalyse(overlap=0) AOverLapV, Default AOverLap. ADct, Default 0, See MvTools MAnalyse(Dct=0). Using other than default value can be VERY slow. ATryMany, Default False. MRecalculate args: RthSAD, Default 100, See MvTools MRecalculate(thSAD=200) RBlkSize, Default ABlkSize/4*2, See MvTools MRecalculate(blksize) NOTE, RBlkSize = 0 Will Switch OFF MRecalculate, probably a bit faster at possible expense of quality. RBlkSizeV, Default RBlkSize. See MvTools MRecalculate(blksizeV) RSearch, Default ASearch. RSearchParam, Default ASearchParam. RChroma, Default AChroma. RTrueMotion, Default ATrueMotion. ROverlap, Default RBlkSize>2?2:0. ROverlapV, Default ROverlap. RDct, Default ADct. MFlowInter args: Iml, Default 200.0, See MvTools MFlowInter(ml=100.0) IBlend, Default True, See MvTools MFlowInter(Blend=True). Blend or copy frame at scene change. IthSCD1, Default 400, See MvTools MFlowInter(thSCD1=400) : (0 < IthSCD1 <= (8*8)*255) IthSCD2, Default 130, See MvTools MFlowInter(thSCD1=130) : (0 < IthSCD1 <= 255) Threshold which sets how many blocks have to change for the frame to be considered as a scene change. It is ranged from 0 to 255, 0 meaning 0 %, 255 meaning 100 %. Default is 130 (which means 51.0%). Used by MvTools2 MFlowInter during interpolation. Show, Default False. Show Interpolated frames. */
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 7th December 2018 at 01:25. |
6th December 2018, 23:32 | #51 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Morpheus.avs v0.02 Part 2 of 2.
Code:
Function Morpheus(clip c,String Cmd,Bool "Inclusive", \ Int "Prefilter", [* Prefilter *] \ Int "SPad", Int "SPel", Bool "SChroma", Int "SSharp", Int "SRFilter", [* MSuper *] \ Int "ABlkSize", Int "ABlkSizeV", [* MAnalyse *] \ Int "ASearch", Int "ASearchParam", Int "APelSearch", [* MAnalyse *] \ Bool "AChroma", Bool "ATrueMotion", [* MAnalyse *] \ Int "AOverlap", Int "AOverlapV", [* MAnalyse *] \ Int "ADct", Bool "ATryMany", [* MAnalyse *] \ Int "RthSAD", Int "RBlkSize", Int "RBlkSizeV", [* MRecalculate *] \ Int "RSearch", Int "RSearchParam", [* MRecalculate *] \ Bool "RChroma", Bool "RTrueMotion", [* MRecalculate *] \ Int "ROverlap", Int "ROverlapV", Int "RDct", [* MRecalculate *] \ Float "Iml", Bool "IBlend", Int "IthSCD1", Int "IthSCD2", [* MFlowInter *] \ Bool "Show" \ ) { c myName="Morpheus: " IsAvsPlus=(FindStr(UCase(versionString),"AVISYNTH+")!=0) HasGScript=RT_FunctionExist("GScript") HasGRunt =RT_FunctionExist("GScriptClip") HasMvTools=RT_FunctionExist("MSuper") HasRemoveGrain=RT_FunctionExist("RemoveGrain") HasCallCmd =RT_FunctionExist("CallCmd") IsAvs26=VersionNumber>=2.6 Assert(IsAvsPlus || HasGScript,RT_String("%sNeed either GScript or AVS+",myName)) Assert(HasGRunt,RT_String("%sNeed GRunt:-https://forum.doom9.org/showthread.php?t=139337 ",myName)) Assert(HasMVTools,RT_String("%sNeed MvTools2:-http://forum.doom9.org/showthread.php?t=131033",myName)) Assert(HasRemoveGrain,RT_String("%sNeed RemoveGrain",myName)) Assert(IsYV12||(IsAvs26&&(IsY8||IsYV16||IsYV24)),RT_String("%sOnly Standard v2.6 Planar Supported (excepting YV411)",myname)) Assert(Cmd!="",String("%sCmd cannot be ''",myName)) # Inclusive = Default(Inclusive,True) PreFilter=Default(PreFilter,1) # 0=Blur(0.6), 1=RemoveGrain(22), 2=RemoveGrain(1).RemoveGrain(22) SPad=Default(SPad,16) SPel=Default(SPel,2) SChroma=Default(SChroma,True) SSharp=Default(SSharp,1) SRFilter= Default(SRFilter,4) ABlkSize=Default(ABlkSize,c.Width>1920?32:c.Width>1100?24:c.Width>720?16:8) ABlkSizeV=Default(ABlkSizeV,ABlkSize) ASearch=Default(ASearch,3) ASearchParam=Default(ASearchParam,2) APelSearch=Default(APelSearch,SPel) AChroma=Default(AChroma,SChroma) ATrueMotion=Default(ATrueMotion,ABlksize<16) AOverlap=Default(AOverlap,4) AOverlapV=Default(AOverlapV,AOverlap) ADct=Default(ADct,0) ATryMany=Default(ATryMany,False) RthSAD=Default(RthSAD,100) RBlkSize=Default(RBlkSize,ABlkSize/4*2) RBlkSizeV=Default(RBlkSizeV,RBlkSize) RSearch=Default(RSearch,ASearch) RSearchParam=Default(RSearchParam,ASearchParam) RChroma=Default(RChroma,AChroma) RTrueMotion=Default(RTrueMotion,ATrueMotion) ROverlap=Default(ROverlap,RBlkSize>2?2:0) ROverlapV=Default(ROverlapV,ROverlap) RDct=Default(RDct,ADct) Iml=Default(Iml,200.0) IBlend=Default(IBlend,True) IthSCD1=Default(IthSCD1,400) IthSCD2= Default(IthSCD2,130) Show=Default(Show,False) #### FuncS=""" Function ChrIsNul(String S) {return RT_Ord(S)== 0} Function ChrIsHash(String S) {return RT_Ord(S)==35} Function ChrIsStar(String S) {return RT_Ord(S)==42} Function ChrIsComma(String S) {return RT_Ord(S)==44} Function ChrIsHyphen(String S) {return RT_Ord(S)==45} Function ChrIsDigit(String S) {C=RT_Ord(S) return C>=48&&C<=57} Function ChrEatWhite(String S) {i=1 C=RT_Ord(S,i) While(C==32||C>=8&&C<=13) {i=i+1 C=RT_Ord(S,i)} return i>1?MidStr(S,i):S} Function ChrEatDigits(String S) {i=1 C=RT_Ord(S,i) While(C>=48&&C<=57) {i=i+1 C=RT_Ord(S,i)} return i>1?MidStr(S,i):S} Function Fn@@@(clip c,String DB,Bool Show,String Fmt1,String Fmt2) { c n=current_frame if(RT_DBaseGetField(DB,n,0)) { # Is an Interpolated frame Start = RT_DBaseGetField(DB,n,1) # Start of Interpolated Frames (Inclusive) End = RT_DBaseGetField(DB,n,2) # End of Interpolated Frames (Inclusive) Count = End - Start + 1 # Count of Interpolated frames in this run Index = n-Start # Index into Count (0 relative, 0 -> Count-1) OFrms=4 # Max number of frames to use from either side of Interpolated run (Src Frames, before & after) LS=Max(Start-OFrms,0) LCnt=Start-LS RCnt=Min(c.FrameCount-1-End,OFrms) TmpC = c.Trim(LS,-LCnt) + c.Trim(End+1,-RCnt) # Src used for interpolation, (with some extra frames[higher quality sometimes]) FixFrm=LCnt-1 # Frame where Interpolated frame will be created PreFilter=PreFilter@@@ PreFilt=Prefilter==0?TmpC.Blur(0.6):Prefilter==1?TmpC.RemoveGrain(22):TmpC.RemoveGrain(1).RemoveGrain(22) SPad=SPad@@@ SPel=SPel@@@ SChroma=SChroma@@@ SSharp=SSharp@@@ SRfilter=SRFilter@@@ Super=TmpC.MSuper(hpad=SPad,vpad=SPad,pel=SPel,levels=1,Chroma=SChroma,sharp=SSharp,rfilter=SRfilter) Superfilt=Prefilt.MSuper(hpad=SPad,vpad=SPad,pel=SPel,chroma=SChroma,sharp=SSharp,rfilter=SRfilter) ABlksize=ABlkSize@@@ ABlksizeV=ABlkSizeV@@@ ASearch=ASearch@@@ ASearchParam=ASearchParam@@@ APelSearch=APelSearch@@@ AChroma=AChroma@@@ ATrueMotion=ATrueMotion@@@ AOverLap=AOverLap@@@ AOverLapV=AOverLapV@@@ ADct=ADct@@@ ATryMany=ATryMany@@@ bv=Superfilt.MAnalyse(isb=true ,delta=1,blksize=ABlksize,blksizeV=ABlksizeV, \ search=ASearch,searchParam=ASearchParam,pelSearch=APelSearch, \ chroma=AChroma,trueMotion=ATrueMotion,overlap=AOverLap,overlapV=AOverLapV,dct=ADct,trymany=ATryMany) fv=Superfilt.MAnalyse(isb=false,delta=1,blksize=ABlksize,blksizeV=ABlksizeV, \ search=ASearch,searchParam=ASearchParam,pelSearch=APelSearch, \ chroma=AChroma,trueMotion=ATrueMotion,overlap=AOverLap,overlapV=AOverLapV,dct=ADct,trymany=ATryMany) RBlkSize=RBlkSize@@@ if(RBlkSize>0) { RthSAD=RthSAD@@@ RBlkSizeV=RBlkSizeV@@@ RSearch=RSearch@@@ RSearchParam=RSearchParam@@@ RChroma=RChroma@@@ RTrueMotion=RTrueMotion@@@ ROverLap=ROverLap@@@ ROverLapV=ROverLapV@@@ RDct=RDct@@@ bv=Super.MRecalculate(bv,thSAD=RthSAD,blksize=RBlkSize,blksizeV=RBlkSizeV, \ Search=RSearch,searchParam=RSearchParam,chroma=RChroma,truemotion=RTrueMotion, \ overlap=ROverLap,overlapV=ROverLapV,dct=RDct) fv=Super.MRecalculate(fv,thSAD=RthSAD,blksize=RBlkSize,blksizeV=RBlkSizeV, \ Search=RSearch,searchParam=RSearchParam,chroma=RChroma,truemotion=RTrueMotion, \ overlap=ROverLap,overlapV=ROverLapV,dct=RDct) } TmpC=TmpC.MFlowInter(Super,bv,fv,time=100.0*(Index+1)/(Count+1),ml=Iml@@@,blend=IBlend@@@,thSCD1=IthSCD1@@@,thSCD2=IthSCD2@@@) TmpC.Trim(FixFrm,-1) # Interpolated Frame to return if(Show) { RT_Subtitle(Fmt2,n,Index+1,Count) } } Else if(Show) { RT_Subtitle(Fmt1,n) } Return Last } if(ChrIsStar(CMD)) { CMD=MidStr(CMD,2) } else { Cmd=RT_GetFullPathName(Cmd) Assert(Exist(CMD),RT_String("%sCMD File does not exist",myName)) CMD=RT_ReadTxtFromFile(CMD) } LINES=RT_TxtQueryLines(CMD) FC=Framecount DB = RT_GetFullPathName("~@@@_"+RT_LocalTimeString+".DB") RT_DBaseAlloc(DB,FrameCount,"bii") for(i=0,LINES-1) { SS=RT_TxtGetLine(CMD,i).ChrEatWhite S=SS if(!S.ChrIsNul && !S.ChrIsHash) { if(S.ChrIsDigit) { StartF = S.RT_NumberValue EndF=StartF S=S.ChrEatDigits.ChrEatWhite if(S.ChrIsComma) {S=S.MidStr(2).ChrEatWhite} IsNeg = S.ChrIsHyphen if(IsNeg) {S=S.MidStr(2).ChrEatWhite} if(S.ChrIsDigit) { EndF=S.RT_NumberValue if(IsNeg) { Assert(Inclusive,RT_String("%sCMD: Error@Line_%d, Exclusive End Frame Cannot be -ve\n%s",myName,i+1,SS)) EndF=StartF+EndF-1 } S=S.ChrEatDigits } Else if(!Inclusive) { Assert(False,RT_String("%sCMD: Error@Line_%d, Exclusive must have End Frame\n%s",myName,i+1,SS)) } Else if(IsNeg) { Assert(False,RT_String("%sCMD: Error@Line_%d, Expecting End Frame\n%s",myName,i+1,SS)) } Start_I = (Inclusive) ? StartF : StartF+1 End_I = (Inclusive) ? EndF : EndF-1 Assert(Start_I>0,RT_String("%sCMD: Error@Line_%d, Illegal Start frame\n%s",myName,i+1,SS)) Assert(End_I<FC-1,RT_String("%sCMD: Error@Line_%d, EndFrame(%d)+1 Out Of Clip\n%s",myName,i+1,End_I+1,SS)) Inclusive \ ? Assert(Start_I<=End_I,RT_String("%sCMD: Error@Line_%d, StartFrame(%d) <= EndFrame(%d)\n%s",myName,i+1,Start_I,End_I,SS)) \ : Assert(StartF<EndF-1,RT_String("%sCMD: Error@Line_%d, None to interpolate, Start(%d) End(%d)\n%s",myName,i+1,StartF,EndF,SS)) Assert(!(RT_DBaseGetField(DB,Start_I-1,0)||RT_DBaseGetField(DB,End_I+1,0)), \ RT_String("%sCMD: Error@Line_%d, Adjacent Interpolation\n%s",myName,i+1,SS)) for(n=Start_I,End_I) { if(RT_DBaseGetField(DB,n,0)) { if(RT_DBaseGetField(DB,n,1)!=Start_I || RT_DBaseGetField(DB,n,2)!=End_I) { Assert(False,RT_String("%sCMD: Error@Line_%d, Overlapping Interpolation\n%s",myName,i+1,SS)) } } RT_DBaseSet(DB,n,True,Start_I,End_I) } S=S.ChrEatWhite } if(!S.ChrIsHash) { Assert(S.ChrIsNul,RT_String("%sCMD: Error@Line_%d, *** NON-PARSE ***\n'%s'",myName,i+1,SS)) } } } Global PreFilter@@@=PreFilter Global SPad@@@=SPad Global SPel@@@=SPel Global SChroma@@@=SChroma Global SSharp@@@=SSharp Global SRFilter@@@=SRFilter Global ABlkSize@@@=ABlkSize Global ABlkSizeV@@@=ABlkSizeV Global ASearch@@@=ASearch Global ASearchParam@@@=ASearchParam Global APelSearch@@@=APelSearch Global AChroma@@@=AChroma Global ATrueMotion@@@=ATrueMotion Global AOverLap@@@=AOverLap Global AOverLapV@@@=AOverLapV Global ADct@@@=ADct Global ATryMany@@@=ATryMany Global RthSAD@@@=RthSAD Global RBlkSize@@@=RBlkSize Global RBlkSizeV@@@=RBlkSizeV Global RSearch@@@=RSearch Global RSearchParam@@@=RSearchParam Global RChroma@@@=RChroma Global RTrueMotion@@@=RTrueMotion Global ROverLap@@@=ROverLap Global ROverLapV@@@=ROverLapV Global RDct@@@=RDct Global Iml@@@=Iml Global IBlend@@@=IBlend Global IthSCD1@@@=IthSCD1 Global IthSCD2@@@=IthSCD2 ### Fmt1="%d]" Fmt2="%d] I%d/%d" ARGS = "DB,Show,Fmt1,Fmt2" ScriptLine = "Fn@@@("+ARGS+")" Last.GScriptClip(ScriptLine, local=true, args=ARGS) """ GIFunc="MORPHEUS" # Function Name, Supply unique name for your multi-instance function. GIName=GIFunc+"_InstanceNumber" # Name of the Instance number Global RT_IncrGlobal(GIName) # Increment Instance Global (init to 1 if not already exists) GID = GIFunc + "_" + String(Eval(GIName)) InstS = RT_StrReplace(FuncS,"@@@","_"+GID) # Write Debug GScript File to current directory (line numbers will correspond to error messages) # RT_WriteFile("DEBUG_"+GID+".TXT","%s",InstS) HasGScript ? GScript(InstS) : Eval(InstS,"GS_EVAL") # Use GSCript if installed (loaded plugs override builtin) # if CallCmd available, Auto delete DBase file on clip closure. HasCallCmd?CallCmd(close=RT_String("""CMD /C chcp 1252 && del "%s" """,DB), hide=true, Synchronous=7):NOP Return Last } Client Code:
#Import(".\Morpheus.avs") # or put in plugins dir Colorbars(Pixel_type="YV12").KillAudio.ShowFrameNumber INCLUSIVE=True SHOW=True INCLUSIVE_CMD="""* # <<<<==== Asterisk(Star) is first character, ie is a String Command, else is a Filename. 10 11 # This Is a Comment 15 20 -2 """ EXCLUSIVE_CMD="""* # <<<<==== Asterisk(Star) is first character, ie is a String Command, else is a Filename. 9 12 14 16 19 22 """ # Select Inclusive or Exclusive CMD depending upon value of INCLUSIVE CMD = (INCLUSIVE) ? INCLUSIVE_CMD : EXCLUSIVE_CMD Morpheus(Cmd,Inclusive=INCLUSIVE,Show=SHOW)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 10th December 2018 at 16:22. Reason: Update |
10th December 2018, 04:02 | #52 | Link | |||
Registered User
Join Date: Jun 2015
Location: France
Posts: 46
|
Quote:
And now that I've re-installed Avisynth+ r1576, it works again as intended, as I wrote in the other thread. But I can no longer load an AVS script as input for ffmpeg, it says that Avisynth is too old... And yet strangely on the seemingly official page for Avisynth+, r1576 is presented as the most recent version. Oh well... Quote:
Quote:
|
|||
10th December 2018, 16:17 | #53 | Link | |||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
The official avs+ page is owned by Ultim, and he no longer visits, Pinterf (current numero uno) is thinking about opening his own avs+ thread, apparently (dig, dig) I think that the only person that really understood mvtools usage (excluding original authors) was probably Didee, and he only very rarely visits (maybe in response to some particularly inciting post). I certainly dont fully (or even halfly, quarterly) understand mvtools, is almost a total mystery. Best one can do is read the docs/examples and try to make some sense of it. If anybody ever did write a mvtools 'guide', he would have a monumental task on his hands, methinks. Quote:
EDIT: Comments:- http://avisynth.nl/index.php/The_ful...n_and_Comments EDIT: Maximum post size is 16KB in Usage Forum, hence 2 posts [Developer Forum 20KB). And you would need an Import() in client, will add now. EDIT: Quote:
[ie change the clip below in red to the clip in blue] Code:
bv=Superfilt.MAnalyse(isb=true ,delta=1,blksize=ABlksize,blksizeV=ABlksizeV, \ search=ASearch,searchParam=ASearchParam,pelSearch=APelSearch, \ chroma=AChroma,trueMotion=ATrueMotion,overlap=AOverLap,overlapV=AOverLapV,dct=ADct,trymany=ATryMany) fv=Superfilt.MAnalyse(isb=false,delta=1,blksize=ABlksize,blksizeV=ABlksizeV, \ search=ASearch,searchParam=ASearchParam,pelSearch=APelSearch, \ chroma=AChroma,trueMotion=ATrueMotion,overlap=AOverLap,overlapV=AOverLapV,dct=ADct,trymany=ATryMany) RBlkSize=RBlkSize@@@ if(RBlkSize>0) { RthSAD=RthSAD@@@ RBlkSizeV=RBlkSizeV@@@ RSearch=RSearch@@@ RSearchParam=RSearchParam@@@ RChroma=RChroma@@@ RTrueMotion=RTrueMotion@@@ ROverLap=ROverLap@@@ ROverLapV=ROverLapV@@@ RDct=RDct@@@ bv=Super.MRecalculate(bv,thSAD=RthSAD,blksize=RBlkSize,blksizeV=RBlkSizeV, \ Search=RSearch,searchParam=RSearchParam,chroma=RChroma,truemotion=RTrueMotion, \ overlap=ROverLap,overlapV=ROverLapV,dct=RDct) fv=Super.MRecalculate(fv,thSAD=RthSAD,blksize=RBlkSize,blksizeV=RBlkSizeV, \ Search=RSearch,searchParam=RSearchParam,chroma=RChroma,truemotion=RTrueMotion, \ overlap=ROverLap,overlapV=ROverLapV,dct=RDct) }
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 10th December 2018 at 16:58. |
|||
13th December 2018, 09:49 | #54 | Link | ||||||
Registered User
Join Date: Jun 2015
Location: France
Posts: 46
|
Quote:
https://video.stackexchange.com/ques...ript-in-ffmpeg Quote:
Quote:
Quote:
Quote:
A quick test... Base frame : https://www.cjoint.com/doc/18_12/HLn...L_136-base.png FrameSurgeon : https://www.cjoint.com/doc/18_12/HLn...ameSurgeon.png Morpheus v1 (v2 seems to produce the same result) : https://www.cjoint.com/doc/18_12/HLn...orpheus-v1.png Morpheus v3 : https://www.cjoint.com/doc/18_12/HLn...orpheus-v3.png Morph : https://www.cjoint.com/doc/18_12/HLn..._136-Morph.png => In a case like this, with a “large object” moving quickly, especially laterally and over a non uniform background, Morph usually produces the less ugly result. And for this particular frame (which is only slightly blurred), none of those filters is significantly improving over the original. By the way : Quote:
Last edited by abolibibelot; 13th December 2018 at 17:16. |
||||||
13th December 2018, 18:51 | #55 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Despite what the StackExchange post said, version 6 Header came in with v2.6 Alpha 4 (not RC1), however it is possible (even likely) that one or two more
changes did occur between those versions (and even since RC1, at least in avs+). Quote:
Quote:
I think that I posted the mods that needed to be done (by you), to get around your self imposed problem. Are you saying that you cannot run system NotePad at all ? (If so, then I may [when time permits] do it all again for you, but I dont like doing specials).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 13th December 2018 at 18:53. |
||
14th December 2018, 01:31 | #56 | Link | |
Registered User
Join Date: Jun 2015
Location: France
Posts: 46
|
Quote:
For now, if anyone using Notepad2 has the same issue, here's the registry key to save and delete : Code:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe Code:
I1 2345 # 2345,2345 I2 2348 # 2348,2349 I1 2351 # 235&,2351 I1 2354 # 2"54,2354 I1 2356 # 2"56,2356 I1 2364 " 2364,2364 I1 2366 " 2366,2366 I2 2373 # 2373,2"74 I1 2377 # 2377,2377 I1 2380 # 2"80,2380 I1 2383 # 23_3,2383 I2 2392 # 2392,23ç3 I1 2397 # 2397,2397 Code:
I1 2418 2418,2418 I1 2418 " 2418,2418 I1 2418 # 2418,2418 Last edited by abolibibelot; 14th December 2018 at 01:46. |
|
14th December 2018, 13:36 | #57 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
OK, I've removed the # comments following interpolations, think that there may be a bug in the AutoIt ControlSend() function for raw keys,
the '#' key denotes the Windows Key when sending cooked (special) characters, somehow its mis interpreting the # when raw, and when it should not change anything at all. Anyway, have removed # chars and following comment frame ranges so we avoid whether bug or not. Here v1.10, source AutoIt code:- http://www.mediafire.com/file/a9x9h9...wBones.7z/file You need AutoIt current version, and also best use SciTE editor (find on AutoIt web site downloads along with AutoIt), and make changes near beginning of source. Code:
#cs ---------------------------------------------------------------------------- This program is free software; you can redistribute it and/or modify it under any terms terms you like. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use at you own risk. #ce ---------------------------------------------------------------------------- ; SawBones v1.10 by StainlessS ... compiled with AutoIt v3.3.14.5 #include <MsgBoxConstants.au3> #include <Misc.au3> Opt("MustDeclareVars", 1) ;;; Global Const $Version = "SawBones v1.10" Global Const $APP_NAME = "SawBones.Exe" Global Const $APP_INI = "SawBones.ini" Global Const $Watching = " SawBones is WATCHING " Global Const $APPTitle = "VirtualDub2" ; VirtualDub2 matches as "VirtualDub2" with traiiling "Build number" on title bar. Global Const $ScriptTitle = "VirtualDub2 Script Editor" ; VirtualDub2 Script Editor Window Global Const $ScriptControl = "[CLASS:Scintilla; INSTANCE:1]" Global Const $VdFrameNo = "[CLASS:Edit; INSTANCE:1]" ; Frame Indicator box (bottom middle of window, just above status line) Global Const $VDRange = "[CLASS:msctls_statusbar32; INSTANCE:1]" ; Frame Range (bottom Left of window, 'Selecting Frames...' when range selected) ; ; CAN CHANGE below "Notepad" and "Edit" to change editor, use AutoIt Au3Info program to get names (try 1st with NotePad.exe to see how to use it). Global Const $EdTitle = "[CLASS:Notepad]" ; NotePad Window name. Global Const $EditControl = "[CLASS:Edit; INSTANCE:1]" ; NotePad text editor window control. ; eg for NotePad2, Comment out above two lines and uncomment below two lines (Semi Colon is comment character). ; After changes, in AutoIt SciTE source editor, hit F7 to rebuild executable. (probably the same key in the basic AutoIt included editor). ;Global Const $EdTitle = "[CLASS:Notepad2]" ; NotePad2 Window name. ;Global Const $EditControl = "[CLASS:SysListView32; INSTANCE:1]" ; NotePad2 text editor window control. EDIT: I think it should work ok, dont think I ever did get a response when asking if I had located the correct NotePad2 program that you use. Just make similar changes to any future versions of Sawbones. EDIT: Install the 32 bit version of AutoIt (option in installer), I've never tried it on 64 bit, and see no advantage whatsoever in doing so. Edit Control "[CLASS:SysListView32; INSTANCE:1]" might be specific to 32 bit version and so may not work in x64 AutoIt. If you do install 64bit, and it dont work, suggest try change to "[CLASS:SysListView64; INSTANCE:1]". EDIT: Above wrong, might need change to "[CLASS:SysListView64; INSTANCE:1]" if using 64 bit Notepad2, not 64 bit AutoIt.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 14th December 2018 at 21:24. |
15th December 2018, 23:27 | #58 | Link | |
Registered User
Join Date: Mar 2018
Posts: 447
|
Quote:
A) incredibly useful in itself and the backbone of many advanced filters B) very complex with dozens of parameters and therefore hard to understand C) has the features which make an automatic optimization process possible If you want to try the optimizer then this is all you need to do: 1) download the package and install it 2) make an "augmented" script where you tell which parameters the optimizer will try to optimize (and you don't need to do this yourself, I can provide an augmented MVTools script ready to go) 3) set the source and choose which frame or frames you want to optimizer to focus on 4) start the optimizer and wait for the results (which you can also inspect visually while the optimization is in progress). Note that this part can take a long time, I am using 50 000 iterations with my optimization tasks and it takes about 3 days per run. If you're in a hurry just set the iterations lower (default is 2000) or even tell how long time optimizer can run (in days, hours, minutes). The best parameters found by the optimizer you can then use with Morpheus and/or FrameSurgeon as they are both using MVTools. I'm currently running an MVTools optimization myself but after it's finished (probably tomorrow) I'd like to start another one using some of those difficult frames of yours. I'm interested in finding out how the optimal paramers change with different source videos. Perhaps with enough tests I can start writing the 'MVTools guide' StainlessS mentioned. [EDIT] It's also possible to reduce the artifacts you're seeing by doing another MVTools pass after the first one using MCompensate (just learned today that Didée suggested the same thing in 2012). Also forgot to mention that the optimization process needs "good" frames to figure out the optimal parameters, so in this case you should let it focus on frames before and after your bad frame (with similar motion than in the bad frame) and then try to reconstruct the bad frame using the settings found. Last edited by zorr; 15th December 2018 at 23:40. |
|
16th December 2018, 00:06 | #59 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Any comment on above Zorr ? I was gonna test it out when I get the time, but maybe you know already. If above is correct, and I have done it sub optimal, then I also messed up Precise (MRecalculate) in McDegrainSharp(Precise=true) EDIT: If my effort was not optimal, then the legendary jm_fps() is similarly non optimal.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 16th December 2018 at 01:40. |
|
16th December 2018, 02:03 | #60 | Link | |
Registered User
Join Date: Mar 2018
Posts: 447
|
Yes I have a comment: I don't know.
Quote:
|
|
Tags |
avisynth, bad frame, interpolate, morph, stabilizer |
Thread Tools | Search this Thread |
Display Modes | |
|
|