View Full Version : mt.dll usage question
graysky
4th May 2007, 23:41
I'm totally new to mt.dll but would like to get some input from the community here as to correct usage for my set of plugins (the wiki and FAQ didn't specifically list them).
First off, here is my avs:global MeGUI_darx = 16
global MeGUI_dary = 9
DGDecode_mpeg2source("D:\work\D1\e1\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(order=1,clip2=tdeintted).tdecimate(hybrid=1)
crop( 8, 0, -8, 0)
As you can see I'm making use of the following plugins:
ColorMatrix.dll
DGDecode.dll
EEDI2.dll
TDeint.dll
TIVTC.dll
Can someone show me what the proper usage of mt.dll for this set of plugins might be?
Thanks all.
Blue_MiSfit
5th May 2007, 00:18
Well, AFAIK those plugins are all pretty cool with MT, so all you really need to do is install the latest version of MT avisynth.dll, and add SetMTMode(2,0) to the top of your script. That should enable multithreading at max speed. Make sure it works before you commit to a full encode :)
~MiSfit
BigDid
5th May 2007, 00:26
I'm totally new to mt.dll but would like to get some input from the community here as to correct usage for my set of plugins (the wiki and FAQ didn't specifically list them).
Hi graysky,
The Wiki MT support page is also available to use and abuse: http://avisynth.org/mediawiki/MT_support_page
First off, here is my avs:global MeGUI_darx = 16
global MeGUI_dary = 9
DGDecode_mpeg2source("D:\work\D1\e1\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(order=1,clip2=tdeintted).tdecimate(hybrid=1)
crop( 8, 0, -8, 0)
First make the appropriate installs (MT.dll).
As a baseline you can begin above the lastline with :
setmtmode(2)
crop( 8, 0, -8, 0)
If ok (which should be), slide setmtmode(2) 1 line up and test again, or test setmtmode(1) for the line under to gain some speed?...
setmtmode(2)
tfm(order=1,clip2=tdeintted).tdecimate(hybrid=1)
crop( 8, 0, -8, 0)
If not ok, you have the choice to:
- test a more compatible setmtmode(3) or (4)
- test the MT mode: MT("tfm(order=1,clip2=tdeintted).tdecimate(hybrid=1)")
- use the most compatible setmtmode(6) or (5)
MT will be active only for whatever is between ("-----------")
... and so-forth until 1st line reached.
ColorMatrix.dll -> setmtmode(2) ok
DGDecode.dll -> setmtmode(2) ok
EEDI2.dll ?
TDeint.dll -> setmtmode(2) should be ok
TIVTC.dll ?
Concerning compatibility and speed please refer (and update if needed) the Wiki MT support page :)
Did
graysky
5th May 2007, 00:52
Thanks for the replies, all. I actually did that before posting and since my results sucked, figured I did it incorrectly:
original script
fps1 = 71.16
fps2 = 24.85
SetMTMode(2,0)
fps1 = 64.52
fps2 = 25.53
SetMTMode(1,0)
gave runtime errors
BigDid
5th May 2007, 01:40
Thanks for the replies, all. I actually did that before posting and since my results sucked, figured I did it incorrectly:
original script
fps1 = 71.16
fps2 = 24.85
SetMTMode(2,0)
fps1 = 64.52
fps2 = 25.53
Not necessarily,
I suppose you are encoding with x264 and the Q6600 (4cores) if so, the results may not be as great as with xvid specially with simple scripts.
To gain some speed, you may want to try/test
- SetMemoryMax(xxxx) , to reserve mem for avisynth
- use MT(" ") ,on a line to line basis, some filters/scripts are quicker with MT some the other way around
...
Anyhow, post your script with setmtmode()/MT(""), maybe it can be tuned up :)
Did
graysky
5th May 2007, 02:59
Line by line, eh? I'll have to mess around with it tomorrow. Do I have the syntax correct here:
MT("edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)",2,2)
I'm in the middle of an encode at the moment and can't test it :)
My current script is in the first post of this thread. I'm also using auto threads for x264, do I want to change that to balance out the avisynth threads?
I would think there has to be a guide somewhere for these specific plugins.
BigDid
5th May 2007, 04:14
Line by line, eh? I'll have to mess around with it tomorrow. Do I have the syntax correct here:
MT("edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)",2,2)
Ok,
MT("") will use the default number of thread identified; if no good result use MT("",2,0) for 2 threads and MT("",4,0) for 4 threads
Your code is making the assumption that all filters will work with MT and that may not be true...
-> You didn't answer for the Q6600 ?
Setmtmode(2)/(2,0)/setmtmode(2,4) for 4 threads should be ok for your script; line by line basis means : no change or MT("") for each line as:
Setmtmode(2)
Filter1() #setmtmode(2) active
Filter2() #setmtmode(2) active
MT("Filter3()") # MT active for this line only (not setmtmode(2))
filter4() #setmtmode(2) active again
MT("filter5().filter6()") # MT active for this line only (2filters)
Setmtmode(6)
filter5().filter6() #setmtmode(6) active for non-compatible filters
# end
Hope it is understandable and correct :o
I would think there has to be a guide somewhere for these specific plugins
For MT nor more than what is in the FAQ and the wiki support page compiled by TSP and myself; this is why I made the proposal to test and update the wiki :)
Did
graysky
5th May 2007, 10:17
So I tried thisSetMTMode(2)
global MeGUI_darx = 16
global MeGUI_dary = 9
DGDecode_mpeg2source("D:\work\D1\e1\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
MT("edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)")
MT("tdeintted = TDeint(edeint=edeintted,order=1)")
MT("tfm(order=1,clip2=tdeintted).tdecimate(hybrid=1)")
crop( 8, 0, -8, 0)
SelectRangeEvery(6000,120)
that errored out:
"AviSynth script error: MT function did not return a video clip!
D:\work\D1\test1.avs, line 8"
Syntax must be wrong. Ideas? Can you post a sample avs using my base codeSetMTMode(2)
global MeGUI_darx = 16
global MeGUI_dary = 9
DGDecode_mpeg2source("D:\work\D1\e1\VTS_01_1.d2v",info=3)
ColorMatrix(hints=true)
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(order=1,clip2=tdeintted).tdecimate(hybrid=1)
crop( 8, 0, -8, 0)
SelectRangeEvery(6000,120)
foxyshadis
5th May 2007, 11:24
Try edeintted = MT("...") etc instead. Beware of using TFM in MT, you can get two entirely different frames stacked once in a while; use setmtmode instead. If you have the current version of EEDI2 on tritical's site, that also has built-in threading, so MT is a bit overkill for that line.
graysky
5th May 2007, 11:27
thanks fox, I'll try that in an hour or so. I'm using MeGUI which keeps the plugins up-to-date I think.
EDIT: http://web.missouri.edu/~kes25c/#c3 gives more recent versions:
NEWER - ColorMatrix v2.1 - 01/18/2007 v2.1
NEWER - TDeint - 01/18/2007 v1.1
NEWER- TIVTC - 02/19/2007 v1.0.1
SAME - EEDI2 - 06/07/2006 v0.9.2
Is my MeGUI updater messed-up or what..?
graysky
5th May 2007, 11:55
Results:
original script
fps1 = 71.16
fps2 = 24.85
SetMTMode(2,0) (top of script)
fps1 = 64.52
fps2 = 25.53
SetMTMode(2,0) (top of script)
edeintted = MT("AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)")
fps1 = 64.52
fps2 = 25.3
removed the SetMTMode(2,0)
edeintted = MT("AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)")
fps1 = 69.27
fps2 = 25.84
removed the SetMTMode(2,0)
edeintted = MT("AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)",2,0)
fps1 = 69.75
fps2 = 26.31
removed the SetMTMode(2,0)
edeintted = MT("AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)",4,0)
fps1 = 70.03
fps2 = 25.88
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.