Log in

View Full Version : CBR or 1 pass quality


Bear
21st November 2003, 21:09
Hello all,

I just tested some movies in 2 modes (CBR or 1 pass quality). Here are my settings:

CBR
1500k
MSP:6
QT:H.263
VHQ:1
enable CM

1 pass quality:
80-90
MSP:6
QT:H.263
VHQ:1
enable CM

I encode some fast motion complicated movies. I found that CBR sometimes give me some bad results. But 1 pass quality mode give me much better quality.

I would like to ask, is 1 pass quality stands for something like "variable bitrate(vbr)"? But if I use this mode, is it mean I can't predit the filesize accurately?

Also, it seems that 1 pass quality mode usually has a smaller filesize compare with CBR.

How about 1 pass quantizer? Is the quality better than CBR or 1 pass quality mode?

Defiler
21st November 2003, 22:24
CBR Mode keeps the bitrate the same throughout the encode.
Quantizer Mode keeps the quantizer value the same throughout the encode (simplified, this is like tossing out a certain amount of detail in every frame.)
Quality Mode tries to keep the perceived quality of each frame roughly the same, throughout the encode.

Only CBR mode lets you predict the end filesize for a single-pass encode. If you want each scene to look roughly as good as any other, use Quality or Quantizer mode. In a manner of speaking, Quality and Quantizer modes are two different ways of addressing the same goal. Quality mode adjusts the quantizer value constantly in order to achieve its goals. Quantizer mode just blindly uses the same quantizer value all the time. However, this will make highly-detailed scenes look "worse" than scenes with few details. Quality mode tries to intelligently deal with that concern.

If Quality mode gives you a smaller file than CBR, that means you can move up the quality setting.

Bear
22nd November 2003, 18:01
Thanks a lot Defiler. For some reasons, I don't want to use 2 pass encoding. That's why I am asking this question. Your post is really informative. I will go with quality mode cos it really give me some good result compare with CBR.

Teegedeck
22nd November 2003, 19:58
The only difference between quantizer- and quality-mode is that in quality-mode the quantizer can go up by one and back again. Quality-mode, too, uses a fixed (or slightly fluctuating, see above) quantizer, calculated from your quantizer range.

CBR mode is not recommended because it still uses a very simplistic algo.

Defiler
24th November 2003, 00:02
You should never use CBR mode unless:
A) You need to know ahead of time exactly what the final file size will be.
AND
B) You don't have time and/or disk space to do two passes.

jonny
24th November 2003, 00:55
I would like to ask, is 1 pass quality stands for something like "variable bitrate(vbr)"? But if I use this mode, is it mean I can't predit the filesize accurately?

Usually can be predicted with a final error around 1%-3%.
Check my app (Enc).

Pen-Pen
24th November 2003, 07:37
Originally posted by Defiler
Quantizer mode just blindly uses the same quantizer value all the time. However, this will make highly-detailed scenes look "worse" than scenes with few details. Quality mode tries to intelligently deal with that concern.


it seems to me that Koepi's XViD help file says the contrary :confused:

Teegedeck
24th November 2003, 09:16
As I wrote above, there isn't much difference between quantizer- and quality-mode.

And yes, quality/quantizer-mode is something like perfect VBR.

And yes again, as these modes treat big frames and small frames evenly, while 2-pass prefers small frames, you could say that big frames 'look better' in quality/quantizer-mode. Don't confuse this with overall quality, though.

Bear
24th November 2003, 09:48
Thanks a lot. I will go with the quality mode route. I think it's easier for my current situation.

Defiler
24th November 2003, 14:21
Originally posted by Pen-Pen
it seems to me that Koepi's XViD help file says the contrary :confused: What does Koepi's help file say?

jonny
24th November 2003, 14:51
XviD faq:

13. What does the quality mode do?

The quality mode chooses an "average quantizer" for the entire video. It is similar to setting a quantizer in the "1-pass - quantizer" mode, though the quality mode lets you have a quantizer of say 4.5. In the case of 4.5, the 1st frame would be encoded with 4, the second with 5, the third with 4, the fourth with 5, etc., so that the "average" quantizer at the end of the video will be 4.5. The equation that gives you the "average quantizer" is:

((MaxQuant-MinQuant)/100 * (100-quality)) + MinQua

kastro68
24th November 2003, 15:15
Have you tried keeping the first pass of a 2-pass encode?
Just change the B-framae quantizer to adjust file size.

Defiler
24th November 2003, 21:45
That FAQ entry doesn't make any sense to me, because you can use Quality mode to, say, capture arbitrary-length files from TV. How can it know what quantizer to set for a given quality level until it actually compresses the frame and determines how compressible it is?

Teegedeck
25th November 2003, 08:14
It really isn't that complicated. Though I don't have the full formula, at hand that's used to calculate the quantizer from the percentage you enter, it's something like this: If you restrict quantizers min=2, max=16 this would mean quality=100%-->quantizer=2, quality=0%-->quantizer=16. 50% should mean something like quantizer=7. You get the general idea.

Edit: Overlooked that thanks to jonny we do have the formula at hand... Once more:
((MaxQuant-MinQuant)/100 * (100-quality)) + MinQua

jonny
25th November 2003, 14:57
Perhaps a "unified" quantizer mode, that accepts non-integer quantizers too, will be less confusing and more powerful (with the quality mode there aren't many possibilities to set accurately fractional quantizers).
*** little suggestion to XviD developers *** :)

Defiler
25th November 2003, 15:54
Oh, haha.. That's way more brute-force than I thought. Here I was ascribing all sorts of intelligence to Quality mode. =)

Bear
27th November 2003, 15:14
After go through some encodings. I found the 1 pass quality mode is really easy to use. I found the quality is just as good as 2 pass encoding and it also save a lot of time as well. May be I don't look very details, the quality is really good compare with 2 passs encoding. If size prediction is not the problem, I will go with this mode. I always set the quality mode between 90-93. So the final ouptut is very similar to the original.