View Full Version : "There is no function named "SetMTMode"
App_rone
4th February 2018, 00:42
I am trying to use InterFrame with MEGUI-2808, and with Avisynth+...
I get "There is no function named "SetMTMode".
So I replace it with "SetFilterMTMode".
And then I get another error "invalid arguments to "SetFilterMTMode".
Does anyone have a fix?
johnmeyer
4th February 2018, 03:58
The syntax for multi-threading is quite different in AVISynth+ than it is in AVISynth.
There is no SetMTMode call in AVISynth+, and the "replacement" call (SetFilterMTMode) is not really the same thing. Because AVISynth filters are written by lots of people, not all of them have done the same things in order to permit their DLL to be run multi-threaded. Therefore, some can be run fully multi-threaded, others only partially multi-threaded, and some don't work multi-threaded. With the original AVISynth multi-threaded hack ("SetMTMode") you could not tell AVISynth to treat each DLL differently when it comes to multi-threading. With AVISynth+, you can now do this.
That's the good news. The bad news is that you have to add SetFilterMTMode for each and every DLL in your script. Fortunately, you can put all these calls into a file, reference that file from your script, and only have to do this work once. What's more, several people have posted their SetFilterMTMode calls for dozens of popular AVISynth DLLs. I think you can find a link to one of these files on the AVISynth+ home page.
When you get it all working, to actually enable multi-threading, you need to add a Prefetch() call as the very last call in your script. Put a number in the parenthesis to specify how many threads to use. For instance, Prefetch(5) will use five threads.
App_rone
4th February 2018, 04:44
The syntax for multi-threading is quite different in AVISynth+ than it is in AVISynth.
There is no SetMTMode call in AVISynth+, and the "replacement" call (SetFilterMTMode) is not really the same thing. Because AVISynth filters are written by lots of people, not all of them have done the same things in order to permit their DLL to be run multi-threaded. Therefore, some can be run fully multi-threaded, others only partially multi-threaded, and some don't work multi-threaded. With the original AVISynth multi-threaded hack ("SetMTMode") you could not tell AVISynth to treat each DLL differently when it comes to multi-threading. With AVISynth+, you can now do this.
That's the good news. The bad news is that you have to add SetFilterMTMode for each and every DLL in your script. Fortunately, you can put all these calls into a file, reference that file from your script, and only have to do this work once. What's more, several people have posted their SetFilterMTMode calls for dozens of popular AVISynth DLLs. I think you can find a link to one of these files on the AVISynth+ home page.
When you get it all working, to actually enable multi-threading, you need to add a Prefetch() call as the very last call in your script. Put a number in the parenthesis to specify how many threads to use. For instance, Prefetch(5) will use five threads.
So how would I use InterFrame with Avisynth+?
`Orum
13th February 2018, 02:59
So how would I use InterFrame with Avisynth+?
Change your SetMTMode() to SetFilterMTMode() with the appropriate MT type. See this section on the wiki (http://avisynth.nl/index.php/AviSynth%2B#MT_Notes) for details. Remember you will also need to use Prefetch() at the end of your script for it to work.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.