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. |
24th August 2013, 12:42 | #1 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,784
|
Multiple autoload directories for AviSynth plugins?
Currently, AviSynth 2.5/2.6 supports exactly one directory (specified in the registry) as autoload directory, so that you don't need to specify full qualified paths in LoadPlugin() calls.
Is there already a solution to expand this feature to a list of directories (like in the PATH variable) to both keep your different plugin directories tidy (here the ones MeGUI keeps up to date, and there some others I add on my own), and also have them all available automatically? |
24th August 2013, 12:53 | #2 | Link | |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
Quote:
About your problem - I have not tried it but maybe an avsi in the auto-load directory which contains a bunch of "LoadPlugin()" which load DLLs from another directory? A clever batch file could be used to create that avsi, I guess.
__________________
Groucho's Avisynth Stuff |
|
24th August 2013, 13:12 | #3 | Link |
German doom9/Gleitz SuMo
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 6,784
|
This idea sounds sensible.
It's not me who needs that; I am not too lazy to use explicit LoadPlugin's. And it will probably also be possible to store AviSynth presets in MeGUI containing manually prepared scripts with them? |
26th August 2013, 09:13 | #4 | Link |
Registered User
Join Date: Mar 2003
Location: UK
Posts: 360
|
I personally just use LoadPlugin or Import as I use various filters at vairous times and keep them in nice neat folders, which does mean duplicating filters but does avoid having a HUGE folder of autoloads that confuses the hell out of avisynth or filters that NEED very specific versions of plug-in to function correctly with some scripts
And also means you KNOW that filter is going to work as everything it needs is in its own folder, without relying on autoload |
26th August 2013, 19:25 | #5 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
It could be possible using RT_Stats and GScript (standard autoload) to load ALL dll's in a directory by creating a
list of *.dll files using RT_WriteFileList with a wildcard of eg "D:\Plugs\QTGMC\*.dll", and then iterate though the list with GScript, calling LoadPlugin on each one. Could even load a list of C plugins using same method. EDIT: Might best be coded as an autoloaded avsi function.
__________________
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; 26th August 2013 at 19:35. |
26th August 2013, 21:51 | #6 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Further to previous post, below seems to work OK:
AutoLoadPlugs.AVSI Code:
Function AutoLoadPlugs(string "Root",string "Folder",Int "Type",Bool "Debug") { # Root = main alternative plugins DIR containing FOLDERS that hold dll's # Folder, the folder name relative to Root containing dll's # TYPE, 0=Standard CPP LoadPlugin, 1 = Import AVSI scripts, 2= LoadCPlugin(built into Avisynth v2.5), 3=LoadCPlugin(v2.0 Avisynth_c.dll) # Debug==true, send info to DebugView window. # Cannot mix Standard CPP and Cv2.0 and Cv2.5 plugins in same directory. # MUST Set Default for ROOT and V2_CPlugin for YOUR SYSTEM. V2_CPlugin="D:\MyPlugins\C2LOADER\Avisynth_c.dll" # NOTE, MUST set complete Path and filename to Kevin Atkinson avisynth_c.dll Root=Default(Root,"D:\MyPlugins\") # Set your own default path Folder=default(Folder,"") # Default = Root ie FULL Path is USER SUPPLIED Type=Default(Type,0) # Standard CPP is default Debug=Default(Debug,false) Assert(Type>=0 && Type <=3,"AutoLoadPlugs: TYPE 0 -> 3 ONLY") TMPFile="~AutoLoadPlugs.TMP" GSCript(""" if(TYPE==3) { if(!RT_VarExist("GLB_V2_CPLUGIN")) { (!Exist(V2_CPlugin)) ? Assert(false,"AutoLoadPlugs: v2.0 C Plugin Loader Does NOT Exist"+Chr(10)+"("+V2_CPlugin+")"): NOP (DEBUG) ? RT_Debug("AutoLoadPlugs: LOADING Avisynth V2.0 C Plugin Loader(Avisynth_c.dll)") : NOP LoadPlugin(V2_CPlugin) # Load v2.0 C Plugin Loader Global GLB_V2_CPLUGIN=True } } eS=RightStr(Root,1) Path=(eS!="\" && eS!="/") ? Root+"\" : Root # Ensure End Slash if(Folder!="") { eS=RightStr(Folder,1) Folder=(eS!="\" && eS!="/") ? Folder+"\" : Folder # Ensure End Slash Path=Path + Folder # Concatenate } TestPath=LeftStr(Path,Strlen(Path)-1) # Test PATH Exist without End Slash, else Error Assert(Exist(TestPath),"AutoLoadPlugin: Path Does not exist ("+Path+")") WildCard=Select(Type,"*.dll","*.AVSI","*.dll","*.dll") SearchString = Path + WildCard Got = RT_WriteFileList(SearchString,TMPFile) if(Got > 0) { SS=RT_ReadTxtFromFile(TMPFile) # Read multiline list of filenames for(i=0,Got-1) { S=RT_TxtGetLine(SS,i) if(TYPE==0) { # Standard CPP Plugin (DEBUG) ? RT_Debug("AutoLoadPlugs: Loading CPP Plugin '"+S+"'") : NOP LoadPlugin(S) } else if(TYPE==1){ # AVSI Import (DEBUG) ? RT_Debug("AutoLoadPlugs: Importing AVSI '"+S+"'") : NOP Import(S) } else if(TYPE==2){ # V2.5 Built-in C plugin Loader (DEBUG) ? RT_Debug("AutoLoadPlugs: Loading v2.5 C Plugin '"+S+"'") : NOP Load_Stdcall_Plugin(S) # alias for BUILT-IN v2.5 LoadCPlugin(). } else { # V2.0 Avisynth_C.dll C plugin Loader (DEBUG) ? RT_Debug("AutoLoadPlugs: Loading v2.0 C Plugin '"+S+"'") : NOP LoadCPlugin(S) # Using Kevin Atkinson Avisynth_c.dll } } RT_FileDelete(TMPFile) } """) return Got } Code:
n=0 n=n+ AutoLoadPlugs("D:\MyPlugins\","CPP\" ,TYPE=0,debug=true) # Standard CPP n=n+ AutoLoadPlugs("D:\MyPlugins\","AVSI\",TYPE=1,debug=true) # AVSI n=n+ AutoLoadPlugs("D:\MyPlugins\","C25\" ,TYPE=2,debug=true) # V2.5 C Plugins n=n+ AutoLoadPlugs("D:\MyPlugins\","C2\" ,TYPE=3,debug=true) # V2.0 C Plugins return Colorbars.RT_Subtitle("%d Plugins loaded",n)
__________________
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; 26th August 2013 at 23:48. |
26th August 2013, 23:51 | #7 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Post #6 updated.
Added Avisynth V2.0 C Plugin loading. MUST EDIT script for your system (1st two lines of code, ie ROOT and V2_CPlugin. Debug output from Above Client script Code:
00000005 23:44:16 RT_Debug: AutoLoadPlugs: Loading CPP Plugin 'D:\MyPlugins\CPP\VagueDenoiser.dll' 00000006 23:44:16 RT_Debug: AutoLoadPlugs: Loading CPP Plugin 'D:\MyPlugins\CPP\VariableBlur.dll' 00000007 23:44:16 RT_Debug: AutoLoadPlugs: Loading CPP Plugin 'D:\MyPlugins\CPP\VerticalCleanerSSE2.dll' 00000008 23:44:16 RT_Debug: AutoLoadPlugs: Loading CPP Plugin 'D:\MyPlugins\CPP\ViewAudio.dll' 00000009 23:44:16 RT_Debug: AutoLoadPlugs: Loading CPP Plugin 'D:\MyPlugins\CPP\ViewFields.dll' 00000010 23:44:16 RT_Debug: AutoLoadPlugs: Loading CPP Plugin 'D:\MyPlugins\CPP\VqmCalc.dll' 00000011 23:44:16 RT_Debug: AutoLoadPlugs: Loading CPP Plugin 'D:\MyPlugins\CPP\VScope.dll' 00000012 23:44:16 RT_Debug: AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\AVSI\colors_rgb.avsi' 00000013 23:44:16 RT_Debug: AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\AVSI\dither.avsi' 00000014 23:44:16 RT_Debug: AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\AVSI\InitExternalPlugins.avsi' 00000015 23:44:16 RT_Debug: AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\AVSI\MCDegrain.avsi' 00000016 23:44:16 RT_Debug: AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\AVSI\mt_xxpand_multi.avsi' 00000017 23:44:16 RT_Debug: AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\AVSI\RoboLevels.avsi' 00000018 23:44:16 RT_Debug: AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\AVSI\RoboSplice.avsi' 00000019 23:44:16 RT_Debug: AutoLoadPlugs: Loading v2.5 C Plugin 'D:\MyPlugins\C25\AVSInpaint.dll' 00000020 23:44:16 RT_Debug: AutoLoadPlugs: Loading v2.5 C Plugin 'D:\MyPlugins\C25\yadif.dll' 00000021 23:44:16 RT_Debug: AutoLoadPlugs: LOADING Avisynth V2.0 C Plugin Loader(Avisynth_c.dll) 00000022 23:44:16 RT_Debug: AutoLoadPlugs: Loading v2.0 C Plugin 'D:\MyPlugins\C2\AVSCurveFlow.dll' 00000023 23:44:16 RT_Debug: AutoLoadPlugs: Loading v2.0 C Plugin 'D:\MyPlugins\C2\AVSShock.dll' 00000024 23:44:16 RT_Debug: AutoLoadPlugs: Loading v2.0 C Plugin 'D:\MyPlugins\C2\equlines.dll' 00000025 23:44:16 RT_Debug: AutoLoadPlugs: Loading v2.0 C Plugin 'D:\MyPlugins\C2\IBob.dll'
__________________
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 ??? |
27th August 2013, 04:37 | #8 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Update on previous posted script,
Can load, CPP dll, C v2.5 dll, C v2.0 dll, Import AVSI, Import AVS, all from same directory. NOTE, As Script may Load Kevin Atkinson Avisynth_c.dll, you MUST use Aviynth v2.5+ builtin Alias for LoadCPlugin, (EDIT: Thereafter) ie Load_Stdcall_Plugin() instead, as Avisynth_c.dll overrides LoadCPlugin() function for v2.0 dll loads. Also, MUST set two Global Vars at head of script to suite YOUR own system. AutoLoadPlugs.AVSI Code:
# AutoLoadPlugs.AVSI, Requires RT_Stats and GScript. Get DebugView from MS. (Google) # MUST Set Default for AutoLoadPlugs_DEFAULT_ROOT and AutoLoadPlugs_V2_CPLUGIN_LOADER for YOUR SYSTEM. # Default Root folder to YOUR Alternative Plugins Global AutoLoadPlugs_DEFAULT_ROOT="D:\MyPlugins\" # MUST set complete Path and filename to Kevin Atkinson avisynth_c.dll (for v2.0 C dll loading) Global AutoLoadPlugs_V2_CPLUGIN_LOADER="D:\MyPlugins\C2LOADER\Avisynth_c.dll" Function AutoLoadPlugs(string "Root",string "Folder",Int "Flgs",Bool "Debug",Bool "Verbose") { # https://forum.doom9.org/showthread.php?p=1641795#post1641795 # Root = main alternative plugins DIR containing FOLDERS that hold dll's # Folder, the folder name relative to Root containing dll's # Flgs, 31(1+2+4+8+16). Add together, 1=CPP DLL, 2=C v2.5 DLL, 4=C v2.0 DLL, 8=Import AVSI, 16=Import AVS. # Debug, false, true, send info to DebugView window. # Verbose, False, true gives more verbose Debug info myName="AutoLoadPlugs: " Root=Default(Root,AutoLoadPlugs_DEFAULT_ROOT) # Set your own default path Folder=default(Folder,"") # Default = Root ie FULL Path is USER SUPPLIED Flgs=Default(Flgs,1+2+4+8+16) # ALL dll + AVSI + AVS is default Debug=Default(Debug,False) Verbose=Default(Verbose,False) Assert(Flgs>=1 && Flgs <=31,"AutoLoadPlugs: FLGS 1 -> 31 ONLY") TMPFile="~AutoLoadPlugs.TMP" GSCript(""" eS=RightStr(Root,1) Path=(eS!="\" && eS!="/") ? Root+"\" : Root # Ensure End Slash if(Folder!="") { eS=RightStr(Folder,1) Folder=(eS!="\" && eS!="/") ? Folder+"\" : Folder # Ensure End Slash Path=Path + Folder # Concatenate } TestPath=LeftStr(Path,Strlen(Path)-1) # Test PATH Exist without End Slash, else Error Assert(Exist(TestPath),"AutoLoadPlugin: Path Does not exist ("+Path+")") WildCard = "*.dll|avsi|AVS" SearchString = Path + WildCard Got = RT_WriteFileList(SearchString,TMPFile) if(Got > 0) { CPP_DLL_SUCCESS=0 CV25_DLL_SUCCESS=0 CV2_DLL_SUCCESS=0 DLL_FAILED=0 AVSI_SUCCESS=0 AVS_SUCCESS=0 DLL_FAILED=0 CV2_LOADER_LOADED=0 Done=0 SS=RT_ReadTxtFromFile(TMPFile) # Read multiline list of filenames if(RT_BitTST(Flgs,2) && !RT_VarExist("GLB_V2_CPLUGIN")) { # We want to load v2.0 C dll's, get LOADER now before we cannot load anymore CPP dll's (!Exist(AutoLoadPlugs_V2_CPLUGIN_LOADER)) \ ? Assert(false,"AutoLoadPlugs: v2.0 C Plugin Loader Does NOT Exist"+Chr(10)+"("+ \ AutoLoadPlugs_V2_CPLUGIN_LOADER + ")") \ : NOP (DEBUG) ? RT_Debug(myName,"LOADING Avisynth V2.0 C Plugin Loader(Avisynth_c.dll)",false) : NOP try{ LoadPlugin(AutoLoadPlugs_V2_CPLUGIN_LOADER) # Load v2.0 C Plugin Loader Global GLB_V2_CPLUGIN=True CV2_LOADER_LOADED=CV2_LOADER_LOADED+1 } catch(err_msg) { err_msg=RT_TxtGetLine(err_msg,0) (DEBUG) ? RT_Debug(myName,"FAILED LOAD V2.0 C Plugin Loader(Avisynth_c.dll)"+Chr(10)+err_msg,False) : NOP Assert(false,myName+"FAILED LOAD V2.0 C Plugin Loader(Avisynth_c.dll)"+Chr(10)+err_msg) } } for(i=0,2) { # pass 0 = dll, pass 1 = AVSI, Pass 2 = AVS if((i==0 && RT_BitAND(Flgs,1+2+4)!=0) || (i==1 && RT_BitAND(Flgs,8)!=0) || (i==2 && RT_BitAND(Flgs,16)!=0)) { (i==0&&DEBUG&&VERBOSE) ? RT_Debug(myName,"PASS 1 ... DLL's",false) :NOP (i==1&&DEBUG&&VERBOSE) ? RT_Debug(myName,"PASS 2 ... AVSI",false) :NOP (i==2&&DEBUG&&VERBOSE) ? RT_Debug(myName,"PASS 3 ... AVS",false) :NOP for(j=0,Got-1) { S=RT_TxtGetLine(SS,j) Ext=RT_GetFileExtension(S) if(i==0) { # dll's if(RT_BitAND(Flgs,1+2+4)!=0 && Ext==".dll") { Bingo=false if(RT_BitTST(Flgs,0)) { try{ LoadPlugin(S) (DEBUG) ? RT_Debug(myName,"CPP Plugin '"+S+"' SUCCESS",false) : NOP Bingo=True CPP_DLL_SUCCESS=CPP_DLL_SUCCESS+1 } catch (err_msg) { (DEBUG && VERBOSE) ? RT_Debug(myName,S+" NOT LOADED as CPP dll",false) : NOP (DEBUG && VERBOSE) ? RT_Debug(myName,"System Message= *** "+RT_TxtGetLine(err_msg,0)+" ***",False) : NOP } } if(Bingo==False && RT_BitTST(Flgs,1)) { try{ # Alias for BUILT-IN v2.5 LoadCPlugin(which may have been overridden by Avisynth_c.dll). # Once Avisynth_c.dll loaded, MUST use Load_Stdcall_Plugin, LoadCPlugin name hijacked by Avisynth_c.dll. Load_Stdcall_Plugin(S) (DEBUG) ? RT_Debug(myName,"v2.5 C Plugin '"+S+"' SUCCESS",false) : NOP Bingo=True CV25_DLL_SUCCESS=CV25_DLL_SUCCESS+1 } catch (err_msg) { (DEBUG && VERBOSE) ? RT_Debug(myName,S+" NOT LOADED as v2.5 C dll",False) : NOP (DEBUG && VERBOSE) ? RT_Debug(myName,"System Message= *** "+RT_TxtGetLine(err_msg,0)+" ***",False) : NOP } } if(Bingo==False && RT_BitTST(Flgs,2)) { try{ LoadCPlugin(S) # Using Kevin Atkinson Avisynth_c.dll, NOTE now overrides built in LoadCPlugin(). (DEBUG) ? RT_Debug(myName,"v2.0 C Plugin '"+S+"' SUCCESS",false) : NOP Bingo=True CV2_DLL_SUCCESS=CV2_DLL_SUCCESS+1 } catch (err_msg) { (DEBUG && VERBOSE) ? RT_Debug(myName,S+" NOT LOADED as v2.0 C dll",False) : NOP (DEBUG && VERBOSE) ? RT_Debug(myName,"System Message= *** "+RT_TxtGetLine(err_msg,0)+" ***",False) : NOP } } (DEBUG && !Bingo) ? RT_Debug(myName,"DLL "+S+" *** FAILED ***",False) : NOP DLL_FAILED=(!Bingo)?DLL_FAILED+1:DLL_FAILED Done = (Bingo) ? Done + 1 : Done (DEBUG)?RT_Debug(myName,false) : NOP } } else if(i==1) { # avsi if(RT_BitTST(Flgs,3) && Ext==".AVSI") { (DEBUG) ? RT_Debug(myName,"Importing AVSI '"+S+"'",false) : NOP Import(S) Done = Done + 1 AVSI_SUCCESS=AVSI_SUCCESS+1 } } else if(i==2) { # avs if(RT_BitTST(flgs,4) && Ext==".AVS") { (DEBUG) ? RT_Debug(myName,"Importing AVS '"+S+"'",false) : NOP Import(S) Done = Done + 1 AVS_SUCCESS=AVS_SUCCESS+1 } } } } } RT_FileDelete(TMPFile) Got=Done (DEBUG) ? RT_Debug( myName,false) : NOP (DEBUG) ? RT_Debug( myName,RT_StrPad("CPP DLL Success =",23),String(CPP_DLL_SUCCESS),false) : NOP (DEBUG) ? RT_Debug( myName,RT_StrPad("C v2.5 DLL Success =",23),String(CV25_DLL_SUCCESS),false) : NOP (DEBUG) ? RT_Debug( myName,RT_StrPad("C v2.0 LOADER LOADED =",23),String(CV2_LOADER_LOADED),false) : NOP (DEBUG) ? RT_Debug( myName,RT_StrPad("C v2.0 DLL Success =",23),String(CV2_DLL_SUCCESS),false) : NOP (DEBUG) ? RT_Debug( myName,RT_StrPad("DLL FAILED =",23),String(DLL_FAILED),false) : NOP (DEBUG) ? RT_Debug( myName,RT_StrPad("AVSI Success =",23),String(AVSI_SUCCESS),false) : NOP (DEBUG) ? RT_Debug( myName,RT_StrPad("AVS Success =",23),String(AVS_SUCCESS),false) : NOP } """) return Got } Client Script: Code:
FLGS=31 # Add Together for required:- 1=CPP DLL, 2=C v2.5 DLL, 4=C v2.0 DLL, 8=AVSI Import, 16=AVS Import DEBUG=True VERBOSE=False n= AutoLoadPlugs("D:\MyPlugins\","MIX\",flgs=FLGS,debug=DEBUG,verbose=VERBOSE) return Colorbars.RT_Subtitle("%d Plugins loaded",n) Code:
00000005 06:00:04 AutoLoadPlugs: LOADING Avisynth V2.0 C Plugin Loader(Avisynth_c.dll) 00000006 06:00:04 AutoLoadPlugs: v2.0 C Plugin 'D:\MyPlugins\MIX\AVSCurveFlow.dll' LOADED 00000007 06:00:04 AutoLoadPlugs: v2.5 C Plugin 'D:\MyPlugins\MIX\AVSInpaint.dll' LOADED 00000008 06:00:04 AutoLoadPlugs: v2.0 C Plugin 'D:\MyPlugins\MIX\AVSShock.dll' LOADED 00000009 06:00:04 AutoLoadPlugs: DLL D:\MyPlugins\MIX\Dummy_Empty_File.dll *** NOT LOADED *** 00000010 06:00:04 AutoLoadPlugs: v2.0 C Plugin 'D:\MyPlugins\MIX\equlines.dll' LOADED 00000011 06:00:04 AutoLoadPlugs: v2.0 C Plugin 'D:\MyPlugins\MIX\IBob.dll' LOADED 00000012 06:00:04 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\MIX\VagueDenoiser.dll' LOADED 00000013 06:00:04 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\MIX\VariableBlur.dll' LOADED 00000014 06:00:04 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\MIX\VerticalCleanerSSE2.dll' LOADED 00000015 06:00:04 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\MIX\ViewAudio.dll' LOADED 00000016 06:00:04 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\MIX\ViewFields.dll' LOADED 00000017 06:00:04 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\MIX\VqmCalc.dll' LOADED 00000018 06:00:04 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\MIX\VScope.dll' LOADED 00000019 06:00:04 AutoLoadPlugs: v2.5 C Plugin 'D:\MyPlugins\MIX\yadif.dll' LOADED 00000020 06:00:04 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\MIX\colors_rgb.avsi' 00000021 06:00:04 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\MIX\dither.avsi' 00000022 06:00:04 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\MIX\MCDegrain.avsi' 00000023 06:00:04 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\MIX\mt_xxpand_multi.avsi' 00000024 06:00:04 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\MIX\RoboLevels.avsi' 00000025 06:00:04 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\MIX\RoboSplice.avsi' 00000026 06:00:04 AutoLoadPlugs: Importing AVS 'D:\MyPlugins\MIX\MatchFrames.avs' 00000027 06:00:04 AutoLoadPlugs: 00000028 06:00:04 AutoLoadPlugs: CPP DLL Success = 7 00000029 06:00:04 AutoLoadPlugs: C v2.5 DLL Success = 2 00000030 06:00:04 AutoLoadPlugs: C v2.0 DLL Success = 4 00000031 06:00:04 AutoLoadPlugs: DLL FAILED = 1 00000032 06:00:04 AutoLoadPlugs: AVSI Success = 6 00000033 06:00:04 AutoLoadPlugs: AVS Success = 1 EDIT: Added pass 3, so as to do AVS imports last, on their own.
__________________
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 January 2018 at 17:00. |
28th August 2013, 01:01 | #9 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Getting some odd results using above posted script.
Was working fine with ~241 autoload plugins in my plugins directory, and scanning against an additional small test directory. Decided to copy contents of plugins dir to a test dir, and scan against that. First thing I noticed was Transition.dll by Gasset, is an Avisynth v2.0 Plugin, and should not have been in my autoload plugins directory (despite an example avs file giving a CPP "LoadPlugin()" as command to load it). 2nd problem showed up with ImportUncompressedFile.dll, no idea what that is, but showing 0x7e error, dependency upon some other module. Found it, here:- http://forum.doom9.org/showthread.php?t=51227, requires LibGFL201.dll. Have now evicted from my plugins, dont even seem to have the original zip. I then cleared plugins dir, with exception of RT_Stats and GScript dll's and scanned again against the test dir. and get this alert: "LoadPlugin: too many plugins loaded already (max. 50)" from Avisynth source Plugins.cpp. Looking at source, it looks like it will also fail at 50 plugins in Autoloading plugins for default plugins dir, it just dont tell you about it. Not sure how that affects things overall, but it seems to include C dll's as well as CPP. Going back to scanning the original smaller test directory, I'm now getting an error message from MS Mplayer2.exe, "The Application or DLL D:\MyPlugins\MIX\Dummy_Empty_File.dll is not a valid Windows image. Please Check this against your installation diskette." That is not a surprising message as the offending file is a zero length file, what is curious, is that it does not occur when my autoload plugins dir is full of dll's, and testing against same dir and file. Looks like something in plugins dir prevents mplayer2 from producing an alert (alert does not terminate the script). (EDIT: May be 50 limit that inhibits MPlayer2 alert) Have extended messages shown in DebugView when Verbose == True, shows returned system messages, might want to test against a copy of your plugins dir to see what plugs fail, probably have to do it in batches of less than 50. Previous Script updated. EDIT: Here Small sample of current VERBOSE debug output: Code:
00000005 1.49089622 AutoLoadPlugs: LOADING Avisynth V2.0 C Plugin Loader(Avisynth_c.dll) 00000006 1.49421430 AutoLoadPlugs: PASS 1 ... DLL's 00000042 1.62006152 AutoLoadPlugs: 00000043 1.62543011 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\TEST\AviShader.dll' SUCCESS 00000044 1.62908924 AutoLoadPlugs: 00000045 1.63216507 AutoLoadPlugs: D:\MyPlugins\TEST\AVSCurveFlow.dll NOT LOADED as CPP dll 00000046 1.63277555 AutoLoadPlugs: System Message= *** Plugin D:\MyPlugins\TEST\AVSCurveFlow.dll is not an AviSynth 2.6 or 2.5 plugin. *** 00000047 1.63502622 AutoLoadPlugs: D:\MyPlugins\TEST\AVSCurveFlow.dll NOT LOADED as v2.5 C dll 00000048 1.63568628 AutoLoadPlugs: System Message= *** Avisynth 2 C Plugin 'D:\MyPlugins\TEST\AVSCurveFlow.dll' has wrong calling convention! Must be stdcall. *** 00000049 1.63692677 AutoLoadPlugs: v2.0 C Plugin 'D:\MyPlugins\TEST\AVSCurveFlow.dll' SUCCESS 00000050 1.63962305 AutoLoadPlugs: 00000051 1.64302754 AutoLoadPlugs: D:\MyPlugins\TEST\AVSInpaint.dll NOT LOADED as CPP dll 00000052 1.64362657 AutoLoadPlugs: System Message= *** Plugin D:\MyPlugins\TEST\AVSInpaint.dll is not an AviSynth 2.6 or 2.5 plugin. *** 00000053 1.64589250 AutoLoadPlugs: v2.5 C Plugin 'D:\MyPlugins\TEST\AVSInpaint.dll' SUCCESS 00000054 1.64907241 AutoLoadPlugs: 00000055 1.65251911 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\TEST\avsmon25a.dll' SUCCESS 00000056 1.65619075 AutoLoadPlugs: 00000057 1.65930426 AutoLoadPlugs: D:\MyPlugins\TEST\AVSShock.dll NOT LOADED as CPP dll 00000058 1.65992415 AutoLoadPlugs: System Message= *** Plugin D:\MyPlugins\TEST\AVSShock.dll is not an AviSynth 2.6 or 2.5 plugin. *** 00000059 1.66215599 AutoLoadPlugs: D:\MyPlugins\TEST\AVSShock.dll NOT LOADED as v2.5 C dll 00000060 1.66277909 AutoLoadPlugs: System Message= *** Avisynth 2 C Plugin 'D:\MyPlugins\TEST\AVSShock.dll' has wrong calling convention! Must be stdcall. *** 00000061 1.66403210 AutoLoadPlugs: v2.0 C Plugin 'D:\MyPlugins\TEST\AVSShock.dll' SUCCESS 00000062 1.66675365 AutoLoadPlugs: 00000064 1.67002130 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\TEST\avstimer.dll' SUCCESS 00000065 1.67427373 AutoLoadPlugs: 00000066 1.67788887 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\TEST\avstp.dll' SUCCESS 00000067 1.68155730 AutoLoadPlugs: 00000068 1.68439424 AutoLoadPlugs: CPP Plugin 'D:\MyPlugins\TEST\aWarpSharp.dll' SUCCESS 00000069 1.68809128 AutoLoadPlugs: 00000107 1.82290232 AutoLoadPlugs: 00000108 1.82628632 AutoLoadPlugs: D:\MyPlugins\TEST\ColourMask_11Sep05.dll NOT LOADED as CPP dll 00000109 1.82694519 AutoLoadPlugs: System Message= *** LoadPlugin: too many plugins loaded already (max. 50) *** 00000110 1.82965374 AutoLoadPlugs: D:\MyPlugins\TEST\ColourMask_11Sep05.dll NOT LOADED as v2.5 C dll 00000111 1.83035314 AutoLoadPlugs: System Message= *** Not An Avisynth 2 C Plugin: D:\MyPlugins\TEST\ColourMask_11Sep05.dll *** 00000112 1.83172953 AutoLoadPlugs: D:\MyPlugins\TEST\ColourMask_11Sep05.dll NOT LOADED as v2.0 C dll 00000113 1.83243144 AutoLoadPlugs: System Message= *** Not An Avisynth 2 C Plugin: D:\MyPlugins\TEST\ColourMask_11Sep05.dll *** 00000114 1.83302999 AutoLoadPlugs: DLL D:\MyPlugins\TEST\ColourMask_11Sep05.dll *** FAILED *** 00000695 2.67637610 AutoLoadPlugs: 00000696 2.68003941 AutoLoadPlugs: D:\MyPlugins\TEST\importuncompressedfile.dll NOT LOADED as CPP dll 00000697 2.68073988 AutoLoadPlugs: System Message= *** LoadPlugin: unable to load "D:\MyPlugins\TEST\importuncompressedfile.dll", error=0x7e *** 00000698 2.68345881 AutoLoadPlugs: D:\MyPlugins\TEST\importuncompressedfile.dll NOT LOADED as v2.5 C dll 00000699 2.68415689 AutoLoadPlugs: System Message= *** Unable to load C Plugin: "D:\MyPlugins\TEST\importuncompressedfile.dll", error=0x7e *** 00000700 2.68633986 AutoLoadPlugs: D:\MyPlugins\TEST\importuncompressedfile.dll NOT LOADED as v2.0 C dll 00000701 2.68734789 AutoLoadPlugs: System Message= *** Unable to load C Plugin: D:\MyPlugins\TEST\importuncompressedfile.dll *** 00000702 2.68781996 AutoLoadPlugs: DLL D:\MyPlugins\TEST\importuncompressedfile.dll *** FAILED *** 00001619 4.04000187 AutoLoadPlugs: 00001620 4.04252243 AutoLoadPlugs: PASS 2 ... AVSI 00001621 4.05713558 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\TEST\colors_rgb.avsi' 00001622 4.08931303 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\TEST\dither.avsi' 00001623 4.13684130 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\TEST\MCDegrain.avsi' 00001624 4.14374447 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\TEST\mt_xxpand_multi.avsi' 00001625 4.16363525 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\TEST\RoboLevels.avsi' 00001626 4.17112350 AutoLoadPlugs: Importing AVSI 'D:\MyPlugins\TEST\RoboSplice.avsi' 00001627 4.20354271 AutoLoadPlugs: PASS 3 ... AVS 00001628 4.24828053 AutoLoadPlugs: Importing AVS 'D:\MyPlugins\TEST\MatchFrames.avs' 00001629 4.29655933 AutoLoadPlugs: 00001630 4.29818916 AutoLoadPlugs: CPP DLL Success = 42 00001631 4.29966164 AutoLoadPlugs: C v2.5 DLL Success = 2 00001632 4.30101299 AutoLoadPlugs: C v2.0 LOADER LOADED = 1 00001633 4.30237246 AutoLoadPlugs: C v2.0 DLL Success = 4 00001634 4.30371428 AutoLoadPlugs: DLL FAILED = 187 00001635 4.30507469 AutoLoadPlugs: AVSI Success = 6 00001636 4.30632734 AutoLoadPlugs: AVS Success = 1
__________________
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 August 2013 at 01:40. |
28th August 2013, 02:31 | #10 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Yes you may only have 50 active plugins at one time, and if the plugins have diverse dependencies you may not even be able to have that many before you exceed the process mapped .dll limit.
Autoloading plugin's uses a different approach when it loads the plugin. It let's the plugin do any AddFunction calls it wants then unloads the .dll and flags those functions for reload on use. See ScriptEnvironment::LoadPluginsMatching() in Avisynth.cpp for the details. |
28th August 2013, 02:38 | #11 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Thank you for your answer Mr B, thought it was something like that.
Makes it sound even more like having a big Auto Load plugs dir, is not such a bad idea.
__________________
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 ??? |
28th August 2013, 21:05 | #13 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
You could (EDIT: perhaps) within the auto loaded plugins dir AutoLoadPlugs.AVSI, load eg CPU dependent plugs,
by appending a line calling the auto loader, I think Stickboy did a plug to GetCPU type, although I'm not sure how you would ensure CPU dll would be loaded first (maybe Avisynth does two pass, or just as it comes across dll/avsi), perhaps would need LoadPlugin on CPU dll first before Autoload call to get CPU dependent dll's. EDIT: Perhaps v2.6 is now ready for a greater plugin limit, memory constraints are now somewhat relaxed since inception of Avisynth.
__________________
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 August 2013 at 21:15. |
28th August 2013, 22:13 | #14 | Link |
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
|
How so? The 2GB address space limit for 32 Bit apps (or 4GB with some tweaking on 64 Bit systems) has been around for many years. What makes the memory constraints more relaxed?
__________________
Groucho's Avisynth Stuff |
29th August 2013, 01:25 | #15 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Sorry, I did try to answer earlier (mobile in pub) but could not.
what I meant was that back in 2002 (or there abouts) few people could dream about 2GB, I could easily spare a 100MB or so extra overhead, I dont use MT stuff and would like ability to choose what I want available, 50 plug limit seems restrictive. For myself, My old m/c blew up and I bought a Core Duo duel core for £10 (well cheap, car boot, price of 3 beers) (EDIT: 3GB, refuse to add another GB {which I got spare} and lose some, 6 hard drives (only came with one HD for $10), Gb network + more, but good £10 worth) would love to have what you have got, but dont. Perhaps I should have said, memory price constraints, instead. of memory constraints. kiss + kiss. EDIT: also got permanently available, at least two 3GHz single cores (used for any rendering) + about 2 or 3 laptops, and about 6, 3Ghz single core (but usually in pieces), gotta put them all together one day.
__________________
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; 29th August 2013 at 03:06. |
|
|