Video Encoding Method, Apparatus, Server, and Computer-Readable Storage Medium

By obtaining the encoding preset information of the video set and dynamically planning the encoding-related parameters, the problem of lack of multi-video encoding scheme in the prior art is solved, the overall optimal encoding of the video set is realized, and the user's viewing experience is improved.

CN115209151BActive Publication Date: 2025-07-04BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210843097.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-18
Publication Date
2025-07-04
Estimated Expiration
2042-07-18

AI Technical Summary

Technical Problem

The existing video encoding technology mainly processes a single video, and lacks a coding scheme for multiple videos, which makes it impossible to achieve global optimal solutions in the video collection, affecting the user's comprehensive viewing experience.

Method used

By obtaining the encoding preset information of the video set, the encoding related parameters of each video to be encoded are determined, so that when the preset target value is reached, the quality data and values ​​of each video to be encoded in the video set will reach the optimal value, and the encoding related parameters are optimized using a dynamic programming algorithm.

Benefits of technology

The overall optimal encoding of the video collection is achieved, the user's viewing experience of the video collection is improved, the encoding quality of each video to be encoded is balanced, and the overall viewing effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115209151B_ABST
    Figure CN115209151B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a video encoding method, apparatus, server, and computer-readable storage medium. The video encoding method includes: obtaining a video set; obtaining encoding preset information of the video set; determining, based on the encoding preset information, encoding-related parameters for each video to be encoded, such that when each video to be encoded is encoded by using the encoding-related parameters thereof, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when a preset target value is achieved; and encoding each video to be encoded based on the encoding-related parameters thereof. According to the video encoding method, apparatus, server, and computer-readable storage medium of the present disclosure, the problem of the lack of an encoding solution for multiple videos can be solved, the encoding quality of each video to be encoded in the video set can be balanced, an overall best effect can be achieved, and the viewing experience of the user for the entire video set can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of video technologies, and in particular, to a video encoding method, apparatus, server, and computer-readable storage medium. Background Art

[0002] In order to provide a better visual experience with limited bandwidth and lower cost overhead, in practical applications, video distribution platforms generally adopt Adaptive Bitrate (ABR) technology for encoding and transmission. In the traditional ABR technology framework, each source video generates multiple resolution versions, and each video of a certain resolution is encoded at a fixed bitrate. The correspondence between these resolutions and bitrates is called an encoding ladder (or a code table). When a user watches a video stream, the client selects the best resolution and bitrate according to the actual network bandwidth and device conditions in order to achieve a better viewing experience.

[0003] Given that the most common problem with this ABR technology is that these combinations of resolutions and bitrates are too inflexible and do not consider any video content characteristics. To solve the problems existing in the traditional ABR technology, a technology that enables ABR encoding to be adaptive according to video content has been proposed, such as Content-Aware Encoding (CAE) technology. CAE technology can improve the streaming transmission in ABR technology. By adding this content-adaptive technology, the original combinations of resolutions and bitrates will be more streamlined, thereby effectively reducing the encoding and storage costs of content providers.

[0004] However, whether it is the traditional ABR technology or the subsequent CAE technology, these existing video encoding technologies are all for the processing of a single video, and there is currently no encoding scheme for multiple videos. Summary of the Invention

[0005] The present disclosure provides a video encoding method, apparatus, server, and computer-readable storage medium to at least solve the problem in the related art that there is a lack of an encoding scheme for multiple videos. The technical solutions of the present disclosure are as follows:

[0006] According to a first aspect of the embodiments of the present disclosure, a video encoding method is provided. The video encoding method includes: obtaining a video set, where the video set includes a plurality of videos to be encoded; obtaining encoding preset information of the video set, where the encoding preset information includes a preset target value and a preset correspondence relationship. The preset target value is a target value preset for the sum of the first quality data of each video to be encoded in the video set, and the preset correspondence relationship is a correspondence relationship preset for the first quality data and the second quality data of each video to be encoded in the video set; based on the encoding preset information, determining encoding-related parameters for each video to be encoded in the video set, such that when each video to be encoded is encoded using the encoding-related parameters thereof, the sum of the second quality data of each video to be encoded in the video set reaches an optimal value when the preset target value is achieved; and encoding each video to be encoded in the video set based on the encoding-related parameters of each video to be encoded in the video set.

[0007] Optionally, the first quality data is one of a video bit rate and a video quality evaluation index, and the second quality data is the other of the video bit rate and the video quality evaluation index.

[0008] Optionally, each video to be encoded in the video set has a plurality of encoding-related parameters, and at least one preset value is configured for each encoding-related parameter; wherein determining the encoding-related parameters for each video to be encoded in the video set includes: obtaining multiple preset value combinations of the plurality of encoding-related parameters based on at least one preset value of each encoding-related parameter in the plurality of encoding-related parameters; where the preset value combination is a combination formed by selecting any one preset value from at least one preset value of each encoding-related parameter; determining the first quality data and the second quality data of each video to be encoded under each preset value combination of the plurality of encoding-related parameters according to the preset correspondence relationship of each video to be encoded; determining a first preset value combination from the multiple preset value combinations based on the first quality data and the second quality data of each video to be encoded under each preset value combination, and determining the encoding-related parameters based on the first preset value combination, where when each video to be encoded is encoded using the first preset value combination, the sum of the second quality data of each video to be encoded in the video set reaches an optimal value when the preset target value is achieved.

[0009] Optionally, the determining of the encoding-related parameters includes: based on the first quality data and the second quality data of the (k-1)-th video to be encoded among the multiple videos to be encoded under each preset value combination, determining the encoding-related parameters of the k-th video to be encoded, such that when encoding the k-th video to be encoded using the encoding-related parameters of the k-th video to be encoded, when the first quality data of the 1st to k-th videos to be encoded reaches the preset target value, the sum value of the second quality data of the 1st to k-th videos to be encoded reaches the optimal value, where 1 ≤ k ≤ N, N is the total number of videos to be encoded, and when k is 1, determining the encoding-related parameters of the 1st video to be encoded, such that when encoding the 1st video to be encoded using the encoding-related parameters of the 1st video to be encoded, when the first quality data of the 1st video to be encoded reaches the preset target value, the second quality data of the 1st video to be encoded reaches the optimal value.

[0010] Optionally, there are multiple preset correspondences for each video to be encoded, and different preset correspondences correspond to different resolutions. Among them, the determining of the encoding-related parameters of each video to be encoded in the video set includes: for each preset correspondence of each video to be encoded, determining the encoding-related parameters of each video to be encoded at each resolution, such that at each resolution, when encoding each video to be encoded using the encoding-related parameters of each video to be encoded, when reaching the preset target value, the sum value of the second quality data of each video to be encoded in the video set reaches the optimal value.

[0011] Optionally, the determining of the encoding-related parameters of each video to be encoded in the video set includes: determining at least one preset value of the encoding-related parameters; according to the preset correspondence of each video to be encoded, determining the first quality data and the second quality data of each video to be encoded under each preset value in the at least one preset value; based on the first quality data and the second quality data of each video to be encoded under each preset value, determining the first preset value in the at least one preset value as the encoding-related parameters, where when encoding each video to be encoded using the first preset value, when reaching the preset target value, the sum value of the second quality data of each video to be encoded in the video set reaches the optimal value.

[0012] Optionally, determining the encoding-related parameter includes: based on the first quality data and the second quality data of the (k-1)-th video to be encoded in each preset value among the multiple videos to be encoded, determining the encoding-related parameter of the k-th video to be encoded, such that when encoding the k-th video to be encoded using the encoding-related parameter of the k-th video to be encoded, when the sum value of the first quality data of the first video to be encoded to the k-th video to be encoded reaches the preset target value, the sum value of the second quality data of the first video to be encoded to the k-th video to be encoded reaches the optimal value, where 1≤k≤N, N is the total number of videos to be encoded, and when k is 1, determining the encoding-related parameter of the first video to be encoded, such that when encoding the first video to be encoded using the encoding-related parameter of the first video to be encoded, when the first quality data of the first video to be encoded reaches the preset target value, the second quality data of the first video to be encoded reaches the optimal value.

[0013] According to a second aspect of the embodiments of the present disclosure, there is provided a video encoding apparatus, including: a first acquisition unit configured to acquire a video set, where the video set includes multiple videos to be encoded; a second acquisition unit configured to acquire encoding preset information of the video set, where the encoding preset information includes a preset target value and a preset correspondence relationship, the preset target value is a target value preset for the sum value of the first quality data of each video to be encoded in the video set, and the preset correspondence relationship is a correspondence relationship preset for the first quality data and the second quality data of each video to be encoded in the video set; a determination unit configured to determine, based on the encoding preset information, the encoding-related parameter of each video to be encoded in the video set, such that when encoding each video to be encoded using the encoding-related parameter of each video to be encoded, when reaching the preset target value, the sum value of the second quality data of each video to be encoded in the video set reaches the optimal value; and an encoding unit configured to encode each video to be encoded in the video set based on the encoding-related parameter of each video to be encoded in the video set.

[0014] Optionally, the first quality data is one of a video bit rate and a video quality evaluation index, and the second quality data is the other of the video bit rate and the video quality evaluation index.

[0015] Optionally, each video to be encoded in the video set has a plurality of encoding-related parameters, and at least one preset value is configured for each encoding-related parameter; wherein, the determining unit is further configured to: based on at least one preset value of each encoding-related parameter among the plurality of encoding-related parameters, obtain multiple preset value combinations of the plurality of encoding-related parameters; wherein, the preset value combination is a combination formed by selecting any one preset value from at least one preset value of each encoding-related parameter; according to the preset correspondence of each video to be encoded, determine the first quality data and the second quality data of each video to be encoded under each preset value combination of the plurality of encoding-related parameters; based on the first quality data and the second quality data of each video to be encoded under each preset value combination, determine a first preset value combination from the multiple preset value combinations, and determine the encoding-related parameters based on the first preset value combination, wherein, when encoding each video to be encoded by using the first preset value combination, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when the preset target value is reached.

[0016] Optionally, the determining unit is further configured to: based on the first quality data and the second quality data of the (k - 1)-th video to be encoded among the plurality of videos to be encoded under each preset value combination, determine the encoding-related parameters of the k-th video to be encoded, so that when encoding the k-th video to be encoded by using the encoding-related parameters of the k-th video to be encoded, the sum value of the second quality data of the first video to be encoded to the k-th video to be encoded reaches an optimal value when the sum value of the first quality data of the first video to be encoded to the k-th video to be encoded reaches the preset target value, wherein, 1 ≤ k ≤ N, N is the total number of videos to be encoded, and when k is 1, determine the encoding-related parameters of the first video to be encoded, so that when encoding the first video to be encoded by using the encoding-related parameters of the first video to be encoded, the second quality data of the first video to be encoded reaches an optimal value when the first quality data of the first video to be encoded reaches the preset target value.

[0017] Optionally, there are multiple preset correspondences for each video to be encoded, and different preset correspondences correspond to different resolutions. Wherein, the determining unit is further configured to: for each preset correspondence of each video to be encoded, determine the encoding-related parameters of each video to be encoded at each resolution, so that at each resolution, when encoding each video to be encoded by using the encoding-related parameters of each video to be encoded, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when the preset target value is reached.

[0018] Optionally, the determining unit is further configured to: determine at least one preset value of the encoding-related parameter; determine, according to the preset correspondence of each video to be encoded, first quality data and second quality data of each video to be encoded under each preset value in the at least one preset value; and determine a first preset value in the at least one preset value as the encoding-related parameter based on the first quality data and the second quality data of each video to be encoded under each preset value, wherein when encoding each video to be encoded by using the first preset value, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when reaching the preset target value.

[0019] Optionally, the determining unit is further configured to: determine the encoding-related parameter of the k-th video to be encoded based on the first quality data and the second quality data of the (k - 1)-th video to be encoded among the multiple videos to be encoded under each preset value, such that when encoding the k-th video to be encoded by using the encoding-related parameter of the k-th video to be encoded, the sum value of the second quality data of the first to k-th videos to be encoded reaches an optimal value when the sum value of the first quality data of the first to k-th videos to be encoded reaches the preset target value, where 1 ≤ k ≤ N, N is the total number of videos to be encoded, and when k is 1, determine the encoding-related parameter of the first video to be encoded, such that when encoding the first video to be encoded by using the encoding-related parameter of the first video to be encoded, the second quality data of the first video to be encoded reaches an optimal value when the first quality data of the first video to be encoded reaches the preset target value.

[0020] According to a third aspect of the embodiments of the present disclosure, a server is provided, the server includes: a processor; a memory for storing instructions executable by the processor, wherein when the instructions executable by the processor are run by the processor, the processor is caused to execute the video encoding method according to the present disclosure.

[0021] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, when instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to execute the video encoding method according to the present disclosure.

[0022] According to a fifth aspect of the embodiments of the present disclosure, a computer program product is provided, which includes computer instructions, and when the computer instructions are executed by a processor, the video encoding method according to the present disclosure is implemented.

[0023] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:

[0024] Encoding can be performed on an entire video set including multiple videos to be encoded. When ensuring that the first quality data of the video set meets a preset target value, a global optimal solution of the second quality data of the video set can be obtained. Based on such an encoding scheme, encoding-related parameters are determined for each video to be encoded, which can balance the encoding quality of each video to be encoded in the video set, achieve the best overall effect, and improve the user's viewing experience of the entire video set.

[0025] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and do not limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The accompanying drawings herein are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure and do not constitute an improper limitation of the present disclosure.

[0027] Figure 1 It is a schematic diagram showing an implementation manner of CAE technology.

[0028] Figure 2 It is a schematic diagram showing R-D curves at different resolutions.

[0029] Figure 3 It is an implementation scenario diagram of a video encoding method shown according to an exemplary embodiment.

[0030] Figure 4 It is a flowchart of a video encoding method shown according to an exemplary embodiment.

[0031] Figure 5 It is a flowchart of the step of determining encoding-related parameters for each video to be encoded in a video encoding method shown according to an exemplary embodiment.

[0032] Figure 6 It is a schematic diagram of R-D curves of multiple videos to be encoded in a video encoding method shown according to an exemplary embodiment.

[0033] Figure 7 It is a schematic diagram of a two-dimensional R-D curve of a single video to be encoded in a video encoding method shown according to an exemplary embodiment.

[0034] Figure 8 It is a block diagram of a video encoding device shown according to an exemplary embodiment.

[0035] Figure 9 It is a block diagram of a server shown according to an exemplary embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0036] To enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0038] It should be noted here that "at least one of several items" in the present disclosure all represents the inclusion of three parallel situations: "any one of the several items", "a combination of any multiple of the several items", and "all of the several items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "performing at least one of step one and step two", which means the following three parallel situations: (1) performing step one; (2) performing step two; (3) performing step one and step two.

[0039] As described above, the problem with traditional ABR technology is that the resolution and bitrate combination is too rigid and does not consider any video content characteristics. For example, for videos with high complexity (such as sports games or action movies), the bitrate under a given combination may be relatively low, resulting in poor visual quality after encoding. On the contrary, for videos of simple scenes (such as animations or video conferences), the bitrate under a given combination may be too high, causing bandwidth waste.

[0040] To solve the above problems existing in traditional ABR, a CAE technology for adaptively adjusting encoding parameters according to video content is proposed. CAE refers to setting appropriate encoding parameters according to the content of the video during the video encoding process to achieve a balance between subjective quality and encoding efficiency. The CAE technology can improve ABR stream transmission. Specifically, for videos of simple scenes, CAE can adjust the encoding combination to make the bitrate lower, and users can watch videos with higher resolution at the same bitrate, with a better viewing experience while saving bandwidth; for videos of complex scenes, CAE can more efficiently allocate bits during the encoding process to improve the visual quality of the encoded video while keeping the overall bitrate unchanged. By adding this content adaptive technology, the original resolution and bitrate combination will be more streamlined, thus effectively reducing the encoding and storage overhead of content providers.

[0041] Generally, there are two ways to apply CAE: one is to apply CAE inside the encoder to adjust the encoding decision parameters based on factors such as video content and human visual characteristics; the other is to apply CAE outside the encoder to optimize and adjust the external encoding parameters (such as bitrate, etc.) according to similar characteristics.

[0042] Figure 1 is a schematic diagram showing the implementation methods of CAE technology. Referring to Figure 1 , according to the granularity of modeling the video content, multiple implementation methods of CAE technology are shown. Among them, internal CAE models the video content more precisely and with a smaller granularity, while external CAE is more rough and generally models the video content from a more macroscopic perspective. Specifically, the implementation methods of CAE technology can be divided into the following categories:

[0043] Per-category CAE: Different encoding configurations are generated for different types of videos. Video classification can be a broad classification, such as video conferencing, movies, sports, music videos, etc. defined by the Video Quality Experts Group (VQEG), or it can be a classification of movie types, such as drama, action movies, animations, etc. Under this classification, the encoding configuration can only be roughly adjusted for a certain type of video. For example, the bitrate can be reduced for videos with simple scenes. However, this classification may be too rough because there are still significant differences between different videos within a certain large category, so using the same encoding configuration is very inaccurate.

[0044] Per-title CAE: Corresponding encoding configurations are obtained for each specific video. According to the rate-quality curve at different resolutions of the video, the optimal combination of resolution and bitrate is selected. The problem with this CAE is that if the video is long (such as a movie, etc.) and contains both complex and simple scenes, the encoding configuration obtained by the Per-title CAE technology may not be flexible enough to effectively handle the changes in different scenes within the video.

[0045] Per-segment CAE: The input video is divided into multiple segments, and the best combination of resolution and bitrate is obtained for each segment according to the above Per-title CAE method. These video segments may be obtained by dividing the original video at regular time intervals, or they may be segmented at the scene transition points based on the video scene detection algorithm. However, due to the dynamic changes in video content, Per-segment CAE still has similar problems to Per-title CAE.

[0046] Per-frame / Per-block CAE: This type of CAE technology is a strict internal CAE. It adjusts the parameters in the encoding decision by analyzing the content characteristics at the frame level. For example, the bitrate control algorithm adjusts the quantization parameters at the frame level according to the content of the current frame. And Per-block CAE goes deeper into each coding block within the frame and adjusts the mode selection and quantization parameters according to the content of the current coding block and its surrounding coding blocks. Therefore, this type of CAE technology can microscopically penetrate into the encoder and select appropriate coding parameters according to the content characteristics of the current frame, which can further improve the coding efficiency.

[0047] For example, in a Per-title encoding scheme, according to the characteristics of each video (such as temporal complexity and spatial complexity), the bitrate level for server-side encoding is determined. Different from the previous encoding method of giving a unified bitrate level to all videos, this method can better balance quality and bandwidth. However, this scheme does not specifically study the relationship between temporal complexity, spatial complexity, bitrate, and subjective quality. Instead, it adopts a more straightforward method, that is, encoding a video source with different resolution-bitrate combinations, calculating the Peak Signal-to-Noise Ratio (PSNR) value, and drawing the Rate-Distortion (R-D) curve graph.

[0048] Figure 2 It is a schematic diagram showing the R-D curves at different resolutions. Among them, the horizontal axis is the bitrate, and its unit can be kbps; the vertical axis is the PSNR value, and its unit can be dB. As Figure 2 shown, the R-D curves at three resolutions of 720×480, 1280×720, and 1920×1080 are shown. The bold curve is the convex hull of the R-D curve. For the R-D curve of each resolution, the point closest to the convex hull is the point with the best coding efficiency, and these points are selected as the final resolution-bitrate parameters. On average, the bitrate can be reduced by 20% without sacrificing quality. However, this scheme only considers the optimal coding scheme for a single video and does not consider from the perspective of a video collection, and can only achieve a local optimum rather than a global optimum solution.

[0049] Based on the above analysis, all existing video coding schemes are for the processing of a single video. Currently, there is a lack of a coding scheme for multiple videos. And the present disclosure realizes that for server-side transcoding, what is provided to the user may be a comprehensive experience of a video collection. Therefore, considering problems from the perspective of the global optimum can obtain a global optimum solution.

[0050] To solve the above problems, the present disclosure proposes a video coding scheme that takes a video set as the research object and gives a global optimal solution. The following will refer to Figures 3 to 9 to describe in detail a video coding method, a video coding device, a server, and a computer-readable storage medium according to an exemplary embodiment of the present disclosure.

[0051] Figure 3 is an implementation scenario diagram of a video coding method shown according to an exemplary embodiment.

[0052] Referring to Figure 3 , when a user requests to watch video content through a video application client on a user terminal (such as mobile phone 111, desktop computer 112, tablet computer 113, etc.) via network 120, the server or video distribution platform 130 can send the requested video content to the user terminals 111, 112, and / or 113 via network 120, and the user can watch the received video content through the video application client. The server or video distribution platform 130 needs to encode the sent video content. When encoding, the video coding method according to the present disclosure can be used to determine the encoding-related parameters of each video to be encoded in the video set according to the preset target value of the sum of the first quality data (such as video bit rate) of each video to be encoded in the video set and the preset corresponding relationship between the first quality data and the second quality data (such as video quality evaluation index) of each video to be encoded in the video set. When each video to be encoded is encoded using the encoding-related parameters of each video to be encoded, when the sum of the first quality data of each video to be encoded in the video set reaches the preset target value, the sum of the second quality data of each video to be encoded in the video set reaches the optimal value. The encoding-related parameters of each video to be encoded determined according to this method can enable the video set to obtain a global optimal solution, balance the encoding quality of each video to be encoded, achieve the overall best effect, and improve the user's comprehensive viewing experience of the video set.

[0053] Figure 4 is a flowchart of a video coding method according to an exemplary embodiment. Here, as described above, the video coding method according to the present disclosure can perform encoding on the entire video set including multiple videos to be encoded, and obtain the global optimal solution of the sum of the second quality data of the video set while ensuring that the sum of the first quality data of the video set reaches the preset target value. Based on such an encoding scheme, the encoding-related parameters are determined for each video to be encoded, which can balance the encoding quality of each video to be encoded in the video set, achieve the overall best effect, and improve the user's viewing experience of the entire video set.

[0054] Specifically, as Figure 4 shown, the video coding method may include the following steps:

[0055] In step S401, a video set can be obtained, where the video set can include multiple videos to be encoded.

[0056] Here, the videos to be encoded can be videos in any format, and the video formats of the multiple videos to be encoded can be the same or different. In addition, the content of the videos to be encoded can be arbitrary, and the video contents of the multiple videos to be encoded can be related or unrelated.

[0057] The video set can be a combination of multiple videos to be encoded. For example, the video set can be a collection of videos of the same type or a collection of a series of consecutive videos. Among them, the multiple videos to be encoded can be multiple individual videos, or multiple segments of content or time - consecutive videos. However, the present disclosure does not limit the specific forms of the videos to be encoded and the video set, which can be set according to actual application needs.

[0058] In step S402, encoding preset information of the video set can be obtained, where the encoding preset information includes a preset target value and a preset correspondence. The preset target value is a target value preset for the sum of the first quality data of each video to be encoded in the video set, and the preset correspondence is a correspondence preset between the first quality data and the second quality data of each video to be encoded in the video set.

[0059] Here, the first quality data and the second quality data can be two data that can characterize the encoding quality of the video, and there can be a preset correspondence between these two data.

[0060] As an example, the first quality data can be one of the video bitrate and the video quality evaluation index, and the second quality data can be the other of the video bitrate and the video quality evaluation index. In this case, the preset correspondence between the first quality data and the second quality data can be the relationship between the video bitrate and the video quality. For example, it can be represented by the Figure 2 R - D curve shown above in the CAE technology.

[0061] In this example, the video quality evaluation metric can be a subjective quality evaluation criterion or an objective quality evaluation criterion. For example, the video quality evaluation metric can be at least one of Video Multi-method Assessment Fusion (VMAF), Peak Signal to Noise Ratio (PSNR), Structural Similarity (SSIM), and Multi-Scale Structural Similarity (MS-SSIM). Here, VMAF is a video quality evaluation criterion that better conforms to the subjective perception of the human eye. The encoding effect of the video quality data obtained based on this metric is better, more in line with the human eye's senses, and the subjective improvement in video picture quality will be more significant. In addition, the subjective quality evaluation criterion is not limited to VMAF mentioned above, and it can also be other more accurate subjective quality measurement methods.

[0062] In this example, the first quality data and the second quality data can be the video bitrate and the video quality evaluation metric respectively. In this way, it can be better connected and integrated with existing video encoding technologies. For example, existing video encoding technologies can be used to determine the relationship between the video bitrate and the video quality evaluation metric of each video to be encoded in the video set, and then the entire video set can be encoded based on the method of the present disclosure.

[0063] However, in the video encoding method according to the exemplary embodiments of the present disclosure, the first quality data and the second quality data are not limited to the video bitrate and the video quality evaluation metric. They can also be other data that can be used to constrain the video encoding result. For example, they can also be both the video resolution and the video quality evaluation metric or both the video resolution and the video bitrate. Correspondingly, the preset correspondence between the first quality data and the second quality data is not limited to the relationship between the video bitrate and the video quality. This preset correspondence can be determined according to the selection of the first quality data and the second quality data. For example, when the first quality data and the second quality data are the video resolution and the video quality evaluation metric respectively, based on the Figure 2 R-D curve shown above in the CAE technology, the preset correspondence between the resolution and the video quality evaluation metric of each video can also be determined.

[0064] The preset target value of the sum of the first quality data of each video to be encoded in the video set can be the total target value preset for the first quality data of all videos to be encoded in the video set. That is to say, when encoding each video to be encoded in the video set, the sum of the first quality data of all videos to be encoded can be this preset target value. For example, in the example where the first quality data is the video bitrate, this preset target value can be the total bitrate of the video set.

[0065] It should be noted that this preset target value can be arbitrarily specified before encoding is performed. It can reflect the quality of the first quality data of the entire video set. Therefore, this preset target value can be arbitrarily set according to the actual video encoding needs. For example, when the performance requirements for the first quality data are relatively high, this preset target value can be set relatively high; when the performance requirements for the first quality data are average, this preset target value can be set relatively low. The present disclosure does not limit the specific setting of this preset target value.

[0066] In addition, it should also be noted that the execution order of the above steps S401 and S402 can be adjusted according to actual needs. For example, the video set and its corresponding encoding preset information can also be obtained simultaneously.

[0067] In step S403, the encoding preset information can be encoded to determine the encoding-related parameters of each video to be encoded in the video set, so that when each video to be encoded is encoded using its encoding-related parameters, the sum of the second quality data of each video to be encoded in the video set reaches the optimal value when the preset target value is achieved.

[0068] In this step, the video encoding-related parameters can be parameters related to video encoding. The first quality data and the second quality data of the video to be encoded can be adjusted by adjusting the video encoding-related parameters of the video to be encoded, so as to achieve the target encoding effect.

[0069] According to an exemplary embodiment of the present disclosure, the video encoding-related parameters may include, but are not limited to, at least one of video encoding parameters and video preprocessing parameters. According to an exemplary embodiment of the present disclosure, the video encoding parameters may include, but are not limited to, at least one of a Constant Rate Factor (CRF), a video bitrate, and a resolution. The video preprocessing parameters include at least one of a video sharpening intensity, a video blurring intensity, and a noise reduction intensity. Here, CRF is an encoding mode that can adjust the video file data rate up or down to achieve a selected quality level, rather than a specific data rate. However, the video encoding-related parameters according to the present disclosure are not limited to the above examples and can be arbitrarily set according to actual encoding needs.

[0070] In step S403, on the premise that the sum of the first quality data of the video set reaches a preset target value, by adjusting the encoding-related parameters of each video to be encoded in the video set, the sum of the second quality data of the video set can reach an optimal value. Thus, based on the encoding-related parameters determined under such a premise and optimal value, each video to be encoded can be encoded to determine the optimal encoding scheme for the entire video set.

[0071] Figure 5 It is a flowchart of the step of determining the encoding-related parameters of each video to be encoded in a video encoding method shown according to an exemplary embodiment.

[0072] In this exemplary embodiment, each video to be encoded in the video set may have multiple encoding-related parameters, and each encoding-related parameter is configured with at least one preset value. As Figure 5 shown, the step of determining the encoding-related parameters of each video to be encoded may include: Step 501, multiple preset value combinations of the multiple encoding-related parameters can be obtained based on at least one preset value of each encoding-related parameter among the multiple encoding-related parameters; Step 502, according to the preset correspondence of each video to be encoded, the first quality data and the second quality data of each video to be encoded under each preset value combination of the multiple encoding-related parameters can be determined; Step 503, based on the first quality data and the second quality data of each video to be encoded under each preset value combination, a first preset value combination can be determined from the multiple preset value combinations, and the encoding-related parameters can be determined based on the first preset value combination.

[0073] Here, the preset value combination can be a combination formed by selecting any one preset value from at least one preset value of each encoding-related parameter. A first preset value combination that makes the first quality data and the second quality data meet the desired conditions can be selected from these preset value combinations. Among them, the first preset value combination can refer to such a preset value combination: when each video to be encoded is encoded using the first preset value combination, the sum value of the second quality data of each video to be encoded in the video set reaches the optimal value when the preset target value is reached.

[0074] In another exemplary embodiment, each video to be encoded in the video set may have one encoding-related parameter. In this case, the step of determining the encoding-related parameters of each video to be encoded may include: determining at least one preset value of the encoding-related parameter; according to the preset correspondence of each video to be encoded, determining the first quality data and the second quality data of each video to be encoded under each preset value among the at least one preset value; based on the first quality data and the second quality data of each video to be encoded under each preset value, determining the first preset value among the at least one preset value as the encoding-related parameter.

[0075] Here, a first preset value that enables the first quality data and the second quality data to meet the desired conditions can be selected from the preset values. The first preset value can refer to a preset value such that when each video to be encoded is encoded using the first preset value, the sum value of the second quality data of each video to be encoded in the video set reaches the optimal value when a preset target value is reached.

[0076] According to an exemplary embodiment of the present disclosure, the encoding-related parameters of each video to be encoded can be one or more. During the process of adjusting the encoding-related parameters of each video to be encoded in the video set, at least one preset value can be preset for each encoding-related parameter, and then the preset values of all encoding-related parameters are combined. In this way, for each combination, a pair of first quality data and second quality data can be obtained. Since the first quality data and the second quality data of the video set are related to the first quality data and the second quality data of each video to be encoded in the video set, it is possible to determine which preset value combination can meet the prerequisite conditions of the first quality data of the entire video set and achieve the optimal value of the second quality data according to the first quality data and the second quality data of each video to be encoded under different preset value combinations. In this way, by using the preset value combination method to determine the encoding-related parameters, it is possible to simplify the calculation process of the encoding-related parameters, improve the calculation speed, and at the same time find the encoding-related parameters that can optimize the overall encoding of the video set.

[0077] Next, taking the first quality data and the second quality data as the video bitrate and the video quality evaluation index respectively as an example, in combination with Figure 6 and Figure 7 the steps for determining the encoding-related parameters of each video to be encoded will be described in detail.

[0078] Figure 6 is a schematic diagram of the R-D curves of multiple videos to be encoded in a video encoding method shown according to an exemplary embodiment. Among them, the horizontal axis is the video bitrate (also known as the bitrate), and its unit can be kbps; the vertical axis is the VMAF value, which can be a dimensionless unit.

[0079] As described above, the exemplary embodiment of the present disclosure can take the video set as the research object. In Figure 6 the example of, it is possible to optimize the overall objective index (such as VMAF) on the premise of a given total bitrate of the video set. Here, taking the encoding-related parameter as CRF as an example, when only considering the change of a single encoding-related parameter CRF, the R-D curves of multiple videos to be encoded in a video set are as shown in Figure 6As shown, in order to obtain the optimal encoding-related parameters of VMAF on the premise that the total bitrate of the video set is fixed, the problem of solving the encoding-related parameters of multiple videos to be encoded can be abstracted as a grouped knapsack problem.

[0080] Specifically, the capacity of the knapsack can be the total bitrate of the video set. Each video to be encoded in the video set can be regarded as a group, and the corresponding relationship between its bitrate and VMAF is Figure 6 the multiple R-D curves given. The items that can be selected in each group are the points on the R-D curve. The volume of the item is the bitrate corresponding to the point on the R-D curve, and the value of the item is the VMAF corresponding to the point on the R-D curve. Based on such abstract analysis, algorithms such as dynamic programming can be used to solve the encoding-related parameters of multiple videos to be encoded.

[0081] Above Figure 6 shows the R-D curves of multiple videos to be encoded under the encoding-related parameters in a single dimension. Figure 7 shows the R-D curve of a single video to be encoded under two-dimensional encoding-related parameters. Among them, the horizontal axis is the video bitrate, and its unit can be kbps; the vertical axis is the VMAF value, which can be a dimensionless unit.

[0082] In Figure 7 , taking the encoding-related parameters as CRF (which is a video encoding parameter) and preprocessing sharpening intensity (which is a video preprocessing parameter) as an example, Figure 7 the dotted lines are the R-D curves under different CRFs. Figure 7 the solid lines are the R-D curves under different preprocessing sharpening intensities. It can be seen from Figure 7 that when considering the joint adjustment of two encoding-related parameters, for example, adjusting the encoding parameter CRF and the preprocessing parameter sharpening intensity, Figure 6 each curve in Figure 7 will become a plane as shown in Figure 6 . In this way, the difference from the single encoding-related parameter in Figure 7 is that the items that can be selected in the group in

[0083] become the points in the plane. By analogy, the encoding-related parameters can be more than two. However, whether for single encoding-related parameters or multiple encoding-related parameters, the same method can be used to solve them.

[0084] As an example, assuming that the total number of videos to be encoded in the video set is N, the following method can be used to solve the encoding-related parameters of each video to be encoded.

[0084] When each video to be encoded in a video collection has multiple encoding-related parameters, the encoding-related parameters of the k-th video to be encoded can be determined based on the first quality data and the second quality data of the (k - 1)-th video to be encoded among multiple videos to be encoded under each preset value combination, so that when encoding the k-th video to be encoded using the encoding-related parameters of the k-th video to be encoded, when the sum value of the first quality data of the first video to the k-th video to be encoded reaches a preset target value, the sum value of the second quality data of the first video to the k-th video to be encoded reaches an optimal value. Here, 1 ≤ k ≤ N. When k is 1, the encoding-related parameters of the first video to be encoded are determined so that when encoding the first video to be encoded using the encoding-related parameters of the first video to be encoded, when the first quality data of the first video to be encoded reaches the preset target value, the second quality data of the first video to be encoded reaches an optimal value.

[0085] For example, assume that the total number of preset value combinations of the encoding-related parameters is n, the given preset target value is Tb, bitrate[k][i] is the first quality data (such as video bitrate) of the k-th video under the i-th parameter combination, where 1 ≤ i ≤ S, and S is the total number of all possible preset value combinations of multiple encoding-related parameters, vmaf[k][i] is the second quality data (such as VMAF) of the k-th video under the i-th parameter combination, and f[k][v] is the maximum second quality data that the first k videos can achieve under the total sum v of the first quality data, that is, v = ∑bitrate[k][i], where 0 < v ≤ Tb. The preset value combination of the encoding-related parameters of the k-th video can be determined by solving f[k][v] = max{f[k - 1][v - bitrate[k][i]] + vmaf[k][i]}.

[0086] Here, as described above, when k is 1, the encoding-related parameters of the first video to be encoded can be determined so that when encoding the first video to be encoded using the encoding-related parameters of the first video to be encoded, when the first quality data of the first video to be encoded reaches the preset target value, the second quality data of the first video to be encoded reaches an optimal value.

[0087] When each video to be encoded in a video collection has an encoding-related parameter, the encoding-related parameter of the k-th video to be encoded can be determined based on the first quality data and the second quality data of the (k - 1)-th video to be encoded among multiple videos to be encoded under each preset value, such that when encoding the k-th video to be encoded using the encoding-related parameter of the k-th video to be encoded, when the sum value of the first quality data of the first video to be encoded to the k-th video to be encoded reaches the preset target value, the sum value of the second quality data of the first video to be encoded to the k-th video to be encoded reaches the optimal value. Here, 1 ≤ k ≤ N, where N is the total number of videos to be encoded. When k is 1, the encoding-related parameter of the first video to be encoded is determined such that when encoding the first video to be encoded using the encoding-related parameter of the first video to be encoded, when the first quality data of the first video to be encoded reaches the preset target value, the second quality data of the first video to be encoded reaches the optimal value.

[0088] For example, assume that the total number of preset values of the encoding-related parameter is m, the given preset target value is Tb, bitrate[k][i] is the first quality data (such as video bitrate) of the k-th video under the i-th preset value, where 1 ≤ i ≤ m, vmaf[k][i] is the second quality data (such as VMAF) of the k-th video under the i-th preset value, and f[k][v] is the maximum second quality data that can be obtained when the total sum of the first quality data of the first k videos is v, that is, v = ∑bitrate[k][i], where 0 < v ≤ Tb. The preset value of the encoding-related parameter of the k-th video can be determined by solving f[k][v] = max{f[k - 1][v - bitrate[k][i]] + vmaf[k][i]}.

[0089] Here, as described above, when k is 1, the encoding-related parameter of the first video to be encoded can be determined such that when encoding the first video to be encoded using the encoding-related parameter of the first video to be encoded, when the first quality data of the first video to be encoded reaches the preset target value, the second quality data of the first video to be encoded reaches the optimal value.

[0090] In this way, the encoding-related parameter can be solved by means of the solution method of the grouped knapsack problem. By dynamically iteratively solving the encoding-related parameters of the first video to be encoded to the k-th video to be encoded one by one, the encoding-related parameters of each video to be encoded in the video collection can be quickly determined while ensuring the preset target value of the first quality data and the optimal value of the second quality data of the entire video collection.

[0091] In addition, according to an exemplary embodiment of the present disclosure, there can be multiple preset correspondences for each video to be encoded, and different preset correspondences can correspond to different resolutions. For example, as described above Figure 2 As shown in, the R-D curves (i.e., the preset correspondences between the first quality data and the second quality data) at different resolutions can be determined.

[0092] In this case, for each preset correspondence of each video to be encoded, the encoding-related parameters of each video to be encoded at each resolution can be determined, such that at each resolution, when encoding each video to be encoded using the encoding-related parameters of each video to be encoded, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when reaching the preset target value.

[0093] In this way, for each video to be encoded, the encoding-related parameters at different resolutions can be determined. Thus, while ensuring the preset target value of the first quality data and the optimal value of the second quality data of the entire video set, video playback options with different resolutions can be provided to the user, offering more possibilities for the user to watch.

[0094] In step S404, each video to be encoded in the video set can be encoded based on the encoding-related parameters of each video to be encoded in the video set.

[0095] In this step, each video to be encoded can be encoded based on the encoding-related parameters of each video to be encoded determined in the previous steps, thereby determining the optimal encoding scheme for the video set.

[0096] Figure 8 is a block diagram of a video encoding device shown according to an exemplary embodiment. Refer to Figure 8 , the video encoding device 1000 includes a first acquisition unit 100, a second acquisition unit 200, a determination unit 300, and an encoding unit 400.

[0097] The first acquisition unit 100 is configured to acquire a video set, where the video set includes multiple videos to be encoded;

[0098] The second acquisition unit 200 is configured to acquire the encoding preset information of the video set, where the encoding preset information includes a preset target value and a preset correspondence. The preset target value is a target value preset for the sum value of the first quality data of each video to be encoded in the video set, and the preset correspondence is the preset correspondence between the first quality data and the second quality data of each video to be encoded in the video set.

[0099] The determination unit 300 is configured to determine encoding-related parameters for each video to be encoded in the video set based on encoded preset information, such that when each video to be encoded is encoded using the encoding-related parameters thereof, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when a preset target value is achieved.

[0100] The encoding unit 400 is configured to encode each video to be encoded in the video set based on the encoding-related parameters of each video to be encoded in the video set.

[0101] As an example, the first quality data is one of a video bit rate and a video quality evaluation index, and the second quality data is the other of the video bit rate and the video quality evaluation index.

[0102] As an example, each video to be encoded in the video set has a plurality of encoding-related parameters, and at least one preset value is configured for each encoding-related parameter. Among them, the determination unit 300 is further configured to: obtain a plurality of preset value combinations of the plurality of encoding-related parameters based on at least one preset value of each encoding-related parameter among the plurality of encoding-related parameters, where the preset value combination is a combination formed by selecting any one preset value from at least one preset value of each encoding-related parameter; determine the first quality data and the second quality data of each video to be encoded under each preset value combination of the plurality of encoding-related parameters according to the preset correspondence of each video to be encoded; determine a first preset value combination from the plurality of preset value combinations based on the first quality data and the second quality data of each video to be encoded under each preset value combination, and determine the encoding-related parameters based on the first preset value combination, where when each video to be encoded is encoded using the first preset value combination, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when a preset target value is achieved.

[0103] As an example, the determination unit 300 is further configured to: determine the encoding-related parameters of the k-th video to be encoded based on the first quality data and the second quality data of the (k - 1)-th video to be encoded among the plurality of videos to be encoded under each preset value combination, such that when the k-th video to be encoded is encoded using the encoding-related parameters of the k-th video to be encoded, the sum value of the second quality data of the first to k-th videos to be encoded reaches an optimal value when the sum value of the first quality data of the first to k-th videos to be encoded reaches a preset target value, where 1 ≤ k ≤ N, and N is the total number of videos to be encoded. When k is 1, determine the encoding-related parameters of the first video to be encoded, such that when the first video to be encoded is encoded using the encoding-related parameters of the first video to be encoded, the second quality data of the first video to be encoded reaches an optimal value when the first quality data of the first video to be encoded reaches a preset target value.

[0104] As an example, there are multiple preset correspondence relationships for each video to be encoded, and different preset correspondence relationships correspond to different resolutions. Among them, the determining unit 300 is further configured to: for each preset correspondence relationship of each video to be encoded, determine the encoding-related parameters of each video to be encoded at each resolution, so that at each resolution, when encoding each video to be encoded by using the encoding-related parameters of each video to be encoded, the sum value of the second quality data of each video to be encoded in the video set reaches the optimal value when the preset target value is reached.

[0105] As an example, the determining unit 300 is further configured to: determine at least one preset value of the encoding-related parameters; determine the first quality data and the second quality data of each video to be encoded at each preset value in the at least one preset value according to the preset correspondence relationship of each video to be encoded; based on the first quality data and the second quality data of each video to be encoded at each preset value, determine the first preset value in the at least one preset value as the encoding-related parameters, where when encoding each video to be encoded by using the first preset value, the sum value of the second quality data of each video to be encoded in the video set reaches the optimal value when the preset target value is reached.

[0106] As an example, the determining unit 300 is further configured to: based on the first quality data and the second quality data of the (k - 1)-th video to be encoded among the multiple videos to be encoded at each preset value, determine the encoding-related parameters of the k-th video to be encoded, so that when encoding the k-th video to be encoded by using the encoding-related parameters of the k-th video to be encoded, when the sum value of the first quality data of the first to k-th videos to be encoded reaches the preset target value, the sum value of the second quality data of the first to k-th videos to be encoded reaches the optimal value, where 1 ≤ k ≤ N, and N is the total number of videos to be encoded. When k is 1, determine the encoding-related parameters of the first video to be encoded, so that when encoding the first video to be encoded by using the encoding-related parameters of the first video to be encoded, when the first quality data of the first video to be encoded reaches the preset target value, the second quality data of the first video to be encoded reaches the optimal value.

[0107] Regarding the device in the above embodiments, the specific manners in which each unit performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.

[0108] Figure 9 is a block diagram of a server shown according to an exemplary embodiment. As Figure 9As shown, the server 10 includes a processor 11 and a memory 12 for storing processor-executable instructions. Here, when the processor-executable instructions are run by the processor, they cause the processor to execute the video encoding method as described in the above exemplary embodiments.

[0109] As an example, the server 10 does not have to be a single device, and can also be any collection of devices or circuits that can execute the above instructions (or instruction sets) individually or jointly. The server 10 can also be part of an integrated control system or system manager, or can be configured to interface with a local or remote (e.g., via wireless transmission) server.

[0110] In the server 10, the processor 11 can include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. By way of example and not limitation, the processor 11 can also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.

[0111] The processor 11 can run the instructions or code stored in the memory 12, where the memory 12 can also store data. The instructions and data can also be sent and received via the network interface device over the network, where the network interface device can employ any known transmission protocol.

[0112] The memory 12 can be integrated with the processor 11, for example, by arranging RAM or flash memory within an integrated circuit microprocessor, etc. In addition, the memory 12 can include a separate device, such as an external disk drive, a storage array, or any other storage device that can be used by a database system. The memory 12 and the processor 11 can be operatively coupled, or can communicate with each other, for example, through an I / O port, a network connection, etc., such that the processor 11 can read the files stored in the memory 12.

[0113] In addition, the server 10 can also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.). All components of the server 10 can be connected to each other via a bus and / or a network.

[0114] In an exemplary embodiment, a computer-readable storage medium may also be provided. When the instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to execute the video encoding method as described in the above exemplary embodiment. The computer-readable storage medium may, for example, be a memory including instructions. Optionally, the computer-readable storage medium may be: read-only memory (ROM), random access memory (RAM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disc memory, hard disk drive (HDD), solid state drive (SSD), cartridge memory (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, and any other device configured to store a computer program and any associated data, data files, and data structures in a non-transitory manner and to provide the computer program and any associated data, data files, and data structures to a processor or computer such that the processor or computer can execute the computer program. The computer program in the above computer-readable storage medium may run in an environment deployed in computer devices such as clients, hosts, proxy devices, servers, etc. Additionally, in one example, the computer program and any associated data, data files, and data structures are distributed on a networked computer system such that the computer program and any associated data, data files, and data structures are stored, accessed, and executed in a distributed manner by one or more processors or computers.

[0115] In an exemplary embodiment, a computer program product may also be provided. The computer program product includes computer instructions that, when executed by a processor, implement the video encoding method as described in the above exemplary embodiment.

[0116] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common knowledge or conventional technical means in the technical field not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the present disclosure are pointed out by the following claims.

[0117] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.

Claims

1. A video encoding method, characterized in that, The video encoding method includes: Obtaining a video set, where the video set includes multiple videos to be encoded; Obtaining encoding preset information of the video set, where the encoding preset information includes a preset target value and a preset correspondence. The preset target value is a target value preset for the sum of the first quality data of each video to be encoded in the video set, and the preset correspondence is a correspondence preset for the first quality data and the second quality data of each video to be encoded in the video set; Based on the encoding preset information, determining encoding-related parameters for each video to be encoded in the video set, such that when encoding each video to be encoded using the encoding-related parameters of each video to be encoded, the sum of the second quality data of each video to be encoded in the video set reaches an optimal value when the preset target value is achieved; Encoding each video to be encoded in the video set based on the encoding-related parameters of each video to be encoded in the video set; Wherein, each video to be encoded in the video set has one encoding-related parameter or multiple encoding-related parameters, and each encoding-related parameter is configured with at least one preset value; Wherein, the encoding-related parameters are determined by the following method: Based on the first quality data and the second quality data of the (k - 1)-th video to be encoded among the multiple videos to be encoded under each preset value of the one encoding-related parameter or each combination of preset values of the multiple encoding-related parameters, determining the encoding-related parameters of the k-th video to be encoded, such that when encoding the k-th video to be encoded using the encoding-related parameters of the k-th video to be encoded, the sum of the second quality data of the first video to be encoded to the k-th video to be encoded reaches an optimal value when the sum of the first quality data of the first video to be encoded to the k-th video to be encoded reaches the preset target value; Wherein, the combination of preset values is a combination formed by selecting any one preset value from at least one preset value of each encoding-related parameter; Wherein, 1 ≤ k ≤ N, N is the total number of videos to be encoded. When k is 1, determining the encoding-related parameters of the first video to be encoded, such that when encoding the first video to be encoded using the encoding-related parameters of the first video to be encoded, the second quality data of the first video to be encoded reaches an optimal value when the first quality data of the first video to be encoded reaches the preset target value.

2. The video encoding method according to claim 1, wherein The first quality data is one of a video bit rate and a video quality evaluation index, and the second quality data is the other of the video bit rate and the video quality evaluation index.

3. The video encoding method according to claim 1 or 2, characterized in that, The determining of the encoding-related parameters for each video to be encoded in the video set includes: Based on at least one preset value of each encoding-related parameter among the multiple encoding-related parameters, obtaining multiple combinations of preset values of the multiple encoding-related parameters; According to the preset correspondence of each video to be encoded, determining the first quality data and the second quality data of each video to be encoded under each combination of preset values of the multiple encoding-related parameters; Based on the first quality data and the second quality data of each video to be encoded under each combination of preset values, determine a first combination of preset values from the multiple combinations of preset values, and determine the encoding-related parameters based on the first combination of preset values, where when encoding each video to be encoded using the first combination of preset values, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when the preset target value is reached.

4. The video encoding method according to claim 1 or 2, characterized in that, There are multiple preset correspondence relationships for each video to be encoded, and different preset correspondence relationships correspond to different resolutions, where determining the encoding-related parameters of each video to be encoded in the video set includes: For each preset correspondence relationship of each video to be encoded, determine the encoding-related parameters of each video to be encoded at each resolution, so that at each resolution, when encoding each video to be encoded using the encoding-related parameters of each video to be encoded, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when the preset target value is reached.

5. The video encoding method according to claim 1 or 2, characterized in that, Determining the encoding-related parameters of each video to be encoded in the video set includes: Determine at least one preset value of the encoding-related parameters; According to the preset correspondence relationship of each video to be encoded, determine the first quality data and the second quality data of each video to be encoded at each preset value in the at least one preset value; Based on the first quality data and the second quality data of each video to be encoded at each preset value, determine the first preset value in the at least one preset value as the encoding-related parameters, where when encoding each video to be encoded using the first preset value, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when the preset target value is reached.

6. A video encoding device, characterized in that, The video encoding device includes: A first acquisition unit configured to acquire a video set, where the video set includes multiple videos to be encoded; A second acquisition unit configured to acquire the encoding preset information of the video set, where the encoding preset information includes a preset target value and a preset correspondence relationship, the preset target value is a target value preset for the sum value of the first quality data of each video to be encoded in the video set, and the preset correspondence relationship is a correspondence relationship preset for the first quality data and the second quality data of each video to be encoded in the video set; A determination unit configured to determine the encoding-related parameters of each video to be encoded in the video set based on the encoding preset information, so that when encoding each video to be encoded using the encoding-related parameters of each video to be encoded, the sum value of the second quality data of each video to be encoded in the video set reaches an optimal value when the preset target value is reached; An encoding unit configured to encode each video to be encoded in the video set based on the encoding-related parameters of each video to be encoded in the video set; Among them, each video to be encoded in the video set has one encoding-related parameter or multiple encoding-related parameters, and each encoding-related parameter is configured with at least one preset value; Among them, the determining unit is configured to: Based on the first quality data and the second quality data of the (k - 1)-th video to be encoded among the multiple videos to be encoded under each preset value of the one encoding-related parameter or each preset value combination of the multiple encoding-related parameters, determine the encoding-related parameter of the k-th video to be encoded, such that when encoding the k-th video to be encoded using the encoding-related parameter of the k-th video to be encoded, when the sum value of the first quality data of the first to k-th videos to be encoded reaches the preset target value, the sum value of the second quality data of the first to k-th videos to be encoded reaches the optimal value. Among them, the preset value combination is a combination formed by selecting any one preset value from at least one preset value of each encoding-related parameter. Among them, 1 ≤ k ≤ N, N is the total number of videos to be encoded. When k = 1, determine the encoding-related parameter of the first video to be encoded, such that when encoding the first video to be encoded using the encoding-related parameter of the first video to be encoded, when the first quality data of the first video to be encoded reaches the preset target value, the second quality data of the first video to be encoded reaches the optimal value.

7. A server, characterized in that, The server includes: A processor; A memory for storing instructions executable by the processor, Among them, when the instructions executable by the processor are run by the processor, it causes the processor to execute the video encoding method according to any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the server, it enables the server to execute the video encoding method according to any one of claims 1 to 5.

9. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the video encoding method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Video coding method and device and electronic equipment

    CN113938682A