View Full Version : Need review of my first AVS-script!
bananacreamandpeca
19th November 2006, 07:55
I made this script, could you guys please review it?
AVISource("C:\1.avi")
Tweak(Sat=0.9,cont=0.6,coring=false)
Bilinear(448,246)
Questions I have:
1. The source is a xvid.avi with 640x352 resolution according to vdubmod.
I entered 448x246 for resizing in the script. Will this preserve
the original AR/is this correct what I entered?
2. If I resize, do I also need to sharpen the picture a bit afterwards?
In irfanview, whenever I resize a image, I always need to sharpen the image a bit afterwards.
Will this also be the case with the bilinear resize?
3. Resize first and then color correction, or the other way around?
I don't know if it affects speed when I feed this to MeGui..
spyce
19th November 2006, 10:20
1. The source is a xvid.avi with 640x352 resolution according to vdubmod.
I entered 448x246 for resizing in the script. Will this preserve
the original AR/is this correct what I entered?
640/352 = 1,8181
448x246 = 1,8211
the AR will be different but you can lock it in your encoder.
2. If I resize, do I also need to sharpen the picture a bit afterwards?
In irfanview, whenever I resize a image, I always need to sharpen the image a bit afterwards.
Will this also be the case with the bilinear resize?
in video processing sharpening is unusual because it leads to much bigger file sizes. also use bicubicresize(). bilinear is the worst method of resizing.
3. Resize first and then color correction, or the other way around?
I don't know if it affects speed when I feed this to MeGui..
i would put color correction after resizing. it's faster and there is no quality gain by doing it before resizing like it would be the case with denoising.
Blue_MiSfit
19th November 2006, 13:02
there are several resizers built into avisynth.
I generally prefer lanczos for most things, and lanczos4 for big upscaling.
bicubic can also be very good for downscaling when lanczos sharpens too much.
In terms of sharpness IIRC
lanczos4>lanczos>spline>bicubic>bilinear
If you want to sharpen more after resize, limitedsharpen is popular. I also like unfilter, usually (5,5) or (10,10) depending.
If you're going to that low of a resolution, no real point in sharpening though. It's going to get blown up on playback and you won't see that detail that you spent bits on when you encoded.
~MiSfit
testyturtle
21st November 2006, 09:51
Also, you should keep the output resolution to a multiple of 16 on each axis to keep the encoder happy.
448/16 = 28 = good!
246/16 = 15.375 = bad!
If you aren't on a multiple of 16, go to the closest multiple you can. In this case, that means changing 15.375 to 15.
So instead of using 15.375*16=246, use 15*16 = 240.
This means your final res is 448x240 and your output ratio will be:
448/240 = 1.867
Not quite right, but not off by enough to notice, and the encoder will love you.
foxyshadis
21st November 2006, 09:54
Actually, the only thing you're likely to keep happy with a mod16 resolution is bad decoders. Notably standalone or handheld systems, or Quicktime. The other major software encoders and decoders don't really care one way or the other.
testyturtle
21st November 2006, 10:42
Actually, the only thing you're likely to keep happy with a mod16 resolution is bad decoders...
Really? I understand the encoders will pad non-mod16 stuff to mod16, but isn't it still best to fall on the mod16 boundary...otherwise aren't you using compression bandwidth to encode padding information?
Also i've read somewhere on here that vobsub doesn't like non-mod16 videos. Anyway, i'm always trying to learn more as well, so please enlighten foxyshadis. :)
foxyshadis
21st November 2006, 12:32
VSFilter gives me no trouble at any legal YV12 resolution. Maybe old versions, I don't know.
The most popular codecs: WMV9, Xvid, Divx, x264, all use pixel doubling or mirroring at the borders, which lessens the bitrate penalty substantially (compared to padding with black), though it might still be measurable, if not visible. Nero doesn't accept non-mod16, nor does mainconcept, iirc, for any of their codecs. RV10 and VP6 work like their more popular kin, far as I know.
Some dumber decoders might show junk on the outer borders, that's the only real issue.
Bottom line, I'd say resize to mod16 if you're already resizing, unless it'll do a number on the aspect ratio; don't bother if you're not.
testyturtle
21st November 2006, 19:14
Thx for the good info foxyshadis.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.