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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 7th February 2019, 21:06   #1  |  Link
silverwing
Registered User
 
Join Date: Nov 2017
Location: Russia, Nizhny Novgorod
Posts: 25
One avisynth script for different bitness (64 and 32). How?

Hi, All!

Two Avisynth+ (and two MEGUI, respectively) are installed on my system: 64 bit and 32 bit.
At the moment, I am making two scripts depending on the bitness of avisynth, because the DLLs are different. Both scripts perform the same task.
Here is an example:

(32 bit)
Code:
...
LoadPlugin ("D:\Megui_X86\tools\avisynth_plugin\mvtools2.dll")
... etc
(64 bit)
Code:
...
LoadPlugin ("D:\Megui_X64\tools\avisynth_plugin\mvtools2.dll")
... etc
I want a strange one: make one universal avisynth script that will work in both cases (32 bit and 64 bit).
Something like this (IMHO, GScipt can do if-else):
Code:
if (avisynth_bitness == 64) 
   PluginPath = "D:\Megui_X64\tools\avisynth_plugin\"
else
   PluginPath = "D:\Megui_X86\tools\avisynth_plugin\"
LoadPlugin($PluginPath + "mvtools2.dll")
Is it possible like that? If possible, please help with an example or give a specific link where you can read about it.

Thank you for attention.
(Sorry for my bad English)
silverwing is offline   Reply With Quote
Old 7th February 2019, 21:18   #2  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,384
http://avisynth.nl/index.php/Interna...GetProcessInfo
sneaker_ger is offline   Reply With Quote
Old 7th February 2019, 23:09   #3  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 874
This should work

Code:
version()
PluginPath = (GetProcessInfo == 64) ? "D:\Megui_X64\tools\avisynth_plugin\" : "D:\Megui_X86\tools\avisynth_plugin\"
subtitle(PluginPath)
ChaosKing is offline   Reply With Quote
Old 8th February 2019, 02:44   #4  |  Link
silverwing
Registered User
 
Join Date: Nov 2017
Location: Russia, Nizhny Novgorod
Posts: 25
sneaker_ger, ChaosKing, Thank you very much, colleagues!
So. Here's what I got.
Code:
PluginPath = (GetProcessInfo() == 64) ? "D:\Megui_X64\tools\avisynth_plugin\" : "D:\Megui_X86\tools\avisynth_plugin\"
...
LoadPlugin(PluginPath + "mvtools2.dll")
And it works (checked on 32-bit and 64-bit avisynth+)! Thanks again.

P.S. There is a nuance, of course. Sometime in the future, on a 128-bit Windows system, this focus on 128-bit avisynth++ will not work.
It will be necessary to write something like:
AvsBitness = GetProcessInfo()
if (AvsBitness == 128) {
PluginPath = "D:\Megui_X128\tools\avisynth_plugin"
}
else if (AvsBitness == 64) {
PluginPath = "D:\Megui_X64\tools\avisynth_plugin"
}
else {
PluginPath = "D:\Megui_X32\tools\avisynth_plugin"
}
silverwing is offline   Reply With Quote
Old 8th February 2019, 04:24   #5  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 6,832
If you use Groucho2004 "Universal Avisynth Installer" :- https://forum.doom9.org/showthread.php?t=172124
You can install both x86 and x64 Avs+, and with the appropriate mvtools2.dll in each of the autoload plugin directories, then there would be no problem (ie you dont need to load it).
Dont know if Grouchy will still be around when AVS+ x128 will be unveiled [might have moved on from D9, or be "as dead as a doornail", would be a nuisance either way.].
__________________
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 ???
StainlessS is offline   Reply With Quote
Old 8th February 2019, 05:19   #6  |  Link
silverwing
Registered User
 
Join Date: Nov 2017
Location: Russia, Nizhny Novgorod
Posts: 25
StainlessS

Yes thank you.
I read the topic about "Universal Avisynth Installer".
But this does not quite suit me for several reasons.

1. I just need to deploy from my USB flash one of the archives with MeGUI (32-bit or 64-bit - depending on the system bitness) on any accessible computer with Windows 7 (8, 10). And get started.

2. The account on computer may not have administrative privileges to install avisynth. In the portable MeGUI framework, avisynth is included with this framework. You do not need to install anything - you just need to unpack the archive in any available place. And get started.

3. MeGUI can update avisynth (as part of the framework) automatically or manually with two or three mouse clicks. Straight from the MeGUI.

This is not an advertisement of MeGUI, it is the harsh truth of common man's life in Russia - rapid deployment and launch while a super-powerful super-multi-core computer is available.

P.S. About hypothetical AVS + x128 (on Windows x128). As one of Hemingway's heroes (Spanish) said, "Quien sabe?". I won’t be surprised if it happens in 10 years, for example. I really hope that in those not very distant years, StainlessS and Groucho2004 will be alive and full of energy.

Last edited by silverwing; 8th February 2019 at 05:33.
silverwing is offline   Reply With Quote
Old 8th February 2019, 09:55   #7  |  Link
Groucho2004
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,288
Quote:
Originally Posted by StainlessS View Post
Dont know if Grouchy will still be around when AVS+ x128 will be unveiled [might have moved on from D9, or be "as dead as a doornail", would be a nuisance either way.].
Most likely humanity will have extinguished itself or have moved to other planets before Avisynth 128 sees the light of day. Either way, I'll definitely be pushing daisies by then.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 12th February 2019 at 20:14.
Groucho2004 is offline   Reply With Quote
Reply

Tags
avisynth bitness

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:01.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.