» AviSynth is a powerful video FrameServer for Win32.

AviSynth Links:
»Learn to script
»Discussion fora
»Project page
»External filters

» You can add pages to this website immediately. No login required.
Edit this document

» AboutAviSynth




( Diese Seite in flag-germany.gif Deutsch )

So, you have read YourFirstScript and now you wonder, what can/should I do?

One thing you will do quite often is to change size of the video clip, in fact almost every script will have some form of resizing. AviSynth now includes 4 forms of resizing: BicubicResize, BilinearResize, ReduceBy2 and the new LanczosResize (introduced in v2.06). The easiest form of resizing is Reduce. This will halve the resolution, either in both directions ReduceBy2 or in one direction ( VerticalReduceBy2 and HorizontalReduceBy2 ). Reduce is a special case of BilinearResize, but it is much faster. BilinearResize is also quite fast, but should not be used for making a picture larger as it is not very good quality-wise and that will show quite clearly when a picture is enlarged. In fact, in most cases you should use BicubicResize as it will give you the best quality at a reasonable speed. LanczosResize is claimed to be just as good as BicubicResize qualitywise, but is as yet quite untested and has yet to prove itself.

All resizefunctions work the same way: xxxxResize(new_width, new_height)

Why Resize? There are 3 main reasons for resizing:

  1. Correcting Aspect Ratio. All MPEG videos are stored with non-square pixels, and must have this corrected for playback on a computer monitor.
  2. Increase size to better match playout screen. If you always watch your clips on a screen of 1024x768 pixels then it can be a good idea to make the video fit this area before adding effects or subtitles etc, to see how it looks when you play the final video.
  3. Reducing size to save space when compressing the video. Video requires a LOT of storage space, and the fewer pixels there are, the less MB will the final clip take to store.

What sizes are useful to resize to:

That entirely depends on what you want to do, but some common values are the following:

352x288 PAL VCD, 352x240 NTSC VCD, 480x576 PAL SVCD, 480x480 NTSC SVCD, 720x576 PAL DVD, 720x480 NTSC DVD

320x240, 384x288, 448x336, 512x384, 640x480 AVI 4:3

512x288, 704x400 (approx), 768x432 AVI 16:9

704x288 (approx) AVI 2,35:1

For exact calculations of what sizes can/should be used I recommend GordianKnot, an extremely good application as it will set-up the AviSynth script for you when converting DVD's to AVI.

I have black bars at the top/bottom that I want to get rid of:

For this you use Crop. Say that you have a PAL DVD video with 72 lines of black at the top and 80 lines of black at the bottom. You also have 8 lines completely black at both sides. To get rid of those you invoke Crop(8,72,704,424) in your script. You can also use Crop(8,72,-8,-80) with the same result.

More to come...

SourceForge Logo


Edit this document | View document history
Document last modified Fri, 20 Feb 2004 09:29:17