Patent ID: 8396120

Claim:
A computer-implemented method for robust single-pass variable bit rate video encoding of a video sequence, the method comprising: determining a buffer size for keeping track of over/underused bits generated during the encoding of the video sequence, the buffer size being a function of at least a target bit rate for the video sequence and a length of the video sequence; initializing the buffer to a default initial fullness; for each frame of the video sequence, performing the following steps: allocating a number of bits to the frame; determining a quant with which to encode the frame, the quant being a function of at least the buffer's fullness, a base quant envelope and a base quant envelope control associated with the frame, wherein the base quant envelope and the base quant envelope control are based on the type of the frame, and the fluctuation of the base quant envelope is controlled by the base quant envelope control; encoding the frame according to the determined quant; calculating a normalized average of over/underused bits of the last N encoded frames of a frame type in a group of pictures, wherein N is a predetermined threshold number; and updating the base quant envelope for the frame type based on the normalized average of over/underused bits of the encoded frames of the frame type.