Log in

View Full Version : Save as .avsi, how does it work?


raquete
4th December 2005, 01:52
hi all.
i found one script that have to be saved as .avsi but i don't know how i can use it or how it works.
please,send me instructions to use or where i can learn to understand how it works.here where i leave i can't open avisynth homepage in this moment,is heavy and i get only page not found.
thanks

Anonymouses
4th December 2005, 03:56
hi all.
i found one script that have to be saved as .avsi but i don't know how i can use it or how it works.
please,send me instructions to use or where i can learn to understand how it works.here where i leave i can't open avisynth homepage in this moment,is heavy and i get only page not found.
thanks

You just make a call to the function as you would with any plugin.

Alain2
4th December 2005, 12:37
The i of avsi is for import I believe; it avoids having to make an import("script.avs") in another script you do, you can directly use the functions it contains as Anonymouses says. But as for the dll plugins, this works only if you put the avsi in the avisynth plugins directory.

gzarkadas
4th December 2005, 14:29
Just Import("path to the .avsi file") like you do with any other script (or: var = Import("path to the .avsi file") if the script returns a value, say a clip, that you want to use in your script).

The .avsi extension is only for autoloading the script, if you have placed it inside the Avisynth's plugins folder. If you are explicitly importing the file, then the extension can be anything that you like.

raquete
4th December 2005, 15:56
i'm stup guys,i don't know how to put it working.
i need to save this as anything.avsi

#-----------------------------------------------

#Copy the function above and save it as an .avsi file using notepad along with the other filters.
#The plugins used : Repair.dll, RemoveGrain.dll, SSETools.dll

LRemoveDust_YV12(17,1)

function LRemoveDust_YV12(clip input, int clmode, int "limit")
{
limit=default(limit,2)
clmode=default(clmode,17)
repmode = 2
clensed = Clense(input)
rep = Repair(clensed, input, mode=repmode)
rg = RemoveGrain(rep, mode=clmode)
return LimitChange(rg, input, limit, LimitU=255 )

}
#------------------------------------------------------

i'm using the removegrain_25_dll_20050501.

i download the last removegrain founded here: http://forum.doom9.org/showthread.php?p=730165#post730165
but don't have SSETools.dll inside this package!

my script.avs:
LoadPlugin("C:\ARQUIV~1\\dgindex\DGDecode.dll")
MPEG2Source("D:\TEST\DGINDE~1.D2V")

what i have to do ? please help me more!
:thanks:

CirTap
4th December 2005, 16:14
Hi,
the location if the .avsi file is supposed to be inside the "plugins" folder of your AviSynth installation, typically
"C:\Program Files\AviSynth 2.5\Plugins"
anything in this folder will be automagically loaded by AviSynth. *)
Using .avsi is just a file naming convention to tell AviSynth: load this file as well.
You should not pack this folder up with everything you have (filter .dlls or other .avsi files) or believe might be useful, since there might be conflicting functions and variable names, "buggy" plugins that donÄt like each other etc.

If you want to keep your Plugins folder clean, you may also use the Import() function in your main script and load the "LRemoveDust.avsi" (continaing the above code) from any other location, e.g:
my script.avs:
Import("C:\avs-scripts\LRemoveDust.avsi")
LoadPlugin("C:\ARQUIV~1\dgindex\DGDecode.dll")
MPEG2Source("D:\TEST\DGINDE~1.D2V")
The same auto-loading applies to "filters" in .dll files.
You can copy "DGDecode.dll" to AviSynth's plugins folder and it will always be available in any script. This allows you to avoid adding a line such as
LoadPlugin("C:\ARQUIV~1\dgindex\DGDecode.dll")
since the DGDecode.dll is already "loaded", and you can use MPEG2Source() and its other functions/filters right away.

Then you may want to consult the documentation at http://www.avisynth.org/

I dunno anything about a "SSETools.dll", but there are SSE2 and SSE3 versions of the filters in the download archive, just use the appropriate version for your CPU
http://home.arcor.de/kassandro/RemoveGrain/RemoveGrain.rar

Have Fun,
CirTap

*) If you have moved/renamed the AviSynth folder after installation, or believe that nothing from its Plugin folder is automatically loaded (dlls, avsi) check (change, set) this registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\AviSynth\plugindir2_5 = "path to real plugins folder"

raquete
4th December 2005, 17:18
wow.a lesson. :)
avisynth last version was removed and installed again in default path
now DGDecode.dll is inside plugins folder.

my default path instalation(Brasil) is:
C:\arquivos de programas\AviSynth 2.5\plugins\

if i put anything as ... .avsi inside plugins folder vdubmod don't open :scared:
i did a new folder called 1 to save the LRemoveDust.avsi :
C:\arquivos de programas\AviSynth 2.5\plugins\1\LRemoveDust.avsi
and vdubmod back to work loading only the source :
MPEG2Source("D:\TEST\DGINDE~1.D2V")

but see the error when i load the script.avs:
Import("C:\arquivos de programas\AviSynth 2.5\plugins\1\LRemoveDust.avsi")
MPEG2Source("D:\TEST\DGINDE~1.D2V")

"script error failure:
script error: invalid arguments to function "LRemoveDust_YV12".
(C:\arquivos de programas\AviSynth 2.5\plugins\1\LRemoveDust.avsi,line 1)
(D:\TEST\DGINDE~1.D2V,line 1)

what can be wrong CirTap?

CirTap
4th December 2005, 19:33
Hi,
since the .avsi file is now loaded at startup, you don't have a "clip" yet -- I didn't realize that the function was already called, but here so can learn about "dropping anything in the plugin folder" can cause you trouble :-)

Method #1:
Edit LRemoveDust.avsi and comment the function call of LRemoveDust_YV12(17,1)
...
# LRemoveDust_YV12(17,1)

function LRemoveDust_YV12(clip input, int clmode, int "limit")
{
...
and then add the function call to your main script:
# load edited include file
Import("C:\arquivos de programas\AviSynth 2.5\plugins\1\LRemoveDust.avsi")
# load dgindex project
MPEG2Source("D:\TEST\DGINDE~1.D2V")
# NOW you have a (default) "clip" from MPEG2Source()
LRemoveDust_YV12(17,1)

Method #2:
Keep LRemoveDust.avsi unchanged but instead move the call of Import() below MPEG2Source()
MPEG2Source("D:\TEST\DGINDE~1.D2V")
# NOW you have a (default) "clip" from MPEG2Source()
Import("C:\arquivos de programas\AviSynth 2.5\plugins\1\LRemoveDust.avsi")
The problem here is, that the .avsi not only declares a new function, but also calls it immediately - something that should not happen inside a "library file", that is.
I believe the line with "LRemoveDust_YV12(17,1)" was supposed to be an example, and all you should have in the .avsi was the function body.

Make yourself familiar with the loading and execution order of plugins/filters, includes/imports of scripts and user functions.

Have fun,
CirTap

raquete
4th December 2005, 22:15
CirTap, :goodpost:
you're a genius,patient and great teacher....one rare kind of person! :cool:

Method #1 and Method #2 are working perfectly.

i'm very thankfull my friend! thank you so much. :)



@ Anonymouses, Alain2 and gzarkadas
thank you too guys. :)

CirTap
4th December 2005, 22:23
you're welcome and agradecimentos para a honra :)
you're a geniuswell, I don't think so; this wasn't *that* tricky after all patientdepends on my mood, and the "pupil" -- you're a good one :D and great teacherthank you

Happy encoding, and have fun,
CirTap

8888
23rd February 2006, 13:45
how do you know which SSE tool is right for your pc? I know there was sometiing to dl to check but dont remember what

Boulder
23rd February 2006, 14:59
Cpu-z.