Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Newbies

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st April 2014, 14:09   #1  |  Link
sutha25
Registered User
 
Join Date: Mar 2014
Posts: 25
Getting Slow FPS with SetMTMode

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
Code:
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)
Code:
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)
Code:
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
sutha25 is offline   Reply With Quote
Old 2nd April 2014, 09:07   #2  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,049
Add this to the end of your script, but only for Megui:

Distributor()
Asmodian is online now   Reply With Quote
Old 2nd April 2014, 11:36   #3  |  Link
sutha25
Registered User
 
Join Date: Mar 2014
Posts: 25
Quote:
Originally Posted by Asmodian View Post
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?
sutha25 is offline   Reply With Quote
Old 2nd April 2014, 11:54   #4  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,031
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.
Groucho2004 is offline   Reply With Quote
Old 2nd April 2014, 12:06   #5  |  Link
sutha25
Registered User
 
Join Date: Mar 2014
Posts: 25
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
sutha25 is offline   Reply With Quote
Old 2nd April 2014, 12:13   #6  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,031
Quote:
Originally Posted by sutha25 View Post
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

I was referring to the megui screen shot from your first post. What is megui doing there (playing through file...)? What is the purpose?
Groucho2004 is offline   Reply With Quote
Old 2nd April 2014, 12:19   #7  |  Link
sutha25
Registered User
 
Join Date: Mar 2014
Posts: 25
Quote:
Originally Posted by Groucho2004 View Post

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?
sutha25 is offline   Reply With Quote
Old 2nd April 2014, 12:23   #8  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,031
Your best bet to get help is to post your problems in the megui bug report thread.
Groucho2004 is offline   Reply With Quote
Old 2nd April 2014, 12:27   #9  |  Link
sutha25
Registered User
 
Join Date: Mar 2014
Posts: 25
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?
sutha25 is offline   Reply With Quote
Old 2nd April 2014, 12:41   #10  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,031
Quote:
Originally Posted by sutha25 View Post
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.
Groucho2004 is offline   Reply With Quote
Old 2nd April 2014, 21:46   #11  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,049
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?
Asmodian is online now   Reply With Quote
Old 2nd April 2014, 22:24   #12  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,031
Quote:
Originally Posted by Asmodian View Post
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.
Groucho2004 is offline   Reply With Quote
Old 2nd April 2014, 23:17   #13  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,049
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? I notice in your screenshot you are using Avisynth version 2.5.8.5.

Last edited by Asmodian; 2nd April 2014 at 23:39.
Asmodian is online now   Reply With Quote
Old 3rd April 2014, 01:38   #14  |  Link
sutha25
Registered User
 
Join Date: Mar 2014
Posts: 25
Quote:
Originally Posted by Asmodian View Post
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? 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
Code:
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
Code:
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)

Last edited by sutha25; 3rd April 2014 at 02:27.
sutha25 is offline   Reply With Quote
Old 3rd April 2014, 03:49   #15  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,049
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?

Code:
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.

Last edited by Asmodian; 3rd April 2014 at 03:52.
Asmodian is online now   Reply With Quote
Old 3rd April 2014, 05:05   #16  |  Link
sutha25
Registered User
 
Join Date: Mar 2014
Posts: 25
Quote:
Originally Posted by Asmodian View Post
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?

Code:
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.
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?
sutha25 is offline   Reply With Quote
Old 3rd April 2014, 07:41   #17  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,049
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.
Asmodian is online now   Reply With Quote
Old 3rd April 2014, 07:42   #18  |  Link
sutha25
Registered User
 
Join Date: Mar 2014
Posts: 25
Quote:
Originally Posted by Asmodian View Post
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
sutha25 is offline   Reply With Quote
Old 3rd April 2014, 07:45   #19  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,049
Ah, you would have to test with and without Distributor() then; I have no idea if Xvid calls Distributor() or not.
Asmodian is online now   Reply With Quote
Old 3rd April 2014, 07:50   #20  |  Link
sutha25
Registered User
 
Join Date: Mar 2014
Posts: 25
thanks iam getting new error now http://prntscr.com/36keob i have installed Visual 2008 SP1 X86
sutha25 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.