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 April 2014, 18:32   #1  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
Easily switching Avisynth versions

OK, since you are all so clever...

Is there a way for me to have 32-bit and 64-bit Avisynth available and an easy way to switch between them? I am on win8 64 bit.

Last edited by Guest; 8th April 2014 at 16:59.
Guest is offline   Reply With Quote
Old 7th April 2014, 21:41   #2  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,054
Quote:
Originally Posted by neuron2 View Post
Is there a way for me to have 32-bit and 64-bit Avisynth available and an easy way to switch between them? I am on win8 64 bit.
The easiest way would be a batch file that replaces avisynth.dll and devil.dll.
If you are using auto-load, you'll also have to have 2 directories, one for 32 Bit and one for 64 Bit plugins and adjust the registry entry for the auto-load directory (this can also be done with the batch file).
Don't use the system32/syswow64 directories for the avisynth/devil DLLs, use a directory to which your PATH environment variable points.

Last edited by Groucho2004; 26th November 2018 at 17:37.
Groucho2004 is offline   Reply With Quote
Old 8th April 2014, 01:29   #3  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
Thank you!
Guest is offline   Reply With Quote
Old 8th April 2014, 10:45   #4  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,054
Quote:
Originally Posted by Groucho2004 View Post
The easiest way would be a batch file that replaces avisynth.dll and devil.dll.
If you are using auto-load, you'll also have to have 2 directories, one for 32 Bit and one for 64 Bit plugins and adjust the registry entry for the auto-load directory (this can also be done with the batch file).
Don't use the system32/syswow64 directories for the avisynth/devil DLLs, use a directory to which your PATH environment variable points.
Here's an example for those not so familiar with batch files:

Code:
@echo off
SET x86=e:\avisynth_src\x86
SET x64=e:\avisynth_src\x64
SET PlugDir_x86=e:\\avisynth_src\\x86\\plugins
SET PlugDir_x64=e:\\avisynth_src\\x64\\plugins
SET TargetDir=e:\apps\div

if "%1" == "32" (
  copy/y "%x86%\avisynth.dll" "%TargetDir%"
  copy/y "%x86%\system\devil.dll" "%TargetDir%"

  echo REGEDIT4 > "%TEMP%\$plugins$.reg"
  echo [HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth] >> "%TEMP%\$plugins$.reg"
  echo "plugindir2_5"="%PlugDir_x86%" >> "%TEMP%\$plugins$.reg"
  start/wait regedit -s "%TEMP%\$plugins$.reg"
  del "%TEMP%\$plugins$.reg" > nul
)

if "%1" == "64" (
  copy/y "%x64%\avisynth.dll" "%TargetDir%"
  copy/y "%x64%\system\devil.dll" "%TargetDir%"

  echo REGEDIT4 > "%TEMP%\$plugins$.reg"
  echo [HKEY_LOCAL_MACHINE\SOFTWARE\Avisynth] >> "%TEMP%\$plugins$.reg"
  echo "plugindir2_5"="%PlugDir_x64%" >> "%TEMP%\$plugins$.reg"
  start/wait regedit -s "%TEMP%\$plugins$.reg"
  del "%TEMP%\$plugins$.reg" > nul
)
The example assumes that you have downloaded the AVS+ 32 bit and 64 bit binaries from here, copied the structure to "e:\avisynth_src" and that the directory "e:\apps\div" is part of your "PATH" environment variable. You can then call the batch file with the parameters "32" or "64". Adjust the directories or add another Avisynth version as needed.
Finally, import this reg file.

Last edited by Groucho2004; 9th April 2014 at 10:14.
Groucho2004 is offline   Reply With Quote
Old 8th April 2014, 13:16   #5  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
Very helpful! Thank you.
Guest is offline   Reply With Quote
Old 8th April 2014, 15:16   #6  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
I tried to get it working but I have an issue. Here is what I did:

1. Started with a working 32-bit 2.5.8 install. The plugins directory is c:\Program File (x86)\Avisynth 2.5\plugins and it is empty because I never want to auto load. I assume the registry points to this.

1. Made a new directory d:\Avisynth_DLL and moved avisynth.dll and devil.dll into there. I added this directory to my path. I am still able to successfully run scripts that load my 32-bit dgdecodeim.dll in 32-bit virtual dub.

2. I replace avisynth.dll and devil.dll with the AVS+ 32-bit ones. Everything still works.

3. Now I replace avisynth.dll and devil.dll with the AVS+ 64-bit ones. I change my script to load my 64-bit dgdecodeim.dll. Now, I load the script into 64-bit VirtualDub. I get an AVI Filter Import error: (Unknown)(80040154).

Any ideas how to fix that? Maybe it has to do with the plugins dir. I am trying to avoid having to change the registry.

Last edited by Guest; 8th April 2014 at 15:29.
Guest is offline   Reply With Quote
Old 8th April 2014, 15:33   #7  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,054
Quote:
Originally Posted by neuron2 View Post
Any ideas how to fix that? Maybe it has to do with the plugins dir. I am trying to avoid having to change the registry.
Are there still 32 bit DLLs in the plugin dir? If so, that's your problem.

Edit: Sorry, I just saw that your plugin dir is empty. What happens when you run the script with 64 Bit AVSMeter?

Last edited by Groucho2004; 8th April 2014 at 15:36.
Groucho2004 is offline   Reply With Quote
Old 8th April 2014, 15:33   #8  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
The plugin dir is empty as I said.

Whoa. Even a script with just Version() gives the same error!
Guest is offline   Reply With Quote
Old 8th April 2014, 15:39   #9  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,054
Also, have a look at this post. If you installed AVS+ before there may be some 32 Bit DLLs somewhere. Also, did you remove the 32 Bit avisynth.dll and devil.dll from syswow64?

Last edited by Groucho2004; 8th April 2014 at 15:41.
Groucho2004 is offline   Reply With Quote
Old 8th April 2014, 15:46   #10  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
I never installed AVS+. Yes I removed the DLLs.

The registry location shown in your linked post do not match mine. Mine is:

...\wow6432node\Avisynth 2.5\plugins

Should I try to make another entry without the wow6432node in the path?

Seems wrong, though, because AVS+ 32-bit is working.
Guest is offline   Reply With Quote
Old 8th April 2014, 15:52   #11  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,054
Quote:
Originally Posted by neuron2 View Post
The registry location shown in your linked post do not match mine. Mine is:

...\wow6432node\Avisynth 2.5\plugins
Never seen that before, probably because I always install manually. Best bet would be to delete all "Avisynth 2.5\plugins" pointers in the registry.
Groucho2004 is offline   Reply With Quote
Old 8th April 2014, 16:01   #12  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
That didn't help. Am I maybe missing some registration or something? It feels like it is not even trying to load the avisynth.dll in 64 bit mode.

I will try to install the reg stuff you gave earlier.

Last edited by Guest; 8th April 2014 at 16:05.
Guest is offline   Reply With Quote
Old 8th April 2014, 16:07   #13  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
I'm missing some of those. Do you have a reg file I can import please?
Guest is offline   Reply With Quote
Old 8th April 2014, 16:07   #14  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,054
Quote:
Originally Posted by neuron2 View Post
That didn't help. Am I maybe missing some registration or something? It feels like it is not even trying to load the avisynth.dll.
As I mentioned, this is tested on WinXP, 32 and 64 Bit. However, I'd be surprised if this would not work on Win7/8. Copy the DLLs to system32 and see if that works.
Groucho2004 is offline   Reply With Quote
Old 8th April 2014, 16:10   #15  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
It works in 32 bit but not 64! Still I will try that.
Guest is offline   Reply With Quote
Old 8th April 2014, 16:10   #16  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,054
Quote:
Originally Posted by neuron2 View Post
I'm missing some of those. Do you have a reg file I can import please?
These entries were added with your 2.58 install. Anyway, here is the reg file.
Groucho2004 is offline   Reply With Quote
Old 8th April 2014, 16:18   #17  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
Well, apparently the 2.5.8 install is not enough, because when I merged your reg file, everything is now working in both 32-bit and 64-bit modes!

Guest is offline   Reply With Quote
Old 8th April 2014, 16:22   #18  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,054
Quote:
Originally Posted by neuron2 View Post
Well, apparently the 2.5.8 install is not enough, because when I merged your reg file, everything is now working in both 32-bit and 64-bit modes!

I'm pretty sure that the 2.58 installer adds these keys/values but 2.58 has a pretty old NSIS installer so maybe it's something with that and Win7/8.
Groucho2004 is offline   Reply With Quote
Old 8th April 2014, 16:25   #19  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
When I looked before changing anything this one was missing:

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Media Type\Extensions\.avs]
@=""
"Source Filter"="{D3588AB0-0781-11CE-B03A-0020AF0BA770}"

I tried adding it manually but I must have made a mistake. Merging your reg file obviously fixed that.

The only mystery was why 32-bit worked and 64-bit did not, but never mind, I am able to do my work now.
Guest is offline   Reply With Quote
Old 8th April 2014, 17:55   #20  |  Link
lansing
Registered User
 
Join Date: Sep 2006
Posts: 1,435
Try a fresh install from the avs+ installer to see if it work first, it will install both 32 and 64 bit automatically. One script will work for both version if the necessary plugins are in their respective plugin folders.

http://avs-plus.net/
lansing 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 00:40.


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