Search

CN-122027824-A - Video coding method, device, equipment, medium and program product

CN122027824ACN 122027824 ACN122027824 ACN 122027824ACN-122027824-A

Abstract

A video encoding method, apparatus, device, medium, and program product are provided in one scenario. The method comprises the steps of obtaining an original video, wherein the original video comprises a plurality of video segments, determining a plurality of coding parameters and a code rate, wherein the original video represents a video to be coded, the plurality of coding parameters are used for coding operation of the video segments, the code rate is related to the coding parameters, determining a plurality of coding segments based on the plurality of coding parameters, wherein the plurality of coding segments represent a plurality of coding results of the video segments related to the plurality of coding parameters, obtaining a plurality of first coding segments based on first indexes and the code rate of the plurality of coding segments, wherein the first indexes are related to visual quality of the coding segments, and splicing the plurality of first coding segments to obtain a video code stream of the original video. On the premise of meeting the requirement of the expected code rate, the visual quality of the video code stream is optimized, and the dual requirements of extreme compression and high image quality are met.

Inventors

  • JIE HONGEN
  • LI MENGMENG
  • LIU JIANZHAO
  • LIU YING
  • Gan Wenyao
  • WU YUXING
  • WANG JICHENG

Assignees

  • 北京字跳网络技术有限公司

Dates

Publication Date
20260512
Application Date
20260310

Claims (12)

  1. 1. A video encoding method, comprising: Acquiring an original video, wherein the original video comprises a plurality of video clips, and the original video represents a video to be encoded; determining a plurality of coding parameters and a code rate, wherein the plurality of coding parameters are used for the coding operation of the video segment, and the code rate is associated with the coding parameters; Determining a plurality of encoded segments based on the plurality of encoding parameters, wherein the plurality of encoded segments characterize a plurality of encoding results of the video segment associated with the plurality of encoding parameters; Obtaining a plurality of first coding segments based on a first index of the plurality of coding segments and the code rate, wherein the first index is associated with visual quality of the coding segments; And splicing the plurality of first coding segments to obtain a video code stream of the original video.
  2. 2. The method of claim 1, the obtaining a plurality of first encoded segments based on the first index of the plurality of encoded segments and the code rate, comprising: Selecting a plurality of first coding parameters from the plurality of coding parameters based on the code rate and the first index, wherein a video code stream associated with the plurality of first coding parameters accords with a coding target, and the coding target is associated with a desired code rate and a desired image quality of the video code stream; a plurality of the first encoded segments is obtained based on the plurality of first encoding parameters.
  3. 3. The method of claim 2, the selecting a plurality of first coding parameters from the plurality of coding parameters based on the code rate and a first indicator, comprising: determining a defect level based on a plurality of second indexes of the coding segment, wherein the second indexes are associated with image quality defects of the coding segment, and the defect level represents a grading result of the coding segment associated with the image quality defects; Selecting a plurality of second coding parameters from the plurality of coding parameters based on the defect level; The plurality of first coding parameters is selected from the plurality of second coding parameters based on the code rate and the first indicator.
  4. 4. The method of claim 3, the selecting the plurality of first coding parameters from the plurality of second coding parameters based on the code rate and a first indicator, comprising: Determining an accumulated code rate and an accumulated index based on the code rate and the first index corresponding to the second coding parameter, wherein the accumulated code rate is related to the video code stream, and the accumulated index represents an accumulated value of the first index; the plurality of first encoding parameters are determined based on the accumulated code rate and an accumulated index.
  5. 5. The method of claim 3, the determining a defect level based on a plurality of second indicators of the encoded segments, comprising: determining a plurality of second indicators based on video features of the encoded segment using a first model, wherein the video features are associated with the image quality defect and the second indicators are associated with the encoded segment; And determining the defect grade based on the second indexes and a preset threshold value.
  6. 6. The method of claim 1, further comprising: for any coding segment, determining a plurality of image quality detection results, wherein the plurality of image quality detection results are associated with visual quality of the coding segment; and determining the first index by combining the plurality of image quality detection results.
  7. 7. The method of claim 1, the determining a plurality of coding parameters and code rates corresponding to the coding parameters, determining a plurality of coding segments based on the plurality of coding parameters, comprising: Determining a plurality of coding parameters of the video clips and code rates corresponding to the coding parameters based on expected code rates and visual characteristics of the video clips; and adopting the plurality of coding parameters to code the video segments to obtain the plurality of coding segments.
  8. 8. The method of claim 1, further comprising: and identifying video segmentation points of the original video by adopting a second model, and segmenting the original video based on the video segmentation points to obtain the plurality of video segments, wherein the video segmentation points comprise time stamps of switching video frames, and the switching video frames comprise scene switching characteristics.
  9. 9. A video encoding apparatus, comprising: the video acquisition module is used for acquiring an original video, wherein the original video comprises a plurality of video clips, and the original video represents a video to be encoded; a coding parameter determining module, configured to determine a plurality of coding parameters and a code rate, where the plurality of coding parameters are used for a coding operation of the video segment, and the code rate is associated with the coding parameters; A video encoding module for determining a plurality of encoded segments based on the plurality of encoding parameters, wherein the plurality of encoded segments characterize a plurality of encoding results of the video segment associated with the plurality of encoding parameters; A segment determining module, configured to obtain a plurality of first coding segments based on first indexes of the plurality of coding segments and the code rate, where the first indexes are associated with visual quality of the coding segments; And the segment splicing module is used for splicing the plurality of first coding segments to obtain a video code stream of the original video.
  10. 10. An electronic device, the electronic device comprising: one or more processors; storage means for storing one or more programs, The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the video coding method of any of claims 1-8.
  11. 11. A storage medium containing computer executable instructions for performing the video encoding method of any of claims 1-8 when executed by a computer processor.
  12. 12. A computer program product comprising a computer program which, when executed by a processor, implements the video encoding method of any of claims 1-8.

Description

Video coding method, device, equipment, medium and program product Technical Field The present disclosure relates to video processing technology, and more particularly, to a video encoding method, apparatus, device, medium, and program product. Background With the development of computer technology and mobile communication technology, video consumption demands have also exhibited explosive growth. More and more users view video through video platforms. Video platforms need to transcode video before distributing it to user devices. If the coding is performed with a lower code rate, image quality defects such as artifacts, color distortion blocks, mosaics and the like can occur, and if the coding is performed with a higher code rate, the condition of code rate waste can exist. How to realize the balance of lossless and extremely compressed image quality under the limited code rate resource is a core requirement of the industry. Disclosure of Invention A video encoding method, apparatus, device, medium, and program product are provided that achieve a balance of high quality image quality and extreme compression. In a first aspect, a video encoding method is provided, including: Acquiring an original video, wherein the original video comprises a plurality of video clips, and the original video represents a video to be encoded; determining a plurality of coding parameters and a code rate, wherein the plurality of coding parameters are used for the coding operation of the video segment, and the code rate is associated with the coding parameters; Determining a plurality of encoded segments based on the plurality of encoding parameters, wherein the plurality of encoded segments characterize a plurality of encoding results of the video segment associated with the plurality of encoding parameters; Obtaining a plurality of first coding segments based on a first index of the plurality of coding segments and the code rate, wherein the first index is associated with visual quality of the coding segments; And splicing the plurality of first coding segments to obtain a video code stream of the original video. In a second aspect, there is also provided a video encoding apparatus, the apparatus comprising: the video acquisition module is used for acquiring an original video, wherein the original video comprises a plurality of video clips, and the original video represents a video to be encoded; a coding parameter determining module, configured to determine a plurality of coding parameters and a code rate, where the plurality of coding parameters are used for a coding operation of the video segment, and the code rate is associated with the coding parameters; A video encoding module for determining a plurality of encoded segments based on the plurality of encoding parameters, wherein the plurality of encoded segments characterize a plurality of encoding results of the video segment associated with the plurality of encoding parameters; A segment determining module, configured to obtain a plurality of first coding segments based on first indexes of the plurality of coding segments and the code rate, where the first indexes are associated with visual quality of the coding segments; And the segment splicing module is used for splicing the plurality of first coding segments to obtain a video code stream of the original video. In a third aspect, there is also provided an electronic device, including: one or more processors; storage means for storing one or more programs, The one or more programs, when executed by the one or more processors, cause the one or more processors to implement the video encoding method. In a fourth aspect, there is also provided a storage medium containing computer executable instructions for performing the video encoding method when executed by a computer processor. In a fifth aspect, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements the video encoding method. According to the technical scheme, an original video is obtained, the original video comprises a plurality of video segments, a plurality of coding parameters of each video segment and code rates corresponding to the coding parameters are determined, the plurality of coding segments are determined based on the plurality of coding parameters, a plurality of first coding segments are obtained based on first indexes and the code rates of the plurality of coding segments, the first indexes are related to the visual quality of the coding segments, and the plurality of first coding segments are spliced to obtain the video code rates of the original video. According to the video coding method, the video coding method and the video coding system, the first coding segments are selected based on the first index and the code rate, so that the video code stream formed by splicing the first coding segments achieves the best visual quality under the expected code rate, the visual quality