View Full Version : Film Spots
Paazabel
1st November 2009, 03:45
I've done the obvious searching for things to affect this clip. I've tried despot, degrain, removedirt, and VirtualDub's Spot Remover. None of them seem to have any impact on the actual spots, though Spot Remover seemed to remove a lot of other noise and sharpen the picture (including most of the spots).
I snipped a 163M section of the video, which is only a few seconds, but still huge. http://www.sgt.cc/vid/spotty-clip.avi
There have been two passes at processing this video, so far:
(1) Multiple captures to even out VHS noise via median filter.
(2) SRestore to 20fps which softened things a tiny bit, but I think this is a product of bobbing the clip to feed into SRestore.
Thanks for any help you can offer.
thewebchat
1st November 2009, 04:17
http://img689.imageshack.us/img689/1469/dongs.png
MVTools seems to be able to remove some of the smaller spots. For the larger ones, I think you might be out of luck.
(Also, there's no good reason to upload BRG32 LAGARINTH files. Try YV12 and H.264 lossless or FFV1.)
Edit: Actually, it may be easier to use one of the despotting filters after removing the noise?
Paazabel
1st November 2009, 05:11
That's pretty similar to what I got from Spot Remover ...
(Yeah, sorry about the big file. I had to reformat my PC, recently. I put on Win 7 64-bit and then discovered that none of my capture cards work. So now I have a partition with XP Home on it, and I haven't loaded any other codecs since I just use lossless on my own space and then burn to DVD.)
rkalwaitis
1st November 2009, 09:36
You could try RemoveNoiseMC by Heini. It is slow, however several people have stated that it does a real nice job.
MadRat
1st November 2009, 10:30
If I was me I'd use RemoveDirtMC also by Heini. I'm not sure if RemoveDirtMC is incorporated into RemoveNoiseMC or not. You might also want to read though some of the original threads to see if you are getting the most up to date version of the script.
# You need: RemoveGrain, MVTools 1.1.1
function RemoveDirt(clip input, int limit, bool _grey)
{
clensed=input.Clense(grey=_grey, cache=4)
alt=input.RemoveGrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey)
}
function RemoveDirtMC(clip,int limit, bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
bvec = clip.MVAnalyse(isb=false, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
fvec = clip.MVAnalyse(isb=true, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
backw = clip.MVFlow(bvec)
forw = clip.MVFlow(fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}
http://forum.doom9.org/attachment.php?attachmentid=5517&stc=1&d=1141264784http://forum.doom9.org/attachment.php?attachmentid=5518&stc=1&d=1141264792
Original RemoveDirt thread: http://forum.doom9.org/showthread.php?p=444456
Original RemoveDirtMC script: http://forum.doom9.org/showthread.php?p=791217#post791217
Where the example pictures came from: http://forum.doom9.org/showthread.php?p=792959#post792959
Paazabel
1st November 2009, 14:09
I used the RemoveDirtMC script (vlq_filter) ... less of the clip stacked before-and-after (still Lagarith, but YV12; ~100M): http://www.sgt.cc/vid/Less-spotty.avi
It was a bitch to get this running, but the results are amazing! Still a few blemishes here and there, but at least a 90% improvement with very little "softening." Very impressive. Thank you.
(side note: Software rights can be a pain in the backside; would be nice if a great script could be "packaged" with all the other plugins that make it work. I know, I'm just lazy, but I spent about 2 hours debugging differences in plugin versions. It was worth it, but for an AVIsynth newb, it would have been improbable for them to stick with it.)
Sample frames:
I was particularly impressed with the second one since there are "real" dark spots in that frame and nothing else came remotely close to finding them. The first frame shows smoke rising over the hill which is in each frame and not processed as "noise." Very cool.
http://www.sgt.cc/pix/d/49030-1/despots-1.jpg
http://www.sgt.cc/pix/d/49033-1/despots-2.jpg
Not as interesting, but ... getting my money's worth out of the ol' computer!
http://www.sgt.cc/pix/d/49036-1/cpu-pegged.jpg
http://www.sgt.cc/pix/d/49038-1/vdub.jpg
MadRat
2nd November 2009, 03:17
I decided to download your avi file and see what I could do with it. I noticed I left out the need for RemoveDirt.DLL when using RemoveDirtMC and the best settings I came up with where:
RemoveDirtMC(88,false)
I've included two pictures showing my results, which are not unusual for this filter.
You might also want to go to the thread The power of Avisynth: restoring old 8mm films. http://forum.doom9.org/showthread.php?t=144271 (http://forum.doom9.org/showthread.php?t=144271) to see how to stabilize shaking, remove noise, sharpen and color correct.
When you get everything cleaned up could you show us how it looks, please? I'd really love to see the final result.
johnmeyer
2nd November 2009, 05:26
I was able to get similar results to those above by using despot, helped by motion estimation.
Paazabel
2nd November 2009, 06:49
I've thought about doing a stabilizer, but since the original film is 20fps, and I then transferred to VHS, and so much detail lost, I'd hate to trim more of the frame away. I think I'm pretty close to getting the max out of the original.
I have read through the film restoring thread (Power of Avisynth), and unfortunately, I do not have access to the original film. Certainly, that would make a huge difference ...
Any thoughts on color correction? I've tried a few things manually, but the video is cut into dozens of short clips like this. I would have to dice them all up and correct each manually. If anyone knows a good auto-corrector, then maybe I can just manually do the ones that something automatic might not handle.
thewebchat
2nd November 2009, 07:05
From what I've seen of your clip, color "correction" is probably a lost cause as there's little to no color left to begin with.
rkalwaitis
2nd November 2009, 08:33
Looks like RemoveNoiseMC did a varily good job.
Look at this too. http://avisynth.org.ru/despot/despot.html
Paazabel
3rd November 2009, 06:26
Here's a comparison that I generated to "spot check" everything. *cough* Sorry.
Anyway ...
Upper-left is the first cut at 20fps. This involved "srestore" to snag and de-dup, and it worked very well with very little tweaking.
Lower-left is the first cut with "RemoveDirtMC" ... still a few spots that you would think the filter should catch.
Lower-right is a cut with a stronger "RemoveDirtMC" ... though there are a few scenes overall that get strange, cartoon-like effects (not in the example). For them, I will insert the scene from the lower-left process.
Upper-right is the lower-right plus MSU color correction. There's one scene that MSU turned into a Van Gogh (not in this sample), and, again, for that I'll use the lower-left clip.
Many thanks to all who make this forum possible. The collective knowledge here is priceless.
http://www.sgt.cc/vid/final4.wmv
Mounir
5th November 2009, 05:18
# You need: RemoveGrain, MVTools 1.1.1
function RemoveDirt(clip input, int limit, bool _grey)
{
clensed=input.Clense(grey=_grey, cache=4)
alt=input.RemoveGrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey)
}
function RemoveDirtMC(clip,int limit, bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
bvec = clip.MVAnalyse(isb=false, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
fvec = clip.MVAnalyse(isb=true, blksize=8, delta=1, pel=2, truemotion=true, idx=1)
backw = clip.MVFlow(bvec)
forw = clip.MVFlow(fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}
How do you use such script ??
Should i copy/paste it in a .txt and make it .avs & later use import in my actual script, for example:
Import("C:\Program Files\AviSynth 2.5\plugins\RemoveDirt.avs")
I know i sound stupid..i just don't get the concept
thewebchat
5th November 2009, 05:30
Ways to load user functions/AVS import files:
1) Save with .avsi extension and place in the Avisynth plugins directory
2) Save somewhere else and use Import
Basically, anything named *.dll or *.avsi will get loaded automatically if you put it in the plugins directory. Import("whatever.avs") is approximately equivalent to copy/pasting it at that position in the script.
Paazabel
5th November 2009, 06:20
I used the AVSI method. This is a pretty complex script, and I had to load a bunch of filters (.dll's) separately for it. What I ended up doing was creating a .zip file with all of the things that make this script work. Then, when I need that function again, I can just delete/move/hide the current AVIsynth "plugins" directory and restore a working "RemoveDirtMC" script.
I had to modify the script slightly to get it to work. It now looks like this (added "mc=true" to MVAnalyse due to updated MVTools):
# You need: RemoveGrain, MVTools 1.1.1
function RemoveDirt(clip input, int limit, bool _grey)
{
clensed=input.Clense(grey=_grey, cache=4)
alt=input.RemoveGrain(2)
return RestoreMotionBlocks(clensed,input,alternative=alt,pthreshold=4,cthreshold=6, gmthreshold=40,dist=1,dmode=2,debug=false,noise=limit,noisy=12,grey=_grey)
}
function RemoveDirtMC(clip,int limit, bool "_grey")
{
_grey=default(_grey, false)
limit = default(limit,6)
bvec = clip.MVAnalyse(isb=false, blksize=8, delta=1, pel=2, truemotion=true, idx=1, mc=true)
fvec = clip.MVAnalyse(isb=true, blksize=8, delta=1, pel=2, truemotion=true, idx=1, mc=true)
backw = clip.MVFlow(bvec)
forw = clip.MVFlow(fvec)
clp=interleave(backw,clip,forw)
clp=clp.RemoveDirt(limit,_grey)
clp=clp.SelectEvery(3,1)
return clp
}
steptoe
5th November 2009, 07:58
I use DVD-RB with AviSynth and is doesn't like autoloading anything, it fails everytime
But, if you manually load the filters or functions you need using the LoadPlugIn or Import functions then everything workd perfectly, so I personally use these all the time then I know 100% that it has loaded it and something else is causing errors when trying out new filters that need multiple filters and functions
Perfect example is the motion compensation functions as they very complex and use a lot of external filters and functions, frequently with very specific versions needed
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.