For better video qualities, the video encoders usually adopt the process of Rate Distortion Optimization (RDO) that involves the the cost function with the Lagrange multiplier to weight the ratio between rates and distortions. However, the quantization parameter (QP) is decided before the encoding process, which is often not the best one. In this work, we propose a two-pass rate control (RC) mechanism based on the fixed Lagrange multiplier λ. An accurate λ value is estimated after the first pass coding, so that it can be adopted as a fixed parameter in the second pass. Simulation results show that, compared to the RC method implemented in H.264 reference software, the proposed method could significantly improve the visual quality.