Log in

View Full Version : AutoGK Unexpected Width Behavior


nstocke
9th October 2005, 04:59
Not sure what is happening. I am encoding to xvid using the AutoGK. Usually the files I encode are either High Def transport streams or Standard Def Analog mpeg2. The XVID files from High Def full resolution were too much for my system to playback smoothly. If I drop resolution to about 912 width and 24 fps the play okay. If I set the Max width to 912 life is good. When I encode the SD files I would expect them to keep their original resolution of 720X480 because they are less than the Max Width 912.
I keep getting them at 912 width as well.
Am I missing something? I'm the first to admit I could be doing something wrong. If someone could point me in the right direction to look I'll do my best.

Neal

len0x
9th October 2005, 11:27
:logfile:

nstocke
9th October 2005, 14:28
AGK log attached.

Thanks

Neal

zacoz
9th October 2005, 15:25
@nstocke: It's better posting your log between CODE tags rather than as an attachment as all attachments require moderator approval before we can see them.

nstocke
9th October 2005, 18:55
Sorry about that. I didn't know. Here is the text. I wasn't sure what between code tags meant.

================================================
[10/8/2005 9:30:44 PM] AutoGK 2.20
[10/8/2005 9:30:44 PM] OS: WinXP (5.1.2600).2
[10/8/2005 9:30:44 PM] Job started.
[10/8/2005 9:30:44 PM] Input file: D:\SnapStream\Beyond TV\Shows\Dungeons & Dragons_ Wrath of the Dragon God-2005-10-08-0.mpg
[10/8/2005 9:30:44 PM] Output file: D:\Dungeons & Dragons_ Wrath of the Dragon God-2005-10-08-0.avi
[10/8/2005 9:30:44 PM] Output codec: DivX
[10/8/2005 9:30:44 PM] Audio 1: Audio Stream 0 MPEG
[10/8/2005 9:30:44 PM] Subtitles: none
[10/8/2005 9:30:44 PM] Format: .AVI
[10/8/2005 9:30:44 PM] Target quality: 75%
[10/8/2005 9:30:44 PM] Custom resolution settings: maximum width of 912 pixels
[10/8/2005 9:30:44 PM] Started encoding.
[10/8/2005 9:30:44 PM] Demuxing and indexing.
[10/8/2005 9:34:59 PM] Processing file: D:\SnapStream\Beyond TV\Shows\Dungeons & Dragons_ Wrath of the Dragon God-2005-10-08-0.mpg
[10/8/2005 9:34:59 PM] Source resolution: 720x480
[10/8/2005 9:34:59 PM] Found NTSC source.
[10/8/2005 9:34:59 PM] Source aspect ratio: 4:3
[10/8/2005 9:34:59 PM] Color correction enabled.
[10/8/2005 9:34:59 PM] Loading custom fps file.
[10/8/2005 9:34:59 PM] Output will contain 215666 frames
[10/8/2005 9:34:59 PM] Running single pass encoding.
[10/8/2005 9:34:59 PM] Writing the following script to D:\agk_tmp\Dungeons & Dragons_ Wrath of the Dragon God-2005-10-08-0_movie.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\ColorMatrix.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrain.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\fdecimate.dll")

movie = mpeg2source("D:\agk_tmp\Dungeons & Dragons_ Wrath of the Dragon God-2005-10-08-0.d2v")
movie = FDecimate(movie,rate=23.976,threshold=1)
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 = 0.888888888888889
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_width = 912
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)
RemoveGrain(mode=2)
ColorMatrix("Rec.709->Rec.601",mmx=true,hints=false)
===========================================================
[10/8/2005 10:49:03 PM] Duration was: 1 hour, 14 minutes 3 seconds
[10/8/2005 10:49:03 PM] Speed was: 48.54 fps.
[10/8/2005 10:49:03 PM] Job finished. Total time: 1 hour, 18 minutes 19 seconds

len0x
9th October 2005, 20:51
This seems to be a feature of quality based encoding. I do not remember why though, but I clearly see the code that sets it to maximum width in case of quality based encoding (so its not a bug).

*Update* from change log of 1.41: "maximum width setting is respected in quality-based mode", which means that it essentially acts like fixed width in quality based encoding (this makes sense as it always encodes at maximum possible resolution).