Log in

View Full Version : What do you use to hit exact size with 2-pass?


Ranguvar
31st March 2008, 23:15
Limiting the quantizers severely seems rather counter-efficient to me...

shorto
2nd April 2008, 13:06
I use Koepi's XViD codec and it works normally with whatever program. I just use the calculator included in the codec (you can see it when you encode with 2nd pass) and it always makes the filesize that I want. I only had problems when I used another XViD (nic's) but I never had any problems with this build. Hope I helped at least a little.

Sharktooth
2nd April 2008, 14:27
thou shall not limit the quantizers...

unskinnyboy
2nd April 2008, 15:56
In the old days, when Xvid's RC wasn't that refined, I would cap the quantizers sometimes (of course, it required patience, multiple encodes, getting the CQM right and all that), but that was for different reasons - quality, compressibility etc, as opposed to just getting an exact file size. At the moment, I recommend that you cap the min-quant to 2 (I/P/B) anyway. That, plus Xvid's RC now should give you the exact file size. If you get undersizing for some reason, think of other ways to increase the file size.

Zep
2nd April 2008, 21:09
make sure overflow control strength , max overflow improvement and max overflow degradation are at least 20%. The default 5% is too low and you will miss your target a lot. I hit within 10K every time at 30%. At 5% I would miss target by many megs.

of course if you are way under you need to bump up the rez or whatever....

Ranguvar
3rd April 2008, 03:00
Thanks, everyone. And yeah, I do limit the minimum quants to 2.

Quick question. Say I set overflow control strength, max overflow improvement, and max overflow degradation, all to 25%. Say I nail the target size. Would doing the same encode at 75% give me worse quality? I'm asking because in certain situations, I want a given filesize, period. I know increasing those values decreases efficiency, but do they continue decreasing efficiency one you reach what % level you need to nail the output size? It'd be easier just to set 75% for all encodes like that and know I'll hit the target rather than being super-quality-conscious like I usually am and trying 5%, 10%, 15%, etc. until I find the lowest value that gets it.

Thanks.

unskinnyboy
3rd April 2008, 13:17
Quick question. Say I set overflow control strength, max overflow improvement, and max overflow degradation, all to 25%. Say I nail the target size. Would doing the same encode at 75% give me worse quality?Yes.
I'm asking because in certain situations, I want a given filesize, period. I know increasing those values decreases efficiency, but do they continue decreasing efficiency one you reach what % level you need to nail the output size? It'd be easier just to set 75% for all encodes like that and know I'll hit the target rather than being super-quality-conscious like I usually am and trying 5%, 10%, 15%, etc. until I find the lowest value that gets it.What kind of issue are you facing here? Undersizing or oversizing, or both, depending on the source? Each of these should be addressed differently.

Any number higher than the defaults of 5, 5, 5 could result in artifacts and quality degradation, although sometimes it wouldn't be really obvious unless you go real higher, and again, the sweet spot for one source material need not work for another.

Unless you can't be bothered to do more than one try for an encode, I strongly recommend other ways to combat undersizing/oversizing rather than touching the overflow treatment values. But, if you just want a fixed filesize on every single first try, regardless of the source or quality, then keep them all at 20% or 25%.

Ranguvar
4th April 2008, 00:18
Well, I use rather insane Xvid settings and filtering settings. Making a lossless clip before encode of something large and high resolution is annoying, especially from HD sources.

For example, a simple DVD rip to Xvid for my Archos 605 and Xbox 360. I have lots of CDs laying around, and want to nail a 700MB size. Also as an experiment to see how good a 1CD'er can look.

I commonly get undersizing and oversizing, around the same frequency each. Undersizing I can just give it more audio bitrate, but still, I'm a perfectionist, and I would prefer those bits to have been used on the video.

plugh
4th April 2008, 05:55
Be careful with large values.

ref: http://forum.doom9.org/showthread.php?p=987418#post987418

Depending upon the ratio of first pass actual size and second pass target size, the values you input can be multiplied.

So when you thought you were requesting 20% strength you might end up at 100% strength...

and PS - if you input '0' to the standard builds, xvidcore supplies a default of '10' (before applying multipliers).