Design and operation of an encoder involves the optimization of many decisions to achieve the best possible trade-off between rate and distortion under the given constraint on delay and complexity. In this paper, a new ratecontrol algorithm is proposed by optimal bit allocation and macroblock mode selection. It is low-complexity, single-pass algorithm applicable in areas that are sensitive to delay and having very limited resources. Improvement in PSNR is obtained for video sequences with varying contents and bit rate. The algorithm does not violate the buffer constraints. © Indian Institute of Science.