View Full Version : Getting Slow FPS with SetMTMode
sutha25
1st April 2014, 14:09
HI i have avisynth 2.6 MT version of set's and i have installed and place the avisynth.dll into syswow64
but when i run the avs script on Megui i am really getting slow speed but when i run that script on VirtualDub and AVSmeter i get really fast speed please have look at my Screen shot i have tired with and without SetMTMode is same no speed difference on Megui can you tell me why is that happening?
Screen shot of VIRTUALDUB: http://prntscr.com/360xun
Screen shot of MEGUI: http://prntscr.com/360ybe
Screen shot of AVSMeter: http://prntscr.com/361tga
Script
SetMTMode(2)
LoadPlugin("D:\EDrive\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\EDrive\Downloads\Inga\VTS_03_1.d2v", info=3)
AssumeTFF()
LoadPlugin("D:\EDrive\megui\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
crop(0, 52, 0, -56)
Spline36Resize(640,272) # Spline36 (Neutral)
UnDot()
Tweak(sat=1.05, bright=-5, cont=1.05)
BlindPP(quant=30, cpu=4, moderate_h=15, moderate_v=25)
LSFmod(strength=75, smode=4, soothe=true, keep=100, edgemode=0, edgemaskHQ=false)
SetMTMode(2, 9)
LoadPlugin("D:\EDrive\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\EDrive\Downloads\Inga\VTS_03_1.d2v", info=3)
AssumeTFF()
LoadPlugin("D:\EDrive\megui\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
crop(0, 52, 0, -56)
Spline36Resize(640,272) # Spline36 (Neutral)
UnDot()
Tweak(sat=1.05, bright=-5, cont=1.05)
BlindPP(quant=30, cpu=4, moderate_h=15, moderate_v=25)
LSFmod(strength=75, smode=4, soothe=true, keep=100, edgemode=0, edgemaskHQ=false)
SetmemoryMax(1024)
SetMTMode(5, 9)
LoadPlugin("D:\EDrive\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\EDrive\Downloads\Inga\VTS_03_1.d2v", info=3)
AssumeTFF()
SetMTMode(2)
LoadPlugin("D:\EDrive\megui\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
crop(0, 52, 0, -56)
Spline36Resize(640,272) # Spline36 (Neutral)
UnDot()
Tweak(sat=1.05, bright=-5, cont=1.05)
BlindPP(quant=30, cpu=4, moderate_h=15, moderate_v=25)
LSFmod(strength=75, smode=4, soothe=true, keep=100, edgemode=0, edgemaskHQ=false)
i have tired all this Script above and some more which is same but different SetMTMode and is same please help me to gain speed as avsmeter or closer to that
Asmodian
2nd April 2014, 09:07
Add this to the end of your script, but only for Megui:
Distributor()
sutha25
2nd April 2014, 11:36
Add this to the end of your script, but only for Megui:
Distributor()
thanks for your kind reply i tired it and is crashing Megui?
Groucho2004
2nd April 2014, 11:54
According to the AVSMeter screen shot, everything looks very good (speed, memory and CPU usage) and your script should not be changed.
Throwing in a "Distributor()" call will just increase the number of threads and makes no sense. Pretty much all encoders call "Distributor" internally.
I don't know what your megui screen shot is showing or what the relevance is, maybe you can elaborate a bit on that.
sutha25
2nd April 2014, 12:06
oh sorry here is the screen shot of the error http://prntscr.com/36bf58 i have tired all the AVISYNTH.dll still same error
but i was getting good speed
Groucho2004
2nd April 2014, 12:13
oh sorry here is the screen shot of the error http://prntscr.com/36bf58 i have tired all the AVISYNTH.dll still same error
but i was getting good speed
:confused:
I was referring to the megui screen shot from your first post. What is megui doing there (playing through file...)? What is the purpose?
sutha25
2nd April 2014, 12:19
:confused:
I was referring to the megui screen shot from your first post. What is megui doing there (playing through file...)? What is the purpose?
sorry i am bit num here iam not getting what you saying i used the same script on megui but added Distributor() and then when i run the encode it crashes with error on the screen shot but the speed does go up with the Distributor() added but is crashing
Megui version is 2418 should i try with Development Version?
Groucho2004
2nd April 2014, 12:23
Your best bet to get help is to post your problems in the megui bug report thread.
sutha25
2nd April 2014, 12:27
Thanks agian i'll try that but before i sign off can i try and use Distributor() with ffms2.dll FFVideoSource? or will it work only on mpeg2source?
Groucho2004
2nd April 2014, 12:41
Thanks agian i'll try that but before i sign off can i try and use Distributor() with ffms2.dll FFVideoSource? or will it work only on mpeg2source?
Whether you have to use "Distributor" or not depends on the application that processes the script. That application is usually the encoder like x264 but can also be a piping program that feeds the data to the encoder. If megui uses such a piping program you may have to add the Distributor call in the script, it depends on the program.
The megui guys know best what their application does so just post there.
Asmodian
2nd April 2014, 21:46
Judging by the response in the Megui thread it sounds like Megui is supposed to add Distributor() automatically like VirtualDub and x264 do (and you do not want it called twice).
Oddly not having Distributor() called would cause exactly this behavior, the application that doesn't call it is limited to single threaded performance while other applications that do call it get full multithreaded. I do know VirtualDub (using Avisynth via VFW) calls Distributor() automatically while AVS2pipemod doesn't. Maybe something has changed in your Megui which causes it to not call Distributor() automatically?
Groucho2004
2nd April 2014, 22:24
I do know VirtualDub (using Avisynth via VFW) calls Distributor() automatically while AVS2pipemod doesn't.
Yes, everything going through VfW will have the call added "automatically".
There are several piping tools out there, some add the call, some don't.
Asmodian
2nd April 2014, 23:17
Yes, but given sutha25's symptoms it really sounds like Megui is using something that doesn't add Distributor().
@sutha25
Does your third example crash with Distributor()? I would use MT mode 5 for the source filter and mode 2 for the bulk of the script. I would expect VirtualDub or AVSmeter to crash too (without Distributor() ) but MT Avisynth is prone to unexpected crashes. Sometimes the oddest changes in filter order, choice, or MT mode stops or starts a script crashing, at least in my experience.
edit: are you sure you are using the newest MT Avisynth from SEt (http://forum.doom9.org/showthread.php?t=148782)? I notice in your screenshot you are using Avisynth version 2.5.8.5.
sutha25
3rd April 2014, 01:38
Yes, but given sutha25's symptoms it really sounds like Megui is using something that doesn't add Distributor().
@sutha25
Does your third example crash with Distributor()? I would use MT mode 5 for the source filter and mode 2 for the bulk of the script. I would expect VirtualDub or AVSmeter to crash too (without Distributor() ) but MT Avisynth is prone to unexpected crashes. Sometimes the oddest changes in filter order, choice, or MT mode stops or starts a script crashing, at least in my experience.
edit: are you sure you are using the newest MT Avisynth from SEt (http://forum.doom9.org/showthread.php?t=148782)? I notice in your screenshot you are using Avisynth version 2.5.8.5.
thanks for the reply i was using 2.6MT from set's thread and i was getting error so i was changing the to 2.5.8 and trying and still same error so i guess is not with avisynth i think is with megui or my script
i'll try my 3rd script on new script and let you know
Edit: I tired the 3rd example with new script and it works but slow screen shot here
http://prntscr.com/36ihr0
SCRIPT
SetmemoryMax(1024)
SetMTMode(5, 9)
LoadPlugin("E:\Megui\tools\ffms\ffms2.dll")
FFVideoSource("D:\Downloads\Vedi.mkv", threads=1)
SetMTMode(2)
#deinterlace
crop(2, 88, -2, -88)
Spline36Resize(720,304) # Spline36 (Neutral)
DeGrainMedian(limitY=14, limitUV=16, mode=5, interlaced=false)
mergechroma(blur(1.3)) # Little Noise
UnDot()
Tweak(sat=1.15, bright=0, cont=1.15,hue=-2)
dfttest(sigma=5.6,sbsize=8,sosize=6,tbsize=5)
LSFMod(strength=75,smode=4, soothe=true, keep=100, edgemode=0, edgemaskHQ=false)
Sharpen(0.60, MMX=True)
Distributor()
I get Error on same script 1ST post http://prntscr.com/36isl3
SetmemoryMax(1024)
SetMTMode(5, 9)
LoadPlugin("D:\EDrive\megui\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("D:\EDrive\Downloads\Inga\VTS_03_1.d2v", info=3)
AssumeTFF()
SetMTMode(2)
LoadPlugin("D:\EDrive\megui\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
crop(0, 52, 0, -56)
Spline36Resize(640,272) # Spline36 (Neutral)
UnDot()
Tweak(sat=1.05, bright=-5, cont=1.05)
BlindPP(quant=30, cpu=4, moderate_h=15, moderate_v=25)
LSFmod(strength=75, smode=4, soothe=true, keep=100, edgemode=0, edgemaskHQ=false)
Asmodian
3rd April 2014, 03:49
Well as those look to run at similar speeds it probably isn't Distributor() after all.
Maybe play with the number of threads used by SetMTMode() to help stop crashing?
LoadPlugin("D:\EDrive\megui\tools\dgindex\DGDecode.dll")
LoadPlugin("D:\EDrive\megui\tools\avisynth_plugin\ColorMatrix.dll")
SetmemoryMax(1024)
SetMTMode(5, 4)
DGDecode_mpeg2source("D:\EDrive\Downloads\Inga\VTS_03_1.d2v", info=3)
ColorMatrix(hints=true, threads=0)
AssumeTFF()
SetMTMode(2, 4)
crop(0, 52, 0, -56)
Spline36Resize(640,272) # Spline36 (Neutral)
UnDot()
Tweak(sat=1.05, bright=-5, cont=1.05)
BlindPP(quant=30, cpu=4, moderate_h=15, moderate_v=25)
LSFmod(strength=75, smode=4, soothe=true, keep=100, edgemode=0, edgemaskHQ=false)
Sorry I don't know much about Megui so I am not sure how AvisynthMT would interact with whatever it is doing. :o
sutha25
3rd April 2014, 05:05
Well as those look to run at similar speeds it probably isn't Distributor() after all.
Maybe play with the number of threads used by SetMTMode() to help stop crashing?
LoadPlugin("D:\EDrive\megui\tools\dgindex\DGDecode.dll")
LoadPlugin("D:\EDrive\megui\tools\avisynth_plugin\ColorMatrix.dll")
SetmemoryMax(1024)
SetMTMode(5, 4)
DGDecode_mpeg2source("D:\EDrive\Downloads\Inga\VTS_03_1.d2v", info=3)
ColorMatrix(hints=true, threads=0)
AssumeTFF()
SetMTMode(2, 4)
crop(0, 52, 0, -56)
Spline36Resize(640,272) # Spline36 (Neutral)
UnDot()
Tweak(sat=1.05, bright=-5, cont=1.05)
BlindPP(quant=30, cpu=4, moderate_h=15, moderate_v=25)
LSFmod(strength=75, smode=4, soothe=true, keep=100, edgemode=0, edgemaskHQ=false)
Sorry I don't know much about Megui so I am not sure how AvisynthMT would interact with whatever it is doing. :o
thanks for the reply i think the problem is my ram with Distributor() i believe 32Bit can only go up to 2GB when megui goes to around 1.5GB is crashes even i tired lowering to SetMemoryMAX(512) still it goes up how can i check the megui memory leak test?
Asmodian
3rd April 2014, 07:41
Maybe don't worry about whatever Megui is using to "play" the script? Try starting an encode and see if it behaves better. It looks like Megui uses x264 directly when encoding to H.264 so don't use Distributor() when encoding.
sutha25
3rd April 2014, 07:42
Maybe don't worry about whatever Megui is using to "play" the script? Try starting an encode and see if it behaves better. It looks like Megui uses x264 directly when encoding to H.264 so don't use Distributor() when encoding.
iam doing with XVID profiles
Asmodian
3rd April 2014, 07:45
Ah, you would have to test with and without Distributor() then; I have no idea if Xvid calls Distributor() or not. :)
sutha25
3rd April 2014, 07:50
thanks iam getting new error now http://prntscr.com/36keob i have installed Visual 2008 SP1 X86
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.