PDA

View Full Version : Could someone write a 16:9 stretched to 4:3 black borders script?


atreides93
13th February 2003, 21:33
I'm not very good at Avisynth scripts. Was wondering if someone could suggest a script for me.
I want to import 720x480 from my miniDV which is shot in 16:9 mode so the image will appear stretched. I want it to be resized back down to letterbox mode, and then add borders.

onesoul
13th February 2003, 23:32
You should try fitcd which can do all sorts of conversions (I use also a neat video size calculator from Gunnar Thalin which helps me understand the different pixel ratios but it isn't so powerful as fitcd). You have to keep in mind if you are doing an interlaced or progressive resize. If you have a progressive minidv then you could use this script:
lanczosresize(720,360)
addborders(0,60,0,60)

scmccarthy
14th February 2003, 06:08
That's right.

4/3 times 4/3 equals 16/9.

So 16/9 times 3/4 equals 4/3.

3/4 is 75%.

Squeeze the height down 75% and add borders to bring it back to the original size. That is what onesoul does above.

For interlaced you'd want to separate fields before resizing:

SeparateFields()
LanzosResize(720,180);180 is half the height of 360
Weave()
AddBorders(0,60,0,60);the mattes don't have to be interlaced.

It is the same for PAL. Except you use 75% of 576 instead.

Stephen

atreides93
14th February 2003, 08:40
Thanks for your help :)