Log in

View Full Version : using avisynth as standalone dll


poptones
12th August 2002, 11:00
Can someone who has done this direct me to some documentation on how to do it? Or just explain it a bit? It's briefly mentioned, but no specifics are offered in the docs. How do you pass it a frame? Return a frame? Pass it a filter chain?

dividee
12th August 2002, 11:41
I don't have time to elaborate now, and I never really used it, but you need to call CreateScriptEnvironment in the DLL. Then you can use env->Invoke to call various functions in Avisynth and get an AVSValue back (a clip or something else). When you have this clip, you can call GetFrame on it. For instance, you can Invoke the "Eval" function and pass a whole script as a string, I think.

Of course, this works in C++, I don't know how you could do it in another language. You'd need to translate avisynth.h to that language I guess. But given C++ naming convention, I bet it wouldn't be easy.

poptones
12th August 2002, 12:32
Actually there are tools to help one add cpp libraries to python. I see the call there, but I'm lost on how one would actually use it.

Sorry, I realize these are fairly mundane questions for someone familiar with cpp and all that, but I'm just not one of those people (at least not yet). I'm really hoping somone who has done it would share their code with me. Once I see how it's done I can take it and run.