| CPC H04N 19/87 (2014.11) [H04N 19/124 (2014.11); H04N 19/132 (2014.11); H04N 19/142 (2014.11); H04N 19/157 (2014.11); H04N 19/172 (2014.11); H04N 19/463 (2014.11)] | 20 Claims |

|
1. An encoding method, performed by a server, comprising:
pre-encoding a current video frame in a video stream, to obtain a pre-encoded current video frame;
when there is no I frame in M encoded video frames that have been encoded before the current video frame, determining whether the current video frame is a scene switching frame in which scene switching has occurred relative to a previous video frame, based on the pre-encoded current video frame and a pre-encoded previous video frame to the current video frame, M being a preset positive integer; and
encoding the current video frame into an I frame when the current video frame is the scene switching frame, and encoding the current video frame into a P frame when the current video frame is not the scene switching frame.
|