VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Page 1 of 4
1 2 3 ... LastLast
Results 1 to 30 of 106
Thread
  1. 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()
    Quote Quote  
  2. Member
    Join Date
    Jan 2003
    Location
    India
    Search Comp PM
    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()
    Quote Quote  
  3. I've been using 2.6 MT.
    Quote Quote  
  4. 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)
    I have a few problems:

    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.
    Quote Quote  
  5. 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.
    Quote Quote  
  6. Could you please point me to a page that offers that as I couldn't even see that mentioned on this page.

    Quote Quote  
  7. Oh, sorry. I don't think mt.dll isn't required anymore. Maybe you need to reboot?
    Quote Quote  
  8. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by holygamer View Post
    Code:
    AddBorders(11, 12, 11, 12)
    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.
    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

    Originally Posted by jagabo View Post
    Oh, sorry. I don't think mt.dll isn't required anymore. Maybe you need to reboot?
    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).
    Quote Quote  
  9. 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.
    Quote Quote  
  10. 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.
    Quote Quote  
  11. 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)
    I had this working before then I restored a backup of my PC before I had it working. Now it's not working and I don't know why. The script loads in AvsPmod as well, it just crashes when I try to encode the video with Simple x264 Launcher.
    Last edited by VideoFanatic; 4th Jul 2012 at 15:36.
    Quote Quote  
  12. Video Restorer lordsmurf's Avatar
    Join Date
    Jun 2003
    Location
    dFAQ.us/lordsmurf
    Search Comp PM
    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.
    Quote Quote  
  13. Originally Posted by holygamer View Post
    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)
    I had this working before then I restored a backup of my PC before I had it working. Now it's not working and I don't know why. The script loads in AvsPmod as well, it just crashes when I try to encode the video with Simple x264 Launcher.
    Simplify your script. To just Mpeg2Source(). Any problems? If not, add McTemporalDenoise(). If no problems add SetMtMode(5,3). If still no problems add SetMtMode(2,0). If only that last command caused problems try changing SetMtMode(5,3) to "5,1", or "5,2".
    Quote Quote  
  14. 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.
    Quote Quote  
  15. 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)
    However when I add the following to the bottom it crashes saying that "avs2yuv_x86.exe has stopped working".

    Code:
    McTemporalDenoise(settings="medium", interlaced=true)
    Using McTemporalDenoise without MT does not cause it to crash!
    Last edited by VideoFanatic; 6th Jul 2012 at 21:52.
    Quote Quote  
  16. Can you open it in VirtualDub? How about directly with x264?
    Quote Quote  
  17. 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.
    Quote Quote  
  18. btw. afaik instead of setMTMode(2) you need to use setMTMode(3) for the part of the script where you use MCTemporalDenoise,..
    Quote Quote  
  19. 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? I'm sure the method I mentionedd before used to work but now it's not.
    Quote Quote  
  20. Why do I need to enter 3?
    Because afaik, unless you use 3 McTemporalDenoise tends to be instable (crashes from time to time), especially if it's not the last filter in the script,...
    -> 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
    Quote Quote  
  21. 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.
    Quote Quote  
  22. Originally Posted by holygamer View Post
    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)
    I tried the above but it still crashed. It doesn't look like MCTempoaralDeniose will work in MT mode. Is there any alternative filter I could use which does the same as McTemporalDenoise(settings="medium", interlaced=true)?
    Quote Quote  
  23. 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,..
    Quote Quote  
  24. 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.
    Quote Quote  
  25. 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,..
    Quote Quote  
  26. 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?
    Quote Quote  
  27. 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?
    for me it works with SetMTMode(3), but I don't use: CPU=6 and I normally don't have interlaced input, and if I have it, the first thing after loading the source (and color format corrections) is to deinterlace it,...

    Cu Selur
    Quote Quote  
  28. 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?
    Quote Quote  
  29. 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
    As a side note: A lot of people create their Avisynth scripts either through an encoder frontend or an Avisynth Editor like AvsPmod, to see the changes of their script directly.

    Cu Selur
    Quote Quote  
  30. Banned
    Join Date
    Oct 2004
    Location
    New York, US
    Search Comp PM
    Originally Posted by Selur View Post
    Code:
    LoadCPlugin("G:\Hybrid\avisynthPlugins\yadif.dll")
    . . . . . . .
    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
    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.
    Quote Quote  



Similar Threads