By default x64 AviSynth version is used

Here you can submit bugreports
Post Reply
User avatar
kibi
Posts: 106
Joined: Mon Feb 29, 2016 12:57 pm
Contact:

By default x64 AviSynth version is used

Post by kibi »

In case of workflow without A/V Media Decoder (when it's necessary to process AVS files) FFASTRans tries to use x64 version of FFPROBE.exe
That's why it's impossible to use x86 dll AviSynth plugins. It would be nice if x86 version of FFPROBE and FFMPEG have the priority.
Alexander Sorkin
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: By default x64 AviSynth version is used

Post by admin »

Thanks for pointing out this issue, Alexander! I will have a look at it as soon as possible.

-steinar
User avatar
kibi
Posts: 106
Joined: Mon Feb 29, 2016 12:57 pm
Contact:

Re: By default x64 AviSynth version is used

Post by kibi »

Hi, Steinar!
I have successfully migrated my AVS scripts to AviSynth+ x64, thougth is was rather tricky, since I couldn't find working AVSPMOD for Avisynth+ x64.
There is a very helpful function SetLogParams, to log all the internal processing of AviSynth+:

Code: Select all

SetLogParams("F:\Test-zone\avisynth.log", 4)
I've find in logs, that AviSynth+ couldn't recognize a standard function like "ImageSource" and assumed that it was the plugin loading issue. That's why added to the top of the scrips:

Code: Select all

ClearAutoloadDirs()
AddAutoloadDir("F:\FFASTrans_0.8\Processors\ffmpeg\x64\plugins+")
LoadCPlugin("F:\FFASTrans_0.8\Processors\avs_plugins\ffms2\x64\ffms2.dll")
LoadCPlugin("F:\FFASTrans_0.8\Processors\avs_plugins\autocrop\x64\autocrop.dll")
and now it works like charm! Thought I have to find x64 version of all the used plugins.

So it would be nice to have an option in workflow properties, to use x64 / x86 code with three variants - "Prefer x86 code" (in case of rare 32-bits plugins), "Prefer x64 code" and "Automatic choice" (as it is now).
Alexander Sorkin
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: By default x64 AviSynth version is used

Post by admin »

That's great! :-)

It's a good suggestion on the x64/86 options and I will really consider it. Thanks! :-)

-steinar
User avatar
kibi
Posts: 106
Joined: Mon Feb 29, 2016 12:57 pm
Contact:

Re: By default x64 AviSynth version is used

Post by kibi »

I would like to share a "cross platform" code, is able to work in any environment (32-bit and x64):

Code: Select all

Findstr(VersionString(), "x86_64") != 0 ? Initx64() : Initx86()

function Initx86()
{
	SetLogParams("F:\Pipeline\Logs\avisynth.log", 1) #1: LOG_ERROR / 2: LOG_WARNING / 3: LOG_INFO/ 4: LOG_DEBUG

	ClearAutoloadDirs()
	AddAutoloadDir("F:\FFASTrans\Processors\ffmpeg\x86\plugins+")
	LoadCPlugin("F:\FFASTrans\Processors\avs_plugins\ffms2\x86\ffms2.dll")
}

function Initx64()
{
	SetLogParams("F:\Pipeline\Logs\avisynth.log", 1) #1: LOG_ERROR / 2: LOG_WARNING / 3: LOG_INFO/ 4: LOG_DEBUG

	ClearAutoloadDirs()
	AddAutoloadDir("F:\FFASTrans\Processors\ffmpeg\x64\plugins+")
	LoadCPlugin("F:\FFASTrans\Processors\avs_plugins\ffms2\x64\ffms2.dll")
}
It could be easily adapted for AviSynth 2.60 and any other versions, for example:

Code: Select all

Findstr(VersionString(), "AviSynth 2.60") != 0 ? Init260() : stub()
Alexander Sorkin
Post Reply