PDA

View Full Version : Running an .avs file from an avs script?


tin3tin
4th March 2006, 11:12
I wonder: is it possible to run/call an external avs script from within an avs script?

Is the easy way to add script functions to the avisynth plugin folder and just call them from the script?

Why does stickboys plugin-scripts have an '.avsi' ending?

Does all plugins get loaded when avisynth is running? Will the amount of plugins slow the speed of avsynth down?

Is there a max of functions in the plugins folder?

(I want to add function to the DVDslideshowGUI which will extract current transitions avs-scripts in a folder(avisynth/plugins?) and the it will automatically add these as selectable transitions. I've allready done this with import of current grayscale jpg in the DSG transition folder as transitions)

Tin3tin

foxyshadis
4th March 2006, 20:14
Two options:

Import("script.avs") to load in all its functions and definitions, plus video output if any.
Avisource("script.avs") to load its video output (but no functions or variables). This can be assigned to a variable.

avsi will autoload if placed in the avisynth plugin folder, as if you'd Import()'d them all.

All plugins load on startup, and certain plugins can cause conflicts, but unused stuff shouldn't slow anything down.

ADLANCAS
5th March 2006, 02:43
One more option:
Something like...
AviSource("D:\cap1.avs")

Lil' Jer
5th March 2006, 11:51
One more option:
Something like...
AviSource("D:\cap1.avs")

I believe foxyshadis already said that:

Avisource("script.avs") to load its video output (but no functions or variables).

;)

tin3tin
5th March 2006, 12:05
Nice - thanks! :)

I think, I'll go for the import-way.

Tin2tin

Darksoul71
5th March 2006, 14:27
@tin3tin:
Another approach when using multiple AVISynth scripts is simply to copy the source script and add all new scripting stuff to the interim script.

Nevertheless Import works fine.

AVISource for AVS should be avoided as AVISynth has the tendency to screw things up when you do so :(

-D$

tin3tin
5th March 2006, 22:48
The import function worked fine. In the next release of DVD slideshow GUI it will be possible to code your own transitions in avisynth and acces the great TransAll plugin by V.C.Mohan, just by placeing avisynth scripts in the transition folder of DSG.

Thanks for your help!

Tin2tin

stickboy
11th March 2006, 07:16
@tin3tin:
Another approach when using multiple AVISynth scripts is simply to copy the source script and add all new scripting stuff to the interim script.

Nevertheless Import works fine.

AVISource for AVS should be avoided as AVISynth has the tendency to screw things up when you do so :(How does it screw things up? That's intended to be the proper way to open one script as the input to another.

Import is not really meant for this. If the script you're importing explicitly returns a clip at the end, it won't work, you have the potential for name collisions, etc.

Darksoul71
11th March 2006, 09:57
@stickboy:
I did not say "It does screw things up !". When I say it has the tendency to screw things up I solely write this based on my experiences with my old encoding approach:
Captured AVI -> AVISynth with cutmarks / fading -> AVISynth for resizing, denoising, letterboxing.

I often got strange errors (I guess you know those unreproducible exceptions ?!?) when chaining AVI Synth scripts with AVISource while each segment of the script worked after I copied them together in one script.

So AVISource might be intended to open one script as input to another but sometimes it crashes.

Depending on the filters and functions used AVISynth is sometimes quite flakey. I guess many of you know those multipass encodings with CCE, where the encoder says the video source has changed or the encoder simple spits out a green frame.