View Full Version : how to remove this fan noise
lansing
30th June 2012, 02:27
sample is here:
http://www.mediafire.com/?niblou3lm4wwhvg
I know that Fanfilter by vcmohan can do it, but I have no idea how to tweak it, and the forum are lacking threads about this problem, any guidance here?
And if I were going to srestore the framerate back to 25fps like this, should I do fanfilter before srestore or after?
source
QTGMC()
srestore(frate=25)
Mounir
30th June 2012, 17:14
You have to denoise first and then use a deflicker filter i have tested with msu deflicker (best,blend,10,1,16) it work well the problem is that the distribution on the luma plane change so what i would do is first light denoising, remove the flickering and denoise again(stronger)
lansing
1st July 2012, 14:54
what denoiser did you use? The only one denoiser that seems to have an effect is fft3dfilter with a high sigma of 15, the others like dfttest, nlmean_cl didn't do anything to the source
Didée
1st July 2012, 16:54
Sorry but .... what a crappy source this is. I don't think there's much sense trying to undo the blended-nomconversion. First - it seems to be a sliding blending (ConvertFPS style), so you'd need RestoreFPS, since Srestore cannot do that. Second - for undoing blending, you generally ned a rather "clean" sorce to start with. Else, you make things differently worse, but not better.
The video looks like it could bear firestone and hand-axe:
avisource("fan noise.avi")
assumetff()
bob(0,0.5)
temporalsoften(6,32,32,28,2)
clense(reduceflicker=false).repair(last,1)
Checking ... it turns out like this (http://www.mediafire.com/?ctsh376qqrnolww).
Very fast, very brutal. But hey, it looks like something. Long live stoneage.
Maybe ... using this stoneage filter as a reference, and build a heavy MDegrain around it:
avisource("fan noise.avi")
assumetff()
#bob(0,0.5)
nnedi3(field=-2)
# patching vertical chroma placement
crop(0,0,0,-8).pointresize(width,height,0,0,width,height).mergeluma(last)
pointresize(width,height,0,8,width,height).mergeluma(last)
bo=last
temporalsoften(6,32,32,28,2)
clense(reduceflicker=false).repair(last,1)
zz=last
sup = last.removegrain(11).msuper()
bv6 = sup.manalyse(isb=true, delta=6,truemotion=false,global=true,blksize=16,overlap=8,DCT=5)
bv5 = sup.manalyse(isb=true, delta=5,truemotion=false,global=true,blksize=16,overlap=8,DCT=5)
bv4 = sup.manalyse(isb=true, delta=4,truemotion=false,global=true,blksize=16,overlap=8,DCT=5)
bv3 = sup.manalyse(isb=true, delta=3,truemotion=false,global=true,blksize=8,overlap=4,DCT=5)
bv2 = sup.manalyse(isb=true, delta=2,truemotion=false,global=true,blksize=8,overlap=4,DCT=5)
bv1 = sup.manalyse(isb=true, delta=1,truemotion=false,global=true,blksize=8,overlap=4,DCT=5)
fv1 = sup.manalyse(isb=false,delta=1,truemotion=false,global=true,blksize=8,overlap=4,DCT=5)
fv2 = sup.manalyse(isb=false,delta=2,truemotion=false,global=true,blksize=8,overlap=4,DCT=5)
fv3 = sup.manalyse(isb=false,delta=3,truemotion=false,global=true,blksize=8,overlap=4,DCT=5)
fv4 = sup.manalyse(isb=false,delta=4,truemotion=false,global=true,blksize=16,overlap=8,DCT=5)
fv5 = sup.manalyse(isb=false,delta=5,truemotion=false,global=true,blksize=16,overlap=8,DCT=5)
fv6 = sup.manalyse(isb=false,delta=6,truemotion=false,global=true,blksize=16,overlap=8,DCT=5)
sup2 = bo.msuper()
bo.mdegrain3(sup2,bv1,fv1,bv2,fv2,bv3,fv3,thsad=600).mt_lutxy(bo,"x 1 + y < x 2 + x 1 - y > x 2 - y ? ?",U=3,V=3)
sup3 = last.msuper()
last.mdegrain3(sup3,bv4,fv4,bv5,fv5,bv6,fv6,thsad=400).mt_lutxy(last,"x 1 + y < x 2 + x 1 - y > x 2 - y ? ?",U=3,V=3)
stackhorizontal(bo.subtitle("bobbed"),last.subtitle("bobbed + Filter"))
http://thumbnails44.imagebam.com/19956/9e25b9199557748.jpg (http://www.imagebam.com/image/9e25b9199557748)
Mounir
1st July 2012, 17:04
here is the script i've used:
http://www.mediafire.com/?9ahtu4vl9b2mf2h
this script + msu deflicker (video 50mb):
http://www.mediafire.com/?9lt2m88vrbcd89q
Mounir
1st July 2012, 17:40
Didée solution seems best but is lacking a few things, i'm experimenting with it, i'll let you know in a few
Mounir
1st July 2012, 21:44
Script didée + minor refinements from me (didée's script does 98% of the job):
http://www.mediafire.com/?9wnbqipl2o12o3q
Video result (this script + msu deflicker (best,blend,10,1,10)) :
http://www.mediafire.com/?6bvzcswaco8rh3y
lansing
2nd July 2012, 15:40
@ Didée
I'm interest in trying the RestoreFPS filter, what do I do with the 60fps clip ending with your script? Selecteven to make it 30fps and then call the RestoreFPS function? And do I need to blind guess the phase number?
@ Mounir
why still need the msu deflicker when the fan noise was already removed in the earlier script?
Didée
2nd July 2012, 16:22
Without SelectEven. You would call RestoreFPS on the 60p footage. All Frames(Fields) contain required information.
In a sense, you have two different layers mixed together: one layer with blending (the video itself), one layer without blending (the VHS noise & artifacts). But you can't separate the layers. That's a problem, because:
a) Using RestoreFPS after the proposed script is a bad idea. The script creates additional smearing/blending/younameit, so the blend reversal cannot work correctly.
b) Using RestoreFPS before the proposed script also is a bad idea. The blend reversal necessarily would "reverse"/"un-blend" the noise too, which is not correct, since the noise is not blended.
If you want to try nonetheless, then try b). I'd guess that a) is guaranteed to fail.
StainlessS
2nd July 2012, 17:10
I would think a good rule of thumb would be to fix problems in the reverse
order to which they occurred, ie in this case (as Didee says), VHS problems 1st .
EDIT: Oops no, Didee says the otherway around, perhaps this is an exception to the rule?
EDIT: Would it usually be a good rule?
Mounir
2nd July 2012, 18:46
@ Mounir
why still need the msu deflicker when the fan noise was already removed in the earlier script?
It doesn't, tested & verified
Didée
2nd July 2012, 18:50
@StainlessS
Sure, processing problems in reverse order they've occurred generally is a good strategy. But look at this source: the VHS crap is urgent, hence you need verrry strrrong temporal filters. But when using verrry strrrong temporal filters, the blending is not what it has been before. Which is the ultimate no-no if you want to do un-blending.
The other way round - when unblending first, then okay, the noise gets falsely un-blended, too .... but since it'll be shot after with very strong temporal filtering anyway, ~maybe~ it works out, and the noise filtering will cancel-out also the falsely-unblended noise.
StainlessS
3rd July 2012, 05:19
Thankyou Didee.
lansing
4th July 2012, 06:16
Without SelectEven. You would call RestoreFPS on the 60p footage. All Frames(Fields) contain required information.
In a sense, you have two different layers mixed together: one layer with blending (the video itself), one layer without blending (the VHS noise & artifacts). But you can't separate the layers. That's a problem, because:
a) Using RestoreFPS after the proposed script is a bad idea. The script creates additional smearing/blending/younameit, so the blend reversal cannot work correctly.
b) Using RestoreFPS before the proposed script also is a bad idea. The blend reversal necessarily would "reverse"/"un-blend" the noise too, which is not correct, since the noise is not blended.
If you want to try nonetheless, then try b). I'd guess that a) is guaranteed to fail.
so the whole thing will be?
nnedi3(field=-2)
RestoreFPS(50,0.00)
#denosie
UPDATE: selecteven the video back to 25fps seems too jaggy on playback, so i'll settle 50fps just like that.
lansing
10th July 2012, 15:54
i have a problem trying to load msu deflicker setting in avisynth, my setting is this:
http://img502.imageshack.us/img502/1338/msudeflicksetting.jpg
but when I check on the vdscript file it shows this, which doesn't match the one show in virtualdub:
VirtualDub.video.filters.Add("MSU Deflicker v1.3");
VirtualDub.video.filters.instance[0].Config(2, 1, 0, 0.000000, 14, 0);
and when I copy the line to avisynth, it's giving me a invalid argument error, what is wrong?
LoadVirtualdubPlugin("VirtualDub-1.10.2\plugins\msu_deflick.vdf", "msu_deflick", 1)
msu_deflick(2, 1, 0, 0.000000, 14, 0)
StainlessS
10th July 2012, 17:44
Hi Lansing
I dont usually use VDub filters in Avisynth (not for a long time anyway), but I just downloaded
MSU Deflicker because I did not have it, and looked at your problem.
Tried this:
ConvertToRGB32()
LoadVirtualdubPlugin("d:\avs\msu_deflick.vdf", "msu_deflick", 1)
msu_deflick(2, 1, 0, 13, 14, 15)
Without error. unfortunately dont know what the entries for 13 and 15 are.
The 14 entry is 'blend threshold' the others are NOT changed via VDub and
are always eg 0.000000 and 0 in settings file.
EDIT: The float is causing the 'invalid argument'.
MSU Filters are a bit weird in that they sometimes need to be initialized somehow
via the VD dialog box and do not work properly simply by loading the
settings file.
I remember writing a bit about this for 'MSU Old Cinema'.
http://forum.doom9.org/showthread.php?p=1371376&highlight=msu+cinema#post1371376
lansing
10th July 2012, 18:08
thanks StainlessS, buggy msu stuffs.
Looks like I need to run a few trials and errors to get the number then, will report.
StainlessS
10th July 2012, 18:16
Those numbers may not actually be the arguments (but they may be), good luck.
lansing
10th July 2012, 19:22
ok i got all the parameter workings, it was actually in the same order as the gui window in vd:
width must be multiple of 4 (could be a bug)
height must be multiple of 2
msu_deflick(
processing type [0-2],
use blend [0-1],
use break [0-1],
safety [10-100],
change ground [1-64],
blend threshhold [1-16]
)
However there's a nasty bug with the output resolution. Say my video is 720x480, and i add a 2px border to the left, it should read 722x480. Now the screen was turned into a mess because 722 is not multiple of 4, but the resolution is actually showing 724x480. And when I added 4px border to the orginal, it repeatedly showing 724x480. I don't know where the problem is coming from but it was annoying when I'm trying to crop.
LoadVirtualdubPlugin("VirtualDub-1.10.2\plugins\msu_deflick.vdf", "msu_deflick", 1)
AVISource("G:\720x480.avi")
AddBorders(2, 0, 0, 0, color=$000000)
ConvertToRGB32()
msu_deflick(2, 1, 0, 10, 13, 14)
StainlessS
10th July 2012, 19:41
Suggest, try ConvertToRGB32, before Addborders.
EDIT:
Not sure, I think VDMod screws up on non mod 4 RGB, maybe later
ones dont. Can you Addborders 2 on both left and right keeping mod 4?
Could also of course be the MSU thing.
lansing
11th July 2012, 01:38
Suggest, try ConvertToRGB32, before Addborders.
EDIT:
Not sure, I think VDMod screws up on non mod 4 RGB, maybe later
ones dont. Can you Addborders 2 on both left and right keeping mod 4?
Could also of course be the MSU thing.
After a few tests, I think the problem came from avisynth. The avisynth filters I tried all work properly after ConvertToRGB32, it's the virtualdub plugins loaded in avisynth that exhibit the mod4 RGB problem. Where can I report this?
StainlessS
11th July 2012, 01:55
Yeh, but what did you render in, VDUB/Mod?
Did you try another?
lansing
11th July 2012, 02:03
Yeh, but what did you render in, VDUB/Mod?
Did you try another?
virtualdub and avspmod, both show the same problem
StainlessS
11th July 2012, 02:34
Am reluctant to accept an Avisynth prob, does it play in MS Media Player?
EDIT: Sample might be good.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.