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 |
17th November 2019, 02:41 | #61 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,992
|
Try this mod to script,
Line 370, Duplicity2.avsi Code:
DB=(DBase=="") ? RT_GetFullPathName("~@@@_"+RT_LocalTimeString+".DB") : RT_GetFullPathName(DBase) Code:
DB=(DBase=="") ? RT_GetFullPathName("~@@@_"+RT_LocalTimeString+".DB") : RT_GetFullPathName(DBase) RT_DebugF("DBase = '%s'",DB,name="DB_BUGTEST: ") # Cap in DebugView and post if problem RT_DBaseAlloc(DB,FrameCount,"iiiiii")
__________________
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; 17th November 2019 at 02:59. |
30th October 2021, 19:56 | #62 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,711
|
I wanted to try DropDeadGorgeous to see if it would work on my test clips. I copy/pasted from posts 46, 47, & 48. When I ran it, I got an error that it needed the DB file and I realized I need to run Duplicity2 first.
I downloaded Duplicity2 and ran it from the client supplied in the zip. However, I got this error: Code:
Avisynth open failure I don't know what ThB means I looked at Duplicity2 and found that the default is simply 2x of another variable so I added this line: Code:
ThB = ThG*2 Code:
Avisynth open failure: System exception - Access Violation Duplicity2.avsi, line 760 Code:
HasGScript ? GScript(InstS) : Eval(InstS,"GS_EVAL") # Use GSCript if installed (loaded plugs override builtin) I still get the same error, so I think it is something other than not having RT_Stats installed, or not having the latest version. I am using AVISynth+ 3.7.0 running under Windows XP Pro 32-bit. |
7th November 2021, 21:29 | #63 | Link | ||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,992
|
Hi John, sorry for the delay in response, been a bit otherwise engaged.
Quote:
Code:
Import(".\Duplicity2.Avsi") ###### FN = "D:\G.AVI" DBase = "D:\G_Det.DB" ThB=2.0 #FN = "D:\GTEST.AVI" DBase = "D:\GTEST_Det.DB" ThB=2.0 #FN = "D:\HAR.AVI" DBase = "D:\HAR_Det.DB" ThB=2.5 #FN = "D:\DeDupTest.AVI" DBase = "D:\DeDupTest_Det.DB" ThB=2.0 ###### Avisource(FN) SRC=Last ### Mode=2 # 0=Write Frames only : 1=Replace Dupes with Exact Dupes : 2= Interpolate/Blend Duplicates. ThG=1.0 # Primary Frame Global Detect ThP=64 # Pixel Count Detect MaxDupLen=9 # Max detected, if more then is considered static sequence not duplicate) MaxInterp=9 # Max Interpolated frames when Mode=2 (More than MaxInterp & less or equal to MaxDupLen then uses Blend mode) InterpFast=true Show=True ShowDot=False ShowBlk=true VERB=False ### TITLE=False STACK=True STACK4=False ### Result=SRC.Duplicity2(Mode=Mode,ThG=ThG,ThB=ThB,ThP=ThP,MaxDupLen=MaxDupLen,MaxInterp=MaxInterp, \ Show=False,InterpFast=InterpFast,DBase=(STACK4||!SHOW)?DBase:"") Metrics=SRC.Duplicity2(Mode=Mode,ThG=ThG,ThB=ThB,ThP=ThP,MaxDupLen=MaxDupLen,MaxInterp=MaxInterp, \ Show=True,Verb=VERB,ShowBlk=ShowBlk,ShowDot=ShowDot,InterpFast=InterpFast,DBase=(STACK4||!SHOW)?"":DBase) Dif=Subtract(Result,SRC) SRC = (TITLE) ? SRC.TSub("Src") : SRC Result = (TITLE) ? Result.TSub("Result") : Result Metrics = (TITLE) ? Metrics.TSub("Metrics") : Metrics Dif = (TITLE) ? Dif.TSub("Dif(Result,Src)") : Dif LFT=StackVertical((STACK4||!SHOW)?Result:Metrics,SRC) RGT=StackVertical(Metrics,Dif) STK4=StackHorizontal(LFT,RGT) (STACK4) ? STK4 : (STACK) ? LFT : (Show)?Metrics:Result Return Last # Stack Overhead Subtitle Text, with optional FrameNumber shown. Function TSub(clip c,string Tit,Bool "ShowFrameNo",Int "Col"){ c.BlankClip(height=20,Color=Default(Col,0)) (Default(ShowFrameNo,False))?ScriptClip("""Subtitle(String(current_frame,"%.f] """+Tit+""""))"""):Subtitle(Tit) Return StackVertical(c).AudioDubEx(c) } Quote:
Also, if using AVS+, then GScript not required. [EDIT: remove GScript from plugins and retest with XP version AVS+] Also, are you using XP version of AVS+ ? [It needs it now, recent test versions of AVS+ do not always contain the XP compat version of AVS+]. EDIT: GScript updated for AVS+ arrays, maybe other mods. [30 Nov 2020]. EDIT: I don't know where I got the 30 Nov 2020 GSCript from, Groucho compiled for x64 May 2020, but that aint it. [EDIT: I think Pinterf maybe did the 30 Nov 2020 ver$] EDIT: Current AVS+ on XP requires special version because non XP ver$ uses system calls that are non-existing on XP [and so will crash].
__________________
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; 8th November 2021 at 03:10. |
||
8th November 2021, 03:57 | #64 | Link |
Banana User
Join Date: Sep 2008
Posts: 1,010
|
Isn't GRunT like replacement for GScript?
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
8th November 2021, 12:20 | #65 | Link | |||
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,992
|
Quote:
Gscript = If, For, While, etc [for non + AVS] Grunt = GScriptClip(Args="...",Local=True/False), + GFrameEvaluate, GConditionalFilter, GWriteFile and GWriteFileIf . [ with Grunt, ScriptClip(Args="...",Local=True/False) etc also works, the 'G' versions just makes Grunt requirement explicit ] Grunt:- https://forum.doom9.org/showthread.php?t=139337 Not sure if Avs+ implements as below Quote:
Quote:
__________________
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; 8th November 2021 at 13:15. |
|||
8th November 2021, 15:36 | #66 | Link |
Banana User
Join Date: Sep 2008
Posts: 1,010
|
Then why this example below produces "Script error: syntax error"?
Code:
dummy = 1 BlankClip() if(dummy == 0) { crop(2,2,-2,-2) } else { crop(4,4,-4,-4) }
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 8th November 2021 at 19:14. |
8th November 2021, 17:03 | #67 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,367
|
I think you might need a space between the if and the bracket
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
8th November 2021, 19:16 | #68 | Link |
Banana User
Join Date: Sep 2008
Posts: 1,010
|
Didn't helped. Btw, error is at the first curly bracket.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
8th November 2021, 19:33 | #69 | Link |
Registered User
Join Date: Nov 2009
Posts: 2,367
|
Ah yep, well it works for me but I use internal conditionals. Might be a Gscript bug.
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
8th November 2021, 20:47 | #70 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,992
|
Gcript requires to be wrapped in GScript("..."), eg
Code:
dummy = 1 BlankClip() GSCript(""" if(dummy == 0) { crop(2,2,-2,-2) } else { crop(4,4,-4,-4) } """) Or you can import a GScript script use eg GImport("..."), where script itself dont need no GScript("""...""") wrapper. EDIT: GScript:- https://forum.doom9.org/showthread.p...hlight=GSCript EDIT: AVS+ implemented GScript language extensions do not require GScript("...") wrappers. Best avoid loading GScript() plugin when using AVS+. (otherwise if/while etc will require Gscript wrappers, [plugins override builtins] EDIT: Not sure about this, maybe wrong) EDIT: Just tried above script, with and without GScript() wrappers, and both worked OK. [avs+ x64 with GScript dll in plugins] I used to 'belly-ache' about wiki saying something like "avs+ does not need GScript wrappers", saying that it should read "will not work with Gscript wrapper", so I guess Pinterf got the message and fixed it. EDIT: Leaving GScript("...") wrapper uncommented, and removing dll from plugins, does produce an error for above script.
__________________
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; 8th November 2021 at 21:17. |
8th November 2021, 21:06 | #71 | Link |
Banana User
Join Date: Sep 2008
Posts: 1,010
|
Then to hell with that Avs 2.6 support, time to let it rest in peace.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
8th November 2021, 21:19 | #72 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,992
|
Quote:
EDIT: Best to advise user that v2.60 std using Gscript plugin, then need to load the script using GScript lang extensions using the GImport() command, and use simple Import() or Plugins autoload avsi, when using AVS+. [AND STRIP ALL INSTANCES of the GScript Wrappers from the actual script containing GScript extensions].
__________________
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; 8th November 2021 at 21:26. |
|
8th November 2021, 21:47 | #73 | Link |
Banana User
Join Date: Sep 2008
Posts: 1,010
|
I see.
I renamed InpaintDelogo.avsi to InpaintDelogo.avs, then called it with: GImport("c:\Program Files (x86)\AviSynth 2.5\plugins\InpaintDelogo.avs") And looks like it started working with Avs 2.6. [when it comes to run actual if/else code then same error] EDIT: Actually it still does't work, it just squashed that error on the script load stage. EDIT2: But that "dummy" example works... EDIT3: It doesn't work because if/else is inside eval("""..."""), need to get rid of it.
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling Last edited by VoodooFX; 8th November 2021 at 23:23. |
8th November 2021, 23:15 | #74 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,992
|
You can only really load script functions containing GScript extensions, [or whatever code allowed in *.avsi scripts],
in main script, must still wrap any GScript extension code. Not ideal, but there you go [Gscript("...") and GImport("...") and GEval("...") only affect code that is wrapped in those G thingies] where Import() is sorta like Code:
S = RT_ReadTextFromFile(".\SomeScriptFile.avs") Eval(S) Code:
S = RT_ReadTextFromFile(".\SomeIfElseFile.avs") GEval(S) Code:
S = "Some If Else stuff" GEval(S) Code:
Function FuncNameExists(String Fn) { Try{Eval(Fn+"()")B=True}catch(e){Assert(e.FindStr("syntax")==0,"FuncNameExists: Error in Function Name '"+Fn+"'")B=(e.FindStr("no function named")==0)}Return B} Function HasGScript() { Return FuncNameExists("GSCript") } # v2.60 std dont have FunctionExist(), so we use above whotsit [which i believe will work ok even in v2.58]. gString =""" Some If Else Stuff""" (HasGScript) ? GEval(gString) : ? Eval(gString)
__________________
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; 8th November 2021 at 23:43. |
8th November 2021, 23:55 | #75 | Link |
Banana User
Join Date: Sep 2008
Posts: 1,010
|
Thanks StainlessS, I think I can make it work with few small edits.
So, your DetSub_Extract.avs can be Avs 2.6 compatible too after all, or not?
__________________
InpaintDelogo, DoomDelogo, JerkyWEB Fixer, Standalone Faster-Whisper - AI subtitling |
19th January 2024, 15:13 | #76 | Link |
Registered User
Join Date: Aug 2016
Posts: 715
|
I'm after something that can blend a duplicate with its neighbours over 4 or 5 frames to hide the jerk.
It seems again you've given me exactly what I want StainlesS, but I need to learn how to use it and my brain isn't working at the moment. I had previously been trying to achieve it with TDecimate, which can almost do it with its hybrid=3 mode, and you can even specify how many frames to blend the duplicate over with the Cycle=n value. But it has some kind of bug or intentional behaviour which makes it blend with the wrong frame, eg. Test video 1080p24 clock: https://drive.google.com/file/d/1jpv...ew?usp=sharing Code:
# downscale for speedup Spline36Resize(854, 480) # synthesise 1 duplicate frame per second for the first 4 seconds when the clock hand is pointing at 12 (north) DuplicateFrame(24, 48, 72, 96) TDecimate(mode=0, /* 0 or 1 makes no difference */ \ cycleR=1, /* must always be 1 */ \ cycle=2, /* set this to the number of frames you want to blend the dupe over */ \ hybrid=3, \ viddetect=2, \ vidthresh=0.9, /* framediff < 0.9 = dupe */ \ conCycle=1, \ dupthresh=0.0, \ denoise=true, \ chroma=false, \ hint=false, \ display=true) But then the next time the clock hand comes around it blends with 2 frames ahead (51+53 instead of 51+52): I can increase the Cycle value to 3,4,5 and kind of reduce/delay the issue, but it still eventually does a blend with 2 frames ahead. I think maybe it's following some rule of blending with the next frame with the highest framediff or something, but I don't want that, I just want it to blend with neighbours only. It seems like your filter will do exactly that, just need to figure out how Last edited by flossy_cake; 20th January 2024 at 06:43. |
28th January 2024, 18:04 | #77 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,992
|
Sorry Flossy, I saw this 1 or 2 days ago but had no time. [missed it previously]
Did you get it sorted. The DropDeadGorgeous thingy is really for situations like webcam cap, where frames may be dropped due to time constraints and cap driver code speed, and same number of dupes were inserted to make up for it, so not suitable for your requirement. Duplicity2, can interpolate/blend a number of consecutive dupes, but using only the two frames from either side of the dupe sequence. I'm no expert with TDecimate.
__________________
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; 28th January 2024 at 18:06. |
1st February 2024, 14:57 | #78 | Link |
Registered User
Join Date: Aug 2016
Posts: 715
|
Yep got it sorted with a slight tweak to TDecimate.cpp in Visual Studio.
For my NTSC DVDs containing cadence breaks I will probably do 2 passes of TDecimate - pass 1 converts the TFM'd 30p to 24p by removing 1 in 5 dupes, then a second pass in hybrid=3 mode to blend over any remaining duplicates which occured due to cadence breaks in the source. I found a cycle value of 5-10 seems to look ok, i.e blend the dupe over 5-10 frames. 2 frames is not enough and still can see the jerk. 5 is kind of okay but still can see a slight jerk. Maybe 7 or 8 could be optimal, still experimenting. The hybrid modes have a useful feature where if it sees one of the frames in the cycle appears to be a scenechange frame, it will not blend it, which is good otherwise you would get blended scenechange frames which look a bit weird visually. Last edited by flossy_cake; 3rd February 2024 at 09:42. |
Tags |
dedup, deduplicate, duplicates |
Thread Tools | Search this Thread |
Display Modes | |
|
|