This is a small guide to understand the terms used for video encoding types.
This methods does two passes over the entire video. The 1st pass examines the entire video. It makes a complex analysis of each frame and each scene, and decides which parts of the video need more bitrate and which ones need less. During the second pass the video is actually encoded using the information found in the previous pass.
Why are two passes needed? Because the codec cannot see in the future. So it cannot know how much bits to give to the current images.
Let's assume that Quantizer*Encoded size is more or less constant. If you do the 1st pass encoding with quantizer=2, you will get a size S. Now, you know the wanted final size (F) that should be less than S, else you just wasted your time.(nbsp)
The average quantizer is then Q=(2*S)/F. It is then tuned all along to give more bits to scenes where it will make a big difference, and less to the scenes where giving bits will not increase the quality noticably.
So, using two-pass mode will give you:
A method for quick re-encoding a file that will encode each frame with the same quantizer as the quantizer the input frame was encoded with. The output could be a file with bitrate/filesize similar to the original one. This may be useful e.g. for re-encoding MPEG-4 video without codec options such as QPel, which some hardware players do not support (note that by re-encoding, you always lose quality, unless the target format is lossless). This method will extract the 1-pass analysis information already stored in the video frames and reuse it, effectively avoiding a whole pass and saving time.
This encodes the video one time, using a limited video bitrate range on all scenes, regardless of whether or not they need less, equal or more bitrate. Note that this is not constant bitrate encoding.
Also known as constant quantizer or constant quality mode. By selecting a number, each frame will get the same level of compression based on the chosen level. Good for quick and simple compression, at the sacrifice of possibly not achieving the large or small size of video desired. Low levels equal less compression, and therefore result in higher video quality. High levels equal more compression, and therefore result in lower video quality. This is very useful for quickly compressing something based on a simple value system.