View Full Version : quality encoding
boombastic
8th January 2004, 09:08
I know that with xvid 1.0 to do a quality based ancoding i must use zones but:
1)i need gamrdev build to make zones works correctly?
2)to reach,for examples,a 60% quality how must i set them? Must i do a size prediction test before?How?
mikeX
8th January 2004, 10:12
i don't think you need gamr's build, you can use the quantizer settings in zone configuration (the 'weight' settings are the ones that don't work)
just set your desired quantizer and do a 2 pass 1st pass encoding
being that quantizers vary from 1 to 31 (although 2 is the actual minimum) i'd say a quantizer of 12-12.5 would retain about 60% of the originan video detail (--> (40/100)*31)
i could be wrong though
sysKin
8th January 2004, 11:13
To use weight zones you do need most recent build (yesterday's or newer). Just set the corresponding weights of all your zones, and the quality will be distributed the same way.
Weight of 0.0 will be changed to 0.01 to avoid some divisions by zero, and means lowest quality achivable by 2-pass rate control, which is not the same as quant 31. You won't be able to directly predict quantizers or bitrate from weights.
Let me just add that this weight control might work suprisingly well, much better than old credits option. Don't be afraid of 0.0.
Radek
boombastic
8th January 2004, 11:39
So to do a "such old builds" quality encoding at 60% i just set a zone beginning at o frame and set a o.60 weight for it,right?
sysKin
8th January 2004, 12:53
Originally posted by boombastic
So to do a "such old builds" quality encoding at 60% i just set a zone beginning at o frame and set a o.60 weight for it,right? Oh no sorry. Weight zones are relative to other weight zones, so if you set whole movie as .6 it will be the same as if you set it to 1.0. Desired size or bitrate will be respected first.
If you want old 60% quality, dig up the formula that converts it to a quantizer (I never knew the formula, it's stupid and illogical) and set your movie as a *quantizer* zone with exactly that (fractional) quant.
Then, encode as CBR.
Quantizer zones don't need horribly new build, beta 3 is fine.
Radek
mikeX
8th January 2004, 21:29
just caught this in the FAQ:
The equation that gives you the "average quantizer" is: ((MaxQuant-MinQuant)/100 * (100-quality)) + MinQuant
so i guess you would wanna set quantizer at 13,2 in the zone configuration for 60% quality (quite close to my first guess really)
boombastic
9th January 2004, 15:20
It seems a bit too low to me.MaxQuanti is 2 or 31?
mikeX
9th January 2004, 17:09
according to the VFW configuration gui ('Advanced Settings' --> 'Quantization') min quant is 2 and max quant is 31
quantizers stand for 'level of detail removal' so the smaller the quantizer the better the quality
ps the right number was 13.6 actually (0.29 * 40 + 2)
.:: edit ::.
just try putting 100% and 0% quality in the formula. it will return quantizers 2 and 31 respectively
kassandro
11th January 2004, 09:29
You cannot use "Twopass - 1st pass" for doing quality vbr with beta3. If you do so, then your quantizer settings are ignored. Xvid just uses the quantizer 2 for I- and P-frames and the quantizer 4 for B-frames. Unfortunately you must use "Single pass". As a consequence you cannot do a second pass if your quality was to high at the first pass. Also various "Single pass" options like the bitrate slider do not make sense at all for quality vbr, but the new user interface is a desaster anyway.
sysKin
11th January 2004, 10:58
Originally posted by kassandro
the new user interface is a desaster anyway. Just wanted to tell everyone that unless *anyone* with some GUI skills pops up, this inteface will stay for 1.0 and will stay for loooong time after 1.0.
We have a full, good design and not a single person who can and is able to code it :(
Radek
mikeX
11th January 2004, 11:26
You cannot use "Twopass - 1st pass" for doing quality vbr with beta3. If you do so, then your quantizer settings are ignored
that's quite wrong!
kassandro
11th January 2004, 14:26
Originally posted by mikeX
that's quite wrong!
You are right!
However, there seems to be a bug within the zones handling. First I had only one zone, starting at frame 0. Then I changed the starting frame of this first zone to, say, 1500 and added another zone starting at 0. Now xvid doesn't seem to get this second zone for the first frames and always uses quantizer 2 for I- and P-frames and quantizer 4 for B-frames. Actually these zones are the only good feature which came with the new GUI.
mikeX
11th January 2004, 15:06
if i understand correctly your configuration is this:
zone 1: start frame >0, quant x
zone 2: start frame 0, quant y
and xvid doesn't seem to understand quant y and uses it's default for first pass (quant 2) while it understands quant x after it reaches that designated frame
well that doesn't surprise me, i haven't seen any dev mentioning that specifically (i haven't looked that hard either) but i think the zones must use a pattern of this type: 'start frame @ zone 1' < 'start frame @ zone 2' < ... < 'start frame @ zone n'
kassandro
11th January 2004, 16:33
exactly!
Clearly you want to have the zone starting at 0 at the first place. But you simply can't place the second zone at the first place. This situation appears quite naturally if you have one standard zone for most of your video and want to add a new zone for the first frames which contain the title and other introductory material.
mikeX
11th January 2004, 16:55
i don't understand exactly what you mean, but this is what you can do if you have starting credits for example:
zone 1: start frame 0, quant x
zone 2: start frame 'end of start credits + 1', quant y
or generally if you want to insert a zone with different quants somewhere in your video you simply define three zones
zone 1: start frame 0, quant x
zone 2: start frame 'whatever', quant y
zone 3: start frame 'whatever's end + 1', quant x
since zone configuration doesn't support end frames as well as start frames for a zone you just have to put your zone's in the right order
kassandro
11th January 2004, 17:25
Since you cannot move zones around and they must be in the order of increasing start frames, you have to define two new zones if you just want to insert one zone at the beginning. It is getting worse if you have already defined 10 zones and want to insert one further zone at the beginning. Then you have to start from scratch again. Thus there should be either the possibility to move zones around or the requirement, that the start frames are increasing, should be dropped. I simply thought that the order of the zones can be arbitrary and that didn't work.
mikeX
11th January 2004, 17:50
ok i got it now :D
zones should become easier to manipulate and a bit more flexible but i think the devs have different priorities at the moment (that's not a bad thing though :) )
i believe sysKin answered a question about enabling an 'Ending frame' feature in zone configuration, but i can't recall where and when and i'm just too lazy to search for it right now (i think it was somewhere in the selam thread)
but you can tell from sysKin's post in this thread what's the status on the gui (although i believe setting 'Ending frame' in zones is not gui related -i'm not sure though, you 'll have to check on the post i mentioned above for that-)
Didée
11th January 2004, 19:10
Originally posted by kassandro
Since you cannot move zones around and they must be in the order of increasing start frames, you have to define two new zones if you just want to insert one zone at the beginning. It is getting worse if you have already defined 10 zones and want to insert one further zone at the beginning. Then you have to start from scratch again. Thus there should be either the possibility to move zones around or the requirement, that the start frames are increasing, should be dropped. I simply thought that the order of the zones can be arbitrary and that didn't work.
The program says "press any key" - but my keyboard doesn't have the "ANY" key!
kassandro,
even if you've set up a hundred zones, you'll only loose *one* zone if you need a new "first" zone:
1. mark the first zone
2. create a new zone
3. copy the settings from the original 1st zone to the freshly created 2nd zone
4. modify the 1st zone to your needs
Alternatively, you can buy a new keyboard, of course ;)
- Didée
kassandro
11th January 2004, 19:20
I disagree!
The "freshly created 2nd zone" is actually the "freshly created 101th" zone, because the most recent zone is always the last zone. Consequently the settings of the original first zone are now at position 101 and are (currently) ignored by xvid. Hence there is no way to avoid a new keyboard.
okay, I was wrong. If I mark the n-th zone and add a new zone, this new zone is inserted at position n+1. I didn't expect the user interface to be that smart. I couldn't realize it because in my test I actually had only one zone.
Didée
11th January 2004, 19:36
kassandro,
you did not perform step no.1 for sure ...
The new zone is put at the end only if NO ZONE IS HIGHLIGHTED.
If you HIGHLIGHT THE FIRST ZONE, then "add zone" will create the new zone as the 2nd one.
c'mon
Didée
------
edit:
I missed your simultaneous edit. Problem solved, fine!
kassandro
11th January 2004, 20:31
Originally posted by Didée
kassandro,
you did not perform step no.1 for sure ...
The new zone is put at the end only if NO ZONE IS HIGHLIGHTED.
If there is only one zone, then a new zone is inserted at the end no matter whether the first one was highlighted or not, because the second position is already last position.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.