DRP535
27th November 2006, 14:18
I'm wanting to convert an MPEG-1 video file to AVI using AutoGK. Unfortunately the MPEG has been encoded with the wrong aspect ratio. It displays at 376x288 pixels which is ~1.3:1. The correct aspect ratio is 3:2. I have corrected it as much as possible using MPEG Sequence Maker, but the closest I can get with that software is ~1.46:1.
Using that corrected 1.46:1 AR MPEG as the input source for AutoGK doesn't work though because even when I force a fixed width of 432 using advanced options, the height is calculated off that to get as close to the input's 1.46:1 ratio as it can. The end result is an AVI with a height of 304. What I want is an AVI with width of 432 & height of 288. Is there any way I can force both width & height in AutoGK to get the slight correction in output aspect ratio I need?
Here's the AviSynth script the encode I did created. Can I manually edit this somehow to force a height of 288 and restart the encode somehow? Everything else about the encode is perfect. I just need to be able to force the overall dimensions to my requirements.
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE2.dll")
movie = mpeg2source("C:\Documents and Settings\Temp\agk_tmp\Burnout of Hellas.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=0,samplestartframe=0,leftadd=1,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.11919418019026
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
out_width = 432
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=0,samplestartframe=0,leftadd=1,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
Using that corrected 1.46:1 AR MPEG as the input source for AutoGK doesn't work though because even when I force a fixed width of 432 using advanced options, the height is calculated off that to get as close to the input's 1.46:1 ratio as it can. The end result is an AVI with a height of 304. What I want is an AVI with width of 432 & height of 288. Is there any way I can force both width & height in AutoGK to get the slight correction in output aspect ratio I need?
Here's the AviSynth script the encode I did created. Can I manually edit this somehow to force a height of 288 and restart the encode somehow? Everything else about the encode is perfect. I just need to be able to force the overall dimensions to my requirements.
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE2.dll")
movie = mpeg2source("C:\Documents and Settings\Temp\agk_tmp\Burnout of Hellas.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=0,samplestartframe=0,leftadd=1,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.11919418019026
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
out_width = 432
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=0,samplestartframe=0,leftadd=1,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)