Motion estimation (ME) is an essential part of digital video compression. However, in H.264, it leads to high computational complexity, which can significantly affect the peak signal-to-noise ratio (PSNR), ME time and bit rate. To improve the coding efficiency of inter-prediction, many fast motion estimation algorithms have been proposed. Based on the research of the characters of educational videos and fast motion estimation (FME) algorithms, this paper proposes a motion estimation algorithm to optimize this process. The experiment results show that compared with the algorithms adopted by JM reference software, the proposed algorithm costs less ME time and achieves better PSNR with little change in bit rate, especially in the field of educational video compression.