The H.264 video encoding standard can achieve high coding efficiency at the expense of high computational complexity. Typically, real-time software implementation requires omission of most optional encoding tools leading to significantly reduced coding efficiency. This paper proposes a novel method for real-time H.264 encoding based on dynamic control of the encoding parameters to meet real-time constraints while minimizing coding efficiency loss. Experimental results show that the method provides up to 19% lower bit rate than conventional real-time encoding using fixed parameters with the same visual quality. The method allows real-time 30fps QCIF encoding on a Pentium IV with similar coding efficiency to full search baseline profile encoding.