Log in

View Full Version : I desperately need some quick help with the AddBorders() function...


ou8thisSN
31st May 2005, 03:10
okay, i have a DV AVI NTSC file that is 720x 480 that was recorded in 4:3 format. I want to crop and addborders to convert it to 16:9 format. using the crop feature, i cropped 60 pixels from the top and bottom of each image, and in the AddBorders function, i added 60 pixels. I am assuming that I just need to fill the pixels that i removed with black ones right?

anyway this crashes CCE\Avisynth\Vdub. I am doing something wrong but I dont know what.

Like i said, all i want to do is convert 4:3 720 x 480 to 16:9 720x 480 with the black borders that you see on DVDs...

Please help if you can, i want to start encoding tonight if at all possible.

Thanks a lot for helping out a newB.

This was my original script with the crop and resize:
AviSource("E:\SWD_tape1\CCE Product\ActualTest.avi")
Crop(0,60,0,-60)
SeparateFields()
bicubicresize(720,240)
ConverttoYUY2()
ReInterpolate411()
odd=SelectOdd.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
evn=SelectEven.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
Interleave(evn,odd)
Weave()
DoubleWeave.SelectOdd()


here is my script after it was suggested I add black borders instead of resizing and "zooming" to fill in for the pixels removed before:

AviSource("E:\SWD_tape1\CCE Product\ActualTest.avi")
Crop(0,60,0,-60)
SeparateFields()
AddBorders(0,60,0-60)
ConverttoYUY2()
ReInterpolate411()
odd=SelectOdd.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
evn=SelectEven.Convolution3D(1, 6, 10, 6, 8, 2.8, 0)
Interleave(evn,odd)
Weave()
DoubleWeave.SelectOdd()

I took out the line about BicubicResize, I am assuming I need to?

ou8thisSN
31st May 2005, 03:35
ok i know it cant have negative integers in it, so it has to be 0, 60, 0, 60 but thats too big, its 720 x 600

how do i get it to be the proper NTSC standard resize with the added borders?

Seed
31st May 2005, 03:56
Without looking much lower down your script, I think your AddBorders should come immediately after Crop, and BEFORE SeparateFields().

gircobain
31st May 2005, 04:06
Also your Addborders command is incorrect
It should be Addborders(0,60,0,60)
Or to make it easier, replace Crop() and Addborders() with a single Letterbox(60,60)

ou8thisSN
31st May 2005, 04:19
hey thanks a lot, it works now!

is it more efficient to use the letterbox(60,60) command than the Crop/addborders command?

i mean will using the letterbox command make CCE encode quicker?

gircobain
31st May 2005, 04:49
Theoretically, it should be faster
Though I don't think you will notice a significant improvement in speed

Abond
31st May 2005, 08:43
If you want to convert it to 16:9 you crop(0,60,-0,-60), resize(720,480) and don't add any borders.
Set the encoder to encode 16:9.
If you want 16:9 letterboxed to 4.3 then you crop(0,60,-0,-60) and AddBorders(0,60,0,60) and set the encoder to encode 4.3