Log in

View Full Version : XviD presets - preliminary thoughts and suggestions


Pages : [1] 2 3 4 5 6 7 8

Teegedeck
26th February 2006, 19:53
This version of the presets is derelict. Please read an up-to-date version of the presets here (http://forum.doom9.org/showthread.php?p=841263#post841263). The previous version can still be found here (http://forum.doom9.org/showthread.php?p=796900#post796900).

Again and again, there's questions on the forum like 'what settings should I use for sports?' or 'what are the best settings for high quality?" I cannot without twitching answer them all with 'use the defaults!' but personally I'm also quite fed-up with explaining the same things over and over again or searching for those explanations and linking them.

So, I guess there is demand for more of those 'XviD presets' which tentatively have been introduced with XviD 1.1.

I'd like to summ up my thoughts on how we could get to meaningful presets in this post and start a discussion that will probably go on for quite some time before we actually see any more presets implemented. Especially since sysKin would rather like to do it right from the start and implement a more cross-platform approach to presets instead of simply modifying the VfW frontend and is quite busy again, now.

OK, thoughts - I hope for your input and for you to correct me where I assume false things.:

Presets should never in any way relate to 'bitrates' because you cannot target settings at such a relative, indeed kind of virtual thing. 'high quality' is correct, 'high bitrate' is wrong.
As few presets as possible - there's not really so much you should need to change in XviD's settings for different circumstances; and also the more, the more confusing it gets to the target audience - i.e. mainly newbies.

Now, how do we have to think about XviD options in order to work our way somewhat efficiently towards meaningful presets? Before we start out just testing into the blue, without any idea where this is going, perhaps we should fence it in a bit by some kind of concept on how to go about it.
So, the following is to describe how one could come to a set of 'presets' to start out testing.

I think the settings in XviD are mainly changed upon three circumstances:


What compression ratio one aims for (As in 'how many percent smaller than a - purely hypothetical - optimum re-encode should the result be?'), simplified as 'compression ('strong --> 'low')
What quality-speed ratio one wants (As in 'how long am I prepared to wait for the darn thing to finish in order to squeeze out some extra quality?'), simplified as 'speed' ('fast'-->'slow')
What kind of source I am about to encode (anime, clean source, noisy source), simplified as 'material'.

That could give us two axes on which to file presets: Compression and speed. 'Material' would kinda stand out.

Now one could arrange a matrix with nine fields:

low&fast medium&fast strong&fast
low&norm medium&norm strong&norm
low&slow medium&slow strong&slow



'Compression' could be addressed mainly by use of, say 3 different CQMs to cover the needs of different scenarios better than 'just using H.263 for everything'. Also, the quantizer at which the first pass is performed should be altered according to matrix characteristics and/or presumable 2nd-pass-target-quantizer for that profile
'Speed' could be addressed by using the usual, more time consuming and quality-enhancing settings for higher quality.

Compression
As for the 'compression'-axis,a start would be switching matrices as follows (from low to strong compression): SixOfNine --> H.263 --> EQM v3 ULR. That is just a starter, and I think H.263 could perhaps be replaced by one of Sharktooth's or Soulhunter's matrices. But I don't know them well enough. Is perhaps one of them more forgiving to quantizer-fluctuations in the 'faster' presets? I also think there should be a special 'near-lossless' setting which uses Sharktooth's UHR matrix. Also, for strong compression AQ should be used IMHO. Renamed to 'for editing' so that it is not mistaken for a preset for archival. The first pass with SixOfNine (or other HQ-CQMs) should be performed at quant=3 in the 'low'-column, and with quant=4 in the 'medium' because of their small coefficients; first pass with EQM ULR should also be done at 4 because I think it would be primarily used at pretty extreme settings, correct me if I'm wrong. First pass with the 'near-lossless' profile should be at ??? Sharktooth?

Speed
As for the 'speed' axis, I'd suggest

line 1 could imply ME 5, no VHQ, no chroma ME
line 2 could imply ME6, VHQ=1, VHQ for b-frames, chroma ME
line 3 could imply ME6, VHQ=4, VHQ for b-frames, chroma ME
'near lossless' or 'for editing' could imply ME6, VHQ=4, VHQ for b-frames, b-frames 1/1.0/1, chroma ME and GMC + Sharktooth's UHR matrix and would be meant specifically for near-lossless encoding.
'anime' could trigger using the H.263 matrix, cartoon mode(!), a mild b-frame setting like ratio 1.0, offset=1, ME6, VHQ=1, VHQ for b-frames, chroma ME.


Trellis should always be used IMHO. I guess also activated in all settings could be chroma optimizer. We could also meditate about making Didée's 'golden cut' ratio (ratio=1.6, offset=0) with its more lenient characteristics the new standard while we're at it.

The use of QPel could depend on both speed and compression - as it doesn't make sense to use it for 'fast' or 'strong compression' profiles, and perhaps neither to use it for the 'anime' preset. In the rest of profiles I think it should be used.

That would leave us basically with eleven presets like these

fast strong compression
fast medium compression
fast low compression
normal strong compession
normal medium compression
normal low compression
slow strong compression
slow medium compression
slow low compression
for editing
anime


That's a bit much, right? Clearly unnecessary. Perhaps one should eliminate extremes that probably wouldn't work too well: fast strong compression is probably not a good idea. And perhaps also settings between which there wouldn't be much difference in the result. As SixOfNine is quite usable till the higher quantizers one could merge the 'low' and medium 'compression'-columns into one and use H.263 only for the fastest encoding mode where high quantizers are likely to occur, for instance... Seven profiles left. Now, re-arrange the order in which they appear to something more meaningful, find catchy names for them and Bob's your uncle :):


normal strong compression: 'fast, extreme compression'
slow strong compression: 'good quality, extreme compression'
fast medium compression: 'good quality, strong compression'
normal medium compression: 'high quality, medium compression'
slow medium compression: 'very high quality, medium compression'
insanely slow low compression: 'insane quality, low compression'
for editing
anime

(Well... We'll think again about the 'catchy' bit sometime later...)
That would mean effectively these settings:

'fast, extreme compression', tooltip: 'at ~15-25% of original filesize':ME6, VHQ=1, VHQ for b-frames, AQ, chroma ME, EQM v3 ULR, 1st pass @q=4, curve-compr. H30, L15, quantizer-restrictions min. 3
'good quality, extreme compression', tooltip: 'at ~15-25% of original filesize, apt for sports'':ME6, VHQ=4, VHQ for b-frames, AQ, chroma ME, EQM v3 ULR, 1st pass @q=4, curve-compr. H30, L15, quantizer-restrictions min. 3
'good quality,strong compression', tooltip: 'apt for standard DVD backup at ~25-35% of original filesize': ME6, VHQ=1, chroma ME, EQM v3 LR,* 1st pass @q=3, curve-compr. H20, L7, quantizer-restrictions min. 3, max. 7
'high quality, medium compression', tooltip: 'apt for transparent DVD backup at ~30-50% of original filesize, also for noisy sources at >40%': ME6, VHQ=1, VHQ for b-frames, chroma ME, SixOfNine, Qpel, 1st pass @q=4 curve-compr. H15, L5, quantizer-restrictions min. 2, max. 6
'very high quality, medium compression', tooltip: 'apt for transparent DVD backup at ~30-50% of original filesize': ME6, VHQ=4, VHQ for b-frames, chroma ME, SixOfNine, Qpel, 1st pass @q=3, curve-compr. H10, L3, quantizer-restrictions min. 2, max. 6
'insane quality, low compression', tooltip: 'apt for DVD-to-DVD-R backup (clean sources) at >50% of original filesize, also for noisy sources at >60': ME6, VHQ=4, VHQ for b-frames, b-frames 1/1.0/1, b-frame sensitivity =-3, chroma ME, Qpel and GMC, EQM UHR , 1st pass @q=4, quantizer-restrictions min. 3 max. 7
for editing, tooltip: 'fast, near lossless encoding, huge filesizes, NOT for archiving purposes': ME6, VHQ=1, no b-frames, chroma ME, EQM EHR , only for quality-based 1-pass, quantizer-restrictions constant quantizer 2
anime: cartoon mode(!), a mild b-frame setting like ratio 1.0, offset=1, ME6, VHQ=1, VHQ for b-frames, chroma ME, H.263, 1st pass @q=2, quantizer-restrictions min. 2,2,3, max. 6,6,10

*=possible replacement by Soulhunter's v6 matrix or H.263

Always active: Trellis, chroma opt., b-frames: max. 2 consecutive, ratio 1.62, offset 0 if not specified otherwise (insane, anime, for editing), ME precision = 5 for first pass.

Do you think that this would be a good start from which to work the way up?


Catchy names:
100 minutes at full resolution (if you get undersizing choose a higher preset, if you get oversizing choose a lower preset:
'fast, extreme compression' --> fast, 1 - 2 CD-Rs
'good quality, extreme compression' --> HQ, 1 - 2 CD-Rs
'good quality, strong compression' --> fast, 2 - 3 CD-Rs
'high quality, medium compression' --> fast, 3 CD-Rs
'very high quality, medium compression' --> HQ, 3 CD-Rs
insane quality, low compression' --> insane, 3 CD-Rs - 1 DVD-R
'for editing only'
'anime'

comment: Don't like this, really, but seems unavoidable. (I really would prefer a naming scheme more analogue to LAME's old preset-names, like 'fast low; low; fast medium; medium' etc. but it seems that people can rightfully expect (if somewhat vague) size-predictions for a codec that's mainly being used for two-pass encoding.)


Edited: some hubris; thanks to Koepi for spotting it!;)
Edited: 'good quality' is not so fast anymore...
Edited: 'near lossless' is fast, now; added 'insane quality'
Edited: added curve-compression settings
Edited: added compressibility hints, replaced 'light compression' with the more appropriate term 'low compression'
Edited: amended tooltip comments
Edited: renamed two presets, can you spot which ones?
Edited: changed another tooltip...
Edited: ...and another blunder ...and correction of filesize recommendations
Edited: added quantizer-restrictions
Edited: quant. restrictions, 'good quality, extreme compression' uses EQM v3 LR now
Edited: adjusted 'catchy' names

Koepi
26th February 2006, 21:51
Do you think that this would be a god start from which to work the way up?

Interesting summary. I like it; I might even assemble a build which uses those profiles.

Anyhow, I'd like to object. It's not a god start. But a good one it is indeed!

Best regards
Koepi

Teegedeck
26th February 2006, 22:21
Wow, thanks! :) I wasn't sure whether the VfW presets could trigger all switches or were restricted in any way.

With a build I guess we could find out quite quickly what is perhaps horribly wrong with that selection above. Though I'd sure like some input beforehand, for example from Sharktooth about what I had in mind with this 'quasi-lossless' preset which would more apty be named 'insane'?

Sharktooth
26th February 2006, 23:07
Well "near lossless" could be a good name.
Also please note there is EHR matrix that was specifically made for that purpouse (with no b-frames) but it has "no mercy" for the file size... :)
So IMHO there could be 2 "near lossless" profiles, one with UHR (more compression) and the other with EHR (less compression).
or maybe just test those 2 profiles and choose the best one to include in the build.

Soulhunter
27th February 2006, 02:22
/me votes for more Soulhunter matrices... ;P :D

9-out-of-10-DVD9s-to-DVD5: VHQ1, B-VOPs 1/1/1, Trellis, No QPel/GMC, Soulhunters v3, Single pass @ Q2


Bye

shpitz
27th February 2006, 06:09
halelloyah Teege, that is an amazing piece of information.

question: i did an encode of a 720p clip (1min long) of an nba game using ur "good quality, extreme compression" settings. filesize was 12mb. quality is awesome.

i did the same encode using ur "high quality" settings. filesize was 8.4mb. quality is tiny worse compared to good quality settings.

target bitrate is 1200kbps.

my question is this: when you say extreme compression in "good quality", how come the filesize was much bigger than "high quality"?
when you say compression you don't mean in terms of filesize?

thanks

Teegedeck
27th February 2006, 10:26
@Sharktooth: Thanks; 'near lossless' it is then! Humm; as these are 'presets for the masses' it would perhaps be wise to have a near lossless profile that still aims for a compression ratio close to that of high-quality MPEG-2 if one can make such a general statement. Do you think one should rather use EHR or UHR for that? Also, do you think that for such a profile B-frames generally shouldn't be used or would it be enough to have only 1/1.0/1 and a low b-frame sensitivity (keeping the filesize-aim in mind)? At which quantizer should the first pass then be performed (if that quantizer were to be near the expected 2nd-pass average quantizer)?

If Koepi would build something for testing we could of course just include two 'near lossless' presets and test all that out.

@Soulhunter: Yay. Thanks for the suggestion. ;) Seriously, your v6 matrix is the only close contender for H.263's place (as your matrix comparisons have shown). Perhaps we could further test out which of the two reacts more forgiving to big quantizer fluctuations, 'cause that is pretty much what I'd expect from the 'good quality' preset which I kinda meant to be really fast.

@shpitz: That's the reason why the 'extreme compression' preset is described as 'apt for sports' while the 'good quality' preset is described as 'apt for DVD backup'. So it's supposed to be that way.

On the other hand, the 'good quality, extreme compression' preset uses higher-quality settings than the 'good quality' one which is meant as being a fast mode. Perhaps this is too confusing and the settings for 'good quality' should be altered to ME=6 at least.

The question is 'how fast does the fastest mode need to be?' We could of course say the current only preset of XviD is the fastest we need. Then we could set 'good quality' to ME=6, VHQ=1. The difference to the 'high quality' preset would still be large enough because of the switch of matrices and VHQ for b-frames. OK, I'll edit my first post for the time being.

Dunno why exactly your result with 'good quality' was undersized(?) but 1 minute is too short for two-pass in any case.

Sports is generally highly-compressed MPEG-2, DVD-content is lightly-compressed MPEG-2. So you also need to use strong compression in MPEG-4 (XviD) to get reasonable filesaving when transcoding sports while you need only lenient compression for transcoding a DVD, in order to retain its original quality. You not needing to worry about the 'whys' is what presets should be there for. :)

raeltheimperialaerosolkid
27th February 2006, 10:30
Good post!
Ehm sorry for bothering always on the same argument but I would recommend that, for compatiblity purposes with SA palyers, the feature (Packed bitstream, QPel and GMC) that could interfere should, at least report a warning. This should be valid for all presets.

Teegedeck
27th February 2006, 10:42
Hardware profiles should always override presets, yes.

Sharktooth
27th February 2006, 13:46
i once read an article (or was it a forum post?) regarding the use of EHR for archival quality.
The difference from the source is so small you can't tell the difference even watching still frames.
They had to intensify the difference between pictures to have them actually show something.
However EHR is bitrate hungry but still compresses more than lossless codecs.
I would suggest using EHR coz it's really near-lossless but it all depends on how much compression you want for that profile.
I think some tests are needed to estabilish how much quality can be sacrificed in the name of "near-lossless".
For what concerns EHR and b.frames, it was not meant to be used with them while UHR can take advantage of b.frames usage.

Teegedeck
27th February 2006, 14:21
Perhaps it's better to include both for now? Say, EHR for 'near lossless' and 'UHR' for an additional 'ultimate (extreme, insane...) quality' preset? See, I kind of would like one really extreme, no-holds-barred preset which even uses GMC and gets us a nice 1 fps on a 3-Ghz-system. :) That could perhaps be done with UHR.

While on the other hand GMC and QPel aren't really necessary for a preset that uses coefficients as low as EHR, perhaps not even VHQ=4, I think, so that mode could be bitrate-hungy but still quite speedy.

CruNcher
27th February 2006, 14:31
I started with something similiar for DVD backups with my EDP build before profiles where introduced for Quality/(Encodeing)Speed, the idea was like Teegedeck showed it based on tests of different material and finding a balanced way between every setting but more based on personal expirience and visual tests that i gathered with XviD over the years. I think whats missing here is also to count in Decodeing complexity for different CE devices @ the moment im working on a Pocket PC profile enhanced for PPC's based on Intel PXA255 400 mhz (QVGA) optimized for Playback with CoreASP and 2h runtime.

Teegedeck
27th February 2006, 15:05
There's certainly a lot of comparison-work looming ahead in the 'extreme compression' department... :) Myself, I rarely use strong compression and mainly reached good results with Javor's 1CD matrix, but Soulhunter's comparisons indicate that Sharktooth's ULR matrix might have an edge. You use the HVS-better matrix?

You might aim for bitrates well below what Sharktooth's ULR is meant for (no lower than 700 kbps on DVD-resolution, I seem to recall), so indeed that might mean either an 'ultra-low-bitrate' profile or perhaps a replacement of the 'fast, extreme compression' profile. I'd prefer the latter in order to keep the number of profiles down. For the time being, can you please list your settings in detail?

laserfan
27th February 2006, 15:25
@shpitz...Sports is generally highly-compressed MPEG-2, DVD-content is lightly-compressed MPEG-2. So you also need to use strong compression in MPEG-4 (XviD) to get reasonable filesaving when transcoding sports while you need only lenient compression for transcoding a DVD, in order to retain its original quality. You not needing to worry about the 'whys' is what presets should be there for. :)It's likely you already understood this Teegedeck, but I just wanted to note that shpitz's NBA game source is prolly 15Mbps, perhaps still "highly-compressed" but certainly very different from DVD.

Maybe everyone here is comfortable that we have lots of HDTV source to work with these days, along with that "ancient technology" DVD stuff. ;)

p.s. Many thanks for this informative thread!!!

Teegedeck
27th February 2006, 15:33
I forgot: We should probably have some curve-compression (formerly evil word). How about

fast, extreme compression: 30,15
good quality, extreme compression: 30,15
good quality: 20,7
high quality: 15,5
very high quality: 10,3
insane quality: none
near lossless: none
anime: 15,5
?

Just guesses. :)

CruNcher
27th February 2006, 15:51
sure and not allways i often test also with ranges of 1 mbit and i find the HVS matrixes scale well from mid to high bitrate ultra low bitrate that i do @ the moment arround 250 kbps it becomes a ringing party :P


1Pass = Q3
Matrix = HVS Better
RC = Foxer cch=50/ccl=50/os=10 B-vops 2/off=100/ratio=150
Advanced Settings = MS=6 VHQ=2 BVHQ=1 ChromaMe=1 Turbo=1 Trellis=1

Good = AQ
Better = AQ + Qpel

Teegedeck
27th February 2006, 16:10
Sounds quite different from what is laid out for 'fast, extreme compression'. It's not compatible and we'd just have to perform a big blind-test to sort it out i.e. see what's better. We can do that later on.

For the time being, perhaps a dedicated 'ultra-strong compression/Pocket-PC' preset then? I'm not quite sure whether Koepi would/could include Foxer's two-pass code, though.

Dams
27th February 2006, 17:30
Teegedeck : excuse me if I don't understand what is the goal of this thread, but why have you choosed only "one pass" and not "two pass" for some of your profiles (best quality) ?

Teegedeck
27th February 2006, 18:08
Sharktooth's EHR matrix is meant for 1-pass constant-quantizer encodes only. It is more like huffyuv and doesn't make sense to use in two-pass. Or did you mistake '1st pass' for '1-pass'?

The goal of this thread is to start a process that should eventually arrive at presets which deliver the full quality that XviD is capable of to any user without the need to acquire any technical insights into XviD. Something like a (much) more humble equivalent to the LAME presets.

And it would be nice to get it started before XviD AVC arrives and takes up a lot of our attention.

mod
27th February 2006, 18:21
it would be nice to get it started before XviD AVC arrives and takes up a lot of our attention.
Yes, it would.. ;)

Dams
27th February 2006, 21:09
Sharktooth's EHR matrix is meant for 1-pass constant-quantizer encodes only. It is more like huffyuv and doesn't make sense to use in two-pass. Or did you mistake '1st pass' for '1-pass'?

The goal of this thread is to start a process that should eventually arrive at presets which deliver the full quality that XviD is capable of to any user without the need to acquire any technical insights into XviD. Something like a (much) more humble equivalent to the LAME presets.

And it would be nice to get it started before XviD AVC arrives and takes up a lot of our attention.

Ok , all is clear now.
But one more question : is "Sharktooth's EHR matrix" is compatible with home divx player ?
I was thinking that only default matrix are only compatible with home divx player, and so, your process could only work with people who read their video on computer ?

Teegedeck
27th February 2006, 21:11
Dunno - depends on your chipset what matrices are compatible with your player. Anyway, XviD's hardware profiles are there to ensure compatibility.

I don't think you want to use EHR vor archiving - it is there for EDITING video because one hour at full resolution means several gigabyte of data.

Teegedeck
1st March 2006, 16:04
I guess that it could be a good idea to re-introduce quantizer-restrictions with presets. That way users would perhaps realize that they could've used a higher-quality preset when they get an undersized 2nd pass, or that they should use a lower-quality preset when they get oversizing.

Undersizing --> 'Use a higher preset!'
Oversizing --> 'Use a lower preset!'

i- & p-frame quantizer(b-frame quantizer):
'fast, extreme compression' (EQM ULR) --> min. 3(4)
'good quality, extreme compression' (EQM ULR) --> min. 3(4)
'good quality, strong compression' (H.263) --> min. 3(4), max. 6(10) (SixOfNine @quant=3 looks better than H.263 @quant=2 and has about the same filesize)
'high quality, medium compression' (SixOfNine) --> min. 2(3), max. 6(10)
'very high quality, medium compression' (SixOfNine) --> min. 2(3), max. 6(10)
insane quality, low compression' --> (EQM UHR) min. 3(4), max. 7(11)
'for editing' (EQM EHR) --> perhaps a forced constant quantizer =2?
'anime' (H.263) --> min. 2(3), max. 6(10)

What do you think? Crap? Or rather fetching?

shon3i
1st March 2006, 16:10
'very high quality, medium compression' (SixOfNine) --> min. 2, max. 7Will be riskly for p frames. Maybe incrase like min2, max8 and for bframes i always put min1 and max2 beacose then b frames only use min 3 and max5, for i frames always put min2 max4.Whith this setting i newer get oversize.

One more question did sixofnine is good for 1cd commpresion bitrate 600-900kbs.

Teegedeck
1st March 2006, 16:20
Will be riskly for p frames. Maybe incrase like min2, max8 and for bframes i always put min1 and max2 beacose then b frames only use min 3 and max5, for i frames always put min2 max4.Whith this setting i newer get oversize.What? Min. 1, max2?!?! Never ever do that! You could as well do a constant quantizer encode or use huffyuv! Did you know that you can restrict b-frame quantizers separately from p-frame quantizers?
Don't restrict quantizers so tightly, rather use different matrices that fit your quality-targets, like in these presets.
One more question did sixofnine is good for 1cd commpresion bitrate 600-900kbs.Oh no, no, no, no, no, absolutely not!!!

To illustrate again what these presets are meant for; these would be my general recommendations for use at full DVD-resolution, no resizing:
'fast, extreme compression' 1 to 2 CD-R encoding
'good quality, extreme compression' 1 to 2 CD-R encoding
'good quality, strong compression' 2 to 3 CD-R encoding
'high quality, medium compression' 3 CD-R or 1/2 DVD-R encoding
'very high quality, medium compression' 3 CD-R or 1/2 DVD-R encoding
insane quality, low compression' --> 1/2 to full DVD-R encoding
'for editing' indredibly huge...
'anime' (H.263) -->1 to 3 CD encoding

I'm beginning to fear that we must perhaps rename the presets to reflect filesize recommendations.

shon3i
1st March 2006, 16:38
@Teegedeck thanx for explanation but i am not sure about this b frame settings. When i restrict to min1 max2 overall picture quality looks better and sharper. That is my notice. Can you suggest me some matrix for 1cd rips bitrate depend on film but never under 550 and never above 1000kbs. I using Jawor CD1 but sometimes h263. Did you have some else good for this range in bitrate.

Teegedeck
1st March 2006, 16:42
Javor's 1-CD matrix is a very good choice. If you read the post that you replied to, again, you'll notice that it mentions Sharktooth's EQM v3 ULR as a matrix for 1- to 2-CD-encoding. You should give that one a try.

shon3i
1st March 2006, 16:46
Javor's 1-CD matrix is a very good choice. If you read the post that you replied to, again, you'll notice that it mentions Sharktooth's EQM v3 ULR as a matrix for 1- to 2-CD-encoding. You should give that one a try.
Thanx a lot.

shpitz
1st March 2006, 16:58
teege, since you're an encoding god, will be so kind to write a technical documents that addresses matrices, quantizers, and all that technical stuff.

i've done a ton of encodings throughout the years, but i've never went down to the nitty-gritty of the process.

i would love to learn what each term actually means, ie, i know what a b-frame is (contains info from before and after frame), but i have no idea when a b-frame is beneficial and when it is not.

i'm kind of a perfectionist and would like to reach max quality in minimum amout of bytes (which i'm sure we all are), and i feel that i'm not really achieving it in a personal level.

another thing that i stuggle with is how to compare results, sometimes i do like 40 encodes of the same clip with different xvid settings and different matrices, but it is very hard for me to find any difference visually after watching the same clip over and over.

and many times i do an encode with let's say using EQM that is meant for low-bitrate, but the result ends up looking like crap compared to the same encode with same script with same xvid settings with the same resulting filesize but with a different matrix.

so it looks to me that a matrix goes well with certain xvid settings, seems to me they are only working well when they are 'packaged' together.

i know this is asking a lot, but could you maybe give me some links for reading material, i would really like to know much more than i know right now...

thanks in advance

Teegedeck
1st March 2006, 18:05
The idea behind making presets is to simplify encoding - at least the non-AviSynth side of it. They should enable users to set up XviD just fine, without bothering about how it works. I myself am not an expert who tweaks each and every XviD setting anew for every source, I am not distinguishing enough to think it necessary.

Most problems come up in setting up a good AviSynth script... As a general rule, it should better be short, throw out everything that's not strictly necessary.

stevewu
1st March 2006, 18:07
Not sure is this the thread where I should put my idea?
If not, please help me move to the right place.
Hi, I am read something about Hexagonal Search and tested the hexagonal search provided by X264. Now I am very interested in put hexagonal search into Xvid( two basic functions has been done). One is simple hexagonal search; another is hexagonal search with inner group refine.
I am trying to put Uneven-cross Multi-Hexagon-grid Search implemented in X264 as X264_ME_UMH.
Here is the question: 1, I have not found out is there any place in Xvid using SAD early termination?
2, Can anybody tell me where I can find it or I have to do the work?
3, I was confused by reading X264_ME_UMH provided by Xvid. They have different classes. Where or who I can approach for the references algorithm document?
Still new to Xvid, but getting interested. So please be kind.
Thanks.

Teegedeck
1st March 2006, 20:12
Not sure is this the thread where I should put my idea?
If not, please help me move to the right place.
[...]Where or who I can approach for the references algorithm document?
Still new to Xvid, but getting interested. So please be kind.
Thanks.No idea, ask on the XviD mailinglist if sysKin doesn't accidentally spot your post and answer it.

Teegedeck
2nd March 2006, 14:07
Moved some off-topic posts: http://forum.doom9.org/showthread.php?t=108079

stevewu
2nd March 2006, 16:37
No idea, ask on the XviD mailinglist if sysKin doesn't accidentally spot your post and answer it.
thanks for advice, I will do that.
I tried your advice on quantizer number, which is very valuable. But when I doing single-pass coding, I noticed, actual quantizer may be bigger than -q max, which is the same problem as bitrate will be bigger than maxrate. I doubt even you give -q max in profile, it is not real -q max machine will stick on.

Teegedeck
2nd March 2006, 23:03
Quantizer-restrictions only work for the 2nd pass of two-pass.

Didée
4th March 2006, 01:58
Quantizer-restrictions only work for the 2nd pass of two-pass.
... and for single pass encoding, they work just as well. :)

Only exception: In single pass, there's no seperate restriction for I-frames. Instead, I-frames use the same restriction as given for the P-frames.
Also note that, in any encoding mode, the restriction given for B-frames is not the "real" maximum quantizer. This value is to be seen in relation to the base quantizer. So, with default B-frame settings 1.50/1.0 (ratio/offset), if you specify a max.quant of "4" for B-frames, they will actually be capped at 4*1.5+1.0 => quant 7.

Teegedeck
4th March 2006, 09:19
Hey, that's real arcane wisdom, thank you!

Although, when i-frame restrictions don't restrict i-frames and b-frame restrictions don't restrict b-frames to the quantizer entered as restriction, I gotta say that stevewu is right. That's not 'properly working' by my standards. ;) OK, gonna adjust the b-frame restrictions accordingly. Thanks again for the info.

Teegedeck
4th March 2006, 10:54
OK, for now EQM v3 LR seems to subjectively (i.e. to my eyes) look better than H.263 and Soulhunter's v6 in the compression ranges of 25-30% at least. This must be subject to more in-depth testing. I dread this part.

Once you start it, there's no end to comparing.

Sharktooth
4th March 2006, 11:57
eh... :)

Teegedeck
4th March 2006, 13:15
Time to remind myself (and everyone interested) that all this is essentially just playing around... :) What I collect here might or might not someday be integrated into XviD. That's up to the devs. And if Koepi might feel at some point like making a build with presets he might or might no use the suggestions from here or modify them.

Should sysKin announce that he has come up with a way to make cross-platform presets and calls for suggestions, then it will get interesting, no doubt.

Caroliano
4th March 2006, 22:51
It's a good iniciative. I would add also an checkbox for "ensure compatibility with Standalones".

I know that it is in profiles dropdown, but it is with an "strange" name and isn't visible at all. As this tread is to help newbies with Xvid setings, I think that this can help too.

CruNcher
5th March 2006, 02:36
"ensure compatibility with Standalones"

that wont work some devices support b-vops some do not SP (first generation SOC's) and ASP (second generation SOC's) how do you wan't to manage that ? and then theres the problem of packed bitstream better is to leave it allways off for any Standalone and Qpel and custom matrices another thing you can't generalize not if you don't wan't to go into compromises on Quality for second generation Chips like the MT1389 series.

Caroliano
5th March 2006, 03:17
Then "ensure compatibility with Divx Certified Standalones".

raeltheimperialaerosolkid
6th March 2006, 14:21
Then "ensure compatibility with Divx Certified Standalones".

This wouldn't be so difficult in terms of features...
The only ones that REALLY create problems are Qpel, Packed bitstream and GMC.
In terms of settings, things could be more compllicated... i.e. SAP have problems with higher resolutions (over 800pixels) and very high bitrate (over 5-6Mbps).
Anyway this could be a way to go. The SAP users are becoming a very big legion...:D

Teegedeck
6th March 2006, 14:34
Again, what do you think the profile dropdown-menu is there for? Right. Hardware-considerations will have no place in presets, their place is the profiles. If the hardware profiles work as they should, they will mercilessly deactivate any feature that isn't profile-compliant. Be it part of the 'preset' or not.

By the way, in course of the weekend I tested with two chapters from LOTR3 (one high-action, one mixed) and a chapter from The Mummy (mixed), producing about 70 clips. Seems to work out like expected. The transition points (forced through capped quantizers) from extreme compression --> high compression --> (V)HQ compression seem quite well-balanced already. Not too narrow space in between the points and the points at quite the right...point. Only that I meditate about giving the recommendations on what preset to use based upon compressibility instead of original VOB-size. Would have the drawback that users who have no clue how to do a compressibility test manually would be lost. Humm.

Also I realized that when XviD hits the capped upper quantizer of a profile in order to prevent quality from going bad (that's wanted behaviour because the presets are quality-presets) the b-frames are scaled surprisingly mildly. (Like, when p-frames are capped at 6, b-frames are scaled to 8. Shouldn't they scale 1.62 x 6 =~10?). I don't know why. (Curve compression?) Maybe I'll try capping b-frames at p-frame quant + 1.

Caroliano
6th March 2006, 19:01
Again, what do you think the profile dropdown-menu is there for? Right. Hardware-considerations will have no place in presets, their place is the profiles. If the hardware profiles work as they should, they will mercilessly deactivate any feature that isn't profile-compliant. Be it part of the 'preset' or not.
I think that the profile drop-down is too hiden, and the divx profiles could be moved to somewere close to the presets, not to be part of the presets. Simple that.

Teegedeck
6th March 2006, 19:23
Too hidden? Well, it's at the very top of the main window; couldn't be less hidden than that IMHO. :)

http://img118.imageshack.us/img118/581/mainwindow5vb.th.png (http://img118.imageshack.us/my.php?image=mainwindow5vb.png)

Caroliano
6th March 2006, 21:18
It is in an rarely used/explained drop down menu, without any indication that going there you can have a Xvid encode compatible with your divx certified DVD. I don't think that it is newbie friendly, IMHO.

foxyshadis
6th March 2006, 21:28
You could call it "Hardware Profile".

Teegedeck
6th March 2006, 21:36
Anyway, there were far more radical proposals (http://forum.doom9.org/showthread.php?p=529757#post529757) for meaningful changes to the GUI (many of them from yours truely :)) but the problem with them is that no-one really cares to invest the time and re-create the XviD GUI. At the moment I, too, would have exciting and wonderful suggestions on how to improve the GUI even more -- but I think you already guessed it: If you want to write a new XviD GUI, please do!

Baseline is, there's not much sense in voicing such wishes in this thread, I'm afraid!

Edit: If you want I can append your posts here to the old thread mentioned above and thus revive it.