Log in

View Full Version : Add Bars in Avisynth


loekverhees
2nd April 2006, 18:38
Hello,

I've a video, but it's too small. I want to have a 16:9 format video, but I won't have a video just stretched up to 16:9 format of course. So I want to add black borders (at top and bottom).

http://www.todaysplanet.com/imagehost/uploads/9092d214af.jpg

I want to do this with Avisynt (using the GUI AVSEdit). Does someone know how my avs-script should be?

Thnx in advance

foxyshadis
2nd April 2006, 18:49
Oddly enough, there's a function called AddBorders in avisynth. Its syntax is all in the manual and online on the wiki. ;)

Mug Funky
3rd April 2006, 13:34
assuming NTSC:

addborders(0,(480-last.height)/2,0,(480-last.height)/2)

for PAL, change the 480 to 576...

Mr_Odwin
3rd April 2006, 13:43
Assuming last.height is even that is.

Edit: In fact I made an avsi file to do resizes to dvd size just the other day.

http://www.james.pike.dsl.pipex.com/FAVCResize.avsi (Right-Click > Save As ...)

You Import it by adding

import("C:\blah\blah\blah\FAVCResize.avsi")
to your script, and then just use:

FAVCResize(last, PAL)

or

FAVCResize(last, NTSC)

It assumes 4:3 aspect ratio for an apsect ratio of less than 1.75 and a 16:9 aspect ratio otherwise.

Chainmax
3rd April 2006, 17:18
FitCD (http://shh.sysh.de/fitcd.html) will calculate the script portion you are looking for.