| CPC H04N 19/50 (2014.11) [H04N 19/105 (2014.11); H04N 19/114 (2014.11); H04N 19/136 (2014.11); H04N 19/164 (2014.11); H04N 19/172 (2014.11); H04N 19/177 (2014.11)] | 18 Claims |

|
1. A video encoding method, performed by an electronic device, comprising:
encoding a first picture frame in a video clip as a video key frame; and
encoding a plurality of picture frames after the first picture frame according to an encoding order, including, for a current picture frame of the plurality of picture frames, performing one of following operations:
in response to determining that a network status of a receiving end of the video clip satisfies transmitting and receiving conditions, encoding the current picture frame based on a corresponding frame type of the current picture frame in a first encoding structure, the first encoding structure at least including M1 bidirectional predicted frames and one forward predicted frame in accordance with a first set order, and M1 being an integer and satisfying M1>0; or
in response to determining that the network status does not satisfy the transmitting and receiving conditions, encoding the current picture frame based on a corresponding frame type of the current picture frame in a second encoding structure, the second encoding structure at least including M2 bidirectional predicted frames and one forward predicted frame in accordance with a second set order, and M2 being an integer and satisfying M2≥0 and M2<M1,
wherein:
in response to M2 equaling 0, encoding the current picture frame based on the corresponding frame type of the current picture frame in the second encoding structure includes:
determining that the frame type is a forward predicted frame, and encoding the current picture frame based on a previous reference picture frame determined from picture frames before the current picture frame; and
in response to M2 being larger than 0, encoding the current picture frame based on the corresponding frame type of the current picture frame in the second encoding structure includes:
in response to determining that the frame type is a bidirectional predicted frame, encoding the current picture frame based on:
the previous reference picture frame determined from the encoded picture frames presented before the current picture frame, and
a subsequent reference picture frame determined from encoded picture frames presented after the current picture frame; or
in response to determining that the frame type is a forward predicted frame, encoding the current picture frame based on the previous reference picture frame determined from the picture frames before the current picture frame.
|