PDA

View Full Version : AVSSource filter maybe?


Quu
10th December 2003, 03:08
this may sound like a wierd request... but a future project i will be working on will include the importing of various avs files into another avs files...

I know you can read other avs files with AVISource... but i worry that the memory overhead of running multiple instances of avisynth (since I beleive that one is opened automagically in the background when you source it as an avi) would bogg down things...

would somethign liek this be easy to include?

Richard Berg
10th December 2003, 03:44
Would your application include doing anything that Import() cannot?

ErMaC
10th December 2003, 04:09
I'm working with him on this project.

The different between Import and an AVSSource is that Import() would literally cut/paste the lines of text, as opposed to evaluating the other AVS file and then using the output as another source filter.

That is unless my understanding of Import() is incorrect. As I read it, the Import() function is just like #include'ing the AVS file into the other one.

This would mean that unless there's a way to make Import() work as a source filter, yes, his application does include something that Import() cannot do.

Quu
10th December 2003, 04:30
here is a simplistic example

examp1.avs
---------------------------
clp1 = AVISource("c:\source1.avi")
return clp1
---------------------------

examp2.avs
---------------------------
clp2 = AVISource("c:\source2.avi")
return clp2
---------------------------

what i would consider what I need (either of these)

solution1.avs
---------------------------
Import( "examp1.avs")
Import( "examp2.avs")
return clp1 + clp2
---------------------------

(I would prefer this solution)
solution2.avs
---------------------------
clp1 = AVSSource( "examp1.avs")
clp2 = AVSSource( "examp2.avs")
return clp1 + clp2
---------------------------


i know thats not really a usefull example... but its simpleified...

I want to be able to use other avs scripts as clips inside of another avs file... with out having to worry about the overhead of the frame server being loaded multiple times in the background

Bidoche
10th December 2003, 11:11
Unless I am heavily mistaken, the frame server is not loaded multiple times, but only once.

Quu
10th December 2003, 16:33
if it is that would be cool...

my worry is that I may be loading 40-50 avs files as source clips in the master avs file... and was worried about the added memory overhead if it loaded an instance of avisynth each time...

Bidoche
11th December 2003, 00:08
The guys at Microsoft are not that stupid, avisynth is a COM server and COM does not load a dll more than once.

Quu
11th December 2003, 00:21
i had not delved into the code yet... so I was unsure of how avisynth was doing that in the background...

cool... then my need for an AVSSource is sevearly lessened... it still might be nice on a code wise level, but no longer somethign i have to worry about

mf
11th December 2003, 16:41
Actually, it would be nice for filters that can only be loaded once per script, or several versions of the same filter, that would conflict because they use the same filter names.