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 14th December 2006, 19:45   #321  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
About System Exception - Access violation.
I have no idea what is SeeSaw function (exactly), and their parameters, and what filters versions you use.

But did you try this?:
...
denoised_source = original_source.MVDegrain1(backward_vector_1, forward_vector_1)
...
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 14th December 2006, 22:32   #322  |  Link
superuser
Registered User
 
Join Date: Sep 2006
Posts: 84
Quote:
Originally Posted by Fizick View Post
About System Exception - Access violation.
I have no idea what is SeeSaw function (exactly), and their parameters, and what filters versions you use.

But did you try this?:
...
denoised_source = original_source.MVDegrain1(backward_vector_1, forward_vector_1)
...
Yes, I tried with that, passing in one forward and one backward vector to MVDegrain1, that does not work. While MVDegrain2 works fine with two fwd and two bckwd vectors being passed in followed by call to SeeSaw. The Access Violation I am getting is on the line in script where I am making a call MVDegrain1. Once I get back to my place, I will try taking out SeeSaw from script and c if problem still exists and post the result.

Thanks.

Edit: Took out SeeSaw and still there is problem - Access violation. This exception is reported at where I am calling MVDegrain1.

Last edited by superuser; 15th December 2006 at 01:27.
superuser is offline   Reply With Quote
Old 15th December 2006, 04:25   #323  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
Does it crash on this ?


Code:
backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
last.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)

Last edited by Pookie; 15th December 2006 at 04:27.
Pookie is offline   Reply With Quote
Old 15th December 2006, 06:05   #324  |  Link
superuser
Registered User
 
Join Date: Sep 2006
Posts: 84
Quote:
Originally Posted by Pookie View Post
Does it crash on this ?


Code:
backward_vec2 = last.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
forward_vec2 = last.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=2, idx = 1)
last.MVDegrain1(backward_vec2,forward_vec2,thSAD=400,idx=1)
oops my bad in previous post.

I had forgot to specify MVdegrain on original_source, so may be it was trying to execute MVDegrain1 on a vectorized source. Sorry.

Good thing is it is working now, can experiment continue on my experiment - compare between removegrain (mode=2, 19) , MVDegrain1 and MVDegrain2.

thanks fizick and pookie for the help and resolving my silly mistake.
superuser is offline   Reply With Quote
Old 24th December 2006, 03:15   #325  |  Link
superuser
Registered User
 
Join Date: Sep 2006
Posts: 84
needed advice on following :

Code:
source = last

#Step 1 - Compute Backward & Forward Vectors
backward_vectors = source.MVAnalyse(pel=2, search=3, chroma=true, isb = true, truemotion=true, idx = 1, lambda = 1000, delta = 1)
forward_vectors = source.MVAnalyse(pel=2, search=3, chroma=true, isb = false, truemotion=true, idx = 1, lambda = 1000, delta = 1)

#Step 2 - Compute Compensation
forward_compensation = source.MVFlow(forward_vectors, idx=1)
backward_compensation = source.MVFlow(backward_vectors, idx=1) 

#Step 3-Create interleaved 3 frames sequences
interleave(forward_compensation, source,  backward_compensation)

#Step 4 - Denoise the source
FFT3DFilter(sigma=2, plane=4, bt=4, interlaced=true)

#Step 5 - Get non compensated frame
denoisedSource=selectevery(3,1)

#Step 6 - If need be apply sharpner, SeeSaw or LS + Soothe
sharpenedSource=denoisedSource.SomeSharpner
1 - Reason for using mvtools is to take into account the motion compensation and than after applying denoisers Step 1 to 4. With FFT3D and computed interleaved frames using vectors, can there be any conflicts or introduce artifacts?

2 - Will using more vectors and computing more interleaved frames in step 3 help in improving results. Or that can be over kill and not really needed or can be spoiler?

3 - What is better approach - use sharpening and dehaloing capability provided by FFT3D or use some external sharpners and have Step 6

4 - Depending on input from above, should Step 6 be performed before Step 5


Thanks for your time.

Merry Christmas and happy holidays.
superuser is offline   Reply With Quote
Old 24th December 2006, 08:31   #326  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
1. yes, there can and will be artefacts, but depending on the thresholds you use and the artefact protection your denoiser uses, it shouldn't be noticable. so fft3d at low settings will be fine.

2. more frames are useful when the denoiser knows what to do with them. so for fft3d's bt=4, you could compute 1 forward and 2 backward compensations, but any more wont be used.

3. that's outside the scope of this thread.

4. results will be identical, only slower if you swap these steps. selectevery will ditch 2/3 of the frames.
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 24th December 2006, 15:09   #327  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,691
You always need to run your own tests on your own source material, and then view the results on the monitor you use for viewing such material (i.e., the computer monitor is NOT the place to view the results). Sometimes this means burning a test DVD (on a DVD+RW or DVD-RW) and then viewing this on your TV.

FWIW, I have seldom found huge improvements in using the motion compensation (there is some) compared to the improvements that can be had by spending time tweaking the settings in step #4. The settings of the FFT denoiser are where all the action is. I would recommend temporarily eliminating all the motion compensation, and then taking 10-20 seconds of representative footage (or longer, if you have the time), and doing test runs with various settings. People have posted various settings here, and I have used some of those as starting point (although some of the settings posted are a little odd). Here are a few that I've collected and modified:
Code:
fft3dfilter(x, sigma=3, plane=0, sharpen=1, bt=3, interlaced=false)

YToUV(fft3dfilter(x, sigma=2, plane=1, sharpen=.25,interlaced=false).UToY,\
fft3dfilter(x, sigma=2, plane=2, sharpen=.25,interlaced=false).VToY,\
fft3dfilter(x, sigma=7, plane=0, sharpen=1, bt=3, interlaced=false))

fft3dfilter(x, sigma=5, sigma2=10, sigma3=12, sigma4=20, plane=0, bt=3, bw=16,\
 bh=16, ow=8, oh=8, sharpen=0.3, smin=20, smax=1000, wintype=2, kratio=1.0,\
 measure=true, interlaced=true, degrid=1)

fft3dfilter(x, sigma=8, sigma2=18, sigma3=12, sigma4=8, plane=0, sharpen=1,\
 measure=true, interlaced=true, degrid=1,wintype=2)
After trying lots of these different settings, I keep coming back to this very simple one that does a pretty good job on lots of clips:
Code:
chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false)
final=chroma.fft3dfilter(sigma=6, plane=0, sharpen=1, interlaced=true)
I only use the chroma filter on VHS sources. For other sources, I just use the FFT filter by itself and then vary the sigma and sharpen settings.

Hope this helps.

Last edited by johnmeyer; 24th December 2006 at 15:11.
johnmeyer is offline   Reply With Quote
Old 25th December 2006, 00:09   #328  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
This one doesn't make much sense:
Code:
YToUV(fft3dfilter(x, sigma=2, plane=1, sharpen=.25,interlaced=false).UToY,\
fft3dfilter(x, sigma=2, plane=2, sharpen=.25,interlaced=false).VToY,\
fft3dfilter(x, sigma=7, plane=0, sharpen=1, bt=3, interlaced=false))
Since it's functionally identical to:
Code:
fft3dfilter(x, sigma=2, plane=3, sharpen=.25,interlaced=false)
fft3dfilter(x, sigma=7, plane=0, sharpen=1, bt=3, interlaced=false)
And probably a little slower, as well. But yeah, good advice to worry more about fft3d settings.
foxyshadis is offline   Reply With Quote
Old 25th December 2006, 07:54   #329  |  Link
superuser
Registered User
 
Join Date: Sep 2006
Posts: 84
Thnxs Mug Funky, johnmeyer, Didee (though i do not know where your post went away), and foxyshadis for your input and time. This is one of the reasons I love doom9.

Info on my part for what I am trying this for: I am trying the suggested options (tweaking settings a little bit) on a newer source which needs more than grain remover (with and without motion compensation). Once I find the appropriate method for the source will apply those settings for encoding DVD 9 -> DVD 5 using CCE.

Quote:
Originally Posted by Mug Funky View Post
1. yes, there can and will be artefacts, but depending on the thresholds you use and the artefact protection your denoiser uses, it shouldn't be noticable. so fft3d at low settings will be fine.

2. more frames are useful when the denoiser knows what to do with them. so for fft3d's bt=4, you could compute 1 forward and 2 backward compensations, but any more wont be used.

3. that's outside the scope of this thread.

4. results will be identical, only slower if you swap these steps. selectevery will ditch 2/3 of the frames.
1 - I did try couple of different settings with and without motion compensation, though the results are not much different. The only observable difference is the compression, without motion compensation there is more compression achieved. (Had tried 4 CCE pass @3000 bitrate for 4000 frames). Was thinking of one thing, with motion compensation, and using external denoiser like fft3D, the number of frames because of interleaving process, which would mean a bump in time by the factor equal to number of vectors used + 1. Am I missing or messing up something here?

2 - Another point clicked to me, will interleaving say using with 2 compensated vectors and source, the the previous, current and next frame would be the same. Will this make block temporal size "bt" inefficient for bt parameters 3 and 4, as it will have three frames from same frame to work on, not sure. What do you guys think about it?

If I am going offtopic to this thread, mods please my post to fft3d post.

Edit: though i observe the color and sharpness difference with same settings one used with motion compensation and another one without. Motion compensation one seems to be better whereas one without appears slightly dull.

3 - I will take this one to fft3d thread. Though do not know where the didees comment on this disappeared. Though at the point Didee made, currently I am trying LSF + Soothe (soothe with newer masktool version from soothe thread).

4 - Yes sir, that was dumb on my part. did not gave it a thought.


Quote:
Originally Posted by johnmeyer View Post
You always need to run your own tests on your own source material, and then view the results on the monitor you use for viewing such material (i.e., the computer monitor is NOT the place to view the results). Sometimes this means burning a test DVD (on a DVD+RW or DVD-RW) and then viewing this on your TV.
Ya, I agree. But as I use my computer LCD as TV also, so sadly most of the experimentation result I view on it. you definetly made a good point.

Quote:
Originally Posted by johnmeyer View Post
Code:
fft3dfilter(x, sigma=3, plane=0, sharpen=1, bt=3, interlaced=false)
#1
YToUV(fft3dfilter(x, sigma=2, plane=1, sharpen=.25,interlaced=false).UToY,\
fft3dfilter(x, sigma=2, plane=2, sharpen=.25,interlaced=false).VToY,\
fft3dfilter(x, sigma=7, plane=0, sharpen=1, bt=3, interlaced=false))

#2
fft3dfilter(x, sigma=5, sigma2=10, sigma3=12, sigma4=20, plane=0, bt=3, bw=16,\
 bh=16, ow=8, oh=8, sharpen=0.3, smin=20, smax=1000, wintype=2, kratio=1.0,\
 measure=true, interlaced=true, degrid=1)

#3
fft3dfilter(x, sigma=8, sigma2=18, sigma3=12, sigma4=8, plane=0, sharpen=1,\
 measure=true, interlaced=true, degrid=1,wintype=2)
After trying lots of these different settings, I keep coming back to this very simple one that does a pretty good job on lots of clips:
Code:
chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false)
final=chroma.fft3dfilter(sigma=6, plane=0, sharpen=1, interlaced=true)
I only use the chroma filter on VHS sources. For other sources, I just use the FFT filter by itself and then vary the sigma and sharpen settings.

Hope this helps.
Thanks for sharing the above methods. Had couple of questions though:
- To process all planes, I generally use plane=4. Is processing one plane at a time better, though time wise I understand, processing one plan at a time, may be higher.
- wondering about why you are using high values for sigma 2, 3, & 4 and is there any correlation for values of sigma 2 ,3 & 4?

Quote:
Originally Posted by foxyshadis View Post
This one doesn't make much sense:
Code:
YToUV(fft3dfilter(x, sigma=2, plane=1, sharpen=.25,interlaced=false).UToY,\
fft3dfilter(x, sigma=2, plane=2, sharpen=.25,interlaced=false).VToY,\
fft3dfilter(x, sigma=7, plane=0, sharpen=1, bt=3, interlaced=false))
Since it's functionally identical to:
Code:
fft3dfilter(x, sigma=2, plane=3, sharpen=.25,interlaced=false)
fft3dfilter(x, sigma=7, plane=0, sharpen=1, bt=3, interlaced=false)
And probably a little slower, as well. But yeah, good advice to worry more about fft3d settings.
thnxs for yuv part, i did not notice the subtlety. was looking more into settings for step #3 suggested by john for the source I am playing with.

Regards and happy holidays to all !!!

Last edited by superuser; 25th December 2006 at 23:43.
superuser is offline   Reply With Quote
Old 4th January 2007, 15:53   #330  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
Just some questions about strenght of filtering in MVtools

What is the most higher parameter for filtering for MVdegrain 2 or MVDenoise:

I am using this scripts(for interlaced material, Pal, DV avi 720x576,BFF). Source is yuy2

Code:
#SetMTMode(2) //To speed up
source=AVISource("C:\Documents and Settings\Nenad\Desktop\vulkani.avi")


fields=source.AssumeBFF().SeparateFields()

backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = fields.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = fields.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
fields.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=800,idx=1)
Weave()
Here is thSad 800, but result is the same when set to 2000 for example

Only when set to 200 i see that is low quality.

The same thing is with these script:

Code:
LoadPlugin("mvtools.dll")
LoadPlugin("MaskTools.dll")
import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs")

#setmtmode(2)
source = AVISource("C:\Documents and Settings\Nenad\Desktop\vulkani.avi")

fields=source.AssumeBFF().SeparateFields() 

backward_vec2 = fields.MVAnalyse(isb = true, lambda = 1000, delta = 2, idx = 1)
backward_vec1 = fields.MVAnalyse(isb = true, lambda = 1000, delta = 1, idx = 1)
forward_vec1 = fields.MVAnalyse(isb = false, lambda = 1000, delta = 1, idx = 1)
forward_vec2 = fields.MVAnalyse(isb = false, lambda = 1000, delta = 2, idx = 1)
fields.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=800,idx = 1)
Weave()
This is the similar script with above(its faster), and also i cant get higher filtering from these.

So, my question is, how to get stronger filtering with MVtools.


And one more, where in this script i can put FFT3d filter. Because with that i can get better filtering.

thanks
Serbianboss is offline   Reply With Quote
Old 4th January 2007, 17:38   #331  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
There is no "filtering strength" parameter in MVDegrain.
It uses "simple" (i.e. very complex) temporal averaging.
The more frames, the more averaging.
But you can get more strong filtering with "overlap" option (up to half of block size).
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 4th January 2007, 17:49   #332  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
I read your manual,

Code:
Overlap-Must be even and less than block size
What this exactly mean? What overlap can be max to get stronger denoise? In first script i am using at value 4.

Can in script just have overlap and not pel that script is runing little faster?
Serbianboss is offline   Reply With Quote
Old 4th January 2007, 18:02   #333  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
for other functions, overlap may be simply lesser block size.
For mvdegrain: ... like FFT3DFilter, overlap value up to blksize/2
Any overlap is summation. Any summation is averaging. i.e. parial denoising.

I can not give specific advice. try yourself for your clip.
Time-quality is compromiss.
__________________
My Avisynth plugins are now at http://avisynth.org.ru and mirror at http://avisynth.nl/users/fizick
I usually do not provide a technical support in private messages.
Fizick is offline   Reply With Quote
Old 4th January 2007, 18:08   #334  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
Not clear but i will try to higher overlap parameter

One more, where is proper way to put fft3dfilter in this MVtools interlaced scipts(3 post above). Because with this scripts i remove noise but not all, and with fft3d i can remove little more noise.
Serbianboss is offline   Reply With Quote
Old 4th January 2007, 20:06   #335  |  Link
Fizick
AviSynth plugger
 
Fizick's Avatar
 
Join Date: Nov 2003
Location: Russia
Posts: 2,183
IMHO, you can simply put fft3d at the end of script to little polish and stablilize.
Fizick is offline   Reply With Quote
Old 4th January 2007, 22:46   #336  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
Did you mean to put fft3d filter after weave() and does need to specific interlaced=true or not.

Code:
SetMTMode(2)
source=AVISource("C:\Documents and Settings\Nenad\Desktop\vulkani.avi")

fields=source.AssumebFF().SeparateFields()

backward_vec2 = fields.MVAnalyse(isb = true, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
backward_vec1 = fields.MVAnalyse(isb = true, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec1 = fields.MVAnalyse(isb = false, delta = 1, pel = 2, overlap=4, sharp=1, idx = 1)
forward_vec2 = fields.MVAnalyse(isb = false, delta = 2, pel = 2, overlap=4, sharp=1, idx = 1)
fields.MVDegrain2(backward_vec1,forward_vec1,backward_vec2,forward_vec2,thSAD=800,idx=1)

Weave()

fft3dfilter(sigma=1.2,interlaced=true)
thanks
Serbianboss is offline   Reply With Quote
Old 4th January 2007, 22:56   #337  |  Link
Pookie
Registered User
 
Join Date: Apr 2005
Posts: 1,339
Code:
Weave()
fft3dfilter(sigma=1.2,interlaced=true)
is correct, and

Code:
fft3dfilter(sigma=1.2)
Weave()
is correct.

Try both and see which looks better.
Pookie is offline   Reply With Quote
Old 5th January 2007, 01:49   #338  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
I try before and after weave and result are similar. Also tried with MT and 2 way is better because use both core.

Quote:
Overlap-Must be even and less than block size
Just few questions. What is block size here? Because need to be evan and less, how do i know that? Can i set overlap=2 in my scripts. It little faster than overlap=4

I mean, how do i know when to set overlap=1 or 2 or 3 or 4 ? Any example would be helpful.
Serbianboss is offline   Reply With Quote
Old 5th January 2007, 02:07   #339  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Block size is bw and bh. Check the docs for what it defaults to. Overlap is in # of pixels, for instance if you have a 32x32 block size, overlap could be 24 (but slooooooooow). 2 is a very limited overlap, though even that's better than 0, which is rather blocky.
foxyshadis is offline   Reply With Quote
Old 5th January 2007, 11:53   #340  |  Link
Serbianboss
Registered User
 
Serbianboss's Avatar
 
Join Date: Mar 2006
Posts: 232
So in MVtools block is blksize, and we have overlap.

Overlap value is blksize/2 or blksize/4

And blksize can be 4,8,16. Default is 8

So if we want blksize=4 overlap must be 2 or blksize=8 then overlap must be 4


Just one note:

Can we in script write overlap=4 and not to write blksize=8 ?

Does we for thSad parameter we must to define with value of overlap or no?
Serbianboss 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 15:33.


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