The invention discloses an intra-frame prediction method, a video coding method, computer equipment and a storage device. The intra-frame prediction method comprises the steps of obtaining a search template of a current block; searching a reference pixel area by adopting a search template, wherein the reference pixel area is an encoded pixel area in the current frame; respectively obtaining the matching degrees of the search template and the blocks covered by the search template in the reference pixel area; determining a minimum value in the matching degree to obtain an image block corresponding to the minimum value as an optimal matching block of the current block; and if the rate distortion cost corresponding to the optimal matching block is minimum, enabling the block matching mode corresponding to the optimal matching block to be the optimal prediction mode. By adopting the search template to search the reference pixel region, the intra-frame prediction method provided by the invention can obtain the optimal matching block by combining the image content, the brightness and the chrominance signal of the current block, so that the bit overhead of subsequent residual coding is relatively low, the compression rate of intra-frame coding is improved, and the spatial redundancy can be further removed.