View Full Version : A quick request / suggestion
Insomniak4700
12th July 2007, 01:26
I've been playing around with Avisynth MT and the speed increase with CCE is amazing on my machine. So far I didn't have any issues
Would it be possible to add a filter prefix (like p: or i: currently in rebuilder) to add a command before the MPEG2SOURCE line?
This way I would be able to add the Setmtmode(2) without using Rbopt.
jdobbs
12th July 2007, 02:21
Hmm... tell me more. I'm not familiar with that.
Fishman0919
12th July 2007, 03:12
You can read more here. LINK (http://forum.doom9.org/showthread.php?t=94996)
Insomniak4700
12th July 2007, 19:05
Avisynth MT is a special version of avisynth for multithreading.
on my X2 3800 Using CCE, my CPU usage goes to about 99% when I use it, and speed increases from about 3.8x to 5x ...
I know I can enable multiple process with HC, but avisynth MT gives me speeds I could only dream of with HC..
archaeo
12th July 2007, 23:30
Interesting.... can this be used thru RB by loading the MT.dll file and then adding the command MT() in the add filter box?
Boulder
13th July 2007, 05:12
Yes..
jdobbs
13th July 2007, 13:28
If it works as-is, I guess I don't understand the request?
Boulder
13th July 2007, 13:33
SetMTMode is a different thing, it needs to be appear in the script before the source is loaded.
Insomniak4700
13th July 2007, 17:50
it's as boulder said....
it dosen't work as is.. The MT() function does indeed work with rebuilder, but it will only speed up the filter called by MT().
ex: mt ("undot().deen") (can't remember the exact syntax as I never use the MT command)
By placing SetMTMode(#) before the mpg2source line, everything placed after that (including reading the source d2v) is sped up because it will run multithreaded.
Now let's say i'm not using any special filters, that I just want to encode as is, I will get a very IMPRESSIVE speed boost from the setmtmode function
ex:
setmtmode(2)
{mpeg2 source line}
{filters}
steptoe
13th July 2007, 20:24
That might explain why I don't see any speed increase when using SetMTMode in my filter scripts, rather than using the MT() options
jdobbs
14th July 2007, 00:53
Well I tried it, and my CCE SP speed on a test segment dropped from 4.98x down to 4.24x just by adding the SetMTMode(2) to the AVS before the MPEG2SOURCE statement. This was done on an AMD Opteron 165 (dual core).
Not much of an increase for my test. :(
jdobbs
14th July 2007, 01:10
I also can't seem to get the triple quotes to work at all... I'm trying to use this command:
mt(""" mpeg2source("c:\path\to\source.d2v") """,2)
and it finds a syntax error at column 6.
dynamis
14th July 2007, 05:48
i have an opteron 165 too and also lost speed :(
same deal on my Pentium D 2.8 GHz
is Avisynth MT only beneficial if u are running a bunch of filters?
i tend to run very few, or none at all.
Insomniak4700
14th July 2007, 06:12
I'll encode a DVD with and without setmtmode in OPV and post results sometime tommorrow....
I remember setmtmode(2) being a LOT faster last time I tried it...
ps: There would only be a point using this with CCE... HC or Quenc users should just use multiple encoder processes..
Boulder
14th July 2007, 09:44
CCE already utilizes multiple threads so I think adding more threads to that only causes scheduling problems for the CPU. I also don't think MT should be used with MPEG2Source (not sure if it even works, but there's the MTSource function you could try), rather use it with different filters. For example LimitedSharpenFaster and SeeSaw get a nice performance boost, DegrainMedian too.
Insomniak4700
15th July 2007, 04:14
It seems you guys are right... (my apologies!) I did most of my tests with captured MJPEG avis... I got about a 40% speed increase with these files.... When I tested w/ rebuilder, I had a few filters active....
*** EDIT ***
I did some more testing tonight with some heavy filters... (and re-read the MT docs)
I ran the prepare phase on a dvd, and tested with and without on a single AVS file.
here is the script
#------------------
# AVS File Created by DVD Rebuilder
# VOBID:02, CELLID:01
#------------------
LoadPlugin("C:\Program Files\DVD-RB PRO\DGDecode.dll")
mpeg2source("E:\DVDwork\D2VAVS\V01.D2V",idct=6)
limitedsharpenfaster()
trim(1526,2844)
ConvertToYUY2()
AudioDub(BlankClip())
There is a significant speed difference if setmtmode(2) is placed as the first line of the avisynth script, before even the loadplugin line.. as per the MT doc... (i used limitedsharpenfaster() to test, the encode ran almost twice as fast). tests were done with cce sp 2.67 without MT this took 59 seconds, and ran at an average of 1x speed with setmtmode(2) before loadplug(..) it took 39 seconds, running at a speed of 1.36x
this is in the MT docs:
SetMTmode(int mode,int threads)
Place this at the first line in the avs file to enable temporal (that is more than one frame is processed at the same time) multithreading. Use it later in the script to change the mode for the filters below it.
My original suggestion might still be useful when filtering is involved... maybe this could be a hidden feature? something to add in rebuilder.ini??
or maybe implemented in the filter editor? maybe something like "s:" (meaning "before the (s:)ource lines"?)
ps: i'm using nan's dgdecode, but I doubt there would be much of a difference with the normal version.
steptoe
2nd August 2007, 13:08
Any updates on MT and the suggestion to possibly have the option 's:' so that commands that can help speed the encode up using MT will work as they should
I use MT and it does speed things up when using the ultra slow filters and functions with multi-core processors
Insomniak4700
5th August 2007, 19:08
hi steptoe, how do you usualy use MT?
are you using the setmtmode() function or the MT() function?
I'm looking for a good "search and replace" tool to modify all AVS files at once, but I haven't found anything really nice that is freeware.
Boulder
5th August 2007, 20:06
I'm looking for a good "search and replace" tool to modify all AVS files at once, but I haven't found anything really nice that is freeware.I've used this one for all my needs : http://forum.doom9.org/showthread.php?p=762500#post762500
archaeo
12th February 2008, 15:41
Resurrecting an old thread here, but I'm having some trouble getting either the setMTmode( ), or MT( ) to work through DVDRB :confused: I'm either getting an error from avisynth stating that there is no such function, or, avisynth just won't run.
(I'm running avisynth 2.57, and have an E6700 dual core)
Here's what I've tried:
Downloaded MT.07, extracted contents into plug ins folder.
Now,
first question (Setting up the MT .dll):
Do I swap the 'standard' avisynth.dll in the windows/system32folder with the modified avisynth.dll (MT) found in the MT.07 folder? When I have done this, avisynth throws back an error when I try to run it:
avi file open ("file xyz.avs") error 0x80040154
Thinking I might have to register the new .dll, I even tried the regsvr command, to no avail.
Second Question (assuming MT install above worked):
In DVDRB, how does one properly 'call' either the MT( ) or the setMTmode( ) function into play? Do I need to use RBOpt to place the setMTmode( ) into the very first line of the script? How about MT("filter")? Do I have to load the "LoadPlugin (MT.dll)" into the filter chain in DVDRB in order to call the MT( ) function? The error I get is:
"There is no function named SetMTMode"
As I've said, I've read through these MT threads, but am left somewhat confused by either my syntax errors, or I've installed the MT. 0.7 incorrectly. Not sure which.
Anybody who has installed/used this successfully with RB, help is welcome :)
archaeo
13th February 2008, 00:53
Update:
problem solved.
The problem was with two missing .dll's:
msvcr71.dll msvcp71.dll
now it works just fine :)
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.