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 > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 31st January 2010, 08:25   #1101  |  Link
kool
Registered User
 
Join Date: Nov 2009
Posts: 79
hmn, So here which installer I must use Avisynth 2.5.8 and replace the avisynth.dll with the one in post 1 or Avisynth 2.5.7 ?
kool is offline   Reply With Quote
Old 31st January 2010, 09:15   #1102  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Well, I am no expert and just stick with the easy reliable stuff. I'd still like to see someone post on specific benefits of the newer version(s).

I would venture a guess that since MT0.7 is 2.5.7 based, it may be safest to install avisynth 2.5.7 and replace the the DLL with the MT0.7 anisynth.dll according to its instructions.

If you're using some filters like Fizick's MVtools2 etc, don't forget to follow his instructions re d/l and copying 32bit fftw3.dll into Windows\System32 (or equiv 32bit folder on 64 bit o/s) - Make sure you have the right versions. If I recall, the d/l is somewhere on here http://www.fftw.org/install/windows.html however I vaguely recall an issue with a new version of it, so maybe check on Fizick's site to check it out.

Some other plugins may require the right C++ 2005/2007 runtimes - here's a couple of Microsoft links to the end-user installs for those runtimes -
http://www.microsoft.com/downloads/d...displaylang=en
http://www.microsoft.com/downloads/d...displaylang=en
I'm unsure about the Win7 validity of those, you may like to search microsoft yourself to ensure they're the latest.

In some cases you might also need to source the latest versions of msvcp71.dll and msvcr71.dll and copy those into Windows\System32 (or equiv 32bit folder on 64 bit o/s).

Last edited by hydra3333; 31st January 2010 at 09:22.
hydra3333 is offline   Reply With Quote
Old 2nd February 2010, 14:19   #1103  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Quote:
Originally Posted by hydra3333 View Post
Well, (nothing to do with multithreading) it's the "older" mv mvtools. have a look at the download page for the new tools and function names.
I dont know what's wrong with the code. I took it from here http://avisynth.org/mediawiki/Denoisers and adapted it to MvDegrain3. Mvtools is one thing that I struggle to understand, there are too many functions with many flags.

isnt there an easy standard heavy MvDegrain3 script? The MvTools download page only shows MvDegrain2 examples with MvAnalyse and then the function MvDegrain. I wonder if thats a lazy script or better ones are possible (smarter).

Anyway, I will have a look on the MvTools thread, although Im afraid everything has to do with the other functions.
Dogway is offline   Reply With Quote
Old 2nd February 2010, 14:39   #1104  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Quote:
Originally Posted by Dogway View Post
I dont know what's wrong with the code
have a look at the NEW sources ... functions MVxxxx are replaced by Mxxxx ... http://avisynth.org.ru/mvtools/mvtools2.html

Quote:
Originally Posted by Dogway View Post
isnt there an easy standard heavy MvDegrain3 script? The MvTools download page only shows MvDegrain2 examples with MvAnalyse and then the function MvDegrain. I wonder if thats a lazy script or better ones are possible (smarter).

Anyway, I will have a look on the MvTools thread, although Im afraid everything has to do with the other functions.
Some commented-out roughie examples which might work:-
Code:
#progressive-only MSUPER/MDegrain1 for use with SetMTMode(2) 
#super = MSuper(pel=2,chroma=true) 
#backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=8, overlap=4, chroma=true) 
#forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=8, overlap=4, chroma=true) 
#MDegrain1(super, backward_vec1,forward_vec1,thSAD=400,plane=4) 
# 
#progressive-only MSUPER/MDegrain2 for use with SetMTMode(2) 
#super = MSuper(pel=2,chroma=true) 
#backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=8, overlap=4, chroma=true) 
#backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=8, overlap=4, chroma=true) 
#forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=8, overlap=4, chroma=true) 
#forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=8, overlap=4, chroma=true) 
#MDegrain2(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=400,plane=4) 
#  
#progressive-only MSUPER/MDegrain3 for use with SetMTMode(2) 
#super = MSuper(pel=2,chroma=true) 
#backward_vec3 = MAnalyse(super, isb = true, delta = 3, blksize=8, overlap=4, chroma=true) 
#backward_vec2 = MAnalyse(super, isb = true, delta = 2, blksize=8, overlap=4, chroma=true) 
#backward_vec1 = MAnalyse(super, isb = true, delta = 1, blksize=8, overlap=4, chroma=true) 
#forward_vec1 = MAnalyse(super, isb = false, delta = 1, blksize=8, overlap=4, chroma=true) 
#forward_vec2 = MAnalyse(super, isb = false, delta = 2, blksize=8, overlap=4, chroma=true) 
#forward_vec3 = MAnalyse(super, isb = false, delta = 3, blksize=8, overlap=4, chroma=true) 
#MDegrain3(super, backward_vec1,forward_vec1,backward_vec2,forward_vec2,backward_vec3,forward_vec3,thSAD=400,plane=4)
hydra3333 is offline   Reply With Quote
Old 2nd February 2010, 15:14   #1105  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Thanks a lot. Right now I was just reading about that of Mvtools2 and msuper stuff. This is more complete so its helpful, now theres no need for motion compensation or mask? Im talking from my ignorance, just trying to stick to an useful script and dont tweak much.

I saw on the thread a similar script starting with a sharpener, I dont know the "usefulness" of it.
Anyways its a starting point. I will try to develop from it on the mvtools thread. thank you.

Quote:
src = last
shrp = src.msharpen()

src_super = src.MSuper()
shrp_super = shrp.MSuper(levels=1)

bv3 = MAnalyse(src_super, isb=true, delta=3, overlap=4)
...
Dogway is offline   Reply With Quote
Old 3rd February 2010, 09:46   #1106  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Those are questions for the thread on MVtools, not MT ...
hydra3333 is offline   Reply With Quote
Old 15th February 2010, 09:44   #1107  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Thanks hydra, I have improved quite a bit since then.

Now I have some questions on MT.
I would like to know if theres a way to use Deen with MT; if it isnt what other filter does a similar function? Now Im using SetMTmode(5) with it, but it slows down the script very much.

Another question. Right now Im dealing with a Avisynth 2.5.7 and MT 0.7 on a Windows 7 x64, 4 cores. And I can only make work the cpu to 25%, but If I use MT("filter") It works up to 100%. Is there any info about this? Some incompatibility with certain CPU's?
Dogway is offline   Reply With Quote
Old 15th February 2010, 10:19   #1108  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Sorry, never used Deen. With a Q9450 4-core, I always use SetMTmode(mode=5,threads=4) as the 1st line (before any Opens) and then SetMTmode(mode=2,threads=4) just after any Open and AssumexFF and AssumeFPS statements. I also use Distributor() as the last line in the script.
Code:
# Distributor() should only be used when loading the script into applications which talk to avisynth directly  
# e.g. HC and MeGUI. If the program opens the .avs file as an avi file (like virtualdub/mod, x264, xvid_encraw etc.)  
# then you don't need (and shouldn't have) the distributor call at the end. 
# http://forum.doom9.org/showthread.php?p=1136518#post1136518 
##### "HC uses custom avisynth routines, you have to add Distributor() to the end of the script." 
Distributor() # use this when using HC and SetMTmode, per http://forum.doom9.org/showthread.php?p=1063622#post1063622
SetMTmode works quite differently to MT function, please refer to the wiki for examples of that (also be careful with interlaced material).

I have a Q9450 4-core with 4Gb, 2 sata disk arrangement, and venerable XP, where the input is from one disk and the output is to the other (to maximise throughput) and I have almost never see 100% cpu utilization (hovers 50%-75% depending).

I am encoding with HCenc023, what are you using ? Is it a limitation in your encoder ? After that, I'm out of ideas.

Last edited by hydra3333; 15th February 2010 at 10:25.
hydra3333 is offline   Reply With Quote
Old 15th February 2010, 10:38   #1109  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
I do the same as you, but I use Megui. I think I dont need the Distributor since I have no problems opening them in the previewers.
I normally use MT() for certain filters only as tnl, or other heavy ones, as SetMTmode goes quite nice. Thanks for the help, I will try to do some more tests.
Dogway is offline   Reply With Quote
Old 15th February 2010, 11:00   #1110  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
OK. Don't forget to use a good "overlap" if you're using the MT function since it splits up the picture to process Why not test Distributor() and see if it helps ? I wouldn't know, but hey if you come up a winner you'd be really happy.

Oh, if you're doing 2-pass encoding then you'd expect enormous elapsed times since your script is being processed twice (unless megui is smart and uses the lossless file approach). If you do it by hand, consider using the lossless file approach (for hcenc023, remember to put 2 or more spaces after the relevant keyword in HC's .ini file if you use one). You need looots of free disk space.

Last edited by hydra3333; 15th February 2010 at 11:04.
hydra3333 is offline   Reply With Quote
Old 15th February 2010, 11:06   #1111  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
This is how I use it. MT("""tnlmeans(ax=3,ay=3,az=8,sx=2,sy=2,bx=1,by=1,sse=true)""",4,2), Im not sure but 4 is the overlap right? and 2 threads. or the other way around? Help says overlap is in case I have artifacts on the borders, so I set margin.

I will try Distributor() then, although my system goes pretty good, the real problem was on a friend's, but I will give it a chance anyway.

Last edited by Dogway; 15th February 2010 at 11:09.
Dogway is offline   Reply With Quote
Old 15th February 2010, 11:20   #1112  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by Dogway View Post
I do the same as you, but I use Megui. I think I dont need the Distributor since I have no problems opening them in the previewers.
If you don't call Distributor() when using an application that requires it, the script will still open without problems, but you will lose the benefit of the multi-threading.

Also, because of the different ways that SetMTMode() and MT() work (see here), you may not get full core utilisation with SetMTMode - a lot depends on the individual filters and their frame access patterns.
Gavino is offline   Reply With Quote
Old 15th February 2010, 11:29   #1113  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
I will add it in expect to dont get any errors.
Normally I only use a few filters, for MVtools and Masktools (mostly) and everything else I use SetMTMode(2), I have only used MT() for tnlmeans and ttempsmooth, but this last one I think is outdated, right?
Thanks for the guidance Gavino, I had already saw that, normally I copy what trustful users post in the scripts, as I havent found a list with the prefered method in which filter to use.
Dogway is offline   Reply With Quote
Old 15th February 2010, 22:51   #1114  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
please see this.
Quote:
Originally Posted by Gavino View Post
When using SetMTMode, Distributor() is the function which co-ordinates the multiple threads and provides a coherent output stream. When using Avisynth via the VfW interface, it is called automatically at the end of the script.

However, for applications that bypass the VfW interface and talk directly to Avisynth (such as hc), it is necessary to call it explicitly instead. Calling it when not required is a bad idea, as is failing to call it when required, so you need to know what method your Avisynth client application uses to communicate with Avisynth.
and this
Quote:
Originally Posted by Didée View Post
Par.ex., I see people sometimes use Distributor(), sometimes not, and I have no clue what's the deal ...

In any case, multithreading of TGMC (so that it's worthwhile) is pretty difficult, because of the complexity of its processing chain.

MT() should be possible, but will worsen the motion search.
SetMTMode probably is a bad idea, because it requires too much ressources. (Having multiple dredges instead of one doesn't help much when it's still only one truck to take the excavation - you can only load so much onto one truck, no matter how many dredges.)
Best bet probably is to use the multithreaded MVTools of josey_wells (though it's the old v1.9 branch) ... using several cores to spread the computational effort for one frame, that's reasonable. Opposed to SetMTmode, which basically means to run TGMC {cores}-times in parallel, which is likely to fail.

In any case, this is the wrong thread for that topic.

If only a tiny fraction of the manpower & ingenuity that's going into x264 would go into MVTools, and Avisynth's/MVTools's multithreading ... <dreams>
hydra3333 is offline   Reply With Quote
Old 12th March 2010, 06:10   #1115  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
Hello again, now Im getting crashes in my script, and the reason is using SetMTmode with MT, I tried commenting the MT line and no problem. But what can I do? I do need TGMC and srestore in multithreading, and well tnlmeans too as it is slow as hell. I tried writting setMTmode(5) before the MT, and it crashed too. Im not sure what can I try now

Quote:
SetMTmode(5)
setmemorymax(768)
DGDecode_MPEG2Source("source.d2v")
SetMTmode(2)
ColorMatrix(dest=2,hints=false,interlaced=true,threads=2)

AssumeFPS(30000,1001)
tempgaussmc_beta2(2,2,3,EdiMode="NNEDI2", qual=3)
SRestore(frate=23.976)

MT("""tnlmeans(ax=11,ay=10,az=4,sx=2,sy=2,bx=1,by=1,h=1.0,a=0.5,sse=true)""",4,2)

DeHalo_alpha(rx=1.3, ry=1.3, darkstr=0.4, brightstr=1.0, ss=1.0, lowsens=50,highsens=65)
LSFmod(defaults="slow", strength=20, edgemode=0)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 12th March 2010 at 06:16.
Dogway is offline   Reply With Quote
Old 12th March 2010, 07:54   #1116  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Both SetMTmode and MT used in the same script ? wow a glutton for punishment
hydra3333 is offline   Reply With Quote
Old 12th March 2010, 08:53   #1117  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
lol, well I already know "that" is the problem, I made my homework . Its just what workaround there is for this?. I have managed to use both in other scripts without crashing, and tnlmeans without MT is just double long looooooong time. tnlmeans MUST be multithreading, but Im unsure it can work with SetMTmode(2) alone nicely, if I dont remember wrong.

Edit: Definetly not, tnlmeans consumes double the time with setmode than MT. Maybe wrapping my other filters with MT? Although I dont know which of them work nice with this (I know TGMC doesnt).
Edit2: Ok LSFmod seems to have problems with setmtmode too, although some users could run it, and being faster than MT. TGMCbeta2 lost the MT flag (Maybe due to old MTMasktools not being v2.0?). In case its transcendent, the errors Im getting are Visual c++ x264 errors. Reasons are the same, the multithreading, but some inconsistencies could deal any better with any certain version of visual c++ or net framework?

I think Ill be moving to this thread: http://forum.doom9.org/showthread.php?t=153030&page=2
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 12th March 2010 at 12:20.
Dogway is offline   Reply With Quote
Old 12th March 2010, 12:19   #1118  |  Link
hydra3333
Registered User
 
Join Date: Oct 2009
Location: crow-land
Posts: 540
Er I don't understand what you say. SetMTmode already makes it multi-threaded - then, on top of that, you split up the frames into bits and further multi-thread process those too with one filter (that's what MT does)... I'm not sure you're actually achieving much more by using MT instead of just leaving that off and relying on the setMTmode alone.
hydra3333 is offline   Reply With Quote
Old 12th March 2010, 12:52   #1119  |  Link
Dogway
Registered User
 
Join Date: Nov 2009
Posts: 2,352
the wiki says that using MT autoactivates mode5, so you dont do anything on top(but I have tried to manually setmode5 too just in case). Certain filters work better with the MT routine, this one (tnlmeans) being one of them. Just tested it on a still: 1:37s with MT, 3:16 with setmode2.

Edit: Also relating to my previous post SetMTmode does work with MT, see here. But it doesnt in my script. Any other reason is discarded because it does work if I remove the tnlmeans line or the MT portion of it. I have also updated both visual c++ and net framework to be safe on that side. Just for further conviction, I revised my script again (although it was already behaving as I said) and made some modfications, but everything is the same. So there must be something with the dll`s or my x264 settings in conflict with MT:

Quote:
x264-rev1471-nl-hrd.exe --profile high --preset veryslow --tune animation --psy-rd 1.0:0.0 --pass 2 --bitrate 4000 --stats ".stats" --thread-input --threads 2 --deblock -1:-1 --bframes 8 --b-pyramid 0 --scenecut 30 --ref 16 --chroma-qp-offset -2 --no-mbtree --me tesa --merange 16 --aq-mode 0 --no-fast-pskip --sar 10:11 -o "output.mp4" "script2.avs"
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread

Last edited by Dogway; 13th March 2010 at 14:02.
Dogway is offline   Reply With Quote
Old 9th June 2010, 19:40   #1120  |  Link
Leinad4Mind
Please, DeInterlace me!
 
Leinad4Mind's Avatar
 
Join Date: Jan 2007
Location: Portugal, Porto
Posts: 81
How can this filter accept spline64resize? It would be great to incorporate him.

Best Regards.
__________________
Who am I?! I'm GOD... 8for it... father of my godchilds.
Leinad4Mind 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 20:39.


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