The quantization parameter (QP) has a very important impact on the compression rate in H.264. In this paper we show that in order to achieve efficient rate-control coding a good estimate for the initial QP parameter is necessary. An extensive altering of this value, to keep the required bitrate, results in significant fluctuation of the image quality and decreases the average quality of the whole coded sequence. We propose a simple and fast method to decide the starting value for QP for each part of the video sequence. Experimental results show stabilized image quality and significant gain in PSNR.