Log in

View Full Version : What AVI Synth script do you use?


torok
20th April 2004, 17:40
I would like to try to frameserve video to CCE that is fully DVD-compliant and ready to go since CCE doesn't seem to concern itself with that busywork. You know, resize it, do some noise reduction, whatever else needs to be done. Is anyone already doing this and has a script I could steal? Thanks.

Boulder
20th April 2004, 17:48
The script really depends on the source. Some need more noise reduction, some don't need any at all. ;)

See www.avisynth.org for a lot of good examples.

torok
20th April 2004, 21:52
Oh cool. I didn't even check the examples at avisynth. :D

sh03z
26th April 2004, 03:02
here's one that worked well for me
it was a very noisy/liney movie:

LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("C:\xxxxxx\convolution3d.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\FluxSmooth.dll")
LoadPlugin("C:\xxxxxx\MPEG2Dec3dg.dll")

mpeg2source("D:\xxxxx.d2v")

ConvertToYUY2()
crop(4,0,712,480)
BicubicResize(720,480)
Telecide(order=1,guide=1).Decimate()
Temporalsoften(3,5,5,mode=2,scenechange=10)
Convolution3d (preset="movieHQ")

Boulder
26th April 2004, 05:57
Originally posted by sh03z
here's one that worked well for me
it was a very noisy/liney movie:

LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("C:\xxxxxx\convolution3d.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\FluxSmooth.dll")
LoadPlugin("C:\xxxxxx\MPEG2Dec3dg.dll")

mpeg2source("D:\xxxxx.d2v")

ConvertToYUY2()
crop(4,0,712,480)
BicubicResize(720,480)
Telecide(order=1,guide=1).Decimate()
Temporalsoften(3,5,5,mode=2,scenechange=10)
Convolution3d (preset="movieHQ")

Don't do colorspace conversion, crop or resize before deinterlacing/IVTC'ing;) You'd also be better off converting the colorspace before Convolution3d (I suppose you use the YUY2 version), or as the last item if none of your filters need YUY2. This will give you a slight speedup.


LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("C:\xxxxxx\convolution3d.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\FluxSmooth.dll")
LoadPlugin("C:\xxxxxx\MPEG2Dec3dg.dll")

mpeg2source("D:\xxxxx.d2v")

Telecide(order=1,guide=1).Decimate()
crop(4,0,712,480)
BicubicResize(720,480)
Temporalsoften(3,5,5,mode=2,scenechange=10)
ConvertToYUY2()
Convolution3d (preset="movieHQ")


You might want to use a small overscan to gain more quality: resize to 688x544 and add 16-pixel borders on each side. You shouldn't see the borders when viewed on your TV set.

sh03z
26th April 2004, 06:04
wow, your right...

I tried that and the speed was great.

thank you very much

Boulder
26th April 2004, 06:06
No problem:)

BTW, you'll get even more quality if you use 704x480 instead of 720x480. They're both valid DVD resolutions;)

torok
26th April 2004, 07:09
I can use 704? That's so great. It always irked me that I had to enlarge it so much. Is that in the DVD spec?

Oh, and it's tough to crop first sometimes, since most of the filters need specific multiples of sizes. Here's what I'm using if you have any suggestions (modified for the new size). The source is always a TV show from my capture card.


LoadPlugin("TomsMoComp.dll")
LoadPlugin("PeachSmoother.dll")
AVISource("tmp.avi")
ResampleAudio(48000)
PeachSmoother(NoiseReduction = 35, Stability = 20, Spatial = 100)
TomsMoComp(1,15,1)
Crop(4,0,-3,-3)
Trim(1530,8580) + Trim(10395,20732) + Trim(26251,46569) + Trim(52668,53658)
BicubicResize(704,480)

Boulder
26th April 2004, 07:32
Originally posted by torok
I can use 704? That's so great. It always irked me that I had to enlarge it so much. Is that in the DVD spec?

Oh, and it's tough to crop first sometimes, since most of the filters need specific multiples of sizes. Here's what I'm using if you have any suggestions (modified for the new size). The source is always a TV show from my capture card.


LoadPlugin("TomsMoComp.dll")
LoadPlugin("PeachSmoother.dll")
AVISource("tmp.avi")
ResampleAudio(48000)
PeachSmoother(NoiseReduction = 35, Stability = 20, Spatial = 100)
TomsMoComp(1,15,1)
Crop(4,0,-3,-3)
Trim(1530,8580) + Trim(10395,20732) + Trim(26251,46569) + Trim(52668,53658)
BicubicResize(704,480)


From the DVD Demystified FAQ:


Allowable picture resolutions are:
MPEG-2, 525/60 (NTSC): 720x480, 704x480, 352x480, 352x240
MPEG-2, 625/50 (PAL): 720x576, 704x576, 352x576, 352x288
MPEG-1, 525/60 (NTSC): 352x240
MPEG-1, 625/50 (PAL): 352x288


Is the source always pure interlaced video? If it's telecined, you should capture at 29.97fps and use Telecide(order=x).Decimate() instead of TMC (replace order=x with order=1 for top field first video or order=0 for bottom field first video). Another point, use TomsMoComp(1,5,1) , values larger than 5 can create artifacts and Tom himself recommends the value 5 there.

You should not do any filtering before deinterlacing/IVTC'ing either. I know that Lindsey says that his filters can be used before that, but still it's better to be safe than sorry.

Don't crop in odd numbers, use Crop(4,0,-4,-4). Use FitCD to get the correct resizing without messing up the aspect ratio.

Use SSRC(48000) instead of ResampleAudio for better quality.

sh03z
26th April 2004, 17:19
ok, but I don't understand, how does 704x480 increase quality?

Boulder
26th April 2004, 18:51
Originally posted by sh03z
ok, but I don't understand, how does 704x480 increase quality?

If you normally use 720x480, you'll have less pixels to encode, hence more bits per pixel in each frame.

film area 720x480 = 345600 pixels (100%)
film area 704x480 = 337920 pixels (~97.7%)

There's a nice 2.3% difference already. Then if you use a 2-block overscan area (16 pixels of black on each side), the gain will be more significant.

film area (704-32)x(480-32) = 672x448 = 301056 pixels, which is a bit over 87% of the 720x480 frame. Of course, the borders won't compress to infinity, but the gain is really very big.

sh03z
26th April 2004, 19:18
very cool

thanks

torok
27th April 2004, 02:25
If I use decimate, that will give me 24 fps. That's not NTSC anymore. Will it be a valid MPEG for a DVD?

Boulder
27th April 2004, 08:01
Originally posted by torok
If I use decimate, that will give me 24 fps. That's not NTSC anymore. Will it be a valid MPEG for a DVD?

If you have a 29.97fps telecined clip and you use Telecide().Decimate() on it, it should give you a 23.976fps clip back. You must then do a 3:2 pulldown for proper playback (don't ask me, I'm not that familiar with handling NTSC material).