jonathonsunshine
27th June 2006, 06:03
Hi, i live in australia, and all our digital tv channels have different resolutions, (720x576, 704x576, 1440x1088, 1920x1088), so what i ended up doing was throwing a small sample of each one at AutoGK, then storing away the resultant .AVS script for use later, i just change the .d2v file and enter the desired width.
I want to change the script so that it will do an autocrop, and then take an additional 2 pixels off each side before resizing.
The reason for this is that othen the edge are blurry or half the top line is blurry.
I have put in another crop command before resizing ( crop(2,2,-2,-2) but i was thinking that this can't be the most efficient way of doing it and also this introduces a (however small) aspect ratio error
LoadPlugin("c:\Program Files\GordianKnot\DGIndex\DGDecode.dll")
LoadPlugin("c:\Program Files\AutoGK\filters\autocrop.dll")
LoadPlugin("c:\Program Files\GordianKnot\AviSynthPlugins\UnDot.dll")
loadplugin("E:\XVIDStuff\TVLogos\xlogo.dll")
movie = mpeg2source(" ******** .d2v").xlogo("E:\XVIDStuff\TVLogos\NINE HD 1600 880 0.bmp", 1600, 880, b1=0, b2=0, b3=0)
out_width = 592
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.00740740740741
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0)
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
Undot()
I want to change the script so that it will do an autocrop, and then take an additional 2 pixels off each side before resizing.
The reason for this is that othen the edge are blurry or half the top line is blurry.
I have put in another crop command before resizing ( crop(2,2,-2,-2) but i was thinking that this can't be the most efficient way of doing it and also this introduces a (however small) aspect ratio error
LoadPlugin("c:\Program Files\GordianKnot\DGIndex\DGDecode.dll")
LoadPlugin("c:\Program Files\AutoGK\filters\autocrop.dll")
LoadPlugin("c:\Program Files\GordianKnot\AviSynthPlugins\UnDot.dll")
loadplugin("E:\XVIDStuff\TVLogos\xlogo.dll")
movie = mpeg2source(" ******** .d2v").xlogo("E:\XVIDStuff\TVLogos\NINE HD 1600 880 0.bmp", 1600, 880, b1=0, b2=0, b3=0)
out_width = 592
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.00740740740741
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0)
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
Undot()