View Full Version : MCTemporalDenoise [v1.4.20 - Update 2010/07/02]
Didée
22nd February 2011, 22:27
McTemporalDenoise is a jewel. You get everything that a user could want, all in one package.
To put an analogy ...
MDegrain1/2/3:
http://img87.imageshack.us/img87/1124/messer2b.jpg
MCTemporalDenoise:
http://img16.imageshack.us/img16/8671/messer9b.jpg
:D
Hint: this ain't a straight compliment.
Zep
23rd February 2011, 15:56
To put an analogy ...
lol good stuff :p
Zep
23rd February 2011, 16:04
Hint: this ain't a straight compliment.
so break it down into more specialized functions that can be called from other scripts that may not need the over kill that MCTD is for most.
Maybe this is a chance to optimize a few things as well. :)
-Vit-
23rd February 2011, 18:03
I face the same monster-script problem with QTGMC. But there simply aren't the language constructs in AviSynth to create nicely componentized scripts. The advantage of monster scripts is that they can resuse processing from earlier steps. QTGMC performs motion analysis once, then reuses the motion vectors about 8 or 9 times. When using standalone scripts, motion vectors might get calculated several times - slower, and possibly inconsistent. And it's not just motion vectors. Within QTGMC, there are many other intermediate clips that are reused in multiple places (dunno about MCTD in this regard tho'). So a huge script can be faster (and more consistent), although you do need to script carefully (http://forum.doom9.org/showthread.php?p=1477993#post1477993) to stop the code bloat from impacting performance. And it becomes hard to maintain of course.
I guess the best current example of how things could be done is in MVTools. You use MAnalyse to return a "super" clip, then that clip can be used in any number of subsequent MVTools calls. But those super clips are special - many images embedded into one, with the audio stream used for data too I think. A necessary hack because of the language constraints. It's not so difficult to do in a C++ plugin, but not something you would want to do in plain script. The only other option would be lots of globals I suppose...
Gavino
23rd February 2011, 18:49
there simply aren't the language constructs in AviSynth to create nicely componentized scripts.
What constructs would you like to see?
cretindesalpes
23rd February 2011, 21:02
Being able to pass variables as references would be great to return multiple data from a function. Regarding QTGMC, it would be really helpful to reuse the motion vectors for subsequent filtering.
-Vit-
23rd February 2011, 23:36
Yeah, reference parameters would be excellent (or output parameters, nearly the same thing). Would allow us to take the same approach of MVTools more easily
Some way to share data between scripts that isn't as clumsy as a global - better scoping, simple namespaces or something. That being said, what are the potential problems of defining "global QTGMC_bVec1", because that would be the idea...
My goal would be to split QTGMC into discrete components, which could be flexibly chained to perform the QTGMC algorithm. And also make some key intermediate clips available to the caller (e.g. motion vectors, temporal min/max, NNEDI'd clip). Some of the QTGMC components could be used stand-alone by other scripts. Most obviously the motion analysis, but also how about the noise-bypass - involves two steps "wrapped" around an "arbitrary" process, the second step needing to access results of the first. So far the only way I see to do this is a host of globals...
Gavino
23rd February 2011, 23:54
That being said, what are the potential problems of defining "global QTGMC_bVec1", because that would be the idea...
Using globals with fixed names can make it awkward to use the associated function more than once in a script, but since the variables would only be used at compile-time, the user just needs to be careful and you don't get the sort of problems that come up with globals and ScriptClip et al.
-Vit-
24th February 2011, 01:52
I wonder if using globals like this would be safer:
function CalculateMotionVectors( clip c, string GlobalPrefix, ...other settings... )
{
# Calculate the vectors...
bVec1 = ....
fVec1 = ....
# Store in user defined globals
Eval( "global " + GlobalPrefix + "_bVec1 = bVec1" )
Eval( "global " + GlobalPrefix + "_fVec1 = fVec1" )
}
#...
clip1.CalculateMotionVectors( "C1", ... )
clip2.CalculateMotionVectors( "C2", ... )
#...
s1 = clip1.MDegrain( super, C1_bVec1, C1_fVec1 )
s2 = clip2.MDegrain( super, C2_bVec1, C2_fVec1 )
Could provide extra code to assert on overwriting existing globals (funky try catch statements), or require an explicit override to do so.
Gavino
24th February 2011, 09:33
^ Yes, all good ideas.
The GlobalPrefix could be made optional with a suitable default for simple use.
SilaSurfer
24th February 2011, 16:24
McTemporalDenoise is a jewel. You get everything that a user could want, all in one package.
Didée
MCTemporalDenoise is a shiny jewel. :) Let's take a avarege beginner, not me, not you, for those MCTD is very simple to use. I don't consider myself a beginner, but I use it in about 10% of my work. I have sources where MCTD(preset="very low") works like a charm. It saves me time and effort. For 90% of cases its MDegrain 2\3 for me where I do my own scripting based on the source. It is a jewel if you take in consideration LaTo's time, effort and willingness to share his work with us here just like you, Vit, cretindesalpes, Tritical and others....
BTW, the Swiss knife from the second picture, whats the retail price on one of those I would like to buy one.:p :D
StainlessS
27th February 2011, 01:50
BTW, the Swiss knife from the second picture, whats the retail price on one of those I would like to buy one.:p :D
Sorry, cant help on retail price, but, I believe I saw a fairly
similar (not quite as many attachments) item in a shop
in the main street alongside the river in Zurich about
1992 (near a hotel called the "Red House", I think). It was
about 4 foot across and animated, ie all the
blades were opening and closing all the time. I assume that
it might be possible to just take the battery out to stop the
animated action, you would however need big pockets. :)
mastrboy
7th May 2011, 12:24
When using a prefiltered clip (p=clip) does MCTemporalDenoise then skip FFT3DFilter, or do i also need to set sigma=0 ?
And how is the prefiltered clip used? (only for motion vector search?)
Basicly I want to use NLMeansCL instead of FFT3DFilter for prefiltering with something like:
pre=NLMeansCL(h=1.5)
MCTemporalDenoise(settings="high",stabilize=true,p=pre,sigma=0)
When using a prefiltered clip (p=clip) does MCTemporalDenoise then skip FFT3DFilter, or do i also need to set sigma=0 ?
And how is the prefiltered clip used? (only for motion vector search?)
Basicly I want to use NLMeansCL instead of FFT3DFilter for prefiltering with something like:
pre=NLMeansCL(h=1.5)
MCTemporalDenoise(settings="high",stabilize=true,p=pre,sigma=0)
No need to set sigma=0, it's automatically off.
MCTemporalDenoise:
http://img16.imageshack.us/img16/8671/messer9b.jpg
:D:D:D
Where can I get all Needed filters for MCTemporalDenoise in rar (zip) archive?
Give please link. :thanks:
You might try reading the thread some. :rolleyes: It's posted only a couple of pages from the end.
mastrboy
25th May 2011, 18:50
How can i reuse the motion vectors in MCTermporalDenoise later in the avs script?
asarian
11th June 2011, 06:46
Is using FFT3Dgpu still pointless with this filter? (I used to get terrible ghosting with it).
aNToK
18th June 2011, 11:57
Has anyone else gotten a drastic speed reduction with the latest version of MCTD? I've used version 1.3.09 for quite a while with no issues and consistent speed, but today I tried v 1.2.40 and my speeds dropped from 1-2fps to 0.08.
I'm running Win7 64bit and avisynth version 2.5.8 (non-MT 32 bit version) on an i5 computer with 4gigs of ram and a 2 year old ati video card. I've replaced all of the older required files with the ones listed at the beginning of the function, but it's going so slow that I moved back to the earlier version and it's still running fine.
I'm filtering a very grainy blu-ray disk with the high presets. I know with the resolution being so high I can expect a slow encode (disk 1 of this set took 3 days and 20 hours, but the results were worth the wait). Here's my script, all required plugins are in the avisynth plugin folder. Any thoughts on the slowdown?
LoadPlugin("C:\VIDEO PROGRAMS\MeGUI_1989_x86\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("E:\ROCKY TEST\ROCKY II\DGAVCindex\Rocky2.dga")
MCTemporaldenoise(settings="high")
asarian
18th June 2011, 12:08
Has anyone else gotten a drastic speed reduction with the latest version of MCTD?
(...)
LoadPlugin("C:\VIDEO PROGRAMS\MeGUI_1989_x86\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("E:\ROCKY TEST\ROCKY II\DGAVCindex\Rocky2.dga")
MCTemporaldenoise(settings="high")
I think it's the 'stabilize' that makes 'high' take like forever. I never use 'high' anyway, as 'medium', for all purposes and intent, really already is extremely high.
aNToK
18th June 2011, 12:18
Stabilize does slow it down some, but in this particular one it improves the picture quite a bit. There's so much light-colored dancing grain all over this vid that the medium setting just doesn't get it there so high is my best option.
Stabilize is active on the high preset in both versions though, so I don't think it would account for a 90% slowdown between the old and new scripts. The only significant change in the high presets that I saw was that the later version of MCTD dropped the radius to 2 instead of 3 and that should speed it up a bit if anything.
If nobody else is getting this kind of slowdown, it must be me. Just would love to figure out why it's happening...
SilaSurfer
19th June 2011, 16:28
Hey LaTo.
Pluggins needed for your function, is it Ok to use newer versions? (Masktoolsa48, MvTools2.5.11.2)
asarian
20th June 2011, 16:58
Hey LaTo.
Pluggins needed for your function, is it Ok to use newer versions? (Masktoolsa48, MvTools2.5.11.2)
Yeah, I'd like to know this too, please.
LaTo
20th June 2011, 17:04
Yes it should be OK.
aNToK
21st June 2011, 07:54
I'd like to know if anyone else has experienced the major slow-down I mentioned earlier.
Carpo
21st June 2011, 10:36
is it advised to use this script on old SD anime as well as newer HD releases? at the moment i am using only toon() and i am wondering if this will complement it or not?
mightydre
9th July 2011, 10:04
Stabilize does slow it down some, but in this particular one it improves the picture quite a bit. There's so much light-colored dancing grain all over this vid that the medium setting just doesn't get it there so high is my best option.
Stabilize is active on the high preset in both versions though, so I don't think it would account for a 90% slowdown between the old and new scripts. The only significant change in the high presets that I saw was that the later version of MCTD dropped the radius to 2 instead of 3 and that should speed it up a bit if anything.
If nobody else is getting this kind of slowdown, it must be me. Just would love to figure out why it's happening...
I've noticed that stabilize does drop my fps down to 10% of what it would be without stabilize--MCTemporalDenoise(settings="high",stabilize=false)--on 1080p content, but I don't see this level of slowdown on lower resolution content (ie. 720p).
Regardless, I wish this stuff made use of multiple cores.
pereant
9th July 2011, 14:18
It doesn't miss "a" scenechange. It does miss *every* scenechange. To my knowledge, temporal processing of FFT3DFilter simply doesn't check or care for that.
Just set bt=5,sigma=16, and watch what happens.
Of course it's mostly not a problem with lower sigmas. But that doesn't mean the issue isn't there. It's just that the problem becomes much harder to notice (and that's why people aren't complaining) ... but *present* it is all the time.
Argh you're right... Hardly noticeable but it's here with high sigma in FFT3Dfilter :(
Good to see it's not completely my fault. I was wondering why it happens. ;)
Thanks anyway LaTo for this great filter and all your efforts. Hope you can fix it :)
Carpo
11th July 2011, 20:29
how the hell can i get this script to work with SetMTMode() ? Every thing i have tried only gets x264 using one core :(
Boulder
11th July 2011, 20:41
Post your script so we can take a look. I'm running MCTD as part of my processing chain and have no problems having so high CPU usage that I also get frequent crashes ;)
Carpo
11th July 2011, 20:51
SetMTMode(2,0)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindexnv\DGDecodeNV.dll")
DGSource("F:\DISC_RIPS\aliens.dgi",fieldop=0)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
#deinterlace
crop( 0, 132, 0, -132)
Spline36Resize(1920,816) # Spline36 (Neutral)
SetMTMode(2)
MCTemporalDenoise(settings="medium")
#denoise
I have tried SetMTMode(2,4) and SetMTMode(5,4) nothing seems to help, if i use MeGUI it shows xfw4x264.exe at 25% and x264_64.exe at about 5-10% , same happens if i call x264.exe from command line, same if i use avs4x264.exe
Boulder
11th July 2011, 20:56
Nothing wrong there, except that you shouldn't use SetMTMode(2) before the source filter.
Does the number of threads used by the encoder process change when you change the number of threads in the first SetMTMode call?
Carpo
11th July 2011, 20:58
if you mean SetMTMode(2,0) i have changed that to other values, but didnt help, if you mean the SetMTMode(2) before the MCTemporalDenoise(settings="medium") filter i have not changed that, from what i was reading on the wiki it seemd to show i should do that before most filters, changing it to maybe (5) or (6), should i remove that and see if it helps?
Boulder
11th July 2011, 21:08
Basically it's always SetMTMode(5) before the source filter and SetMTMode(2) after that unless there are filters that do not work properly when multithreading. But you can check if the script is running/trying to run multithreaded by looking at the number of threads per encoder process. If it changes when you change the number of threads in the first SetMTMode call, it's definitely trying to do something.
Carpo
11th July 2011, 21:12
This seems to work
SetMTMode(2,0)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("F:\DISC_RIPS\MainMovie\ERGO_PROXY_ep1\VIDEO_TS\ergo_ep1.d2v", info=3)
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, interlaced=true, threads=0)
Load_Stdcall_Plugin("C:\Program Files (x86)\MeGUI\tools\yadif\yadif.dll")
Yadif(order=1)
crop( 4, 2, 0, 0)
Spline36Resize(720,400) # Spline36 (Neutral)
MCTemporalDenoise(settings="medium", gpu=false)
#denoise
which atm has xfw4x264.exe at about 70% , x264_64.exe is still at 10%
will try from cli and see if its better
levi
13th July 2011, 01:46
I've not had success using setmtmode before dgdecode. I just put SetMTMode(2,0) after that line.
Boulder
13th July 2011, 03:29
You have to put SetMTMode before the source is loaded or there will be no multithreading. Also the number of threads to use must be defined in that first call.
shroom
15th July 2011, 12:11
This script does wonder !
:thanks:
nibus
1st August 2011, 12:28
Does the "fixband" parameter for FFT3D do what "enhance" (gradfun2dbmod) does, or is it something only for an issue with FFT3D?
LaTo
4th August 2011, 09:26
Does the "fixband" parameter for FFT3D do what "enhance" (gradfun2dbmod) does, or is it something only for an issue with FFT3D?
"fixband" removes banding created by FFT3D.
If you use "enhance" it may be overkill to leave fixband ON, try the 2 and pick the best for you ;)
asarian
9th August 2011, 20:21
Has anyone else gotten a drastic speed reduction with the latest version of MCTD? I've used version 1.3.09 for quite a while with no issues and consistent speed, but today I tried v 1.2.40 and my speeds dropped from 1-2fps to 0.08.
Actually, had the same issue the other week, with Der Untergang. At first (and, in hindsight, on earlier occassions) I thought MCTemporalDenoise was simply hanging; but it's not: it simply drops to like 0.08 fp/s. This was on a full 1080p source, uncropped, and with 'medium' for settings. Switching to 'low' made the problem go away, but that was obviously not what I wanted.
I experienced the issue again, soon thereafter, with The Shadow, cropped to 1040p, and also on 'medium' settings.
I eventually 'solved' the matter by simply splitting the film up vertically into 2x 540p parts (each with a 16px overlap), and processing each with MCTemporalDenoise individually, only to splice them back together later on. Not ideal, of course.
totya
28th September 2011, 11:47
Hi,
I think I found all needed filters (with exact version), except this:
Deblock_QED (25.may.2010)
This (http://avisynth.org/mediawiki/Deblock_QED) version date is 2010-10-16. This is good or not?
Second question: Of many needed filters they are newer version, these better than (recommended) olders, or not?
Example latest MVTools version is 2.5.11.3 etc...
Thanks!
the_weirdo
28th September 2011, 12:45
Hi,
I think I found all needed filters (with exact version), except this:
Deblock_QED (25.may.2010)
This (http://avisynth.org/mediawiki/Deblock_QED) version date is 2010-10-16. This is good or not?
Second question: Of many needed filters they are newer version, these better than (recommended) olders, or not?
Example latest MVTools version is 2.5.11.3 etc...
Thanks!
IMHO, you should use latest version of those needed filters, except RemoveGrain + Repair.
totya
28th September 2011, 12:56
IMHO, you should use latest version of those needed filters, except RemoveGrain + Repair.
Hi,
thx, but recommended version (http://avisynth.org/mediawiki/RemoveGrain) of RemoveGrain + Repair already latest: v1.0PR, this is mean I think: "v1.0 pre-release - latest edition with SSE3 fix"
the_weirdo
28th September 2011, 13:42
Hi,
thx, but recommended version (http://avisynth.org/mediawiki/RemoveGrain) of RemoveGrain + Repair already latest: v1.0PR, this is mean I think: "v1.0 pre-release - latest edition with SSE3 fix"
You're right. I've misremembered :o
jmac698
28th September 2011, 15:42
It's sad that no one has noticed the installer
http://www.sendspace.com/file/1gggec
totya
28th September 2011, 17:12
It's sad that no one has noticed the installer
http://www.sendspace.com/file/1gggec
Hi, I don't see this link on first post... and anywhere.
Symtomps:
- Default instal path is wrong, if avisynth installed outside on default path (good path from registry)
- Deblock_QED_MT2.avsi is not recommended version too
- mt_masktools-25.dll is not recommended version (latest), and recommended avisynth-MT verison is 2.60 see (http://forum.doom9.org/showthread.php?t=148117), and this version need mt_masktools-26.dll
But nice pack :)
jmac698
28th September 2011, 18:03
Thanks for the feedback! (finally)
I had mentioned it here:
http://forum.doom9.org/showthread.php?t=162622
It's also here:
http://avisynth.org/mediawiki/MCTemporalDenoise#Required_Filters
But this is a good thread, it just wasn't a top thread lately so I didn't know about it. I guess people are not finding information, but at least check the avisynth wiki as there's some good information there.
- Default instal path is wrong, if avisynth installed outside on default path (good path from registry)
That's why I made it customizable. To do it properly, I have to make a more advanced installer which can read the registry.
I should warn you that I put a few files in system32, fft3w.dll (required) and avsrecursion (often used, but not required by this filter). Ideally I want to make an installer for many things "filter pack".
You can open the .exe in 7-zip and see everything.
- Deblock_QED_MT2.avsi is not recommended version too
Can you point me to the correct file?
- mt_masktools-25.dll is not recommended version (latest), and recommended avisynth-MT verison is 2.60 see, and this version need mt_masktools-26.dll
I didn't install any avisynth-mt. mt_masktools-25.dll *should* be from a48. I can also include mt_masktools-26.dll, there's no problem there. I only use 2.58 myself, haven't used mt yet :)
asarian
28th September 2011, 18:08
Actually, had the same issue the other week, with Der Untergang. At first (and, in hindsight, on earlier occassions) I thought MCTemporalDenoise was simply hanging; but it's not: it simply drops to like 0.08 fp/s. This was on a full 1080p source, uncropped, and with 'medium' for settings. Switching to 'low' made the problem go away, but that was obviously not what I wanted.
I experienced the issue again, soon thereafter, with The Shadow, cropped to 1040p, and also on 'medium' settings.
I eventually 'solved' the matter by simply splitting the film up vertically into 2x 540p parts (each with a 16px overlap), and processing each with MCTemporalDenoise individually, only to splice them back together later on. Not ideal, of course.
Speaking of feedback, does anyone else experience the same issue? Or is no one else processing HD material?
jmac698
28th September 2011, 18:19
Ok, the installer version is correct masktools, latest version
58440c2964e3b8a3899d265b644d05bc *mt_masktools-25.dll
totya
28th September 2011, 18:41
Deblock_QED_MT2.avsi is not recommended version too
Can you point me to the correct file?
No, this is my already qestion (http://forum.doom9.org/showpost.php?p=1529075&postcount=542).
I didn't install any avisynth-mt. mt_masktools-25.dll *should* be from a48
But recommended version is MaskTools (v2.0a43).
I can open your installer with 7z, and I see, fftw3.dll is very outdated. New version (http://www.fftw.org/install/windows.html).
Thanks, and I see wiki (http://avisynth.org/mediawiki/MCTemporalDenoise#Required_Filters) too...
jmac698
28th September 2011, 18:49
Ok,
The original Deblock_QED_MT2.avsi is at http://www.64k.it/andres/dettaglio.php?sez=avisynth. This version requires masktools <a35 to work, because of new "bias" parameter added. The newer Deblock_QED_MT2.avsi made some minor changes, and now needs masktools a45+ to work. Using a48 should be ok. The requirements are actually different if you update some of the scripts.
So just tell me, does my pack work as is?
Yes I used old version fftw3, once I tried to use new version and it didn't work for me. I should test again.
Update:
I checked the changelog from a43-a48. Some bugs were fixed and new features added, but nothing incompatible.
Alpha 48 :
added : signed and unsigned binary shifts to LUTs, ceil/floor/trunc float -> int conversions. @ is now equivalent to °
Alpha 47 :
added : signed and unsigned binary operators to LUTs
Alpha 46 :
fixed : with mt_lutf, "std" mode wasn't working. Could also affect "std" with mt_luts and mt_lutsx
Alpha 45 :
fixed : mt_clamp on sse2 platforms with resolution not multiple of 64
added : mode parameter to mt_lutspa, to clean up biased/relative mess
Alpha 44 :
added : new mode (weighted sum) for mt_luts and mt_lutsx
I will also list the differences in the new Deblock_QED_MT2.avsi:
# Changes 2008-08-18: (Didée)
# - Replaced the ugly stackXXX cascade with mt_LutSpa() (requires MaskTools v2.0a35)
# - Changed Quant and Offset defaults to 24,28,2,4,4,8
# Changes 2010-05-25:
# - Explicitly specified parameters of mt_LutSpa()
# (required due to position of new 'biased' parameter, starting from MaskTools 2.0a43)
# - Non mod 16 input is now padded with borders internally
# Changes 2010-08-18:
# - Replaced AddBorders with PointResize
# - Changed Quant and Offset defaults to 18,19,3,4,1,1 to reduce blurring
# Changes 2010-10-16:
# - Replaced 'relative' with the new 'mode' parameter in mt_LutSpa(), starting from MaskTools 2.0a45
# - Changed Quant and Offset defaults to 24,26,1,1,2,2 to increase effectiveness, but still within sensible limits.
# (see for details: http://forum.doom9.org/showthread.php?p=810932#post810932)
totya
28th September 2011, 19:09
Ok,
The original Deblock_QED_MT2.avsi is at http://www.64k.it/andres/dettaglio.php?sez=avisynth. This version requires masktools <a35 to work, because of new "bias" parameter added. The newer Deblock_QED_MT2.avsi made some minor changes, and now needs masktools a45+ to work. Using a48 should be ok.
Thanks for the info!
So just tell me, does my pack work as is?
Not much different for me "packs" :)
Yes I used old version fftw3, once I tried to use new version and it didn't work for me. I should test again.
All new version is work's for me (need libfftw3f-3.dll... rename it to fftw3.dll. I read this somewhere on doom9 forum). You can run benchmark "benchf.exe -opatient 64 128 256 512 1024 2048 4096" and you see speed different.
Thanks!
jmac698
28th September 2011, 20:03
Ok, I will update the one file and try to read the correct installation directory.
Thanks for the testing and feedback.
Boulder
28th September 2011, 20:41
Speaking of feedback, does anyone else experience the same issue? Or is no one else processing HD material?I've noticed a similar issue sometimes with SD material as well. Using a radius of over 2 frames is somewhat slower (or at least was with my old Q6600), and that's the big difference between medium and the lower defaults.
asarian
30th September 2011, 12:30
I've noticed a similar issue sometimes with SD material as well. Using a radius of over 2 frames is somewhat slower (or at least was with my old Q6600), and that's the big difference between medium and the lower defaults.
The problem for me is not so much that 'medium' takes a bit longer than 'low' (which is totally reasonable), but that sometimes 'medium' (or higher) slows down by an order of magnitude (like I said, ca. 0.08 fp/s on my i7 980X). In fact, it slows down so much that you think the process is stuck; only it isn't (it looks correctly when you examine the output) -- it just goes extremely slow; like where it would suddenly take 700 hours to complete.
Like I stated, the slowdown doesn't always happen; merely on some sources (I suspect because of the the grain being pretty intense).
cretindesalpes
30th September 2011, 12:59
When the framerate suddenly drops by one order of magnitude or even more, try to increase the frame cache memory, for example with SetMemoryMax(1024) at the beginning of your script.
asarian
30th September 2011, 14:23
When the framerate suddenly drops by one order of magnitude or even more, try to increase the frame cache memory, for example with SetMemoryMax(1024) at the beginning of your script.
Thanks! Never really understood the memory max variable. Gonna give it a try (when the current render is done); and I'll let you know if it worked. :)
LaTo
1st October 2011, 07:43
It would be great to find a script & sample that isolate the problem. Someone?
chainring
4th October 2011, 05:23
Speaking of feedback, does anyone else experience the same issue? Or is no one else processing HD material?I'm currently doing some 1080 BD to 720p downconversions and have no problems. If I try to do anything with SetMTMode, no matter the mode and number of threads, all hell breaks loose.
i7 2600K
4 GB RAM
Win7 x64 Ult
Avisynth 2.6 with SET's latest MT .dll
Latest MeGUI set for dev updates
All the correct versions of Avisynth plugin's for MCTD, except I'm using the latest Masktools.
chainring
4th October 2011, 05:24
When the framerate suddenly drops by one order of magnitude or even more, try to increase the frame cache memory, for example with SetMemoryMax(1024) at the beginning of your script.I noticed that with, IIRC, when playing with SetMTMode.
asarian
4th October 2011, 15:48
I noticed that with, IIRC, when playing with SetMTMode.
It says here (http://avisynth.org/mediawiki/Internal_functions/Control_functions) SetMemoryMax is limited to 512MB on 2.5.8. :(
Didée
4th October 2011, 16:02
That limit is only for the *default* value (so that e.g. on a 16GB machine, the default won't be set to a 4GB-ish value).
You can of course specify a value >512MB manually.
asarian
4th October 2011, 16:07
That limit is only for the *default* value (so that e.g. on a 16GB machine, the default won't be set to a 4GB-ish value).
You can of course specify a value >512MB manually.
Guess I read it wrong then. My bad. :) Thanks!
DVDBob
13th October 2011, 15:57
Hello.
I use DGIndexNV and this script, but i only convert with 2-3 fps, if i use medium setting.
How can i get it to convert faster???
x264Boy
14th October 2011, 12:07
Hello.
I use DGIndexNV and this script, but i only convert with 2-3 fps, if i use medium setting.
How can i get it to convert faster???
I got same problem.
CoRoNe
24th October 2011, 21:08
I've been trying out some denoisers today, but I'm having some trouble getting MCTemporalDenoise to work.
For MCTemporalDenoise my Avisynth plugin directory contains:
addgrain.avs, AddGrainC.dll, DctFilter.dll, deblock.dll, Deblock_QED_MT2.avs, EEDI2.dll,
FFT3DFilter.dll, gradfun2db.dll, GradFun2DBmod.v1.5.avsi, LSFmod.v1.9.avsi, MCTemporalDenoise
.v1.4.20.avsi, mt_masktools-25.dll, mt_masktools-26.dll, mvtools2.dll, RemoveGrain.dll,
Repair.dll, RSharpen.dll, SangNom.dll, TTempSmooth.dll and fftw3.dll in the WINDOWS-directory
The following error-message shows up with "MCTemporalDenoise(settings="low")":
Evaluate: System exception - Illegal Instruction
(GradFun2DBmod.v1.5.avsi, line 291)
(MCTemporalDenoise.v1.4.20.avsi, line 1072)
(MCTemporalDenoise.v1.4.20.avsi, line 1090)
(New File (2), line 10)
Setting up this filter proves to be quite a challenge, so can somebody point me in the right direction?
P.s. My computer is rather old; AMD Athlon XP 3200+, so only SSE. Hope that's not the cause.
jmac698
25th October 2011, 02:00
It's sad that no one has noticed the installer
http://www.sendspace.com/file/1gggec
I had mentioned it here:
http://forum.doom9.org/showthread.php?t=162622
It's also here:
http://avisynth.org/mediawiki/MCTemp...quired_Filters
CoRoNe
25th October 2011, 06:36
I have seen it, I have used it, but it caused Avisynth to crash completely. At least now, collecting everything by hand, I get an error message.
jmac698
25th October 2011, 06:40
SSE only is your problem.
I only included optimized versions I believe.
CoRoNe
25th October 2011, 17:58
You're absolutely sure? Quickly looking through each filter's readme didn't reveal one to be SSE2 only.
As I mentioned earlier, Avisynth here crashed on your package with optimized versions. The fact it doesn't crash on my handpicked collection shows you it's not a SSE or SSE2 problem I guess.
Something else must be the problem...
LaTo
25th October 2011, 18:35
Seriously I don't understand why people have always problems to set up MCTD.
It's *very* easy, for each filter take the latest version. Put the corresponding .dll or .avsi in autoloading folder.
That's all.
(Sometime you need to choose between .dll according to your avisynth's version and to your CPU's instructions. Read the information file of each filter before.)
jmac698
25th October 2011, 18:49
No, not sure just a suggestion. However for me it worked, but I used avisynth 2.58 32bit. If you can find the problem and proper versions I can update the installer.
Ok 291 is
\ : Eval("dither." + custom)
so your custom string is incorrect. Since you used preset low that's strange. Try playing with the script, setting custom to empty for example...
CoRoNe
25th October 2011, 20:30
Put the corresponding .dll or .avsi in autoloading folder.Keep it cool, ok? I did exactly that:For MCTemporalDenoise my Avisynth plugin directory contains:
addgrain.avs, AddGrainC.dll, DctFilter.dll, deblock.dll, Deblock_QED_MT2.avsi, EEDI2.dll,
FFT3DFilter.dll, gradfun2db.dll, GradFun2DBmod.v1.5.avsi, LSFmod.v1.9.avsi, MCTemporalDenoise
.v1.4.20.avsi, mt_masktools-25.dll, mt_masktools-26.dll, mvtools2.dll, RemoveGrain.dll,
Repair.dll, RSharpen.dll, SangNom.dll, TTempSmooth.dll and fftw3.dll in the WINDOWS-directoryAll latest versions. Also libfftw3f-3.dll resides in the WINDOWS-dir btw. Afaik the only plugin with multiple (optimized) versions available is RemoveGrain, and I'm even using the most basic one.
so your custom string is incorrectMCTemporalDenoise(settings="low") is all I initially tried. I haven't touched any other command. MCTemporalDenoise() doesn't work either.
No matter what I try, I keep getting the error message mentioned earlier.
Btw jmac698, I found out why Avisynth failed to load at all. Deblock_QED_MT2.avsi within your package is saved as UTF-8 when it should be ANSI! Have people even successfully used your package? You can't use Avisynth at all if you haven't solved this first.
AND you forgot MVTools2. Without it you'll get:Script error: there is no function named "MSuper"
(MCTemporalDenoise.v1.4.20.avsi, line 712)
And what is AvsRecursion.dll for, when it's not required for MCTemporalDenoise.v1.4.20.avsi.
This whole filter is driving me nuts atm...
Using jmac698's package, with RemoveGrain.dll, Repair.dll and RSharpen.dll instead of their SSE2 counterparts and with an ANSI version of Deblock_QED_MT2.avsi gives me the same error as in my initial post
LaTo
25th October 2011, 21:02
Keep it cool, ok?
Are we friends? So stop talking to me this way!
I do not see when I could be offensive to you...
I did exactly that
No you have not done what I said above.
Moreover I just saw that your mistake is obvious, simply read the documentation of each filter to find the solution.
CoRoNe
25th October 2011, 22:09
Nice attitude!
Forget about it...
the_weirdo
25th October 2011, 22:10
..., mt_masktools-25.dll, mt_masktools-26.dll,...
Not sure this is the cause of your problem, but you only need one of those two. Choose the one that compatible with your Avisynth's version.
CoRoNe
25th October 2011, 23:58
Deleting mt_masktools-26.dll (I'm using Avisynth 2.5.8) doesn't make a difference. Thanks though.
LaTo
26th October 2011, 07:45
The error said this:
Evaluate: System exception - Illegal Instruction
(GradFun2DBmod.v1.5.avsi, line 291)
*Illegal Instruction*: your CPU doesn't support some used instructions
First thing, we check the line 290-291 of GradFun2DBmod.v1.5.avsi:
grain = custom=="empty" ? dither.addgrainC(str,strC,0,0)
\ : Eval("dither." + custom)
diff = custom=="empty" ? blankclip(dither,color_yuv=$808080).addgrainC(str,strC,0,0)
\ : Eval("blankclip(dither,color_yuv=$808080)." + custom)
These lines only contains one filter call: AddGrainC, it should be the culprit.
Second step, we remove AddGrainC's calls to confirm the problem:
grain = custom=="empty" ? dither
\ : Eval("dither." + custom)
diff = custom=="empty" ? blankclip(dither,color_yuv=$808080)
\ : Eval("blankclip(dither,color_yuv=$808080)." + custom)
If this modification works, it's a problem with AddGrainC.
Third point, we look at the readme and the official thread.
Readme states that AddGrain only requires SSE cpu. So it should work on your CPU, strange...
But in the official thread (http://forum.doom9.org/showthread.php?t=111849), it seems that foxyshadis might forget to remove the SSE2 switch during the compilation.
If everything is correct, you should post on AddGrainC's thread to get a fix.
So you see, I hope to be enough *cool* for you :p
jmac698
26th October 2011, 08:43
And that's the same spot I pointed out as well.. though didn't go as far..
Gavino
26th October 2011, 09:46
And that's the same spot I pointed out as well.. though didn't go as far..
Ok 291 is
\ : Eval("dither." + custom)
so your custom string is incorrect.
What you failed to take into account is that for a multi-line statement, the line numbers reported might be out by one. The actual error occurred on line 290 (addgrainC).
jmac698
26th October 2011, 10:13
good tip, thanks!
CoRoNe
26th October 2011, 20:13
Well, there you have it. AddGrainC is indeed the culprit. After having removed it's calls from GradFun2DBmod.v1.5.avsi, your filter actually works. I'll definitely stop by foxyshadis's AddGrainC thread. Thanks for your help.
You know, I've never dug deep into Avisynth filter-scripts like this. I never alter or even touch script at all. Whenever I had an Avisynth error, it was always a faulty command in the initial script or an issue with the dependencies (dlls). So all in all, there's a bit more to "It's *very* easy, for each filter take the latest version. Put the corresponding .dll or .avsi in autoloading folder." than you'd think at first, but hey, we learn everyday.
I was rather indignant at your initial post, as if I just asked the most stupidest thing. On the other hand, I know the feeling however from my own experience with people asking rather silly questions at first site. Anyway, let's forget about our altercation. Thanks again.
LaTo
26th October 2011, 21:10
You know, I've never dug deep into Avisynth filter-scripts like this. I never alter or even touch script at all. Whenever I had an Avisynth error, it was always a faulty command in the initial script or an issue with the dependencies (dlls). So all in all, there's a bit more to "It's *very* easy, for each filter take the latest version. Put the corresponding .dll or .avsi in autoloading folder." than you'd think at first, but hey, we learn everyday.
My first post was referring to a global view of errors caused by the lack of reading the documentation (mt_masktools-25.dll & mt_masktools-26.dll).
The purpose of my post was not to be offensive, it was just an observation about recurring errors over a lot of pages in this thread.
I was rather indignant at your initial post, as if I just asked the most stupidest thing. On the other hand, I know the feeling however from my own experience with people asking rather silly questions at first site. Anyway, let's forget about our altercation. Thanks again.
Sorry about that, but your answer was really a bit too offensive... So that is why my second post was such direct.
Anyway there is nothing personal. I'm glad the problem is partially solved, don't hesitate if you have any further questions ;)
jmac698
26th October 2011, 22:21
I'm glad you've resolved your issues, and it looks like there's a new version of addgrainC, so I can see if I can account for that in the installer. I think there's a cpudetect plugin for the installer. Anyhow that's low on my priority list for today...
fbs
25th November 2011, 14:27
Has anyone managed to run it with multithreading?
chainring
26th November 2011, 06:07
Has anyone managed to run it with multithreading?Yes.
I have the "SetMemoryMax()" in there, but you may or may not need it. I have 16GB RAM and bumped it up from the default max of 512 to 768. In all honesty, I haven't seen any changes by going higher or lower, so I just leave it, and that's for SD and HD sources.
From what I've read, SetMTMode has to be set to 5 before your source call and the second number is threads, which if you don't set here will effectively set you to one. I have a i7 2600K and set it to 3 since going any higher does nothing.
The later SetMTMode sets it back to a more aggressive multi-threading mode.
There ya go!
SetMemoryMax(768)
SetMTMode(5,3)
LoadPlugin("C:\Apps\Video\MeGUI\tools\dgindex\DGDecode.dll")
DGDecode_mpeg2source("E:\VIDEO\01 IFO\00 NO ANGLES\007_WORLD_NOT_ENOUGH\VIDEO_TS\VTS_01_1.d2v", info=3)
LoadPlugin("C:\Apps\Video\MeGUI\tools\avisynth_plugin\ColorMatrix.dll")
ColorMatrix(hints=true, threads=0)
crop( 8, 62, -8, -66)
SetMTMode(2)
MCTemporalDenoise()
Gavino
26th November 2011, 08:47
From what I've read, SetMTMode has to be set to 5 before your source call and the second number is threads, which if you don't set here will effectively set you to one.
You're right that the second parameter is only used on the first call, but the default is the number of processors available, not one.
fbs
26th November 2011, 14:16
That's what I do and I always get crashes after some minutes.. maybe that's because I'm using QTGMC's dlls..? qtgmc works fine with them.. :\
-Vit-
26th November 2011, 16:44
It could be the opposite fbs, maybe you need more modded plugins...
The general advice I offer for multithreading in the first post of the QTGMC thread applies to all multithreaded scripts:
- Use SEt's 2.6 MT, all other MT versions have known threading bugs
- Recompile all plugins with SEt's fixes. This has been done in the QTGMC modded plugins.
MCTemporalDenoise uses plugins that are not used by QTGMC. Some of those plugins will contain known threading bugs, unless their authors have updated them recently for that reason.
chainring
26th November 2011, 18:16
You're right that the second parameter is only used on the first call, but the default is the number of processors available, not one.Now, for clarification sake, is that the number of physical CPU's, or the number of real cores, not including hyperthreading, etc...?
Didée
26th November 2011, 18:30
As much as there are diagrams in the Taskmanager. ;)
I.e. the logical cores from hyperthreading are included. A 4C8T CPU identifies itself to the OS as to have 8 cores.
fbs
27th November 2011, 01:22
MCTemporalDenoise uses plugins that are not used by QTGMC. Some of those plugins will contain known threading bugs, unless their authors have updated them recently for that reason.
I wonder where I could find these extra modded plugins ~~
-Vit-
27th November 2011, 02:03
I wonder where I could find these extra modded plugins ~~
Rear end of a compiler
:p
chainring
27th November 2011, 02:09
As much as there are diagrams in the Taskmanager. ;)
I.e. the logical cores from hyperthreading are included. A 4C8T CPU identifies itself to the OS as to have 8 cores.Excellent, helpful as always, Didée. Thank you!
Corpsecreate
28th November 2011, 13:09
My encode always crashes when I use MCTemporalDenoise on my 1080p anime source. It is an extremely noisy video source so I have to use settings = high or very high. I have downscaled it to 720p before denoising it but I still have the same problem. Is there any way I can stop this from happening? The exact line in my script is:
MT("""MCTemporalDenoise(settings="high")""", threads = 4, overlap=0)
The results of MCTD are amazing and nothing I've tried comes close to it but if it keep crashing, I may have to use something else :(
kypec
28th November 2011, 14:49
Is there any way I can stop this from happening? The exact line in my script is:
MT("""MCTemporalDenoise(settings="high")""", threads = 4, overlap=0)
The results of MCTD are amazing and nothing I've tried comes close to it but if it keep crashing, I may have to use something else :(
Did you try to run your script in non-MT mode? Usually it's multi-threading that causes all problems with such demanding processing...
fbs
3rd December 2011, 05:58
It seems it only works stable if it's the LAST line of the .avs. if there's a converttorgb() or whatever at the end, it crashes after some minutes. (it's not a immediate crash)
Why would it be like that? SEt's bug? :P
setmemorymax(600)
setmtmode(3, 7)
avisource("d:\ds000.avi")
ChromaShift(C=4)
crop(16, 8, -20, -8)
setmtmode(2)
MCTemporalDenoise(settings="medium",enhance=true,stabilize=true,interlaced=true,sharp=false,chroma=true,edgeclean=true,truemotion=true,post=2,ncpu=1)
I'm afraid VirtualDub will have problems with it's output, because the source .avi is an interlaced YV12 720x480 vhs rip.. and I couldn't put a "converttorgb()" at the end... am I in trouble?
oh I'm using set's 2.6mt with -vit-'s modded plugins \o
Corpsecreate
8th December 2011, 06:57
Ok I managed to get it to stop crashing by removing the MT call.
I noticed that on scene changes, the denoise isnt applied well and you get grain/noise for the first 1-2 frames after a scene change. I understand that this is part of how a temporal denoiser works but is there any way I can reduce the effect? I am using the preset "high" setting.
An IP BreAKDoWN
12th January 2012, 06:49
So I'm using this filter for an 1080p encode on a low setting and for one it runs at 1 fps and two to fix that 1 fps I tried using MTMode. However when I use MT it encodes the first 8 frames and the rest is black. So can anyone recommend a plugin or something that will allow me to encode at a decent rate, or help me with MT? Here is my script:
##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)
##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Decomb521VFR1.3_P4-Athlon.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\TIVTC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.21.avsi")
##Setting Speed##
SetMTMode(5)
##Source Video##
AVCSource("G:\%PATH%\video.dga")
##Setting Cores##
SetMTMode(8)
##Decimate for timecodes##
Decimate(timecodes="G:\%PATH%\timecodes.txt",
\vfrstats="G:\%PATH%\timecodes.vfrstats")
##Crop Before Filters to Reduce Times##
crop(244, 4, -244, -4)
##Some Tweaking##
Spline36Resize(960,720)
##Them Good Ole' Watermarks##
textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\BreAKDoWN.ssa")
##Filtering##
MCTemporalDenoise(settings="low")
Taurus
12th January 2012, 08:34
So I'm using this filter for an 1080p encode on a low setting and for one it runs at 1 fps and two to fix that 1 fps I tried using MTMode. However when I use MT it encodes the first 8 frames and the rest is black. So can anyone recommend a plugin or something that will allow me to encode at a decent rate, or help me with MT? Here is my script:
##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)
##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Decomb521VFR1.3_P4-Athlon.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\TIVTC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.21.avsi")
##Setting Speed##
SetMTMode(5)
##Source Video##
AVCSource("G:\%PATH%\video.dga")
##Setting Cores##
SetMTMode(8)
##Decimate for timecodes##
Decimate(timecodes="G:\%PATH%\timecodes.txt",
\vfrstats="G:\%PATH%\timecodes.vfrstats")
##Crop Before Filters to Reduce Times##
crop(244, 4, -244, -4)
##Some Tweaking##
Spline36Resize(960,720)
##Them Good Ole' Watermarks##
textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\BreAKDoWN.ssa")
##Filtering##
MCTemporalDenoise(settings="low")
Should be SetMTMode(2,8)
if your eight core monster handles it.
Some encoding frontends prefer
Distributor()
at the end of the script.
But for Virtualdub and MeGui this is a NoNo.
AVCSource("G:\%PATH%\video.dga")
Is this your real path?
And maybe try another decoder...
Which Avisynth MT version?
Zep
12th January 2012, 17:36
So I'm using this filter for an 1080p encode on a low setting and for one it runs at 1 fps and two to fix that 1 fps I tried using MTMode. However when I use MT it encodes the first 8 frames and the rest is black. So can anyone recommend a plugin or something that will allow me to encode at a decent rate, or help me with MT? Here is my script:
Should be SetMTMode(2,8)
if your eight core monster handles it.
Some encoding frontends prefer
Distributor()
at the end of the script.
But for Virtualdub and MeGui this is a NoNo.
And maybe try another decoder...
Which Avisynth MT version?
yeah all good tips from Taurus. I will add get rid of
SetMemoryMax(1024)
the defaults are more than enough. Using 1024 is gonna cause low memory crashes and huge slow down if you are lucky not to crash. For me the 2.6 MT latest build by SET is the best. For me setting the number of cores to the number of REAL cores you have works best. Do you have 8 real cores?
An IP BreAKDoWN
12th January 2012, 18:13
Should be SetMTMode(2,8)
if your eight core monster handles it.
I thought i had to set the speed then the cores as stated here (http://forum.doom9.org/showthread.php?t=148782). And why 2, I thought I have to do 5?
Should be [COLOR="Red"]
Is this your real path?
And maybe try another decoder...
No of course not :P I have a working path. And for the decoder which one would you recommend?
Should be [COLOR="Red"]
Which Avisynth MT version?
2.6 MT (http://forum.doom9.org/showthread.php?t=148782)
I will add get rid of
SetMemoryMax(1024)
the defaults are more than enough. Using 1024 is gonna cause low memory crashes and huge slow down if you are lucky not to crash.
I'm going to comment it out and see what will happen. However I have 16 gigs of RAM and when I encode I barely use 20% total (including all other programs and OS). Should I still leave it out?
For me the 2.6 MT latest build by SET is the best. For me setting the number of cores to the number of REAL cores you have works best. Do you have 8 real cores?
Yes I have a FX8150 that has 8 cores, not threads, nor hyperthreading, 8 cores. That's why I think I should be able to get more encoding time.
Thanks for the quick responses please keep them coming!
Gavino
12th January 2012, 18:32
I thought i had to set the speed then the cores as stated here (http://forum.doom9.org/showthread.php?t=148782). And why 2, I thought I have to do 5?
The first call to SetMTMode is the one that sets the cores (or more exactly, the number of threads to be used). The mode (the first parameter to SetMTMode) should be set to 5 for AVCSource(), then changed to 2 for the other filters, so your script should look like:
##Setting initial mode, and cores##
SetMTMode(5, 8)
##Source Video##
AVCSource("G:\%PATH%\video.dga")
##Setting mode for filters##
SetMTMode(2)
##Decimate for timecodes##
...
Didée
12th January 2012, 19:15
Don't put a frame decimator in an MT-enabled section. The better case is that it pulls the whole thing down to 1-threaded speed. The worse case is that it creates other, more serious problems.
Taurus
12th January 2012, 19:37
Don't put a frame decimator in an MT-enabled section.
I knew there was something wrong :mad:
Could not get in to my head for this.
Maybe clogged synapses on my side.
But Didée is here for the rescue.
Didée
12th January 2012, 19:41
Keep the SetMTmode(5) at the start. (There's a recommendation to use mode=3 instead, but I've had some probs with 3 that I never have with 5)
Put the SetMTmode(2) later in the script, after the Decimate call. I'd try putting it directly before MCTemporalDenoise.
- edit -
Oh, and for a start, try with SetMTmode(5,4) at the beginning. 8 Threads might be too much for MCTD, creating memory problems. 4 threads is much easier to get running.
An IP BreAKDoWN
12th January 2012, 19:46
Don't put a frame decimator in an MT-enabled section. The better case is that it pulls the whole thing down to 1-threaded speed. The worse case is that it creates other, more serious problems.
Makes sense, however I already made the timecodes without the MT. So I deleted it.
Keep the SetMTmode(5) at the start. (There's a recommendation to use mode=3 instead, but I've had some probs with 3 that I never have with 5)
Put the SetMTmode(2) later in the script, after the Decimate call. I'd try putting it directly before MCTemporalDenoise.
So this would be my script: (?)
##Setting Memory (HW has 16 GB)##
#SetMemoryMax(1024)
##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Decomb521VFR1.3_P4-Athlon.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\TIVTC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.21.avsi")
##Setting Speed##
SetMTMode(5)
##Source Video##
AVCSource("G:\%PATH%\video.dga")
##Crop Before Filters to Reduce Times##
crop(244, 4, -244, -4)
##Some Tweaking##
Spline36Resize(960,720)
##Them Good Ole' Watermarks##
textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\BreAKDoWN.ssa")
##Setting Cores? I have an 8 core processor##
SetMTMode(2)
##Filtering##
MCTemporalDenoise(settings="low")
An IP BreAKDoWN
12th January 2012, 20:02
I tried using that script and if the setting is on low I can queue it, encoding it now. However when I try to queue the same script with the very high setting on the Temp Denoiser it crashes MeGUI when I try to queue it. I wonder why its doing that.
Taurus
12th January 2012, 20:25
I tried using that script and if the setting is on low I can queue it, encoding it now. However when I try to queue the same script with the very high setting on the Temp Denoiser it crashes MeGUI when I try to queue it. I wonder why its doing that.
Are you sure you are using exactly the plugins Lato mentioned in the readme part of his script?
I dont use MCTemporalDenoise but made a little test with it.
Runs rockstable with a Core2duo. About 10fps at SD content with MT enabled.
No, and I dont use MeGui and would never even bother to try the "very high" settings in MCTemporalDenoise.
Leave some dirt in the movie and enjoy the show :p
An IP BreAKDoWN
12th January 2012, 20:50
Are you sure you are using exactly the plugins Lato mentioned in the readme part of his script?
I dont use MCTemporalDenoise but made a little test with it.
Runs rockstable with a Core2duo. About 10fps at SD content with MT enabled.
No, and I dont use MeGui and would never even bother to try the "very high" settings in MCTemporalDenoise.
Leave some dirt in the movie and enjoy the show :p
I have all the plugins and all the other stuff. Just double checked. However I did get this to queue and encode:
##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)
##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Decomb521VFR1.3_P4-Athlon.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\TIVTC.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.21.avsi")
##Setting Speed##
SetMTMode(5)
##Source Video##
AVCSource("G:\%PATH%\video.dga")
##Decimate for timecodes##
#Decimate(timecodes="G:\%PATH%\timecodes.txt",
#\vfrstats="G:\%PATH%\timecodes.vfrstats")
##Crop Before Filters to Reduce Times##
crop(244, 4, -244, -4)
##Some Tweaking##
Spline36Resize(960,720)
##Them Good Ole' Watermarks##
textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\BreAKDoWN.ssa")
##Setting Cores##
SetMTMode(8)
##Filtering##
MCTemporalDenoise(settings="very high")
but not:
##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)
##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\DGAVCDecode.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\gradfun2db.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.20.avsi")
##Setting Speed##
SetMTMode(5)
##Loading Original Video##
AVCSource("G:\%PATH%\00012.dga")
##Cropping Before Filter to Reduce Time##
crop(240, 0, -240, -0)
##Them Good Ole' Watermarks##
#textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\breakdown Don't use.ssa")
##Setting Cores##
SetMTMode(8)
##Processing Filters##
MCTemporalDenoise(settings="very high")
Only difference is the length of the video. First one is a 23 minute show, other is a 45 second clip. They are untouched from two separate BDs. Could that be the issue?
Didée
12th January 2012, 21:09
I'm too lazy to make a practical test, AVCsource I haven't used in ages (it's depreciated and buggy, use ffmpegsource (from *.mkv, not from *.m2ts) or DGDecodeNV instead), and MCTemporalDenoise I don't use either.
However, now you have this SetMTmode(8) -thing in the script, again. Concentration please, it should be SetMTmode(2).
'Untouched' can be a dangerous word, btw.
Taurus
12th January 2012, 22:23
There is no SetMTMode(8) as far as I remember.
Maybe just read the Avisynth MT doc's...
Edit: Didée was faster
An IP BreAKDoWN
12th January 2012, 23:12
However, now you have this SetMTmode(8) -thing in the script, again. Concentration please, it should be SetMTmode(2).
Ok I misinterpreted the SetMTMode function, I thought the second was to set the number of cores. Major facepalm. And I wouldn't have to claim the number of again if I change it to SetMTmode(2) would I?
Didée
12th January 2012, 23:46
Yes. The number of threads is defined only by the very first call of setmtmode. Later on, you can change the "mode", but not the number of threads.
Example script.
(1) SetMTmode(5,4)
(2) Mpeg2source("source.d2v")
(3) Filter1()
(4) SetMTmode(2)
(5) Filter2()
(6) return(last)
(1) - Define that the script will use 4 threads for mutlithreading. However, don't actually use multithreading now (mode=5), because source filters usually don't like that
(2) - source filter, using only one thread (we're in "mode=5")
(3) - a processing filter, using only one thread (we're still in "mode=5") - perhaps a GPU-assisted filter, these filters don't like multithreading either
(4) - now switch the multithreading on. It will activate mode=2, and (inherently) use 4 threads (as defined in the very 1st call)
(5) - a processing filter, this one now runs in mode=2, using 4 threads
(6) - end of story, erh, script
If in (4) you would write SetMTmode(2,6) (mode=2, threads=6), then it'll switch to mode 2, but still use only 4 threads (as defined at the beginning)
An IP BreAKDoWN
13th January 2012, 00:33
Ok I really appriciate the help guys alot; however I'm still having problems with this. Here is new modified script that should implement all the suggesting everyone's posted. Here is my script:
##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)
##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\gradfun2db.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.20.avsi")
##Setting Modes And Cores##
#SetMTMode(5,4)
##Loading Original Video##
FFVideoSource("G:\TEST\T1_Video - .mkv", track = -1, cache = true, cachefile = "G:\TEST\T1_Video - .ffindex", fpsnum = -1, fpsden = 1, pp = "", threads = -1, timecodes = "G:\TEST\test timecodes.txt", seekmode = 1, rffmode = 0, width = -1, height = -1, resizer = "BICUBIC", colorspace = "", utf8 = false)
##Cropping Before Filter to Reduce Time##
crop(240, 0, -240, -0)
##Them Good Ole' Watermarks##
#textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\breakdown Don't use.ssa")
##Changing Modes##
SetMTMode(2)
##Processing Filters##
MCTemporalDenoise(settings="very high")
It still crashes MeGUI when I load it into queue (but loads video preview just fine :confused:)
Zep
13th January 2012, 16:02
Keep the SetMTmode(5) at the start. (There's a recommendation to use mode=3 instead, but I've had some probs with 3 that I never have with 5)
Put the SetMTmode(2) later in the script, after the Decimate call. I'd try putting it directly before MCTemporalDenoise.
- edit -
really you have had crashes or some other decimate problem?
I always use 3 and never had a problem. Note i only use 3 cause SET said 3 was better and i only use 3 with HIS Builds.
yeah for sure no decimate at level 2. that always is crash for me i just leave it at 3 and it works fine in the SET builds.
Zep
13th January 2012, 16:20
[QUOTE=An IP BreAKDoWN;1551042
I'm going to comment it out and see what will happen. However I have 16 gigs of RAM and when I encode I barely use 20% total (including all other programs and OS). Should I still leave it out?
[/QUOTE]
how much ram you have access to depends on the OS version and avisynth version you have installed and a few other things. IIRC since SET only makes 32 bit builds the most you have access to is 4 gigs on a 64 bit OS. Even less if the "few other things" are not good to go :D
Zep
13th January 2012, 16:23
Ok I really appriciate the help guys alot; however I'm still having problems with this. Here is new modified script that should implement all the suggesting everyone's posted. Here is my script:
##Setting Memory (HW has 16 GB)##
SetMemoryMax(1024)
##Plugins##
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms2.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\gradfun2db.dll")
Import("C:\Program Files (x86)\AviSynth 2.5\plugins\MCTemporalDenoise.v1.4.20.avsi")
##Setting Modes And Cores##
#SetMTMode(5,4)
##Loading Original Video##
FFVideoSource("G:\TEST\T1_Video - .mkv", track = -1, cache = true, cachefile = "G:\TEST\T1_Video - .ffindex", fpsnum = -1, fpsden = 1, pp = "", threads = -1, timecodes = "G:\TEST\test timecodes.txt", seekmode = 1, rffmode = 0, width = -1, height = -1, resizer = "BICUBIC", colorspace = "", utf8 = false)
##Cropping Before Filter to Reduce Time##
crop(240, 0, -240, -0)
##Them Good Ole' Watermarks##
#textsub("C:\Program Files (x86)\AviSynth 2.5\plugins\breakdown Don't use.ssa")
##Changing Modes##
SetMTMode(2)
##Processing Filters##
MCTemporalDenoise(settings="very high")
It still crashes MeGUI when I load it into queue (but loads video preview just fine :confused:)
because you still have SetMemoryMax(1024) perhaps
Didée
13th January 2012, 16:40
That script doesn't even use multithreading. The initial SetMTmode is #commented, so it doesn't initiate the threading. The later SetMTmode is without effect, since you cannot initiate threading after a video object has been created.
No idea why it's crashing MeGUI, I never use it. (It's not even installed here.) But somehow I feel that "Avisynth script is crashing MeGUI!!!" is a frequent topic. Isn't it?
An IP BreAKDoWN
14th January 2012, 06:38
That script doesn't even use multithreading. The initial SetMTmode is #commented, so it doesn't initiate the threading. The later SetMTmode is without effect, since you cannot initiate threading after a video object has been created.
No idea why it's crashing MeGUI, I never use it. (It's not even installed here.) But somehow I feel that "Avisynth script is crashing MeGUI!!!" is a frequent topic. Isn't it?
Oh ha, that was an old test one. I don't have it commented out now. But I'll post there thanks.
Zep
14th January 2012, 15:57
That script doesn't even use multithreading. The initial SetMTmode is #commented, so it doesn't initiate the threading. The later SetMTmode is without effect, since you cannot initiate threading after a video object has been created.
No idea why it's crashing MeGUI, I never use it. (It's not even installed here.) But somehow I feel that "Avisynth script is crashing MeGUI!!!" is a frequent topic. Isn't it?
haha yeah i didn't notice he commented the MT out. proof that just quickly glancing at code is a bad mojo :D
However, my gut says he pasted bad code as there is no way not to notice MT off CPU wise.
UPDATE: it appears my gut was correct :P
nibus
14th February 2012, 13:53
LaTo - is there any advantage to running TTempSmooth inside MCTD rather than separately? I'd like to tweak the lthresh and cthresh parameters.
torwart
17th February 2012, 19:54
People help.
I want to make working this MCtemporal denoise. I have every plugin and avsi in one folder. my script is there too. when i drop in VD ERROR OCCURS!!!!!! /there is no function ff3dfilter/ I have fft3d system 32. everything is ok. all i need is to run that script. what to do????????????????????????
06_taro
17th February 2012, 20:55
Download: MCTDmod_v1.4.20mod3.6.rar (http://www.nmm-hd.org/upload/get~qALxd-h2jUg/MCTDmod_v1.4.20mod3.6.rar)
Changelog ( I didn't post modded version in D9, until I see someone needed today. If you need previous version, find it here (http://j.mp/MF-06_taro) ):
v1.4.20 mod3.6
-- adjusted merge16_8 usage to latest version of dither package
v1.4.20 mod3.5
-- now accept negative value of post as sigma ( was only used to define whether fixband is used on post-denoise, and must be used with custom "ppnr" )
-- added "useMMask" in MCTD to turn motion mask on/off for sharpen/stabilize/enhance
v1.4.20 mod3.4
-- fully supported Y/U/V in -65535~5 of MCPP_merge16_8, although MCTD_PP only needs value of 1/3
v1.4.20 mod3.3
-- added "stF" to allow custom stabilizing filter
v1.4.20 mod3.2
-- made lthresh/cthresh changeable
v1.4.20 mod3.1
-- added "useMMask" in MCTD_PP to turn motion mask on/off for sharpen/stabilize/enhance
-- changed the type of "sigma" from int to float
v1.4.20 mod3
-- fixed scene change frames not being filtered correctly with sharp/stabilize/enhance
-- added "pp" in MCTD to turn all post-processing in MCTD_PP off
-- supported stacked 16-bit output for custom "dbF" ( mainly implemented by SAPikachu )
v1.4.20 mod2
-- removed deblock mod16 warnings when deblock=true, pad and crop internally
-- updated Deblock_QED with custom bug fix
v1.4.20 mod
-- added "p1nr", "p2nr", "ppnr", "shF", "aaF", "dbF" to allow custom filters
Requirements pack(packed some days ago, should contained all the plugins/scripts, but I didn't check. MCTD uses some functions in other scripts, and I was not sure if I had splitted all these funcions out):
MCTDmod_Requirements.7z (http://www.nmm-hd.org/upload/get~QWy1xdGiHi0/MCTDmod_Requirements.7z)
edit: Dither package in requirements pack haven't been updated, you need to manually update it to v1.15.0 or above
Taurus
17th February 2012, 21:27
I have fft3d system 32. everything is ok
No, you have to put FFTW3.DLL in system32.
fft3dfilter.dll -> avisynth\plugins folder.
Please read the readme's and/or the html:
http://avisynth.org.ru/fft3dfilter/fft3dfilter.html
Good luck.
MCTD is a little bastard, I won't use it:p:D
nibus
18th February 2012, 03:23
MCTD v1.4.20 mod 3.2
Download: MCTDmod_v1.4.20mod3.2.rar (http://www.nmm-hd.org/upload/get~jiGTwAFhlUE/MCTDmod_v1.4.20mod3.2.rar)
Changelog ( I didn't post modded version in D9, until I see someone needed today. If you need previous version, find it here (http://j.mp/MF-06_taro) ):
Thanks taro, I'll give your mod a shot. :cool:
torwart
18th February 2012, 07:57
Sorry. Ofcourse I have fftw3.dll in system 32 and the fft3dfilter.dll in plugins.........
StainlessS
18th February 2012, 12:10
People help.
I want to make working this MCtemporal denoise. I have every plugin and avsi in one folder. my script is there too. when i drop in VD ERROR OCCURS!!!!!! /there is no function ff3dfilter/ I have fft3d system 32. everything is ok. all i need is to run that script. what to do????????????????????????
FFT3DFilter. (EDIT: If that's not too obvious)
canuckerfan
5th March 2012, 04:44
MCTD v1.4.20 mod 3.3
Download: MCTDmod_v1.4.20mod3.3.rar (http://www.nmm-hd.org/upload/get~o_ydt3aaV00/MCTDmod_v1.4.20mod3.3.rar)
Changelog ( I didn't post modded version in D9, until I see someone needed today. If you need previous version, find it here (http://j.mp/MF-06_taro) ):
Requirements pack(packed some days ago, should contained all the plugins/scripts, but I didn't check. MCTD uses some functions in other scripts, and I was not sure if I had splitted all these funcions out):
MCTDmod_Requirements.7z (http://www.nmm-hd.org/upload/get~QWy1xdGiHi0/MCTDmod_Requirements.7z)
Those are some interesting modifications. How would I combine MCTDmod with the Dither package to perform post dithering on a clip?
Edit: Can MCTDmod output 16-bit like the modified dfttest can in the dither package?
06_taro
5th March 2012, 06:28
Example:
MCTD(enhance=true, dbF="GradFun3(lsb=true)")
In this way, output is stacked 16-bit.
Actually both stabilize and enhance period accept 16-bit process ( they share the same mask/merge ):
MCTD(stabilize=true, stF="dfttest(lsb=true)",
\ enhance=true, dbF="GradFun3(lsb=true, lsb_in=true)")
But be careful that if stabilize period outputs 16-bit clip, enhance filter should be able to accept 16-bit input.
And you can use MCTD(enhance=true, dbF="""dfttest(lsb=true).GradFun3(lsb=true, lsb_in=true)""") to do the same thing.
lansing
26th March 2012, 19:50
can MCTD be multithreaded? I'm currently trying to run it on my 100 minutes bluray anime movie, and it's going to take like 30 hours on my AMD 4 core, while only with 35% cpu usage. Is there a way to utilize all the cores?
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.