Log in

View Full Version : Easily switching Avisynth versions


Pages : [1] 2

Guest
7th April 2014, 18:32
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.

Groucho2004
7th April 2014, 21:41
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.

Guest
8th April 2014, 01:29
Thank you! :thanks:

Groucho2004
8th April 2014, 10:45
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:

@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 (http://www.avs-plus.net/), 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 (https://www.dropbox.com/s/kpc1e9iqwqgh7e0/avisynth.reg).

Guest
8th April 2014, 13:16
Very helpful! Thank you.

Guest
8th April 2014, 15:16
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.

Groucho2004
8th April 2014, 15:33
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?

Guest
8th April 2014, 15:33
The plugin dir is empty as I said.

Whoa. Even a script with just Version() gives the same error!

Groucho2004
8th April 2014, 15:39
Also, have a look at this post (http://forum.doom9.org/showthread.php?p=1646315#post1646315). 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?

Guest
8th April 2014, 15:46
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.

Groucho2004
8th April 2014, 15:52
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.

Guest
8th April 2014, 16:01
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.

Guest
8th April 2014, 16:07
I'm missing some of those. Do you have a reg file I can import please?

Groucho2004
8th April 2014, 16:07
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.

Guest
8th April 2014, 16:10
It works in 32 bit but not 64! Still I will try that.

Groucho2004
8th April 2014, 16:10
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 (https://www.dropbox.com/s/kpc1e9iqwqgh7e0/avisynth.reg).

Guest
8th April 2014, 16:18
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!

:thanks:

Groucho2004
8th April 2014, 16:22
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!

:thanks:
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.

Guest
8th April 2014, 16:25
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.

lansing
8th April 2014, 17:55
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/

Guest
8th April 2014, 18:02
Thanks, but as I mentioned it's all working for me now.

Groucho2004
8th April 2014, 18:22
it will install both 32 and 64 bit automatically.
It either installs both or it installs them automatically, depending on the OS. Which one is it?

lansing
8th April 2014, 18:57
It either installs both or it installs them automatically, depending on the OS. Which one is it?

sorry for my bad phrasing, I mean in the installer, it will ask the user to choose what version to install. You can then choose to install both of them, and it will automatically setup all the path and file locations for you. I'm using Windows 7 64 bit.

Groucho2004
8th April 2014, 21:42
sorry for my bad phrasing, I mean in the installer, it will ask the user to choose what version to install. You can then choose to install both of them, and it will automatically setup all the path and file locations for you.
OK. Still, this only works with the 32 and 64 Bit AVS+ versions. If I want to test something with other versions, I would have uninstall, re-install, yada yada...

manolito
9th April 2014, 07:14
The name of this thread is
Easily switching Avisynth versions

So far it looks all but easy to me... :devil:


Cheers
manolito

Groucho2004
9th April 2014, 10:15
The name of this thread is
Easily switching Avisynth versions

So far it looks all but easy to me... :devil:


Cheers
manolito
Which part do you have trouble with? All you need are the instructions in post #4. I have also simplified it a bit.

Guest
9th April 2014, 13:22
The point is that after the initial setup, it *is* easy to switch versions. I call running a batch file easy.

Groucho2004
9th April 2014, 22:42
I have uploaded a package with 7 Avisynth versions (https://www.dropbox.com/s/olmgl9apwem7b31/AvisynthRepository.7z) and the necessary batch file to change between them.

All you have to do:
- Copy the batch file to a directory to which your "path" environment variable points so you can run it from anywhere.
- Adjust the paths for "TargetDir" and "AVS_SRC_DIR" as necessary:

REM This is the target directory for avisynth.dll and devil.dll
REM Your "PATH" environment variable must point to it.
SET TargetDir=E:\Apps

REM This is the source directory with the various avisynth versions.
REM !!Make sure you use double backslashes in the following path!!
SET AVS_SRC_DIR=E:\\AvisynthRepository

The included versions are (and the corresponding switches for the batch file):
Avisynth 2.5.7 (AVS257)
Avisynth 2.5.8 (AVS258)
Avisynth 2.6 Alpha 5 (AVS260)
Avisynth 2.6 Alpha 5 ICL (AVS260_ICL)
Avisynth 2.6 Alpha 5 MT (AVS260_MT)
Avisynth+ x86 r1576 (AVSPLUS_x86)
Avisynth+ x64 r1576 (AVSPLUS_x64)

manolito
9th April 2014, 23:04
Thanks Groucho2004 for taking the time to create such an eleborate AviSynth switcher, this makes the process quite easy indeed... :thanks:

The AviSynth.reg file which comes with your package seems to have two issues, though:

According to an earlier post by clsid the reg key for the avs extension on 64bit Windows is
[HKEY_CLASSES_ROOT\Wow6432Node\Media Type\Extensions\.avs]
I only use 32bit systems so I cannot verify this.


And more importantly this entry
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Media Type\Extensions\.avs]
@=""
"Source Filter"="{D3588AB0-0781-11CE-B03A-0020AF0BA770}"
effectively disables the LAV splitter for Avisynth and replaces it with the standard AVI / WAV splitter. Might be important for users of LAVFilters.



Cheers
manolito

Groucho2004
9th April 2014, 23:34
According to an earlier post by clsid the reg key for the avs extension on 64bit Windows is
[HKEY_CLASSES_ROOT\Wow6432Node\Media Type\Extensions\.avs]
This seems to apply to Vista and above. I can't test this.

And more importantly this entry
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Media Type\Extensions\.avs]
@=""
"Source Filter"="{D3588AB0-0781-11CE-B03A-0020AF0BA770}"
effectively disables the LAV splitter for Avisynth and replaces it with the standard AVI / WAV splitter. Might be important for users of LAVFilters.
Yet for neuron2, this was the entry he needed to make it work.

So, unless someone tells me what registry entries are necessary for which OS, I'm leaving it as it is.

manolito
9th April 2014, 23:56
When I recently got crashes using LAVSplitter 0.61.1, clsid posted a reg fix. Here is my post and nevcairiels answer:
http://forum.doom9.org/showthread.php?p=1675316#post1675316


Cheers
manolito

Groucho2004
10th April 2014, 11:42
I have updated the avisynth.reg file so it now corresponds to the same keys/values that the official Avisynth installer writes.
Please re-download the package in post #28.

bxyhxyh
22nd April 2014, 13:50
@Groucho2004
Why didn't you add your build of avisynth?

Groucho2004
22nd April 2014, 16:03
@Groucho2004
Why didn't you add your build of avisynth?
I updated the package to include the A5 version built with ICL. See post #28 (https://forum.doom9.org/showthread.php?p=1677076#post1677076).

Groucho2004
12th May 2014, 00:33
Another update:
The previous ICL DLL was a test version without the "SoundTouch" functions. :o The new one is complete.
The new version is built with ICL 11.1. It also uses much faster Intel intrinsics for "Interlocked*" functions.
Post #28 (https://forum.doom9.org/showthread.php?p=1677076#post1677076) has the download link.

aldix
12th May 2014, 18:25
I have uploaded a package with 7 Avisynth versions (https://www.dropbox.com/s/4wlvb816qwr4rhk/set_avisynth.7z) and the necessary batch file to change between them.

All you have to do:
- Copy the batch file to a directory to which your "path" environment variable points so you can run it from anywhere.
- Adjust the paths for "TargetDir" and "AVS_SRC_DIR" as necessary:

REM This is the target directory for avisynth.dll and devil.dll
REM Your "PATH" environment variable must point to it.
SET TargetDir=e:\apps\div

REM This is the source directory with the various avisynth versions.
REM !!Make sure you use double backslashes in the following path!!
SET AVS_SRC_DIR=e:\\videotools\\avisynth_source

The included versions are (and the corresponding switches for the batch file):
Avisynth 2.5.7 (AVS_257)
Avisynth 2.5.8 (AVS_258)
Avisynth 2.6 Alpha 5 (AVS_260A5)
Avisynth 2.6 Alpha 5 ICL (AVS_260A5_ICL)
Avisynth 2.6 Alpha 5 MT (AVS_260A5_MT)
Avisynth+ x86 r1576 (AVSPLUS_x86)
Avisynth+ x64 r1576 (AVSPLUS_x64)

Can't get it to work. What's 'path variable'? I have the folder on my desktop and set 'target' path to SysWow (I'm on x64) and that other to set_avisynth folder on the desktop.

But I only get access denied errors when I try to swap, even though registry keys seemingly are changed or something.

Help me out here.

And yes, I have the Admin account.

Groucho2004
12th May 2014, 22:05
Can't get it to work. What's 'path variable'? I have the folder on my desktop and set 'target' path to SysWow (I'm on x64) and that other to set_avisynth folder on the desktop.
It makes no sense to put the folder in the desktop directory. There is no mouse clickety-clickety involved in the process of switching the versions.
Let's try to simplify it further:

Put the "set_avisynth" folder in the root of "c:".

Create a folder "c:\avisynth".

Go to Control Panel -> System -> Advanced and add "c:\avisynth" to the "PATH" environment variable. Reboot or log off->log on.

Open the "set_avs.bat" with a text editor and change the value for "AVS_SRC_DIR" to "c:\\set_avisynth" and the value for "TargetDir" to "c:\avisynth".

Open a console window.

Run the batch file with the appropriate switch.

Very important: Uninstall the previous version of Avisynth and make sure that there are no other "devil.dll" and "avisynth.dll" in your Windows directory (and below).

aldix
12th May 2014, 22:57
Hmm, do you mean System & Security? I have no just "System". Win 7 x64

Guest
12th May 2014, 23:10
Does this help?

Select Computer from the Start menu
Choose System Properties from the context menu
Click Advanced system settings > Advanced tab
Click on Environment Variables, under System Variables, find PATH, and click on it.

aldix
13th May 2014, 00:26
Hmm, yeah I found this way after some search on Google.

However, I have there some sort of Wifi data. Don't feel good about removing it, tbh.

So I guess I'm out of luck.

edit: Well, ok. I just added it to the row & now I can swap. However, do I have to call even the most core plugin now manually? I mean, using SeeSaw and it whines about not knowing what mt_lutxy is...

edit#2: Yeah, that's it. Have to do separate plugin folders for each version. I guess I can live with that. Cool stuff. Thanks!

Groucho2004
13th May 2014, 02:13
Yeah, that's it. Have to do separate plugin folders for each version.
Having a separate set of plugins for each version makes sense and eliminates the very common mistake of using the wrong set of plugins for a given Avisynth version.
Among the 7 included Avisynth versions there are at least 3 different sets of plugins required (64/32 Bit, AVS 2.6x plugins don't work with AVS 2.5x, etc).

aldix
13th May 2014, 14:08
Hmm, indeed.

Switched to AVS_260A5_MT and can't for the life of me to get FFT3DFilter to work. Only throws FFW3.dll error or just hangs. But I have this dll in SysWow64 folder and everything.

StainlessS
13th May 2014, 14:24
Only throws FFW3.dll error

Perhaps just a typo in your post, but should be FFTW3.dll. :helpful:

aldix
13th May 2014, 14:41
Yup, that's it. Typo :)

Edit: Oddly enough, the error stemmed from system32 folder, instead. Apparently I had two fftw3.dll's, one in there, one in SysWow64 where it should be.

Previously, avspmod hasn't cried foul, but now with this quoted version of Avisynth it did.

Anyways, dll in system32 folder deleted & actually script become a lot faster now (judging by avspmod seek anyway).

Cheers for help!


edit#2: Interestingly, whilst I can set AVS_257, I can't seem to work with it with avspmod. It gives this Error loading Avisynth!

I didn't even do any plugin transfers yet, it's just the DirectShowSource and TCPDeliver as it was in the pack. What's up?

Similarly, can't load AVSPLUS_x64 on avspmod, even though I have x64 system (win 7) it gives the error that Avisynth is not valid win32 app.

StainlessS
13th May 2014, 18:11
Yup, that's it. Typo :)

Thought it would be.


Apparently I had two fftw3.dll's, one in there, one in SysWow64 where it should be.

Previously, avspmod hasn't cried foul, but now with this quoted version of Avisynth it did.


Looks like something changed the dll directory search order.

Groucho2004
13th May 2014, 18:36
Interestingly, whilst I can set AVS_257, I can't seem to work with it with avspmod. It gives this Error loading Avisynth!
I don't know how Avspmod loads the avisynth dll but I suspect that it requires a higher version than 2.5.7.

Similarly, can't load AVSPLUS_x64 on avspmod, even though I have x64 system (win 7) it gives the error that Avisynth is not valid win32 app.
Is there even a 64 Bit version of avspmod? You can't load a 64 bit DLL into a 32 Bit application.

Groucho2004
25th May 2014, 21:54
Another update:
- Shortened the parameters for easier switching
- Fixed a problem with the plugin path
Post #28 (http://forum.doom9.org/showpost.php?p=1677076&postcount=28) has the download link.

Sparktank
25th May 2014, 23:50
Hmmm, I've been delaying looking into this project for all sorts of complicated fun.

I would love to try this and give feedback.

My main purpose would be to switch between SEt's MT version and the SVP (SmoothVideo Project) version.
SVP uses a custom 2.5.8 build ("AviSynth 2.5.8 (SVP edition)"): http://www.svp-team.com/wiki/Download#Avisynth_plugins_-_the_heart_of_SVP

When I use SVP program, I use SEt's MT version ("2.6 Alpha 5 MT (AVS260_MT)") and it runs quite well for me.
But I've been wanting to try to use their custom build (and their build of MVTools ("MVTools 2.5.11.9 SVP") since I'm currently using cretindesalpes' MVtools variation).

This seems like it could be a highly utlized function for my complicated ways.
When I get time to try everything out, I'll give some feedback on it.

bxyhxyh
20th January 2015, 16:34
Hello. Since Avisynth has been updated, is it safe to just replace avisynth.dll, devil.dll and Directshowsource.dll?
Or new .reg file should be written?

Groucho2004
20th January 2015, 17:25
Hello. Since Avisynth has been updated, is it safe to just replace avisynth.dll, devil.dll and Directshowsource.dll?
Or new .reg file should be written?
You only have to replace avisynth.dll and directshowsource.dll.