Rate control

During the encoding process you have the option of encoding your renditions with a constant bitrate (CBR) or variable bitrate (VBR). Variable bitrate can produce higher quality because it allows the encoder to use varying amounts of data to represent different sections of the video (a complex scene of action would have more data than a simple scene of a talking head). Unfortunately, due to the limitations of bandwidth and CPU across different clients, VBR might cause playback problems if the data rate suddenly jumps to a rate with which the client can not keep up.

Because of this, it is recommended to use CBR as it maintains a steady stream of data regardless of the complexity of the video in any given frame. This ensures client playback is uninterrupted. Advanced users should consider using VBR if their encoder allows them to cap the data rate used by the encoder to 1.5 times the desired bitrate. This allows some flexibility and should prevent massive jumps that could interrupt playback.

Regardless of the method used it is highly recommended to use two-pass encoding whenever possible. Two-pass encoding performs an analysis step before the actual encoding step, which allows the encoder to effectively distribute data rates and align keyframes.

While it will take longer than one-pass encoding, the improvement is well worth the time. In some situations, two-pass encoding can improve visual quality by as much as 30% when using VBR. If encoding time is a concern, a faster first pass can be achieved by keeping sub-pixel estimation complexity to a lower value such as 1 or 2, and the number of reference frames to 1.

The second pass should be slower by setting sub-pixel estimation complexity to 6 and the number of reference frames to 5.