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 19th October 2019, 13:29   #1  |  Link
KreuzBlick
Registered User
 
Join Date: Jun 2012
Location: Germany
Posts: 20
Alternate use of Avisynth scripts with 32bit and 64bit

Hi,

today I have a question about the alternate use of Avisynth scripts with 32bit and 64bit, for example when I use the corresponding variants of Virtualdub2 or MeGUI. Depending on bit depth, I have to load other plugins or use different instructions. So far, I do that with a Boolean variable

Code:
is64bit
which I set either true or false. I call my instructions with a kind of construction like

Code:
is64bit? Eval ("""
              #Do everything with 64bit
"""): Eval ("""
              #Do everything with 32bit
""")
My question is whether there is a function that automatically detects what kind of operating system is present.

Maybe I see it too complicated and there is a much simpler solution of my problem.
KreuzBlick is offline   Reply With Quote
Old 19th October 2019, 14:27   #2  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
There's the SysInfo plugin https://forum.doom9.org/showthread.php?t=176131 which can automate your switch.

Code:
int SI_ProcessBitness
Returns the bitness of the current process (64 or 32)
Edit:
Maybe Avsinit is also helpfull for auto-loading different dlls / scripts https://forum.doom9.org/showthread.php?t=176749
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 19th October 2019, 19:48   #3  |  Link
KreuzBlick
Registered User
 
Join Date: Jun 2012
Location: Germany
Posts: 20
Thank you for that information. I have looked at the linked posts and they indeed give an indication that the determination of "bitness" in Avisynth should be possible.
However, I have not found a way to derive from it a function that I can use directly in my script.
KreuzBlick is offline   Reply With Quote
Old 19th October 2019, 20:07   #4  |  Link
ChaosKing
Registered User
 
Join Date: Dec 2005
Location: Germany
Posts: 1,795
The download page seems to be currently offline, so I can't test it myself. But you can do it without a plugin

Code:
version()
subtitle(String(is64bit()))

function is64bit()
{
      FindStr(VersionString, "x86_64") != 0
}
it show true in 64 bit avisynth+ and false in 32bit
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth
VapourSynth Portable FATPACK || VapourSynth Database
ChaosKing is offline   Reply With Quote
Old 19th October 2019, 22:39   #5  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Alternative, using Groucho2004 SysInfo plugin.
Code:
Function is64bit() { return SI_ProcessBitness==64 }
Untested

EDIT: I'll add it to avsInit.avsi, also IsXP()
EDIT: Added.
__________________
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; 20th October 2019 at 05:37.
StainlessS is offline   Reply With Quote
Old 20th October 2019, 09:41   #6  |  Link
KreuzBlick
Registered User
 
Join Date: Jun 2012
Location: Germany
Posts: 20
I have tested both versions in my computing environment.

When I drag the script from Post #4 to Virtualdub32 or Virtualdub64, it behaves as expected.

If I replace the function by the one from the current avsInit.avsi, then my result in 32bit is correct, but with Virtualdub64 the following error message comes up:

"Avisynth open failure: 'I don't know, what 'SystemInfoExists' means'."

In any case, my problem is solved, my handling of scripts in 32- and 64-bit environments has become much easier.

Thanks to ChaosKing and StainlessS for the great help!
KreuzBlick is offline   Reply With Quote
Old 20th October 2019, 14:58   #7  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
The one in post #5 should work [req SysInfo], the one in AvsInit depends upon SysInfo RT_Stats and is not intended to be extracted from AvsInit [as it also depends upon a script function SystemInfoExists too].

If you intend using avs standard with GScript and avs+, then AvsInit is the only game in town [Complete Script].

EDIT: ChaosKing post has no requirements [other than that the Avisynth Version strings remain fairly static].
__________________
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; 20th October 2019 at 15:14.
StainlessS is offline   Reply With Quote
Reply

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 20:24.


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