Log in

View Full Version : Aspect Ratio / Cropping Problem


Rafael
7th October 2005, 18:16
I am encountering a cropping/aspect ratio problem when encoding with AutoGK 2.20. The video I am encoding is a B&W VOB that has a little green logo from the TV network on the upper left corner. For some reason, the encoding process eliminates a bunch of pixels from the top to get rid of the green logo, and the aspect ratio gets all screwed up. Here's the log:
__________________________________________________________________
[10/7/2005 3:32:07 AM] AutoGK 2.20
[10/7/2005 3:32:07 AM] OS: WinXP (5.1.2600).2
[10/7/2005 3:32:07 AM] Job started.
[10/7/2005 3:32:07 AM] Input file: C:\Tenorio Documents\Movies\VTS_01_1.VOB
[10/7/2005 3:32:07 AM] Output file: C:\Tenorio Documents\Movies\VTS_01_1.avi
[10/7/2005 3:32:07 AM] Output codec: XviD
[10/7/2005 3:32:07 AM] Audio 1: Audio Stream 0 AC3
[10/7/2005 3:32:07 AM] Subtitles: none
[10/7/2005 3:32:07 AM] Format: .AVI
[10/7/2005 3:32:07 AM] Target size: 850Mb
[10/7/2005 3:32:07 AM] Standalone support enabled: MTK/Sigma
[10/7/2005 3:32:07 AM] Started encoding.
[10/7/2005 3:32:07 AM] Demuxing and indexing.
[10/7/2005 3:33:01 AM] Processing file: C:\Tenorio Documents\Movies\VTS_01_1.VOB
[10/7/2005 3:33:01 AM] Source resolution: 704x480
[10/7/2005 3:33:01 AM] Found NTSC source.
[10/7/2005 3:33:01 AM] Source aspect ratio: 4:3
[10/7/2005 3:33:01 AM] Analyzing source.
[10/7/2005 3:35:23 AM] Source has percentage of interlacing in motion areas: 58.06
[10/7/2005 3:35:23 AM] Source has percentage of telecined patterns: 4.09
[10/7/2005 3:35:23 AM] Source has percentage of progressive patterns: 23.67
[10/7/2005 3:35:23 AM] Source has percentage of interlaced patterns: 72.24
[10/7/2005 3:35:23 AM] Source is considered to be interlaced.
[10/7/2005 3:35:23 AM] Output will contain 101940 frames
[10/7/2005 3:35:23 AM] Picking up autocrop parameters.
[10/7/2005 3:35:23 AM] Audio1 size: 108,830,720 bytes (103.79 Mb)
[10/7/2005 3:35:23 AM] Overhead: 566,912 bytes (0.54 Mb)
[10/7/2005 3:35:23 AM] Video size: 781,891,968 bytes (745.67 Mb)
[10/7/2005 3:35:23 AM] Running compressibility test.
[10/7/2005 3:35:23 AM] Writing the following script to C:\Tenorio Documents\Movies\agk_tmp\VTS_01_1_comptest.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE3.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\kerneldeint.dll")

movie = mpeg2source("C:\Tenorio Documents\Movies\agk_tmp\VTS_01_1.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=18,rightadd=14,topadd=0,bottomadd=8)
fixed_aspect = 0.909090909090909
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 = 704
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
KernelDeInt(movie,order=1,sharp=true)
autocrop(mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=18,rightadd=14,topadd=0,bottomadd=8)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
SelectRangeEvery(300,15)
===========================================================
[10/7/2005 3:39:31 AM] Duration was: 4 minutes 7 seconds
[10/7/2005 3:39:31 AM] Speed was: 20.60 fps.
[10/7/2005 3:39:31 AM] Compressibility percentage is: 61.19
[10/7/2005 3:39:31 AM] Chosen resolution is: 640x352 ( AR: 1.82 )
[10/7/2005 3:39:31 AM] Predicted comptest value is: 73.43
[10/7/2005 3:39:31 AM] Running first pass.
[10/7/2005 3:39:31 AM] Writing the following script to C:\Tenorio Documents\Movies\agk_tmp\VTS_01_1_movie.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE3.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\kerneldeint.dll")

movie = mpeg2source("C:\Tenorio Documents\Movies\agk_tmp\VTS_01_1.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=18,rightadd=14,topadd=0,bottomadd=8)
fixed_aspect = 0.909090909090909
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 = 640
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
KernelDeInt(movie,order=1,sharp=true)
autocrop(mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=18,rightadd=14,topadd=0,bottomadd=8)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
===========================================================
[10/7/2005 4:08:08 AM] Duration was: 28 minutes 36 seconds
[10/7/2005 4:08:08 AM] Speed was: 59.38 fps.
[10/7/2005 4:08:08 AM] Expected quality of first pass size: 74.18
[10/7/2005 4:08:08 AM] Running second pass.
[10/7/2005 5:05:33 AM] Duration was: 57 minutes 24 seconds
[10/7/2005 5:05:33 AM] Speed was: 29.59 fps.
[10/7/2005 5:05:33 AM] Job finished. Total time: 1 hour, 33 minutes 25 seconds
____________________________________________________________________

Any clues?

Thanks a bunch in advance!

unskinnyboy
7th October 2005, 19:20
If autocrop isn't cropping as you expect it to, disable it by setting the threshold to 0 and then use the manual crop options to crop the frame as you want.