Will anyone test an Avisynth script in CS5?
I've uploaded three short scripts 1249_aeavfsscripts.7z.zip that replace all avi files in a project with an Avisynth-scripted versions of themselves via mounting with AVFS. I've just started playing around with AVFS but being able to access Avisynth filters in After Effects CS5 seems like an very useful capability so I'd appreciate if anyone would test these initial scripts out. You need Avisynth and filters yadifmod, nnedi2; AVFS and its required Pismo file mount (see AVFS page for details).
Here's what to do: 1) create an AE project with some interlaced avi files; 2) run script Generate+Mount_AVFS.jsx and that's it. The script will create Avisynth files for every avi file, mount it with AVFS and replace the avi footage with the mounted Avisynth file.
I'm interested in using Avisynth's yadifmod to deinterlace sd footage right before final render but you can easily edit Generate+Mount_AVFS.jsx to produce any Avisynth script you can think of.
When you re-open the project later on, the footage will be missing if it is not mounted. Rectify this by running the Mount_AVFS.jsx and should you want to unmount the files, then run the Unmount_AVFS.jsx script.
Let me know if you have any questions, problems.
what is your goal? to deinterlace before you even import? wouldn't that make a laggy workspace? have you compared smart deinterlacer, grafts, and so on, with AE' built-in preserve best edges? if you want the best deinterlacing, i'd recommend topaz enhance out of all 300 ways to do this.
here's a site that compares some avsynth.
I made an interesting test with timewarp to repair deinterlacing artifacts here
If you post a screenshot directly comparing yadifmod superior to Ae's preserve best edges, I'd be willing to help code it.
The idea is to wait until final render before swapping in the Avisynth version in order to avoid intermediates and keep AE as quick as possible. Using AVFS-mounted files while compositing would, as you suggest, be too slow to be practical (at least on our equipment).
I have compared various deinterlacers, including native AE effects, various "formulas" and many of the Avisynth filters. Your timewarp method was good but difficult to automate within our workflow. AE's Preserve Edges did not fair well though it's what we'll use until we swap in the Avisynth scripts for final render.
Yadifmod gave us the least artifacting while still rendering at a reasonable framerate. There were certainly better Avisynth deinterlacers but the 2-3fps render rate probably won't work for us. Our footage tends to be mostly interviews so there isn't a lot of fast action. That's the trouble with deinterlacing - there doesn't seem to be One Best Solution.
BTW, the Topaz Enhance appears to not be available anymore.
I'll post the comparison screenshots in the next day or so.
The screen caps of the deinterlace tests I did are here (5mb). The piece of footage is dreadful - low motion and noisy so it was a good test for the sort of footage we often have to work with.
I pre-tested yadif in virtualdub and was simply amazed how well it works. I couldn't figure out the difference between your yadif and yadifmod jpg(which seemed to look a little better) I couldn't make a true fare assement comparing the lady.jpg because topaz and timewarp require several adjacment frames to improve quality. I will try to get your full script tested this week. But so far, my hat is off to you for your diligence in this matter. bravo!
Working with AVFS and real projects leads to one simple conclusion: make sure no comps are open in AE when the AVFS files are mounted or else you're in for a very long wait.
The slowdown is due to AE accessing the footage files for various reasons and the Avisynth scripts executing for every frame accessed. I had good results with having the comps in the Render Queue ready to go (and not loaded in the Composition window) then mounting the AVFS files.
BTW, while checking out denoising footage with AVFS, I came across these two denoising scripts that work as well as what I've seen Noiseware do in Photoshop:
super = MSuper(pel=2, sharp=1)
backward_vec2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
backward_vec1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
forward_vec1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
forward_vec2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\SSEToolsS.dll")
Interleaved2Planar() # convert clip to planar
super = MSuper(planar=true)
bv1 = MAnalyse(super, isb = true, delta = 1, overlap=4)
fv1 = MAnalyse(super, isb = false, delta = 1, overlap=4)
bv2 = MAnalyse(super, isb = true, delta = 2, overlap=4)
fv2 = MAnalyse(super, isb = false, delta = 2, overlap=4)
bv3 = MAnalyse(super, isb = true, delta = 3, overlap=4)
fv3 = MAnalyse(super, isb = false, delta = 3, overlap=4)
Planar2Interleaved() # convert back to normal interleave YUY2
The ability to denoise with the level of quality I've seen right after the deinterlacing step in the script on the final render is great - no more pre-processing problem clips.