8mm Video 8 capture and using AVISynth help

Shane Jensen wrote on 3/29/2006, 1:26 PM
I'm capturing Video 8 8mm tapes using the Sony GV-D200 which is connected directly to my computer with firewire. The results are VERY good, as good as the original source. However, a number of my tapes were recorded with a camera that isn't that good of quality to begin with, the Sony Handycam CCD-TRV57. It's a model from either 1999 or 2000 I believe, I got it in 2000. The resulting picture from this camera has some noise and a lot of it still shows through even with the TBC and DNR enabled on the player (GV-D200). The player does clean up a lot of it and improves it to a small point, but a lot of the noise is still visible. I know it's the quality of that camera because I have older videos from my 8mm Video 8 camera, Sharp Viewcam VL-E37U from 1995, and the picture quality is WAY cleaner.

Anyway, I was wondering if I should do any further noise reduction cleaning or will it just destroy the picture? Should I just use the Dynamic Noise Reduction (from Mike Crash) in my Vegas, or should I use AVISynth, or both? If I should use AVISynth can anyone recommend the most reliable plugin?

I have a small file on YouSendIt that is only 3.20 MB, a sample of a video I just captured into my computer. This is at a lighting level where it shows the camera's (Sony CCD-TRV57) noise at it's most. I rendered this short clip out on Vegas 6.0d at 4,800,000 bitrate (the whole video is 1:58 minutes) and using Mike Crash's Dynamic Noise Reduction at number 3. Please let me know if I can get this picture better without destroying it because I'm not sure myself. Here's the link to download the short clip.

http://s45.yousendit.com/d.aspx?id=29PQ0ZTNODDQ20JXUVV28JMGDW

.

Comments

Shane Jensen wrote on 3/29/2006, 1:29 PM
How the heck can I make a link in this forum? Why can't I find out how in the FAQ?
johnmeyer wrote on 3/29/2006, 2:02 PM
Here's the AVISynth cleanup script I use. It temporarily separates the video into its individual fields, and then first applies a chroma filter (which is tweaked for VHS, but will probably help your 8mm as well) and then a temporal filter that is similar to what Mike Crash adapted from the Virtualdub temporal denoising filter. FluxSmoothT is the temporal-only version of a filter that includes both spatial and temporal denoising. It is easy to simply replace the "FluxSmoothT" calls with the more genereal version of the filter (you'll see when you download the filter). I like this filter because it is so FAST.
#Serve RGB32 from Vegas and convert back to RGB32 in this script if going into Mainconcept MPEG encoder.
#Check the RGB 16-235 box in the Mainconcept encoder.

#For use in Virtualdub, BOTH RGB 16:235 boxes must be checked AND YUY2 Disable must be checked in MC DV codec.

#loadplugin("c:\Program Files\AviSynth 2.5\plugins\despot.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")

AVISource("D:\Frameserver.avi")

#These plugins require color space conversion
converttoYV12(interlaced=true)

assumebff()
a = separatefields()
even = a.SelectEven().Cnr2("oxx",8,16,191,100,255,32,255,false).fluxsmoothT(5)
odd = a.SelectOdd().Cnr2("oxx",8,16,191,100,255,32,255,false).fluxsmoothT(5)
Interleave(even, odd)
weave()

#DeSpot(p1=20,p2=8,pwidth=240,pheight=5,mthres=14,mwidth=20,mheight=15,interlaced=true,merode=43)

ConvertToRGB24(interlaced=true)
As to how to make a link in this forum, here is that information along with all the other information that usually gets asked after someone figures out how to create the links:


To create a link to another page you type this:

<a href="http://www.google.com"/>google.com</a>

to create this:

google.com

to open in new window type this:

<a href="http://www.google.com/" target="_blank">google.com</a>

to get this:

google.com


You use the HTML ampersand (&) codes in place of the character itself. For instance, to get the

<

to appear, but not be interpreted as HTML, you type

&#38

If you type this, and then submit your post to the Sony forum, all you will get is the

<

character, and it will NOT be interpreted as HTML code. You then do this for every other special character in the HTML syntax.

Now, don't even think of asking me how I got the &#38 syntax to appear above instead of just the < character.

Here are many of the codes
 &#38 &
&#34 "
&#47; / slash
&#48;- &#57; digits 0-9
&#58; : colon
&#59; ; semicolon
&#60; < less-than sign
&#61; = equals sign
&#62; > greater-than sign
&#63; ? question mark
&#64; @ at sign
&#65;- &#90; uppercase letters A-Z
&#91; [ left square bracket
&#92; \ backslash
&#93; ] right square bracket
&#94; ^ caret
&#95; _ horizontal bar (underscore)
&#96; ` grave accent
&#97;- &#122; lowercase letters a-z
&#123; { left curly brace
&#124; | vertical bar
&#8226 bullet

johnmeyer wrote on 3/29/2006, 2:25 PM
I looked at the clip. The temporal denoising artifacts from Mike Crash's filter are pretty apparent (at least to me) and yet the noise is still fairly strong.

There is a hierarchy of noise reduction, starting with simple spatial noise reduction, then graduating to temporal noise reduction, and then to combination spatial/temporal noise reduction, and then to adaptive temporal/spatial noise reduction (where the temporal noise reduction is reduced during periods of motion), and finally the "holy grail" which involves using full-blown motion estimation software to modify the noise reduction on different parts of each video frame depending on what's moving. In general, temporal noise reduction (which looks for random small changes from one frame to the next and then averages them out) looks great when nothing is moving, but creates havoc on fast moving scenes. Spatial denoising makes everything look like a watercolor painting if you turn up the strength too far, but this is less noticeable during periods of high motion, when details are not as apparent. This leads to the idea of the combination spatial/temporal filter, and the idea of changing the relationship as the amount of motion changes, and ultimately leads to the idea of changing these relationships for different portions of each frame. Thus, if a horse runs across the frame, but nothing else moves, the fully motion-compensated denoising algorithm would apply temporal denoising to the background, but turn that off for the portion of each frame occupied by the horse.

This "ultimate" noise reduction is complicated to set up and slower than snail "stuff," and it has to be tweaked for each job, which is why I have never posted the details of how to do it.

If you can post the identical clip, rendered in the same way, but WITHOUT any noise reduction or any other changes (i.e., your raw capture), I'll take a quick look at what I can do with it.
Shane Jensen wrote on 3/29/2006, 2:29 PM
Thanks for the info. The link info sounds like a pain to do. :(

I tried loading up that AVISynth script using Virtual Dub and I'm getting an error message:

"Avisynth open failure:
The script's return value was not a video clip"

Huh? I have it pointing to the AVI file and the right location. So, what am I doing wrong?
Shane Jensen wrote on 3/29/2006, 2:40 PM
Here is a very small clip at just over 4 MB from the raw capture AVI, no changes.

http://s49.yousendit.com/d.aspx?id=3DPKYX16FDOTS1CHOQ4BYF19R3

This whole video I think varies as far as motion and lighting is concerned. It was a video my friend Mike had me shoot of his wedding, so there are low lighting situations during the reception, high lighting outside the church, and fast motion from panning on the dance floor if I had to quickly move. Like I said, the whole video varies as do all of my videos.
johnmeyer wrote on 3/29/2006, 3:52 PM
"Avisynth open failure:

Copy the script you are using, and paste it into your next post.
Shane Jensen wrote on 3/29/2006, 5:11 PM
The same script that you posted above, only with my files.

#Serve RGB32 from Vegas and convert back to RGB32 in this script if going into Mainconcept MPEG encoder.
#Check the RGB 16-235 box in the Mainconcept encoder.
#For use in Virtualdub, BOTH RGB 16:235 boxes must be checked AND YUY2 Disable must be checked in MC DV codec.
#loadplugin("D:\Program Files\AviSynth 2.5\plugins\despot.dll")loadPlugin("D:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")AVISource("F:\Tape 1 - Clip 001.avi")
#These plugins require color space conversionconverttoYV12(interlaced=true)assumebff()a = separatefields()even = a.SelectEven().Cnr2("oxx",8,16,191,100,255,32,255,false).fluxsmoothT(5)odd = a.SelectOdd().Cnr2("oxx",8,16,191,100,255,32,255,false).fluxsmoothT(5)Interleave(even, odd) weave() #DeSpot(p1=20,p2=8,pwidth=240,pheight=5,mthres=14,mwidth=20,mheight=15,interlaced=true,merode=43)ConvertToRGB24(interlaced=true)
johnmeyer wrote on 3/29/2006, 6:23 PM
OK. First, on the script, try this version. I checked the version I posted earlier, and it works fine here, but this one is more explicit:
#Serve RGB32 from Vegas and convert back to RGB32 in this script if going into Mainconcept MPEG encoder.
#Check the RGB 16-235 box in the Mainconcept encoder.

#For use in Virtualdub, BOTH RGB 16:235 boxes must be checked AND YUY2 Disable must be checked in MC DV codec.

#loadplugin("c:\Program Files\AviSynth 2.5\plugins\despot.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")

AVISource("D:\Documents\Dnload\UNPACK\20030425.avi")

#These plugins require color space conversion
converttoYV12(interlaced=true)

assumebff()
a = separatefields()
even = a.SelectEven().Cnr2("oxx",8,16,191,100,255,32,255,false).fluxsmoothT(5)
odd = a.SelectOdd().Cnr2("oxx",8,16,191,100,255,32,255,false).fluxsmoothT(5)
c=Interleave(even, odd)
d=weave(c)

#DeSpot(p1=20,p2=8,pwidth=240,pheight=5,mthres=14,mwidth=20,mheight=15,interlaced=true,merode=43)

e=ConvertToRGB24(d,interlaced=true)
e
Next, here are links to various files that I have fixed up using different approaches.

1. Mike Crash, using default "10". I'm not sure what version of the Mike Crash filter you were using, and whether you used it inside of Vegas or not. You mentioned a value of "3", but that doesn't do much when the filter is run as a Vegas plugin.

I encoded this file, and the other two files, using a constant bitrate of 8,000 kbps, which is quite high. These are basically as good as the original AVI.

2. MVtools fluxsmooth 35. This is the result of a rather complicated script that uses motion estimation to improve the effectiveness of the FluxSmoothT plugin. It is similar to the one I posted above, except that it uses MVTools to estimate which portions of the frame are moving, and then turn off the temporal denoising when rapid motion is detected. I

3. FFT3DFilter sigma=6, plane=4). This is perhaps the most advanced of the filters, although it actually was surprisingly easy to implement. It is REALLY slow. I had not used this filter until today, but I am extremely pleased with the results.

I would suggest that you take your original clip that you posted, and line these three up below it on the Vegas timeline. Set up Vegas to loop, and then solo each track back and forth to see the differences. Do this both while the video is in motion, and also one frame at a time. Things to look for that may not be obvious at first:

1. Contouring. Noise reduction can take large areas with no detail (like the shirt of the guy in the middle) and make it look like there are contour lines, similar to a topological map.

2. New edge noise. You will see some of this with the Fluxsmooth demo. I used VERY high values for all three noise reduction plugins in order to exaggerate both the benefits and the downsides. Look at the edges of their heads, where the hairline intersects with the background, especially as the camera moves quickly.

3. Loss of detail. The cross-hatch on the shirt of the guy on the left is one example. Hair is always a good place to look for detail.

There is not much detail in these clips to begin with, so it is not easy to see a loss when it occurs.

4. Screen door effect. The clip you original posted is the best example of this. The problem is typical of temporal noise reduction. It looks like the video was taken through a screen door.

5. Not enough noise. I don't know what else to call this, but a video can begin to look a little unnatural, somewhat like film where all the grain has been removed. Actually, it's worse than that because what happens is that almost all the noise is removed, but a little remains, usually in the shadows. That noise, since it is localized, calls attention to itself. What you want instead is noise reduction that results in a similar look across the video. This actually requires that the plugin do more in some areas and less in others, which is tricky.

Once you think you have noise reduction working, the next thing is to encode a fairly lengthy portion, encode it to DVD, and watch it on a big screen. The first thing to do is see if you can watch it without being distracted by all the new artifacts. Don't look for the artifacts; just watch it. Then, run it again and start looking for trouble. If the video passes both tests, and if it is a pretty long sample that has different kinds of scenes (high motion, low motion; light, dark; saturated colors, muted colors, etc.), then you're ready to encode the whole thing.

Hope this helps!
Shane Jensen wrote on 3/29/2006, 9:06 PM
Whoa! Awesome tests. Thank you for taking the time to do these, I can't believe it. I love the results of the last two, and the third one the best of all.

To answer your question, I was using the Mike Crash Dynamic Noise Reduction in Vegas. I'm not too crazy about the artifacts from Mike Crash's noise reduction filter, I notice it all too much.

Where can I get the scripts and plugins for those last two tests you posted? Did you do those with AVISynth?

It's a shame with this picture noise, but I know it's from the quality of the camera itself and not with the tape. I remember seeing that noise on the live picture on the LCD screen on the camera, so it must be a low quality sensor or something with that model. Of course if that is the case there isn't much more we could do than what your tests show without creating other losses to the video quality. But man, I love the results of that last one.

Edited to add: I tried using your new script above and it opens fine in Virtual Dub, but when I try to save to the new AVI (using the Panasonic DV codec) it goes for a split second and then crashes, it just shuts down and closes the program.
johnmeyer wrote on 3/29/2006, 9:27 PM
I'll post some of the scripts in a second. However, I spent a little extra time and tried to come up with something even better. Take a look at this clip and see what you think. The script is quite complicated. I actually backed off a little on the total noise removed, so there is still some residual snow, but the amazing thing, if you stack this on the Vegas timeline as I recommended earlier, and then click the solo toggle on/off, you will actually see detail appear that wasn't there before.

In addition, if you play the clip looped, although it is tough to follow because the clip is so short, I think you'll find that there is no residual screen door or other effect.

Here's the link:

fft3dfilter with depan motion estimation

This one's a keeper.
johnmeyer wrote on 3/29/2006, 10:51 PM
OK, here are the scripts. I already posted the simple one that uses
the temporal noise cleaner, FluxSmoothT, and processes each field
separately and then combines them back together. I'll repeat that here,
just so I can later refer back to this single post:
>#Serve RGB32 from Vegas and convert back to RGB32 in this script if going into Mainconcept MPEG encoder.
#Check the RGB 16-235 box in the Mainconcept encoder.

#For use in Virtualdub, BOTH RGB 16:235 boxes must be checked AND YUY2 Disable must be checked in MC DV codec.

#loadplugin("c:\Program Files\AviSynth 2.5\plugins\despot.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")

AVISource("D:\Frameserver.avi")

#These plugins require color space conversion
converttoYV12(interlaced=true)

assumebff()
a = separatefields()
even = a.SelectEven().Cnr2("oxx",8,16,191,100,255,32,255,false).fluxsmoothT(5)
odd = a.SelectOdd().Cnr2("oxx",8,16,191,100,255,32,255,false).fluxsmoothT(5)
Interleave(even, odd)
weave()

#DeSpot(p1=20,p2=8,pwidth=240,pheight=5,mthres=14,mwidth=20,mheight=15,interlaced=true,merode=43)

ConvertToRGB24(interlaced=true)
Here is a motion-compensated version of that same script:
#Serve RGB32 from Vegas and convert back to RGB32 in this script if going into Mainconcept MPEG encoder.
#Check the RGB 16-235 box in the Mainconcept encoder.

#For use in Virtualdub, BOTH RGB 16:235 boxes must be checked AND YUY2 Disable must be checked in MC DV codec.

#loadplugin("c:\Program Files\AviSynth 2.5\plugins\despot.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\MVTools\MVTools.dll")

a=AVISource("D:\Documents\Dnload\UNPACK\20030425.avi")

#These plugins require color space conversion
source=converttoYV12(a,interlaced=true)

backward_vectors = source.MVAnalyse(blksize = 16, isb = true, lambda = 1000, delta = 1, idx = 1, pel = 2)
# we use explicit idx for more fast processing
forward_vectors = source.MVAnalyse(blksize = 16, isb = false, lambda = 1000, delta = 1, idx = 1, pel = 2)
forward_compensation = source.MVFlow(forward_vectors, idx=1) # or use MVCompensate function
backward_compensation = source.MVFlow(backward_vectors, idx=1) # or use MVCompensate function
# create interleaved 3 frames sequences
interleave(forward_compensation, source, backward_compensation)

Cnr2("oxx",8,16,191,100,255,32,255,false).fluxsmoothT(5) # place your preferred temporal (spatial-temporal) denoiser here

c= selectevery(3,1) # return filtered central (not-compensated) frames only
return(c)

#StackVertical(source,c)
For sheer simplicity, here's a script that only really has two lines, and yet may be the best bang for the buck. There are dozens of tweaks you can perform, although "sigma" is the main dial to tweak. You can set sigma as high as 20 for really noisy video.
#Serve YUY2 from Vegas and convert back to RGB32 in this script if going into Mainconcept MPEG encoder.
#Check the RGB 16-235 box in the Mainconcept encoder.

loadPlugin("c:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll")

#Modify this to point to the video file you use.
source=AVISource("D:\Frameserver.avi")

chroma=source.Cnr2("oxx",8,16,191,100,255,32,255,false)
final=chroma.fft3dfilter(sigma=4, plane=0, sharpen=1, interlaced=true)
return final
Finally, here is the "no holds barred" script that I used on that last upload:
#This is the "ultimate" as of the date this was last saved. Still seems to leave noise
#around really bright objects, like date/time logos.

#Serve RGB32 from Vegas and convert back to RGB32 in this script if going into Mainconcept MPEG encoder.
#Check the RGB 16-235 box in the Mainconcept encoder.
#For use in Virtualdub, BOTH RGB 16:235 boxes must be checked AND YUY2 Disable must be checked in MC DV codec.

loadPlugin("c:\Program Files\AviSynth 2.5\plugins\CNR\Cnr2.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\fft3dfilter.dll")
loadPlugin("c:\Program Files\AviSynth 2.5\plugins\depan.dll")

source=assumebff(AVISource("D:\Documents\Dnload\UNPACK\20030425.avi"))

#These plugins require color space conversion
sourceYV12=converttoYV12(source,interlaced=true)
b=bob(sourceYV12)
motion=DepanEstimate(b, fftw=true)
x=DepanInterleave(b,data=motion)

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))

c=SelectEvery(3,1)
mot_est=c.assumebff().separatefields().selectevery(4,0,3).weave()

#Following lines can be used to compare with/without motion estimation
#Comment out last line (mot_est) and then un-comment all lines below
#including the Stackvertical statement
#d=YToUV(fft3dfilter(b, sigma=2, plane=1, sharpen=.25,interlaced=false).UToY,
#fft3dfilter(b, sigma=2, plane=2, sharpen=.25,interlaced=false).VToY,
#fft3dfilter(b, sigma=7, plane=0, sharpen=1, bt=3, interlaced=false))
#straight=d.assumebff().separatefields().selectevery(4,0,3).weave()
#StackVertical(mot_est,straight)

mot_est
The script above lets you filter the chroma channels separately from the luma channels
(plane 0 is luma and is the most important for 8mm cleaning). You can omit the
two "depan" lines for faster processing, and you may not notice that much
difference for many clips. For grins, try changing the sigma in the portion
of the filter that reads:

VToY,fft3dfilter(x, sigma=7, plane=0,

from sigma=7 to something way too large, like sigma =70. On the test clip
used for this thread, there was so little detail to begin with that virtually
no detail is lost at this high setting and, amazingly, the typical temporal
de-noising artifacts, when the camera or subject move quickly, are almost
completely absent. Wow!

There is no single script that works for everything, that's for sure.

Shane Jensen wrote on 3/30/2006, 8:42 AM
Thanks again for these scripts. I'm going to file these away.

These are very hard to use, though. I keep having great difficulty trying to get these to load up. I'm trying to load that last one above and I keep getting this error message:

"Avisynth open failure:
DePanEstimate" Can not load FFTW3.DLL !
(F:\20050425.avs, line 9)"

I do in fact have the FFTW3.DLL file in there, so I have no idea why it keeps saying that. It's really frustrating.

Also, keep in mind that I am a beginner as beginner can get with this script and noise reduction stuff so forgive me if I'm a bit dense with some (or most?) of this.

P.S., I use Windows XP in case you're wondering.
johnmeyer wrote on 3/30/2006, 9:57 AM
I do in fact have the FFTW3.DLL file in there, so I have no idea why it keeps saying that. It's really frustrating.

Yeah, you need to read the doc pretty closely. That file is supposed to be put in the SYSTEM32 folder, which you will find in your WINDOWS folder. It sounds like you already have the FFTW3.DLL file, but in case you don't, rather than force you to find it on the AVISynth support boards, I uploaded a copy here:

http://download.yousendit.com/006C94B81D2258A0

Also, the scripts are complicated to set up, but once you have things set, they are not that complicated to use. What I usually do is set the AVISource statement to point to some video file, and then open the AVS script in VirtualDub. I then tweak various filter settings in Notepad, save the file, and simply click on the same file name in VirtualDub (Alt-File-1). I then play the video. While it does require a Ctrl-S in Notepad to Save, and Alt-File-1 in Virtualdub to retrieve the changes, it is pretty interactive.

Once I have the filter set up the way I want, I then go to Vegas and put the video on the timeline and edit it the way I want. I then go to Render As and select Satish's frameserver as the render option. I create a signpost file name, and then go back to he AVISynth script and change the AVISource statement to point to that file name. Then -- and this is the tricky part -- I either open this script up in VirtualDub and use the MainConcept DV codec to encode to AVI, or I use the direct stream copy option and start the VirtualDub frameserver and open THAT signpost in the MainConcept external MPEG encoder (which unfortunately doesn't read AVS files directly, which is why I must set up the VirtualDub frameserver).

There is also a way to read the output of the AVS file directly back into a second instance of Vegas and then use Vegas to encode to either AVI or MPEG-2. I described this here:

Frameserving AVS back into Vegas

I made similar comments in this thread: AVISynth and Vegas

BTW, I found an error in my "no-holds barred" script. I have edited my earlier post to correct that. That earlier version actually never coupled the motion estimator into the de-noiser. That's what I get for trying to debug four scripts at once. The one I grabbed was an intermediate version where I had temporarily disabled the motion estimation.

johnmeyer wrote on 3/30/2006, 12:51 PM
I made so many changes to my "no holds barred" script (posted in the earlier thread) that I thought I should send you a copy of what you actually get from the script as it is now revised (I think this is the end of this upgrading -- I have to get onto the thing I was really trying to do with AVISynth). Here's the link, which will only be good for a week:

Motion Compensated fft3dfilter, using bobbed source

P.S. Here is a link to download all four scripts, so you don't have to copy/paste and have the problems associated with that. This link is only good for seven days:

Scripts

Shane Jensen wrote on 3/30/2006, 6:32 PM
John, thank you so much for doing all of this.

System32, that's right. I actually knew that but forgot. I put that file in the system32 folder and it loaded up just fine. I'm actually rendering my 1:58 minute AVI using AVISynth in Virtual Dub right now. It has been going for seven and a half hours now and it's only almost two thirds through. It's saying the total time is twelve hours. This really takes a long time. I probably would have waited until tonight to have this go while I'm sleeping, but I've been busy all day and away from my computer and figured I would let it go to see how long it would actually take.

I have over twenty 8mm tapes from this camera, so it's going to make digitizing these take a little bit longer than it will for digitizing the tapes from my much cleaner footage from the Sharp Viewcam VL-E37U. Maybe your revised script that you posted since I have started this current render will be a bit faster? I didn't omit the depan lines, I figured I would just leave them in this time and omit them on the next video that I try it on to compare. How much faster would this go if I did omit the depan lines? Maybe with your upgraded scripts since this afternoon I won't even need those lines?

In any case, I like the results so far. Trying to figure out how I should tweak it for my Sharp Viewcam VL-E37U footage is probably going to be tricky since I don't have much experience with these. Hopefully I'll settle on one of these scripts (that have been posted in this thread so far) for this footage from that Sony Handycam CCD-TRV57 (which is where those sample clips were from) without doing too much tweaking.
johnmeyer wrote on 3/30/2006, 7:34 PM
Before you do everything, make sure you create a test DVD and look at the results on a big TV screen. Sometimes you see things there you don't see on a small monitor.

As for performance, I spent all my time on quality and none on performance. There are all sorts of ways to make these scripts MUCH faster, perhaps 2x or 3x. Larger block size are faster (bh and bw, if you read the doc -- set them both to 64). Only cleaning the luma plane (plane = 0) and eliminating the other two fft3d lines that clean the other planes will make a big improvement in performance. If you have chroma noise (which is what the other two planes address), you can use CNR2 before using the fft filter. CNR2 is VERY fast. Your clip had very little chroma noise (since your source is 8mm, not VHS), so you might be able to eliminate these two parts of the fft3d filter and not even bother to replace it with CNR2.

And, of course, you can get rid of the two lines that set up the motion estimation. If you do this, you have to eliminate the SelectEvery(3,1) statement. In case you haven't figure it out, what motion estimation does is create a new frame before and a new frame after each frame, thus tripling the total number of frames. These new artificial frames have been adjusted up/down, left/right, to eliminate movement, much like Deshaker (the authors of both this and Deshaker have exchanged a lot of code, actually). The denoising algorithm is then applied between these phantom frames and the one real frame. Since motion between frames has now been eliminated, because the previous and next frame have been moved up/down left/right, the noise algorithm can now correctly identify what is really noise. Without this motion estimation step, the de-noiser looks at pixels on objects that are moving and, since they aren't in the same place as they were in the previous or in the next frame, it thinks they are noise and attempts to eliminate them, thus creating nasty artifacts.

So, there are lots of ways to make the script faster. BTW, make sure you are using the version of the script that is now posted above in my previous post (which I edited) or in the scripts that I zipped up and linked to in my last post. I made a LOT of changes as I worked on this today. This was a job (perfecting noise reduction) I've been planning to do for a long time, and I'm also trying to gear myself up for an incredibly difficult AVISynth script that I haven't been able to figure out (for converting 16mm film captures to video using a shutterless projector).



Shane Jensen wrote on 3/31/2006, 7:29 AM
Took twelve and a half hours but AVISynth in Virtual Dub finally finished rendering the hour and fiftyeight minute video early this morning. I was using this script of yours "VHS cleanup (fft3dfilter, depanestimate).avs" prior to your latest upgrade because the render was already well on the way before you posted it. So, I waited until the current render was over and decided to try it again (saving a new file of course and not overwrighting the one I just rendered) using your revised script (VHS cleanup (fft3dfilter, depanestimate).avs).

Unfortunately, your revised script seems to take more than twice as long to process than the first one. It figured out an estimated time of 1:09:5x:xx or something like that (the "x" are where there was some number that I can't remember exactly), which shows that it would take one day, nine hours, fifty something minutes to render. The frames per second during rendering was between one and two while the it was four to six on the first revision that I used. WAY too long for me to use and spend on each video project. It's a shame because the results are awesome. :(