View Full Version : Add Black Borders
Strigoyu
31st August 2012, 07:28
Hi, mates! I've got a question: I want to turn an .avi file into MPEG-2 format. The problem is that my .avi file is 704x384, so I need to add black border in to order to make a DVD compliant .m2v file and then mux with the AC3 audio file. So, my question is... how could I do that? I tried with "BorderControl" avisynth filter, but all I got is green borders, not black borders. Moreover, aspect ratio doesn't seem to be the correct one. Could anyone help me, please, and tell me what should I do? Thanks in advance!
José Antonio
dvdboy
31st August 2012, 10:11
AddBorders() should do the trick. By deafult it's black but you can define a hex value I believe.
Strigoyu
31st August 2012, 15:10
Hi! Thanks for your reply. Could you please be more accurate? This is my whole script:
# Creado con Gordian Knot
#
# http://gknot.doom9.org
# PLUGINS
LoadPlugin("C:\PROGRA~2\GORDIA~1\DGMPGDec\DGDecode.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\decomb.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\KernelDeInt.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\UnDot.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\dgbob.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\Convolution3d.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\FluxSmooth.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\TomsMoComp.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\VSFilter.dll")
#LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\SimpleResize.dll")
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\BorderControl.dll")
# SOURCE
avisource("D:\PUÑOS DE HIERRO [DVD MPEG-2]\Puños de hierro SATRip sin audio 25fps.avi")
# TRIM
#trim(startframe,endframe)
# IVTC
#Telecide(order=1,guide=1).Decimate()
# o usar
#IVTC(44,11,95)
#GreedyHMA(1,0,4,0,0,0,0,0)
# DESENTRELAZADO (1)
#FieldDeinterlace()
#FieldDeinterlace(blend=false)
#TomsMoComp(1,5,1)
# DESENTRELAZADO (2)
#KernelDeInt(order=1,sharp=true)
# o tal vez
#DGBob(order=1,mode=0)
# DESENTRELAZADO (3) - peticiones especiales
#GreedyHMA(1,0,0,0,0,0,0,0)
#Telecide()
#SeparateFields()
# CROPPING
crop(0,0,704,384)
# SUBTITULOS
#VobSub("FileName")
# REDIMENSIONADO
LanczosResize(720,576)
# DENOISING: cambiar una combinación (o ninguna)
Undot()
# 1) pequeño noise
#Temporalsoften(2,3,3,mode=2,scenechange=6)
#mergechroma(blur(1.3))
#FluxSmoothST(5,7)
# 2) medio noise
#Temporalsoften(3,5,5,mode=2,scenechange=10)
#Convolution3d("moviehq")
#FluxSmoothST(7,7)
# 3) pesado noise
#Temporalsoften(4,8,8,mode=2,scenechange=10)
#Convolution3d("movielq")
#FluxSmoothST(10,15)
# BORDES
BorderControl(96,8,96,8)
# TEST DE COMPRESIBILIDAD
# !!!!Snip El tamaño ahora tiene que ser 14 para el uso en GKnot!
#SelectRangeEvery(280,14)
# FOOL CCEnc
#empty = BlankClip()
#AudioDub(last,empty)
Hope anyone can help me! Thanks in advance!
José Antonio
dvdboy
31st August 2012, 17:12
Wow, that's quite a script - you may be better posting in the AVISynth Forum. Do you need all of that? What resolution is your source AVI?
manolito
31st August 2012, 17:28
@Strigoyu
Since your source file has been created with Gordian Knot I assume that your source AVI has square pixels. When you convert this into the DVD MPEG2 format (which does not use square pixels), you have to apply some math to get the correct aspect ratio.
Fortunately you do not need to make the calculation yourself, Jsoto wrote a nice little calculator for this purpose. Download here:
http://download.videohelp.com/jsoto/tools/aviresz.zip
In your case the script should contain the following 2 lines:
LanczosResize(720,418)
AddBorders(0,79,0,79)
Cheers
manolito
Strigoyu
31st August 2012, 19:04
Hi, mates! All I can say is that the original file aspect ratio is 704x384. Hope this can help to you all (in order to be able to help me, of course).
José Antonio
P.S.: Are you Spanish, manolito?
manolito
31st August 2012, 19:38
P.S.: Are you Spanish, manolito?
Sorry I'm from Berlin, Germany...
But I do have a Spanish uncle :cool:
Did you try Jsoto's formula?
Cheers
manolito
Strigoyu
31st August 2012, 20:40
Yes, mate! I tried it and it did a good job! I finally could make my DVD!!! Thanks for all, mate!!!
José Antonio
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.