Patent ID: 7170938

Claim:
A method of controlling the rate of an MPEG video stream to achieve a target bit rate, said method comprising the steps of: computing a rate reduction factor, wherein computing the rate reduction factor includes i) setting said rate reduction factor to and a rate increase variable to 0, ii) adding the size of a current frame in a frame buffer to a total size variable, iii) adding the duration of the current frame to a total delays variable, iv) calculating a current value of the number of bits in a vbv buffer, v) if the current value of the number of bits in the vbv buffer is less than the lower threshold, increasing said rate reduction factor, vi) if the current value of the number of bits in the vbv buffer is greater than the upper threshold, increasing said rate increase variable, and vii) repeating steps ii) to vi) for a plurality of frames in a said frame buffer; b) computing a quantizer scale; c) applying the results of steps a) and b) to the encoder to achieve said target bit rate; and d) repeating steps a) to c) for a plurality of frames in said video stream.