View Full Version : Question about b-frames in fixed quant zones
Prettz
16th June 2004, 03:21
So I created some quant 2 zones in my encode, but the 2nd pass log says that the b-frames in that frame range are all quant 3. My b-frame settings were 2/1.40/0.70.
Is this how it is supposed to work? I was hoping to get all p-frames, or at worst get a few quant 2 b-frames here and there.
malkion
16th June 2004, 03:54
If you need all p-frames, uncheck b-vops settings completely. Once u check it you'll get b-frames. I average around 40% b-frames using 1 bframe, 60% with 2 b-frames. If u want less then those percentages, I've heard you can set b-frame sensitivity to a negative number, but I dont know the formula, or range you can use. I'm curious to that, myself.
As for your b-frame quantization, it's p-frame quant * b-frame ratio + b-frame offset. Your example would be 2 * 1.4 + .7 or 2.8 + .7 = 3.5, however, I dont know if it rounds from 2.8 to 3 or if it rounds 3.5 to 3 or 4. I use simple formulas (1, 1.00, 1.00, etc) or just use the defaults. Hope this helps.
Best wishes.
Prettz
16th June 2004, 04:22
Originally posted by malkion
If you need all p-frames, uncheck b-vops settings completely. Once u check it you'll get b-frames. I average around 40% b-frames using 1 bframe, 60% with 2 b-frames. If u want less then those percentages, I've heard you can set b-frame sensitivity to a negative number, but I dont know the formula, or range you can use. I'm curious to that, myself.
As for your b-frame quantization, it's p-frame quant * b-frame ratio + b-frame offset. Your example would be 2 * 1.4 + .7 or 2.8 + .7 = 3.5, however, I dont know if it rounds from 2.8 to 3 or if it rounds 3.5 to 3 or 4. I use simple formulas (1, 1.00, 1.00, etc) or just use the defaults. Hope this helps.
Best wishes.
Eh, you haven't told me anything I didn't already know. I thought that the quant zone overrode even the b-frame quant formula (a logical assumption). And since a quant 2 b-frame will possibly be larger than a quant 2 p-frame (due to b-frames having to reference frames that are farther away and hence more different, and VHQ4 being used on p-frames and not b-frames), the codec would choose more p-frames over b-frames.
Since the quant zone doesn't seem to force b-frame quants, I'll just have to set the b-frame sensitivity to -3 or something, since I'm trying to get these scenes with no quant 3 frames, whether they're b-frames or not.
malkion
16th June 2004, 05:45
If I'm correct, at this time you can only try to limit the number of actual b-frames in your zones. Your b-frame quant will always be what you set in the Profile @ Level, if you want Q2 B's, then you might as well set 2/1.00/0.00. The minimum suggested value of -35 for b-vop sensitivity may or may not completely eliminate b-frames from a zone. This is found in the unoffical FAQs. According to your question, I was just restating the obvious, as sometimes I may have a knack for this.
Is this how it is supposed to work? I was hoping to get all p-frames, or at worst get a few quant 2 b-frames here and there.
Regardless, best wishes.
RadicalEd
16th June 2004, 06:37
The b quant ratio and offset are always applied, even in CQ mode.
lordadmira
16th June 2004, 07:45
What are u trying to do? Ur question doesn't really make sense to me. Do u want a zone that has no B frames and the rest of the video has normal numbers of B frames?
Prettz
16th June 2004, 08:15
Originally posted by lordadmira
What are u trying to do? Ur question doesn't really make sense to me. Do u want a zone that has no B frames and the rest of the video has normal numbers of B frames?
Well now that I've confirmed that there wasn't any problem going on, just xvid behaving as it's supposed to, my problem isn't that important. Basically I didn't care if there were b-frames or not, I just wanted every frame at quant 2, because at quant 3 there are artifacts (by next morning, assuming I used the right settings this time, I should find out just how much difference there is when there are no quant 3 frames).
Didée
16th June 2004, 08:24
All quantizer restrictions always refer to P-frames only (and I-frames for 2nd-pass). Even if you specify a B-frame max. quant of quant = 5, then this refers to the B-frame *before* the formula is applied. So, with default settings, B-frame max. quant = 5 will restrict the B's to a maximum of (q5 * 1.5 + 1.0) = q8 .
For fixed quant zones, the same applies. It is just the "underlying" P-frame-quant within the B-frame-formula, that gets restricted.
- Didée
Prettz
16th June 2004, 23:59
Originally posted by Didée
All quantizer restrictions always refer to P-frames only (and I-frames for 2nd-pass). Even if you specify a B-frame max. quant of quant = 5, then this refers to the B-frame *before* the formula is applied. So, with default settings, B-frame max. quant = 5 will restrict the B's to a maximum of (q5 * 1.5 + 1.0) = q8 .
For fixed quant zones, the same applies. It is just the "underlying" P-frame-quant within the B-frame-formula, that gets restricted.
- Didée
See, normally this wouldn't have been so frustrating to me, but as it was, I was already getting my whole video clip all quant 2 p-frames and all quant 3 b-frames (on top of that, it was also still coming out 50MB undersized). So adding in these zones didn't affect anything; I couldn't even force xvid to waste bitrate :)
All quant 2 p-frames I would guess is probably better for the bitrate than a mix with quant 2 b-frames anyway.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.