Log in

View Full Version : Tell me if I understand the quantizer correctly


plokm
9th February 2007, 00:43
Tell me if this is right:
A quantizer (e.g. 4.0) will give a consistant quality, but a target bitrate will give consistant file size (given equal length video).

Also, if the above is right, is the quality averaged over the whole file, or is it a determined on each frame?

HeadBangeR77
9th February 2007, 01:24
Tell me if this is right:
A quantizer (e.g. 4.0) will give a consistant quality, but a target bitrate will give consistant file size (given equal length video).

Also, if the above is right, is the quality averaged over the whole file, or is it a determined on each frame?

Quantizers in two-pass mode (target bitrate*/target filesize) are determined on per-frame basis, however taking some other things into consideration like:
- statistics from the first pass,
- target filesize within certain limits,
- curve compression (manually set) etc.

So, to put it simple (if not simplistic): decisions are made on per-frame basis, but the overall quality is averaged throughout the movie at the same time, in order to reach the given bitrate/filesize.

Hope that's clear, more or less. ;)

* Target bitrate in one-pass mode is possible, but is a mistake imo.

plokm
9th February 2007, 01:36
So if I want consistant quality across multiple files, and don't really care what the filesize for each video is, should I use a target bitrate or a target quantizer (using 2-pass encoding)?

HeadBangeR77
9th February 2007, 02:49
If you don't care about the final filesize, then you should actually use 1-pass constant quantizer mode. The resulting filesize is really inpredictable then, since decisions are made per-frame, to keep constant quality, so it depends on movie's compressability (low motion, high motion, bright scenes, dark scenes, amount of details, source's sharpness and so on).

In 2-pass encoding you determine the final size (or bitrate, in XviD it's usually size, in x264 it's bitrate) and the quantizer changes, and with it the quality also. That's why I wrote:
So, to put it simple (if not simplistic): decisions are made on per-frame basis, but the overall quality is averaged throughout the movie at the same time, in order to reach the given bitrate/filesize.
Providing the codec is clever enough, and you don't set any absurd target filesize (like 1CD for The Two Towers ;)), you shouldn't get jumps in quality, 'cause the differences won't be noticeable while watching.

plokm
9th February 2007, 02:57
Thanks, I have way to much spare time, and I'm willing to encode a TV season multiple times to make it fill a certain amount of space with a constant quality in all episodes. :D Plus I just like doing things the hard way.