Log in

View Full Version : Help needed with my first avisynth attempt


echooff
18th February 2004, 17:43
I am trying to move this film from vhs to dvd in ntsc land. I have managed to capture it using picvideo mjpeg codec 680x480. The file is about 16 gig in size. I have the avisynth manual, the forum faqs and a lot of threads. The result of all this reading has been very little enlightenment and mostly mass confusion. As I become more comfortable with scripts hopefully my understanding (and ability will improve.
I came across this script on a post somewhere in the forum(undot on down are my additions) and it worked very well using avisynth 2.54 and Tmpgenc in 2 pass vbr mode. I am going to encode it again using cce with 3 pass. I have several questions.
1. where in the scrip should I place my crop command.
2. I understand why the fields are seperated and applying convolution3d on each field, does this also apply to undot and mipsmooth. If so do the filters need to be place directly below con3d with odd even commands or do I again seperate fields and weave prior to each filter.
3. Where in the scrip does the resize command need to placed.
4. Am I off base with this script. Does anyone have any suggestions for improvement.
5. It appears to need decombing where should I place that.
I am
AviSource("D:\The Renaissance Man.avi")
ReInterpolate411()
SeparateFields()
odd=SelectOdd.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
evn=SelectEven.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
Interleave(evn,odd)
Weave()
DoubleWeave.SelectOdd()
UnDot()
mipsmooth()
#STMedianFilter(8,20,4,8)
antiflicker()

stickboy
18th February 2004, 23:39
Originally posted by echooff
1. where in the scrip should I place my crop command.As early as possible. Reducing the frame size -> fewer pixels to filter -> less encoding time.
2. I understand why the fields are seperated and applying convolution3d on each field, does this also apply to undot and mipsmooth. If so do the filters need to be place directly below con3d with odd even commands or do I again seperate fields and weave prior to each filter.Unless you're dealing with interlaced or hybrid material, you shouldn't need to use SeparateFields at all. That is, if you run Decomb on your material and get back all progressive frames, then filtering the odd and even scanlines separately is totally unnecessary.

If you are dealing with interlaced material, and if you run spatial-temporal filters, then yes, you need to do the SeparateFields thing (or, to toot my own horn, use something like my JDL_UnfoldFieldsVertical/JDL_FoldFieldsVertical (http://www.avisynth.org/stickboy/) functions). For purely spatial smoothers, you can do:
AVISource("foo.avi")
SeparateFields()
SomeSpatialSmoother()For purely temporal smoothers, you don't need to separate the fields at all.AVISource("foo.avi")
SomeTemporalSmoother()In neither case does it hurt to do the SeparateFields() + SelectOdd()/SelectEven() fandango, so if you're not sure and want to be safe, you usually should be able to expand on what you did:
SeparateFields()
odd = SelectOdd.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
evn = SelectEven.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)

odd = odd.Undot()
evn = evn.Undot()

odd = odd.MipSmooth()
evn = evn.MipSmooth()

Interleave(evn,odd)
Weave()(The exception is where some filters (such as Dust) can't be called multiple times in the same script. In that case, you do need to use my Unfold/Fold functions.)3. Where in the scrip does the resize command need to placed.I think the usual consensus is at the end. There are a number of threads discussing it:
Filters before or after resize (http://forum.doom9.org/showthread.php?s=&threadid=39303)
When to resize - filter order (http://forum.doom9.org/showthread.php?s=&threadid=55011)
4. Am I off base with this script. Does anyone have any suggestions for improvement.Why do you call DoubleWeave().SelectOdd() ?

5. It appears to need decombing where should I place that.At the beginning, after the crop, before any denoising filters (usually).

echooff
19th February 2004, 17:50
Thank you for the feed back. Guess I need to do more reading. Since I know zip about programming it is difficult for me. Again thanks for your response