Log in

View Full Version : can too many b-frames be a bad thing?


chrome
19th January 2004, 00:49
if im getting an undersized end result, can upping the number of b-frames help? ive read that you shouldn't go past 3, but im wondering if the higher you go, are there any negative effects? or am i just looking in the wrong area if i want to increase the quality/filesize.

seems odd asking if i can get help making my file BIGGER, but i dont really want to increase the vid's resolution... im allready using some filters, is there anything else thats simple, and would fill up that extra space by making the video a bit higher quality? ive also tried setting a higher target file size, in case xvid was having trouble with size predictions, but its still the same sized end result

APF_Gandalf
19th January 2004, 01:00
B-frames decrease file size.
if youf encode is undersized, just turn them off, you'll get the same or even better quality (depending of the source) than with B-frames "on" and a bigger file size.
By using the "search button", you'll find at least 1 thread about undersized video. IIRC, the use of alternate quantization matrices was another way to raise the file size too.

chrome
19th January 2004, 01:08
ok that goes against what i was told, the less b-frames you have, the lower the quality, higher the compression. but heck, thats why i came here, now i know better. cheers for the info.

Danzel
19th January 2004, 01:12
asking to make encodes bigger is becoming a common thing around here...
:search:

Increasing the amount of bframes will generally lower the file size, as the default settings is to use a higher quant (smaller size) when encoding bframes, but dont disable them as at the same quant a bframe looks better than a p frame, so to increase the file size change your bframe Quantizer ratio to be 1.00.

With Xvid1.0 there is no longer a problem of having too many b-frames in a row, except that it will require more processing power to decode the more bframes in a row, and it wont playback on a hardware player if you have more than 1 bframe.

If you are using smoothing filters you could disable them and that should give a higher filesize. Or add a Noise generating Filter, although that may give a worse end result.

Danzel.

[Edit] Woops, someones already replied while I was typing

chrome
19th January 2004, 01:16
hey thanks for all the help - ill take another crack at it tonight and see how it goes.

begu
19th January 2004, 09:46
Well, I did some tests. Using b-frame settings:
max b-frame = 3
ratio = 1
offset = 0
and b-frame 'amount' in 'zone control' set to 40 (don't remember the real name for setting)

I got nice results. So the quantizer of bframe is always the same as the quantizer of p-frame. And if I'm correct, the frame size in kb is smaller than p-frame size. And the image quality is about the same, I did not look that carefullu.

My test was average bitrate 2700 kbps and the test scene was from LOTR II with much action together with slowmotion landscape scenes. The result was amazing.

Maybe one of Xvid developers could give some info about the quantizers: when comparing the p- and b-frame with same quantizer, what is the image quality (nad filesize) between the p- and b-frame types? Could the b have better quality than p, I wonder. :)

Mug Funky
19th January 2004, 15:23
due to the way b-frames work, there shouldn't be many of them in a row. i've tried it to see what happens :|

basically a b frame can only refer to p or i-frames, meaning the more b frames, the less correlation between p frames, and the less efficient b-frames become (you can see this in virtualdub's frame size graph. the b-frames start small adjacent to p frames, but directly between 2 p frames the b-frame will be much larger, forming a "hump" shape between p-frames.

3 consecutive b-frames is pushing it, and i prefer 2.