View Full Version : Adding SetMtMode to a script
frubsen
28th September 2012, 18:02
Hi all,
I have a script I'm using to convert old home videos to DVD.
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\Convolution3D.dll")
avisource("cmob.avi",audio=false)
converttoyuy2(interlaced=true)
SeparateFields()
odd=SelectOdd.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
evn=SelectEven.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
Interleave(evn,odd)
Weave()
DoubleWeave.SelectOdd()
I'm wondering where I can add Setmtmode to speed it up.
I've tried both setmtmode(2) and setmtmode(3) before the avisource line and both crash CCE after about 30 seconds.
Anyone know which filter isn't liking being multithreaded?
Thanks
AzraelNewtype
29th September 2012, 00:25
If you were trying mode 2 above avisource, that is your problem. Do mode 5 above the source and then try mode 2 immediately after.
Alternately: don't use mt at all, as whatever the potential speedups you'd probably be done by now if you used single threaded avisynth rather than crashing repeatedly with a massively unstable product.
Taurus
29th September 2012, 10:42
Alternately: don't use mt at all, as whatever the potential speedups you'd probably be done by now if you used single threaded avisynth rather than crashing repeatedly with a massively unstable product.
Heh,heh,
I use Avisynth MT for years now...
It all depends on the source and some stable plugins.
As an example, DV Avi works best with:
SetMemoryMax(682) # set to your needs
SetMTMode(5,4) # second number set the cores/threads of your cpu.
Fiddle around for stability.
And there is a typo in your script:
Interleave(evn,odd)
should be "even"
Don't know about Convolution3D if it's MT capable.
Cheers
Groucho2004
29th September 2012, 11:01
Fiddle around for stability.
Yes, that's what most users really want to do. :rolleyes:
And there is a typo in your script:
Interleave(evn,odd)
should be "even"
Not true.
Taurus
29th September 2012, 11:59
You are right about "evn" ;):D
Sorry, for this.
But MT is a beast, you have to tame it.
After this it becomes your best friend.
And a little extra curve of learning should not hurt.
I dont have a master degree in avisynth scripting,
it took me maybe one day to sort out the hazzles related to MT.
But when it's done, it's done ;).
Simple example script:
SetMemoryMax(682) # set to your needs
SetMTMode(5,4) # second number set the cores/threads of your cpu.
avisource("your file.avi") # your source filter
SetMTMode(2) # now get some speed
all your needed plugins() # deinterlace, denoising, sharpen,etc. some wont work with MT :(
distributor() # only needed for HCEnc or similar
Return(last) # might give a little stability
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.