I would like to decrease the time it takes for scripts to run. Which one of these should I be using to get the best speed gains and compatibility with plugins? There's no point in me using them if they're going to crash.
Which of these should I be using to achieve that?
Avisynth 2.6 MT
MT 0.7(+custom avisynth)a filter to run filters multithreaded. Usefull for SMP or HT
SEt's Avisynth 2.5.8 MT compiled for *X86_64* :This doesn't seem to be maintained any more.
These are the scripts I use which would need to work with any of the above programs:
Mpeg2Source("I:\New\z = Encode\Raw January 13 1997 Fixed.d2v", CPU=6)
TTempSmoothF(maxr=3, lthresh=8, cthresh=5, strength=4, interlaced=true)
turnleft().nnedi3(dh=true).turnright()
Load_Stdcall_plugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll")
Load_Stdcall_plugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll")
AssumeTFF()
Yadif(mode=1, order=1)
mdata = DePanEstimate(dxmax=0)
Vinverse()
DePanStabilize(last, data=mdata, initzoom=1.05, dxmax=0, dymax=4)
SeparateFields()
SelectEvery(4,0,3)
Weave()
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 30 of 106
Thread
-
-
afaik, avisynth 2.5.8 MT or 2.6 MT should both work ok.
I use the 2.5.8 MT and get all my cores to work with no crashes by using
setmtmode(5,0) just before the source line (in your example it would be the line before Mpeg2Source)
and
setmtmode(2,0) immediately after the source line.
e.g. your example would become
setmtmode(5,0)
Mpeg2Source("I:\New\z = Encode\Raw January 13 1997 Fixed.d2v", CPU=6)
setmtmode(2,0)
TTempSmoothF(maxr=3, lthresh=8, cthresh=5, strength=4, interlaced=true)
turnleft().nnedi3(dh=true).turnright()
Load_Stdcall_plugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll")
Load_Stdcall_plugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll")
AssumeTFF()
Yadif(mode=1, order=1)
mdata = DePanEstimate(dxmax=0)
Vinverse()
DePanStabilize(last, data=mdata, initzoom=1.05, dxmax=0, dymax=4)
SeparateFields()
SelectEvery(4,0,3)
Weave() -
I have a dual-core PC with Vista 32-bit and 4GB Ram.
I did what it said on this page and replaced the avisynth file in System 32 with the MT Avisynth file. I am now using the following script:
Code:setmtmode(5,0) Mpeg2Source("I:\New\z = Encode\Raw December 11 2000 Fixed.d2v", CPU=6) setmtmode(2,0) DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true) Crop(8,12,-14,-12) Tweak(Bright=0, Sat=0.7 , Cont=1.0, Hue=0.0, Coring=False) AddBorders(11, 12, 11, 12)
1. I like to see what my improvements look like before I encode the video by using AvsPmod. I get this script error: "There is no function named "setmtmode" on line 1" so I can't use AvsPmod.
2. MT doesn't seem to support having borders or crops on both the width AND height. This seems silly. How am I supposed to use MT if I can't crop or add borders.
3. I let the script run for a couple of minutes to see how high the frames per second speed would go up to. It was around 14 at max. However I got that speed before without MT! Am I doing something wrong? I am encoding h264.Last edited by VideoFanatic; 15th Jun 2012 at 16:43.
-
Get mt.dll and put it in your plugins folder. Crop and AddBorders works exactly the same as in the single threaded version. Without SetMtMode() you will get no improvement.
-
Oh, sorry. I don't think mt.dll isn't required anymore. Maybe you need to reboot?
-
Avisynth 2.6 (and hence 2.6 MT) does not allow odd numbers in Crop or AddBorders with YV12 clips.
http://forum.doom9.org/showthread.php?p=1567181#post1567181
mt.dll is not supported in the 2.6 MT version.
It was never required for SetMTMode anyway, only for the separate MT() function.
You shouldn't need to reboot when installing the MT avisynth.dll.
However, you need to unload any currently loaded instances of Avisynth.
(In AvsP: release all videos from memory). -
OK guys I restarted my PC (I have a dual core) and I'm still getting the same 17.88 fps speed with normal and MT avisynth.
I have Avisynth 2.5.8. I replaced the system32 avisynth file with the MT 2.6 file. I am using this script with Simple x264 Launcher to make an h264 file:
Code:setmtmode(5,0) Mpeg2Source("I:\file.d2v", CPU=6) setmtmode(2,0) DeGrainMedian(limitY=2, limitUV=3, mode=1, interlaced=true) Crop(0,12,0,-12) Tweak(Bright=0, Sat=1.0, Cont=0.9, Hue=10.0, Coring=False) AddBorders(0, 12, 0, 12)
Last edited by VideoFanatic; 17th Jun 2012 at 00:28.
-
Look at Task Manager. What's your CPU usage? Try using 3 threads on a dual core system -- SetMtMode(5,3). If x264 is your bottleneck speeding up AviSynth won't help much.
-
I've replaced the avisynth.dll in the System 32 folder with the file from MT. However when I try to encode the video in Simple x264 Launcher it crashes and I get the following message "avs2yux_x86.exe has stopped working". Yet if I encode with HC Encoder I don't get any problems.
I'm not sure what I've done wrong. This is my script:
Code:setmtmode(5,3) Mpeg2Source("L:\Raw 2001\01 Raw January 2001\Jan 8\Raw January 08 2001.d2v", CPU=6) setmtmode(2,0) McTemporalDenoise(settings="medium", interlaced=true)
Last edited by VideoFanatic; 4th Jul 2012 at 15:36.
-
I've run into some issues with bad frames on encodes longer than 12 hours on MT.
The non-MT had no such issues.
Same for the MT Huffyuv vs non-MT.Want my help? Ask here! (not via PM!)
FAQs: Best Blank Discs • Best TBCs • Best VCRs for capture • Restore VHS -
-
Thanks, I've solved the problem. I was missing a plugin and I also made the mistake of copying and pasting my script into Microsoft Word then copying it back into the avs file which somehow caused the encoding to fail.
-
I spoke too soon. The following code works:
Code:setmtmode(5,3) Mpeg2Source("L:\Raw 2001\01 Raw January 2001\Jan 8\Raw January 08 2001.d2v", CPU=6) setmtmode(2,0)
Code:McTemporalDenoise(settings="medium", interlaced=true)
Last edited by VideoFanatic; 6th Jul 2012 at 21:52.
-
I had an MPEG2 and I saved the project file with DGIndex. I dragged the script in VirtualDub. It opens and I can see the video. How do I save the video? The only option I see is File, Save as AVI. I did that then the program crashed. Here's the crash screenshot: http://img151.imageshack.us/img151/3035/crashzt.jpg
Apart from the Avisynth plugins do I need anything else to make VirtualDub work apart from the program?
In Simple x264 Launcher MCTemporalDenoise works without MT mode. But with it, it crashes. HC Encoder doesn't crash but the resulting video has a whitle glow around all objects.
I can use other scripts such as DegrainMedian with MT mode without crashing.Last edited by VideoFanatic; 7th Jul 2012 at 00:32.
-
btw. afaik instead of setMTMode(2) you need to use setMTMode(3) for the part of the script where you use MCTemporalDenoise,..
-
So do I do this?
Code:setmtmode(5,3) Mpeg2Source("L:\Raw 2001\01 Raw January 2001\Jan 8\Raw January 08 2001.d2v", CPU=6) setmtmode(3,0) McTemporalDenoise(settings="medium", interlaced=true)
-
Why do I need to enter 3?
-> if mode 2 works for you without a problem use mode 2, otherwise I would try mode 3. (I'm not sure but from what I remember from my last time using McTemporalDenoise, mode 3 when using a specific option in it,.. might be the interlaced = true,..)
Cu Selur -
Yes, multithreading is difficult to program for properly. Some filter used by McTemporalDenoise() appears to have a problem so trying different modes is in order.
-
-
than try, the other mode values and why do you set the second parameter ?
if it crashes with all mode values try if it works without MT and if the script works with onlky the MPEG2Source call in it,.. -
I will told to have setmtmode before and after MPEG2Source so that's what I did. Is it wrong?
The script works fine without MT but crashes in MT mode. -
Source filters normally all need Mode 5, after that most other filters work with mode 2 if they don't work with mode 2 one has to try the other modes,..
-
I tried different MT settings before and found that only the following gave any speed benefit over non-MT. I'm encoding h264 with a dual-core PC.
setmtmode(5,3) Mpeg2Source("L:\Raw 2001\01 Raw January 2001\Jan 8\Raw January 08 2001.d2v", CPU=6) setmtmode(2,0)
Do you know of a specific setting that will work? -
If you don't call other filters after the source filter no additional SetMTMode calls are required,..
also depending on the application you feed the script to, you need to add
distributor()
to the end of the script,..
Do you know of a specific setting that will work?
Cu Selur -
I thought de-interlacing a video for viewing on a TV will cause a loss of quality or is there a filter I could use to prevent or minimize the quality loss? Is so could you please provide a sample script?
-
Example script - generated with Hybrid and it's avisynth extension - for using QTGMC for Deinterlacing and Deblock_QED for non aggressive deblocking, with some comments I added:
Code:SetMemoryMax(768) #setting max memory, actually usage can get a lot higher SetMTMode(5,8) #setting MT Mode #Loading Plugins: I normally avoid autoloading stuff from the Avisynth/plugins folder, since this can cause problems, i.e. when putting the RemoveGrain.dlls there ;) LoadPlugin("G:\Hybrid\avisynthPlugins\DGDecode.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\LoadDll.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\AddGrainC.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\dfttest.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\DirectShowSource.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\EEDI2.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\eedi3.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\FFT3DFilter.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\mt_masktools-26.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\mvtools2.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\nnedi.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\nnedi2.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\nnedi3.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\RemoveGrainSSE2.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\RepairSSE2.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\SSE2Tools.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\TDeint.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\VerticalCleanerSSE2.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\ffms2.dll") LoadCPlugin("G:\Hybrid\avisynthPlugins\yadif.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\DctFilter.dll") LoadPlugin("G:\Hybrid\avisynthPlugins\deblock.dll") #Loading dlls: these I load since FFT3DFilter needs them and I don't like to have Avisynth stuff in my System folders LoadDll("G:\Hybrid\avisynthPlugins\libfftw3f-3.dll") LoadDll("G:\Hybrid\avisynthPlugins\fftw3.dll") #Importing scripts: Import("G:\Hybrid\avisynthPlugins\Deblock_QED.avs") Import("G:\Hybrid\avisynthPlugins\QTGMC-3.33.avsi") #Loading source: (setMTMode is still at 5, for general hints regarding mode see: http://avisynth.org/mediawiki/MT_support_page which is a good start even though it is not always right, i.e. they use MPEG2Source with mode 1, which never worked for me) MPEG2Source(d2v="H:\Temp.d2v") SetMTMode(2) #changing MT mode to 2 QTGMC(Preset="Faster") # deinterlacing, see: http://forum.doom9.org/showthread.php?t=156028 SelectEven() # since QTGMC normally is a bobber, I now throwing away half of the images Deblock_QED(quant1=24,quant2=26,aOff1=1,bOff1=1,aOff2=2,bOff2=2,uv=3) # soft deblocking, see: http://avisynth.org/mediawiki/Deblock_QED distributor() # adding distributor return(last) #returning content
Cu Selur -
Which statement in this script is using yadif? QTGMC at "faster" doesn't use it.
https://docs.google.com/spreadsheet/ccc?key=0AsftVT5A1FqQdHRKTUdlUXVUaDlxUE43c0NsQ3dFR3c#gid=0
With final output as standard DVD, the video might not play well on some player/tv setups. I'd test first.
If holygamer doesn't like the slow speed of plugins like MCTemporalDenoise, he certainly won't like just-as-slow-or-slower QTGMC. You could try the ultra-fast preset, but results aren't quite as slick.Last edited by sanlyn; 22nd Mar 2014 at 21:20.
Similar Threads
-
Help needed! Hacking LG BD390 to Multi region
By PANOS in forum Newbie / General discussionsReplies: 0Last Post: 13th Oct 2011, 08:35 -
AviSynth much needed help!
By dbanimal in forum EditingReplies: 18Last Post: 28th Jan 2011, 10:33 -
Query about Multi-threaded vide codecs?
By goldenmean in forum Newbie / General discussionsReplies: 2Last Post: 9th Feb 2010, 15:59 -
Multi-threaded video conversion - how to check it?
By usta in forum Video ConversionReplies: 8Last Post: 12th Nov 2009, 08:16 -
Guide Needed for Authoring Multi Language DVD with multi language menus
By kemimich in forum Authoring (DVD)Replies: 2Last Post: 24th Dec 2008, 16:46