homermaster
12th April 2005, 18:06
I originally posted under the topic "prerotating video for palm" and tried to add this to the thread but I was never able to view it. Sorry if not knowing how this forum works is causing problems but I wanted to offer a simple solution to those who are looking for ways to make this happen.
I'm not sure if this is an option that will be added in to AutoGK or not... I'm still hoping so. However, I have been playing around with things a little and have discovered a simpler way to rotate the video. It requires that there are two passes made for the video processing, which will definately happen if you are making the video small enough for a Palm or PocketPC. It does require you to pay attention to the encoding process though.
The first thing is to set up AutoGK like any normal encoding and start it. It will go through a number of steps that you can keep track of through the log window in AutoGK. When you see the line "Running First Pass" a file will be created in the agk_tmp folder called *_movie.avs. You will need to open this file with Notepad and at the end of it add the line turnright(). Here is an example of an avs script I edited...
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
movie = mpeg2source("C:\Documents and Settings\Aaron\Desktop\agk_tmp\Napoleon Dynamite.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartfram
e=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.18518518518519
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 : (4.0/3.0)
out_width = 480
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,sample
startframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
BicubicResize(out_width,out_height,0,0.5)
turnright()
This MUST be added before the second pass is started. If you have done this correctly your encoded video from AutoGK will be rotated 90 degrees to the right. YEA!!
I'm not sure if this is an option that will be added in to AutoGK or not... I'm still hoping so. However, I have been playing around with things a little and have discovered a simpler way to rotate the video. It requires that there are two passes made for the video processing, which will definately happen if you are making the video small enough for a Palm or PocketPC. It does require you to pay attention to the encoding process though.
The first thing is to set up AutoGK like any normal encoding and start it. It will go through a number of steps that you can keep track of through the log window in AutoGK. When you see the line "Running First Pass" a file will be created in the agk_tmp folder called *_movie.avs. You will need to open this file with Notepad and at the end of it add the line turnright(). Here is an example of an avs script I edited...
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
movie = mpeg2source("C:\Documents and Settings\Aaron\Desktop\agk_tmp\Napoleon Dynamite.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartfram
e=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.18518518518519
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 : (4.0/3.0)
out_width = 480
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,sample
startframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
BicubicResize(out_width,out_height,0,0.5)
turnright()
This MUST be added before the second pass is started. If you have done this correctly your encoded video from AutoGK will be rotated 90 degrees to the right. YEA!!