Log in

View Full Version : Recommended settings to use with AviSynth for captured video


zshadow
30th January 2006, 00:27
Ok, well basically i am capturing video from VHS tapes and outputting them to an uncompressed AVI. From there I load up an AviSynth script in CCE and encode the video to mpeg-2 for DVD.

this is what my current avs script looks like

avisource("video.avi")
Lanczos4Resize(720,480)

and I mean, the video comes out decent, but is there any other options anyone would recommend for this type of encode?

thanks. :)

Chainmax
30th January 2006, 00:40
This question is too vague to answer. I recommend you to read the capture guide (http://www.geocities.com/wilbertdijkhof/ACG41.zip) and the IVTC tutorial (http://www.doom9.org/ivtc-tut.htm). Also download the Decomb package (http://www.neuron2.net/decomb/decombnew.html) and read its tutorials and manuals. That's a whole lot of extremely useful info to chew on. Enjoy :)!


P.S: I'd advice you to change your thread title, it incurs in a Rule 12 violation (http://forum.doom9.org/forum-rules.htm).

Chainmax
30th January 2006, 01:10
You might also want to download FitCD (http://shh.sysh.de/files/FitCD_v128.zip). It's a great resize information utility.

zshadow
30th January 2006, 03:33
thanks Chainmax

I've been reading up on some stuff..

LoadPlugin("C:\Program Files\AviSynth 2.5\old\LoadPluginEx.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\old\dustv5.dll")
avisource("video.avi")
ConvertToYUY2()
PixieDust()
fft3dFilter()
LimitedSharpen()
Lanczos4Resize(720,480)

that seems to work pretty good.. I was wondering though, is there a better order to have these filters in?

foxyshadis
30th January 2006, 05:15
Sharpen should usually be the last step (in fact it should best be used only during playback, but realistically that's difficult), plus you can resize by using limitedsharpen(dest_x=720,dest_y=480). Maybe add ConvertToYV12() after pixie, and LimitedSharpenFaster, for speed. Otherwise it looks good for a basic script, especially if the results look good to you.

Mug Funky
30th January 2006, 06:34
also bear in mind that most of those lines don't get along well with interlace. you might need to separate fields into an odd and even clip, filter each separately, then weave them back together at the end.

there's plenty of threads on good ways to do this depending on what you wish to do (there's a few ways of dealing with it), but they might confuse you a tad.

of course, if your footage isn't interlaced you don't have to worry.

zshadow
1st February 2006, 17:47
thanks for the feedback. here is my latest script:

LoadPlugin("C:\Program Files\AviSynth 2.5\old\LoadPluginEx.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\old\dustv5.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\SeeSaw.avs")
avisource("video.avi")
PixieDust()
ConvertToYV12()
TomsMoComp(-1,-1,1)
FFT3DFilter(sigma=1,bw=32,bh=32,bt=3,ow=16,oh=16,sharpen=0.7)
Lanczos4Resize(720,480)
SeeSaw()
AddGrain(2,0,0)

runs pretty slow though.. is there any way to speed it up?

Chainmax
1st February 2006, 18:36
Yeah, ditch Pixiedust and increase FFT3DFilter's sigma to 2 or 3. By the way, read the SeeSaw thread more carefully, I think you're using it wrong. In any case, I think it's meant for clean sources like DVDs rather than analogue captures (not sure about that, ask around in the SeeSaw thread), so you'll probably be better off using LimitedSharpen() instead.

Also, TomsMoComp is not really a good alternative for deinterlacing. For high quality deinterlacing, download TDeint, EEDI2 and use one of the following lines:

For TFF:

interp = separatefields().eedi2(field=3)
tdeint(mode=1,order=1,edeint=interp)


For BFF:

interp = separatefields().eedi2(field=2)
tdeint(mode=1,order=0,edeint=interp)

If you need speed, then use LeakKernelDeint with a threshold of 8 or 6.

Come to think about it, using -1 for the second TomsMoComp switch doubles the height of the source. If you want to do that (why?), I advice you to just use Lanczos4Resize. tritical once told me that using interpolators to resize an image isn't really a good idea.


P.S: is there any reason to use AddGrain(2,0,0)?

P.S 2: you source can't be progressive, there should be an IVTCing/Deinterlacing step somewhere. Did you read the material I linked you to?

zshadow
1st February 2006, 18:47
Thanks for the info, I'll try that out.

about the AddGrain - I just used it to give the video more of a film look. Won't be using it for all my video captures but it gives a good effect for some.

edit: yeah, that's why I was using TomsMoComp.

Chainmax
1st February 2006, 22:58
Experimented people said that in the old days, supersampling (resizing to a higher resolution than the final one) prior to filtering was done because filters weren't effective enough and that modern filters don't need supersampling. I would therefore suggest that you ditch the TomsMoComp line as well. So, the script I'd recommend is this:

FFT3DFilter(sigma=2,bw=32,bh=32,bt=3,ow=16,oh=16,sharpen=0.7)
Lanczos4Resize(720,480)
DeHalo_Alpha()
LimitedSharpen()
AddGrain(2,0,0)

I added DeHalo_Alpha because I read that most VHS captures will have some haloing/ghosting and on top of that you are sharpening twice and using a sharp resizer. Also, I must again advice you to read all the documents I linked to, as there's no way a VHS capture is progressive: your video will be telecined or interlaced. If the former, it's highly beneficial to perform IVTC. If the latter, since you are creating a DVD you should leave it interlaced. Either way, your filterchain will vary, so find out what kind of source you have and report back. Better yet, provide us with a small (say, 5-15secs) sample capture.