View Full Version : best noise reduction ever seen, using vdub "save img seq" and neat image "batch mode&
Backwoods
19th August 2005, 11:56
Evaluate: Unrecognized exception!
TimeDeNoise.avs, line 12
With the latest MVTools loaded,
Works:
ImageSource("capture_2.png")
Lanczos4Resize(720,480)
ConvertToYUY2(interlaced=false)
TimeDenoise(1.0,interlaced=false)
Doesn't work:
DirectShowSource("PERFECT_PLATE.avi")
FieldDeinterlace(blend=false)
Lanczos4Resize(640,360)#or (720,480)
TimeDenoise(1.0,interlaced=false)
It seems once anything relating to motion happens, I receive any error. Any ideas?
sasam
23rd August 2005, 14:08
I have noticed that this script doesn't work with some codec's.
While I can open all files with directshowsource() some crash in this script.
Backwoods try using file encoded by different codec. I use mjpeg and it works fine.
Backwoods
23rd August 2005, 19:16
Will do.
EDIT: You are correct. Ok, well that solves that.
o2xygen
25th August 2005, 22:11
Where can I find the setmemorymax.avs file?
It Paviko's method runs very slow here, and I am wondering if that will fix this.
thanks
cwk
25th August 2005, 22:23
Hello o2xygen,
If you are looking to use the SetMemoryMax option to increase the amount of memory available to a script, you do not have to utilize an external AviSynth script.
If you add SetMemoryMax(256) to the top of your script, AviSynth will no what you are talking about.
ck
Backwoods
25th August 2005, 22:30
Or if you like, you can make an "setmemorymax.avsi" file in your "X:\...\AviSynth 2.5\plugins\" dir. And within that file put which setting you like.
SetMemoryMax(256)
This will make that setting load each time you open an AVS file without having to type it each time.
o2xygen
26th August 2005, 14:14
something else, is it better the footage to be interlaced or progressive?
IF progressive then should I change the main.avs
to
clip = AVISource("C:\avisynth\someavi.avi")
clip = clip.TimeDenoise(1.0,interlaced=false)
Then should I change the timedenoise.avs as well? (IF ITS BETTER TO KEEP THE FOOTAGE INTERLACED, THEN DON'T BOTHER AS I WILL DEINTERLACE IT AFTER THIS.)
function TimeDenoise(clip clip, float "strength", bool "interlaced"){
strength = default(strength, 1.0)
interlaced = default(interlaced, false)
order = (clip.getparity == true) ? 1 : 0
clip = (interlaced == false) ? clip.ConvertToYV12(interlaced = true) : clip.ConvertToYV12()
clip = (interlaced == false) ? clip.TDeint(mode=1,order=order,type=2) : clip
clip = clip.FFT3DFilter(sigma = strength / 2, bt = 2, bw = 48, bh = 48)
backward_vectors4d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 4, idx = 1, pel = 2)
backward_vectors3d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 3, idx = 1, pel = 2)
backward_vectors2d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 2, idx = 1, pel = 2)
backward_vectors1d = clip.MvTools_MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors1d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_vectors2d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 2, idx = 1, pel = 2)
forward_vectors3d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 3, idx = 1, pel = 2)
forward_vectors4d = clip.MvTools_MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 4, idx = 1, pel = 2)
clip = clip.MvTools_MVDenoise(backward_vectors4d, backward_vectors3d, backward_vectors2d, backward_vectors1d,
\ forward_vectors1d, forward_vectors2d, forward_vectors3d, forward_vectors4d, tht = int(strength * 6),
\ thsad = int(strength * 800), thSCD1 = int(strength * 1000))
clip = clip.ConvertToYUY2()
clip = (interlaced == false) ? clip.separatefields().selectevery(4,0,3) : clip
clip = clip.VagueDenoiser(threshold = strength, wavelet = 3, method=1, nsteps=4 ,chromaT=0.8, Wiener = false,
\ percent = 80, interlaced = true) ####This was false
clip = clip.LimitedSharpen(ss_x = 2, ss_y = 2, strength = 255, wide = true)
clip = clip.Unfilter(int(strength * 4), int(strength * 4))
clip = (interlaced == false) ? clip.Weave() : clip
return clip
}
those in red are those that I modified and most probably are wrong...
Wilbert
26th August 2005, 15:05
IF progressive then should I change the main.avs
to
clip = AVISource("C:\avisynth\someavi.avi")
clip = clip.TimeDenoise(1.0,interlaced=false)
Yes.
Then should I change the timedenoise.avs as well?
No. If you do that your progressive footage is treated as interlaced (unless you specify interlaced=true) :)
o2xygen
26th August 2005, 17:35
:thanks:
one last thing... Deinterlace before or after denoising?
thanks in advance
bananacreamandpeca
10th January 2006, 20:48
This degrain.dll I keep reading about in the AutoGordianknot logs,
is that the work of the TS. ??
I would like to add, yes it;s amazing.
But I just used agk 2.20 and encoded SW. Episode IV Empire Strikes Back
And I must say, yes it's asome sort of a complaint.
--> It makes the picture very clean. too clean! very sterile,
like if some scnenes were very good CGI performances!
How can I override this degrain.dll from starting in AGK ?
So I can compare for myself.
It is an amazing filter, but I kinda like some grains that add to the tension
of certain scenes you know..
I realy do not know what drives these people to always digitaly destroy
sound that sounds great or a picture that already has life in it and suck it away.
Some scenes in SW now realy look like they were matte paintings.
a shame..
BigDid
10th January 2006, 21:26
...How can I override this degrain.dll from starting in AGK ?..
Hi,
Its not degrain, its removegrain from Kassandro.
You can try AGKPal/AGK Tweaker to change the filtering in AGK (more related to the AGK Forums ;) )
here: http://hansprestige.com/agkpal/AGKPal-0.11.zip
discussion here: http://forum.doom9.org/showthread.php?t=100517&highlight=agkpal
I use removegrain with mode=5 instead of mode=2 (AGK settings) keeps more details; for stronger use, try modes7,8,9 etc... see Kassandro chart in his removegrain pre 1.0 release
here: http://home.arcor.de/kassandro/RemoveGrain/
Did
ADI_RO
1st February 2006, 12:22
I must say that i am amazed of the quality this script can produce but unfortunately for me it dosen't properly work.
What i'm doing is caputring the dv video using WinDV,editing the video in Adobe Premiere and then i'm using avisynth with these scripts and virtualdubmod,from vdm i use fast recompress but with all the codecs that i use like huffyuv or Main Concept Dv Codec or even no compresion at all,the output is properly filtered for only 5 to 8 seconds,after wich even thow i only have 4 fps meaning that the script is still working,a lot of the noise reaper,i think the problem might be with MvTools_MVAnalyse,i'm using 0.9.9.1,i was unable to find the latest version,from what i've understand i have to make a donation,i will if that will fix the problem for me :).
paviko
1st February 2006, 22:57
@o2oxygenone last thing... Deinterlace before or after denoising?A bit late to answer ;), but before is recommended, because this script is deinterlecing video when it's not progressive.
@ADI_ROthe output is properly filtered for only 5 to 8 seconds,after wich even thow i only have 4 fps meaning that the script is still working
Really, really strange. What version of avisynth, what parameter for memory used by avisynth, how much RAM you've got? The new version of MVTools (1.0.3) is available again on Fizicks website. But probalby it's not the cause of this behaviour. How about commenting out the line with MVTools call and comparing output:
change this
clip = clip.MvTools_MVDenoise(....
to:
#clip = clip.MvTools_MVDenoise(....
Regards
ADI_RO
2nd February 2006, 15:31
I'm using AviSynth_256_r2 i tryed also with the official one but with the same results.
The scripts that i use are the original one posted by u and the one with limitedsharpen2 wich is a little faster,but they both work with that same problem.
I have 1 gb of pc 3200 oc at 600 mhz dual channel,i didn't use SetMemoryMax,should i? how much memory should i use?
MVTools (1.0.3) is still unavailable,i would have wanted to try out MCNR_simple2 but that one dosen't work without the latest version of MVTools.
Here is a sample with the problem i was talking about at the moment in wich the noise start reapearing after 6 s from the begining using fast recompres from vdm with Main Concept Dv Codec,the script used is the one with limitedsharpen2 :
http://rapidshare.de/files/12382854/2.avi.html
ADI_RO
3rd February 2006, 14:24
Using SetMemoryMax didn't change anything,i used 256 and 512.
Also removing MvTools_MVDenoise line resulted in the noise that i was talking about being there all along from the start to the end.
Tryed the script on a p4 with the same result,i don't know what else tot do,i realy liked what these scipt can do.
Didée
3rd February 2006, 14:51
Try decreasing SetMemoryMax, instead of increasing ...
The point is that MVTools by itself uses lots of memory, independant of what Avisynth uses for the script. Try some low values like SetMemoryMax(32|40|..|64) ... the lower you can get away with, the better.
And just to make sure - are you talking about the "TimeDenoise" function? You're referring to "this script", which is somewhat vague ...
Lastly, at this place (http://home.arcor.de/dhanselmann/_stuff/), you'll find not only the script for MVNR_simple, but also one of the needed incredients.
ADI_RO
3rd February 2006, 17:49
Thanks ,yes i was refering to Timedenoise Function.
No luck with SetMemoryMax(32) wich is the lowest,alldow something did hapen my render speed was half now then it was before,after that i replaced the MVTOOLS.dll with the one from 1.0.3 but again same thing happend.
There was no Mvnr_simple on that link only MCNR_simple2.
ADI_RO
3rd February 2006, 22:21
Ok,i gave SeeSaw and MCNR_simple2 a try and the results are even better and gues what it works all the way :) whitout even using SetMemoryMax command ,thanks again Didée.
The script i used :
aviSource("e:\test.avi")
Import("LimitedSharpenFaster.avs")
Import("SeeSaw.avs")
Import("MCNR_simple2.avs")
ConverttoYV12(interlaced=true)
LimitedSharpenFaster(ss_x=2.5,ss_y=2.25,strength=30,smode=4)
fft3dfilter(sigma=5,plane=0)
fft3dfilter(sigma=6,plane=3)
a = last
b=a.degrainmedian(mode=1).cnr2()
SeeSaw(a,b,NRlimit=17,bias=18,Smode=11,Szp=18,SdampLo=20)
In the end i replaced MCNR_simple2 becouse the render speed was 1 fps.
paviko
5th February 2006, 11:48
after that i replaced the MVTOOLS.dll with the one from 1.0.3 but again same thing happend
Then I have no idea what can be wrong :(
Regards
fRUTTiFrESH
6th February 2006, 07:03
New FFTW Version 3.1 is out http://www.fftw.org !
Download the Win32 binaries, extract libfftw3f-3.dll, rename it to fftw3.dll and replace the old one in the \windows\system32 folder.
Somehow it was a bit slower than the old binary (AthlonXP 3000+ / Barton core). Please post some of your benchmarks (can be done with benchf.exe from the archive)
D:\FFTW-3.1>benchf.exe -opatient 64 128 256 512 1024 2048 4096
Problem: 64, setup: 33.33 ms, time: 555.46 ns, ``mflops'': 3456.6
Problem: 128, setup: 72.76 ms, time: 1.22 us, ``mflops'': 3672
Problem: 256, setup: 144.42 ms, time: 2.70 us, ``mflops'': 3789.8
Problem: 512, setup: 289.08 ms, time: 5.99 us, ``mflops'': 3847.1
Problem: 1024, setup: 520.38 ms, time: 13.18 us, ``mflops'': 3883.9
Problem: 2048, setup: 1.01 s, time: 31.57 us, ``mflops'': 3568.1
Problem: 4096, setup: 2.08 s, time: 74.45 us, ``mflops'': 3301
A Changelog can be found here: http://www.fftw.org/release-notes.html
AVIL
6th February 2006, 19:00
For general information:
The new version crashes gaussianblur, an avisynth's filter from tsp's variableblur 0.4 filter pack. Avisynth's filter FFT3dfilter 1.8.5 from Fizick don't crashes and (apparently) runs ok.
My system is XP professional edtion SP1. Pentium III 800Mhz 384 Kb RAM.
tsp
6th February 2006, 22:18
it might be because fft3dfilter is not staticly linked to fftw.dll while gaussianblur is. Does anyone see improved performance with fft3dfilter with fftw 3.1?
ron spencer
7th February 2006, 19:38
neat image makes neat video:
http://www.neatvideo.com/index.html?sni
jriker1
9th April 2006, 03:51
Trying to figure out how to add the following two lines to the below script:
LanczosResize(704,480,0,0,352,240)
AddBorders(8,0,8,0)
Any ideas? Tried sticking them after the avisource, before the return, putting clip= before each. Doesn't take. I know the limitedsharpen.avs file has a LanczosResize value in it so may have to directly put it there, however wasn't sure.
Here it is:
Example:
Import("limitedsharpen.avs")
Import("timedenoise.avs")
clip = AVISource("filename.avi")
clip = clip.TimeDenoise(1.0)
return clip
Regards
Thanks.
JR
Blue_MiSfit
25th April 2006, 20:52
I would say that the samples are pretty good, but I do see some loss of detail / sharpness - particularly the guy's hat. It's minute, and when played back, the temporal nature of video might mask that...
Still yet, it's not phenomenal I think...
Not bad though :D
~misfit
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.