PDA

View Full Version : Covering 4:3 aspect to 16:9 by adding black bars?


haggis663
17th April 2004, 06:51
What script commands do I need to add to covert a standard PAL 4:3 aspect ratio to a 16:9 aspect ratio with black bars on the left & right (pillerbox)?

stickboy
17th April 2004, 08:26
# assumes that the input clip uses square pixels
# (note: the ... / 4 * 2 is not the same as ... / 2 !)
padding = Round(Height() * 16.0 / 9.0 - Width()) / 4 * 2

AddBorders(padding, 0, padding, 0)Edit:
Ack, I didn't calculate the mod 4 widths properly. Should be fixed now.

haggis663
17th April 2004, 08:43
Thanks. Can I set the border's colour as to minimise burn in effect?

stickboy
17th April 2004, 09:04
If you want colored borders, change the AddBorders line from:
AddBorders(padding, 0, padding, 0)toAddBorders(padding, 0, padding, rgb)where "rgb" is the RGB color triplet (e.g. $FFFFFF is white, $000000 is black, $FF0000 is red, $808080 is grey, etc.)

(BTW, my calculations in my original post were wrong; it should be corrected now.)

haggis663
18th April 2004, 05:16
Thanks again. I tried it with DVD Rebuilder and just had to resize the image to a anamorphic 16:9 720x576 picture ie.
AddBorders(152,0,152,0, $808080)
LanczosResize(720,576)

jorel
18th April 2004, 07:06
Originally posted by haggis663
Thanks again. I tried it with DVD Rebuilder and just had to resize the image to a anamorphic 16:9 720x576 picture ie.
AddBorders(152,0,152,0, $808080)
LanczosResize(720,576)

very nice.

please, for standard NTSC 4:3 aspect ratio to a 16:9 aspect ratio,
what will be the parameters for addborders and resize ?

thanks!