Log in

View Full Version : What dictates AviSynth+ plugin compatibility?


brucethemoose
20th September 2016, 21:33
Their site says existing AviSynth scripts and plugins should work... but not all do.


As an example, I'm trying to get AnimeIVTC working. TMM is one of its old core dependancies, found here:

http://avisynth.nl/index.php/TMM

But when I try to load the .dll with AviSynth+, I get the error "%1 is not a valid Win32 application". And interestingly, when I use VapourSynth's "LoadPlugin()", I also get an error. Both work for other plugins in that exact same directory.



But it's clearly a working plugin, as its been an AnimeIVTC dependency for ages... So what is it that makes newer forks unable to load old plugins like that, and is there any way around it?

Groucho2004
20th September 2016, 22:11
But when I try to load the .dll with AviSynth+, I get the error "%1 is not a valid Win32 application".You have to elaborate on "try to load". What software did you use to load the script? This particular error is usually related to 32/64 bit mismatches.

OK, I just saw this post:
And I'm sitting here, staring right at "nnedi2.dll" inside my plugins64+ folder.
I'm pretty sure that there is no 64 bit version of nnedi2 so you're trying to load 32 bit plugins with 64 bit Avisynth.

brucethemoose
20th September 2016, 23:25
You have to elaborate on "try to load". What software did you use to load the script? This particular error is usually related to 32/64 bit mismatches.

OK, I just saw this post:

I'm pretty sure that there is no 64 bit version of nnedi2 so you're trying to load 32 bit plugins with 64 bit Avisynth.


Right, 32 bit vs 64 bit facepalm.

There's no way to load 32 bit plugins in AviSynth+ right? Sorry, I'm new here. :D

MWilson
20th September 2016, 23:28
IIRC, you can. Just place it in plugins+ or plugins. I haven't used it in a while so not 100% certain.

Groucho2004
20th September 2016, 23:29
There's no way to load 32 bit plugins in AviSynth+ right? Sorry, I'm new here. :D
Avisynth+ provides both 32 and 64 bit builds. Assuming that you did not change the default directories, you have to put your 32 bit plugins into "plugins+", not "plugins64+".
However, the error you got indicates that you used a software that loads 64 bit Avisynth. So, once more, what software do you use to load your script?

Groucho2004
20th September 2016, 23:35
Their site says existing AviSynth scripts and plugins should work... but not all do.
All 2.5 and 2.6 C/C++ plugins should work. Only ancient 2.0 C/C++ plugs are not supported by AVS+.

brucethemoose
21st September 2016, 01:06
Avisynth+ provides both 32 and 64 bit builds. Assuming that you did not change the default directories, you have to put your 32 bit plugins into "plugins+", not "plugins64+".
However, the error you got indicates that you used a software that loads 64 bit Avisynth. So, once more, what software do you use to load your script?

StaxRip's last test build and AVSpmod. Also Stax/VapourSynth Editor when trying to load it in VS (which is the goal). I use avs.LoadPlugin() in VapourSynth.


I guess what I'm really asking is how to load 32 bit AviSynth plugins in 64-bit VapourSynth, if thats even possible.

StainlessS
21st September 2016, 01:17
I guess what I'm really asking is how to load 32 bit AviSynth plugins in 64-bit VapourSynth, if thats even possible.


There lies the rub, not sure that it is possible. (I'm guessin that is why the recent spate of 64 bit plugs is required)

brucethemoose
21st September 2016, 01:24
There lies the rub, not sure that it is possible.

Yeah, figured that was asking too much. Guess I'll have to do 2 encodes :/.


One more question while I'm here... how do I tell if a plugin is 32 bit, 64 bit, or both?

Take this plugin, for example:

http://avisynth.nl/index.php/ReduceFlicker

32-bit AviSynth is refusing to load any of the 9 versions I tried. I assume that means it's a 64-bit only plugin (which seems bizarre, as it's a requirement of AnimeIVTC which relies on 32 bit plugins, but that's another issue...)

The page and the readme say nothing about that. Is there any other way to tell, or do I just have to attempt to import plugins and see what happens?

StainlessS
21st September 2016, 01:28
brucethemoose, sorry, bit pissed, no idea. But sure others will advise.
(There are still some accredited persons of worth on-site, lest, thats what Ive been told).

If you want something reliable, then, lie back and wait for it to happen, if you want to be at cutting edge, then you have to wait, and/or
be a part of the development, most(including me) are happy to wait to see what the clever guys come up with. (I aint one of them).

raffriff42
21st September 2016, 03:16
Guess I'll have to do 2 encodes :/Why??

how do I tell if a plugin is 32 bit, 64 bit, or both?Check the documentation which usually accompanies the filter. Assume 32-bit unless stated otherwise. A filter is always (in my experience) 32-bit unless the ZIP or DLL file has "64" in the name.

32-bit AviSynth is refusing to load any of the 9 versions I tried.What was the error message? Never mind, I'll try it:LoadPlugin: unable to load "<x>.dll", Module not found. Install missing library!This is not a 32/64 bit issue. Let's go to the documentation:ReduceFlicker.htm
...All three versions of the plugin are dynamically linked and require msvcr71.dll (for Microsoft specific stuff) and AvsRecursion.dll (http://www.avsrecursion.de.tf/) (for recursion within Avisynth). If none of the above dlls works, probably one of these two libraries is missing.Well where do we get this "msvcr71.dll"? Helpfully, the link is given in the Wiki page:...requires the Microsoft Visual C++ 2010 Redistributable Package (x86) (http://www.microsoft.com/en-us/download/details.aspx?id=8328) to be installed.(BTW, did you see the "x86"? That means it's 32-bit!)

So I installed the linked Redistributable Package (actually re-installed it) and got the same error message. Okay, this filter is being more difficult than usual. Microsoft Dependency Walker (http://www.dependencywalker.com/) tells me "ReduceFlickerSSE3.dll" depends on AvsRecursion.dll (EDIT on re-reading the docs, I guess I should have known that; I thought it was saying the DLL was only needed if my script had recursion). The link is dead, but fortunately the Internet Archive has mirrored it (http://wayback.archive.org/web/20150708165546/http://www.avsrecursion.de.tf/). Unzipping the (4KB!) AvsRecursion.zip into the <install>\bin\VS2010 folder, and...success! No error message!

StainlessS
21st September 2016, 03:29
RaffRiff42, you are a star, so much more nice than I.
Hope brucethemoose appreciates that.
(By the way, I think msvcr71.dll comes from VS toolkit 2003, not VS 2010)

qyot27
21st September 2016, 03:35
One more question while I'm here... how do I tell if a plugin is 32 bit, 64 bit, or both?
If you have the GNU file tool (included with msys2, or the Subsystem for Linux/Bash for Windows), then you can do so on the command line:

file pluginname.dll
And the output will tell you whether pluginname.dll is for 32-bit or 64-bit Windows. Like so:

32-bit:
C:\Program Files\AviSynth+\plugins>file ffms2.dll
ffms2.dll: PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB), for MS Windows

64-bit:
avisynth+_r2216-g31d3775-20160906\64bit>file ConvertStacked.dll
ConvertStacked.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows


It also accepts globbing, so you can do
file *
and it'll detect everything in the directory:
avisynth+_r2216-g31d3775-20160906\64bit>file *
AviSynth.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
ConvertStacked.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
DevIL.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows
DirectShowSource.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
ImageSeq.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
Shibatch.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
TimeStretch.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
VDubFilter.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
dev: directory

StainlessS
21st September 2016, 03:51
For anybody that does need msvcr71.dll (vs toolkit 2003, and compatriotes), see here:- http://forum.doom9.org/showthread.php?t=166492

EDIT: Here, VS Toolkit 2003, runtimes, (+ VS 2002):- http://www.mediafire.com/download/1220u8g1drmubi8/MSVCR71_70_Runtimes.rar

brucethemoose
21st September 2016, 04:06
Why??

Check the documentation which usually accompanies the filter. Assume 32-bit unless stated otherwise. A filter is always (in my experience) 32-bit unless the ZIP or DLL file has "64" in the name.

What was the error message? Never mind, I'll try it:This is not a 32/64 bit issue. Let's go to the documentation:Well where do we get this "msvcr71.dll"? Helpfully, the link is given in the Wiki page:(BTW, did you see the "x86"? That means it's 32-bit!)

So I installed the linked Redistributable Package (actually re-installed it) and got the same error message. Okay, this filter is being more difficult than usual. Microsoft Dependency Walker (http://www.dependencywalker.com/) tells me "ReduceFlickerSSE3.dll" depends on AvsRecursion.dll (EDIT on re-reading the docs, I guess I should have known that; I thought it was saying the DLL was only needed if my script had recursion). The link is dead, but fortunately the Internet Archive has mirrored it (http://wayback.archive.org/web/20150708165546/http://www.avsrecursion.de.tf/). Unzipping the (4KB!) AvsRecursion.zip into the <install>\bin\VS2010 folder, and...success! No error message!

I installed an re-installed the VC++ libraries, but missed the other dependency in the docs, thanks.

If you have the GNU file tool (included with msys2, or the Subsystem for Linux/Bash for Windows), then you can do so on the command line:

file pluginname.dll
And the output will tell you whether pluginname.dll is for 32-bit or 64-bit Windows. Like so:

32-bit:
C:\Program Files\AviSynth+\plugins>file ffms2.dll
ffms2.dll: PE32 executable (DLL) (console) Intel 80386 (stripped to external PDB), for MS Windows

64-bit:
avisynth+_r2216-g31d3775-20160906\64bit>file ConvertStacked.dll
ConvertStacked.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows


It also accepts globbing, so you can do
file *
and it'll detect everything in the directory:
avisynth+_r2216-g31d3775-20160906\64bit>file *
AviSynth.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
ConvertStacked.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
DevIL.dll: PE32+ executable (DLL) (GUI) x86-64, for MS Windows
DirectShowSource.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
ImageSeq.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
Shibatch.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
TimeStretch.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
VDubFilter.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows
dev: directory

I'll use that in the future, thanks.

Groucho2004
21st September 2016, 04:29
One more question while I'm here... how do I tell if a plugin is 32 bit, 64 bit, or both?
The easiest way to check your Avisynth install, if all plugins (32/64 bit) are in the correct directories, missing dependencies, etc. is to use AVSMeter with the switch "-avsinfo".

raffriff42
21st September 2016, 04:56
Groucho2004, I've been meaning to get AVSMeter so I can knowledgeably recommend it, as it seems like a very worthwhile tool, but haven't actually needed it as of yet, as I find myself solving this kind of problem very quickly by hand. So, what I'm saying is, I'm not ignoring AVSMeter on purpose.

StainlessS
21st September 2016, 05:30
Raff, Grouchy has spent quite some time on AvsMeter, there is nothing to compare with it, it does what it says on the tin, get it.
(apart from the dependencies thing, is real handy for FPS timings, memory usage etc). Mucho recommended.

Danke sehr G2K4.

brucethemoose
21st September 2016, 08:58
Thanks for suggestion AVSmeter.

Yeah, figured that was asking too much. Guess I'll have to do 2 encodes :/.


Why??


Just to answer that, there's an AviSynth IVTC script I found that I simply can't replicate in VapourSynth. I tried porting it, but I'm new at this and my script is not giving me good results.