Log in

View Full Version : Target file size & xvid.... Arghhhhh!


yetanotherid
1st December 2008, 05:24
I simply cannot believe I'm the only one who has this problem with AutoGK & xvid because it happens to me on all three PCs here.
I posted about this problem a while back and didn't find a solution, but as it reared it's ugly head again today I thought I'd give it another shot.

There is only one version of xvid... and I've probably tried them all... which will give me the correct target file size when using AutoGK. That's "Koepi's XviD Codec 1.2.127 Alpha 25-02-2006". If it wasn't for that xvid version, I couldn't use AutoGK because I'd never hit the correct file size. But when using that version AutoGK produces the exact file it's supposed to every time.

Recently I installed StaxRip to try, and it complained about preferring a different version of xvid so I let it install that version without thinking about it. Yesterday though I used AutoGK to convert a couple of DVDs. I asked it to give me a 1350MB & a 1450MB AVI (long story as to why those sizes but it's a known good size for those DVDs to give 75% quality 2 pass encoding at full resolution).
This morning I looked to find two AVIs, one 905MB in size while the other was 986MB. They were both pretty average quality. This same version of xvid however, the one StaxRip installed, produces the exact file size asked for when making AVIs with StaxRip. So why can't AutoGK do the same thing??
Below is the log file for one of the AVIs, which despite the info it contains wasn't 1350MB. It was 905MB.

Interestingly, when AutoGK converted that DVD the first time it picked 720x304 as the resolution while telling me the quality would be around 5% higher than it did this time. I hadn't forced ITU resizing that time though, so maybe that's what made the difference there?

Thanks.



[01/12/08 2:36:01 AM] AutoGK 2.45
[01/12/08 2:36:01 AM] OS: WinXP (5.1.2600).2
[01/12/08 2:36:01 AM] Job started.
[01/12/08 2:36:01 AM] Input file: D:\To Burn\01 FOTR1\VTS_01_0.IFO
[01/12/08 2:36:01 AM] Output file: H:\01 FOTR1.avi
[01/12/08 2:36:01 AM] Output codec: XviD
[01/12/08 2:36:01 AM] Audio 1: English AC3 6ch
[01/12/08 2:36:01 AM] Subtitles 1: English letbox
[01/12/08 2:36:01 AM] Display only forced subtitles.
[01/12/08 2:36:01 AM] Format: AVI
[01/12/08 2:36:01 AM] Target size: 1350Mb
[01/12/08 2:36:01 AM] Audio 1 settings: Original
[01/12/08 2:36:01 AM] Standalone support enabled: ESS
[01/12/08 2:36:01 AM] Started encoding.
[01/12/08 2:36:01 AM] Demuxing and indexing.
[01/12/08 2:37:39 AM] Processing file: D:\To Burn\01 FOTR1\VTS_01_1.VOB
[01/12/08 2:37:39 AM] Processing file: D:\To Burn\01 FOTR1\VTS_01_2.VOB
[01/12/08 2:37:39 AM] Processing file: D:\To Burn\01 FOTR1\VTS_01_3.VOB
[01/12/08 2:37:39 AM] Processing file: D:\To Burn\01 FOTR1\VTS_01_4.VOB
[01/12/08 2:37:39 AM] Source resolution: 720x480
[01/12/08 2:37:39 AM] Found NTSC source.
[01/12/08 2:37:39 AM] Source aspect ratio: 16:9
[01/12/08 2:37:39 AM] Source seems to be pure FILM.
[01/12/08 2:37:39 AM] Output will contain 151927 frames
[01/12/08 2:37:39 AM] Preparing subtitles.
[01/12/08 2:38:00 AM] Forcing ITU resize method.
[01/12/08 2:38:00 AM] Audio1 size: 354,824,960 bytes (338.39 Mb)
[01/12/08 2:38:00 AM] Overhead: 1,804,160 bytes (1.72 Mb)
[01/12/08 2:38:00 AM] Video size: 1,058,948,480 bytes (1009.89 Mb)
[01/12/08 2:38:00 AM] Running compressibility test.
[01/12/08 2:38:00 AM] Writing the following script to H:\agk_tmp\01 FOTR1_comptest.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\vsfilter.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE3.dll")

movie = mpeg2source("H:\agk_tmp\01 FOTR1.d2v")
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.21557454890788
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
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)
VobSub("H:\agk_tmp\01 FOTR1.idx")
SelectRangeEvery(300,15)
===========================================================
[01/12/08 2:39:27 AM] Duration was: 1 minute, 26 seconds
[01/12/08 2:39:27 AM] Speed was: 87.53 fps.
[01/12/08 2:39:27 AM] Compressibility percentage is: 71.20
[01/12/08 2:39:27 AM] Chosen resolution is: 704x288 ( AR: 2.44 )
[01/12/08 2:39:27 AM] Predicted comptest value is: 71.20%
[01/12/08 2:39:27 AM] Running first pass.
[01/12/08 2:39:27 AM] Writing the following script to H:\agk_tmp\01 FOTR1_movie.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\vsfilter.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrainSSE3.dll")

movie = mpeg2source("H:\agk_tmp\01 FOTR1.d2v")
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.21557454890788
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
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)
VobSub("H:\agk_tmp\01 FOTR1.idx")
===========================================================
[01/12/08 2:54:46 AM] Duration was: 15 minutes 18 seconds
[01/12/08 2:54:46 AM] Speed was: 165.36 fps.
[01/12/08 2:54:46 AM] Expected quality of first pass size: 67.06%
[01/12/08 2:54:46 AM] Running second pass.
[01/12/08 3:18:48 AM] Duration was: 24 minutes 1 second.
[01/12/08 3:18:48 AM] Speed was: 105.38 fps.
[01/12/08 3:18:48 AM] Job finished. Total time: 42 minutes 46 seconds

citanuL
1st December 2008, 23:20
Get the portable non-installer AIO AutoGK version here: http://forum.doom9.org/showpost.php?p=1212614&postcount=9
[also includes AGKPal tweaker for avisynth editing and xvid encoder settings]
This will let StaxRip keep using it's updated XviD

CWR03
1st December 2008, 23:56
Try simply uninstalling Xvid and reinstalling Koepi's build. Installing Xvid over another version is known to cause sizing issues. It should also work with StaxRip.

yetanotherid
2nd December 2008, 08:24
citanuL,
Thanks, I didn't know that version existed. I'll give it a try if for no other reason than to see if I get the correct file size with it.
Although just for the record.... StaxRip actually wants to use an older version of xvid, not a newer one.

CWR03,
It's not an "installing over the top" issue. When I first realised I had this problem I tried every xvid version I could find and I was very thorough with my uninstalling/installing testing routine. I've now re-installed Koepi's build and StaxRip seems to play well with it.

I just don't understand what it is about the three PCs I have here which causes the same problem on each yet it's a problem which isn't apparently all that common. At least nobody else seems to be complaining about it.
But here's my original post on the subject, from last April:
http://forum.doom9.org/showthread.php?t=137085

And while I'm at it.... I still haven't found the answer for this problem. Anyone?
http://forum.doom9.org/showthread.php?t=139403

Thanks.

len0x
2nd December 2008, 13:14
Actually this all doesn't sound too crazy at all. If you look at the change log on the AutoGK web page, you'll see that XviD version was downgarded twice after 2.45 stable to solve exactly your problem: undersize with ESS standalone option on. If you use current 2.48 and XviD bundled with it (I know its beta, but in fact its more stable) then you should not have this problem. If I recall correctly there were some changes in XviD code that broke something in standalone support, but I'm not an expert in that. You can try current just released 1.2.0 final and see if the problem is still present there.

yetanotherid
2nd December 2008, 14:16
Thank you. And thank you again. Finally an answer!!
I do remember originally reading that XviD had been downgraded in the later version, but didn't remember why.
I just re-read the change log though. #^&@!!!!!!!!
Unbelievable. The answer was staring me in the face.

Only thing is though, I was sure I'd updated to 2.48b when I installed AutoGK this time round and let it install the XviD that goes with it... obviously not though.
However.... before I installed AutoGK on this machine I installed it on two others because I was having the file size problem, and I'm 100% certain I upgraded them to 2.48b at the time. I remember doing it.
Which I guess means the version of XviD that's included with 2.48b still has the same problem. Next week when I've got more time, I'll uninstall the lot and start again to check. I'll also give the 1.2.0 final version of XviD a shot and see what happens.

But however it goes, thanks again! From day one this has been bugging me and now at least I know I'm not going nutty.

So would I make an enemy of you by asking when you'll give AutoGK h.264 support? ;-)
AutoGK is, no doubt, the best DVD to AVI conversion program out there for someone like me, who wants quality results but doesn't want to have to over-think every conversion. I've tried lots of alternatives and always come running back. I'd hate to see it fade away one day.
And the ability to run the compressibility check, then pick an appropriate file size and resolution to match...... I'd be in AVI heaven. :-)

len0x
6th December 2008, 14:00
FYI I just tried encoding with XviD 1.2.1 and ESS option enabled and its very unfortunate but Home Theatre profiles still don't work as expected...

yetanotherid
8th December 2008, 09:38
FYI I just tried encoding with XviD 1.2.1 and ESS option enabled and its very unfortunate but Home Theatre profiles still don't work as expected...

Thanks for letting me know. I guess that saved me a bit of experimenting time....
Well at least I've got one version of Xvid which always works with the ESS option enabled. I guess using the ESS option must not be all that common given that this forum isn't full of people asking about file size issues.

Thanks again.

len0x
8th December 2008, 22:07
I'm still convinced that version that is bundled with 2.48 is working correctly (at least for me it does) and that's why nobody actively reports problems about it. It does drives me crazy though why latest versions are broken in that respect. Its all goes to me installing VS to compile it myself itseems and backtracking all the changes around winter 2007 (December's 2006 build was OK, but July's 2007 was already not) to find what is wrong... :(

yetanotherid
10th December 2008, 15:32
According to my old post here:
http://forum.doom9.org/showthread.php?t=137085
I wasn't hitting the correct file size with the version of XviD which comes with 2.48b. Maybe I was getting things wrong back then, but I think I was being pretty thorough when I was testing. Maybe I didn't update XviD when I updated AutoGK....... it was a while ago.
I've been doing some other experimenting over the last week, but I'll get around to re-testing that version of Xvid sooner or later.