The invention provides a video coding method and device,
electronic equipment, a storage medium, a program product and a method for generating a bit
stream. The video coding method comprises the following steps: determining a
rate distortion model of each image group in a
video sequence; based on the
rate distortion model of each image group, adjusting
code rate distribution of each image group to obtain a target
code rate of each image group; coding the corresponding image group according to the target
code rate of each image group; the first step comprises the steps of coding the image group according to a first code
rate control parameter value to obtain a first code rate and first
distortion; according to the second code
rate control parameter value, coding the basic
time domain layer in the image group to obtain a basic code rate and basic
distortion; obtaining a second code rate and second
distortion according to the first code rate, the basic code rate, the first distortion and the basic distortion; and determining a
rate distortion model of the image group according to the first code rate, the first distortion, the second code rate and the second distortion. The method can improve the code
rate control efficiency.