Abstract: In order to improve the performance of the video watermark resist H.264 compression, this paper proposes a video watermarking algorithm based on Image Optical Flow(IOF). According to the optical flow rate of the points in video images, the total optical flow in the frame is calculated. The key video’s frames are selected on the basis of the dispersion of the total optical flow. And with the DCT block transform, the watermark information is embedded in those frames. Experimental results show that the algorithm can effectively antagonize the three compression modes of H.264 and ensure the robustness of the watermark and multiple requirements of the high image quality as well as the high compression ratio.