Video coding method, computing device, storage medium and program product

By extracting features of the video to be encoded and using a deep learning model to predict the video quality curve and bit rate curve, and selecting an appropriate CRF value for video encoding, the problem of difficulty in balancing video quality and bit rate in the existing technology is solved, and video coding is achieved. Efficiency and strategic design.

CN118590652AActive Publication Date: 2024-09-03XIAOHONGSHU TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410701663.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-03
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

Existing video coding technology is difficult to quickly and accurately select an appropriate constant quality factor (CRF) value, making it difficult to achieve a balance between video quality and bit rate, and cannot effectively assist users in formulating quality improvement or cost reduction strategies.

Method used

By extracting features from the video to be encoded, the deep learning model is used to predict the video quality curve and bit rate curve, the matching CRF target value is selected for video encoding, and the strategy is designed based on the gradient information of video quality and bit rate.

Benefits of technology

It can quickly and accurately select the appropriate CRF value, assist users in video encoding, improve the balance between video quality and bit rate, support the design of quality improvement or cost reduction strategies, and maximize revenue.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590652A
    Figure CN118590652A
Patent Text Reader

Abstract

The invention provides a video coding method, computing equipment, a storage medium and a program product. The method comprises the following steps: performing feature extraction on a to-be-coded video to obtain video features of multiple dimensions related to the to-be-coded video; based on the video features of the multiple dimensions, predicting a video quality curve and a video code rate curve corresponding to the video coding of the to-be-coded video based on different constant quality factors CRF; obtaining CRF target values which are selected from the video quality curve and the video code rate curve and are matched with the video quality and the video code rate required for video coding of the to-be-coded video; and performing video coding on the to-be-coded video based on the CRF target value to obtain a target video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present application relate to the field of video encoding technology, and in particular, to a video encoding method, a computing device, a storage medium, and a program product. Background Art

[0002] Constant Rate Factor (CRF) is a parameter in constant quality encoding mode. After setting a fixed CRF value, the encoder will automatically adjust the bitrate during video encoding to maintain the consistency of the visual quality of the output video as much as possible. The bitrate (or bitrate) refers to the number of bits transmitted per second. The higher the bitrate, the more data is transmitted per second, and the clearer the video quality.

[0003] The larger the CRF value, the more severely the source video is compressed during the encoding process, and the smaller the bit rate of the encoded video is. In other words, the smaller the amount of encoded video data is, and accordingly, the worse the video quality is.

[0004] Therefore, for the source video to be encoded, considering the quality and bit rate of the encoded video, it is particularly important to quickly and accurately select a suitable CRF value for video encoding. Summary of the invention

[0005] In view of this, one or more embodiments of the present application provide a video encoding method, a computing device, a computer-readable storage medium, and a computer program product.

[0006] In a first aspect, the present application provides a video encoding method, the method comprising:

[0007] Extracting features from the video to be encoded to obtain video features of multiple dimensions related to the video to be encoded;

[0008] Based on the video features of the multiple dimensions, predicting the video quality curves and the video bit rate curves corresponding to when the video to be encoded is encoded based on different constant quality factor CRF values;

[0009] Obtaining a CRF target value selected from the video quality curve and the video bit rate curve that matches the video quality and video bit rate required for video encoding of the video to be encoded;

[0010] The video to be encoded is encoded based on the CRF target value to obtain a target video.

[0011] In an illustrated embodiment, the video quality includes a VMAF value, a multi-method fusion evaluation index of video quality based on subjective perception of human eyes; the video features of multiple dimensions include CRF feature values, VMAF feature values, and video bit rate feature values; and the feature extraction of the video to be encoded to obtain video features of multiple dimensions related to the video to be encoded includes:

[0012] Performing video encoding on the video to be encoded based on the selected CRF feature value to obtain an encoded video;

[0013] A VMAF value and a video bit rate of the encoded video are obtained, and the VMAF value and the video bit rate are determined as the VMAF characteristic value and the video bit rate characteristic value corresponding to the CRF characteristic value.

[0014] In an illustrated embodiment, the predicting, based on the video features of the multiple dimensions, corresponding video quality curves and video bit rate curves when the to-be-encoded video is encoded based on different CRF values, includes:

[0015] The video features of the multiple dimensions are input into a pre-trained deep learning model, and the deep learning model predicts the video quality curve and the video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values ​​based on the video features of the multiple dimensions.

[0016] In an illustrated embodiment, the deep learning model includes a first basic network; the video features of the multiple dimensions are input into the pre-trained deep learning model, and the deep learning model predicts the video quality curve and the video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values ​​based on the video features of the multiple dimensions, including:

[0017] Perform feature splicing on the video features of the multiple dimensions to obtain target features;

[0018] The target feature is input into the first basic network, and the first basic network predicts, based on the target feature, a video quality curve and a video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values.

[0019] In an illustrated embodiment, the first basic network includes a batch normalization layer, a self-attention mechanism layer, a residual feature layer, and a fully connected layer connected in sequence; the target feature is input into the first basic network, and the first basic network predicts, based on the target feature, a video quality curve and a video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values, respectively, including:

[0020] Inputting the target feature into a batch normalization layer, and the batch normalization layer performs batch normalization processing on the video features of multiple dimensions contained in the target feature;

[0021] Inputting the normalized video features of the multiple dimensions into a self-attention mechanism layer, the self-attention mechanism layer extracts correlation information between the video features of the multiple dimensions, and integrating the video features of the multiple dimensions into deep features based on the correlation information;

[0022] Inputting the depth feature into a residual feature layer, and performing residual correction on the depth feature by the residual feature layer to obtain a residual feature;

[0023] The residual feature is input into a fully connected layer, and the fully connected layer predicts, based on the residual feature, a video quality curve and a video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values.

[0024] In an illustrated embodiment, the deep learning model further includes a suspension operator, and the method further includes:

[0025] Inputting the video quality curve and the video bit rate curve predicted by the first basic network into the suspension operator, and the suspension operator performs suspension processing on the video quality curve based on the CRF feature value and the VMAF feature value, so that the video quality curve after suspension processing passes through a first anchor point formed by the CRF feature value and the VMAF feature value; and

[0026] The video bit rate curve is suspended based on the CRF feature value and the video bit rate feature value, so that the video bit rate curve after the suspension process passes through a second anchor point formed by the CRF feature value and the video bit rate feature value.

[0027] In an illustrated embodiment, the deep learning model further includes a second basic network, and the method further includes:

[0028] Inputting the video quality curve and the video bit rate curve after the suspension processing into the second basic network, and performing residual correction on the video quality curve and the video bit rate curve after the suspension processing by the second basic network, respectively, to obtain the video quality curve and the video bit rate curve after the residual correction;

[0029] The obtaining of a CRF target value selected from the video quality curve and the video bit rate curve and matching the video quality and video bit rate required for video encoding of the video to be encoded includes:

[0030] A CRF target value that matches the VMAF value and the video bit rate required for video encoding of the video to be encoded is obtained from the residual-corrected video quality curve and the video bit rate curve.

[0031] In an illustrated embodiment, the obtaining of a CRF target value selected from the video quality curve and the video bit rate curve and matching the video quality and video bit rate required for video encoding of the video to be encoded includes:

[0032] Determining a first CRF value range corresponding to a video quality value range required for video encoding of the video to be encoded from the video quality curve; and

[0033] Determine, from the video bit rate curve, a second CRF value range corresponding to a video bit rate value range required for video encoding of the video to be encoded;

[0034] A CRF target value is selected from the intersection of the first CRF value range and the second CRF value range.

[0035] In one illustrated embodiment, the method further comprises:

[0036] Acquire multiple sample videos, perform feature extraction on the multiple sample videos respectively, and obtain video features of multiple dimensions related to each sample video;

[0037] Based on the preset multiple CRF values, each sample video is respectively encoded multiple times to obtain multiple encoded videos corresponding to each sample video, and the video quality and video bit rate of the multiple encoded videos are obtained;

[0038] The deep learning model is supervisedly trained by taking video features of multiple dimensions related to each video sample as training samples, and taking video quality and video bit rate of multiple encoded videos corresponding to each sample video as sample labels.

[0039] In a second aspect, the present application provides a video encoding device, the device comprising:

[0040] A feature extraction unit, used to extract features of the video to be encoded, and obtain video features of multiple dimensions related to the video to be encoded;

[0041] A prediction unit, configured to predict, based on the video features of the multiple dimensions, corresponding video quality curves and video bit rate curves when the to-be-encoded video is encoded based on different CRF values;

[0042] An acquisition unit, configured to acquire a CRF target value selected from the video quality curve and the video bit rate curve and matching the video quality and video bit rate required for video encoding of the video to be encoded;

[0043] The encoding unit is used to perform video encoding on the video to be encoded based on the CRF target value to obtain a target video.

[0044] In an illustrated embodiment, the video quality includes a VMAF value, a multi-method fusion evaluation index of video quality based on subjective perception of human eyes; the video features of the multiple dimensions include a CRF feature value, a VMAF feature value, and a video bit rate feature value; the feature extraction unit is specifically used to:

[0045] Performing video encoding on the video to be encoded based on the selected CRF feature value to obtain an encoded video;

[0046] A VMAF value and a video bit rate of the encoded video are obtained, and the VMAF value and the video bit rate are determined as the VMAF characteristic value and the video bit rate characteristic value corresponding to the CRF characteristic value.

[0047] In an illustrated embodiment, the prediction unit is specifically configured to:

[0048] The video features of the multiple dimensions are input into a pre-trained deep learning model, and the deep learning model predicts the video quality curve and the video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values ​​based on the video features of the multiple dimensions.

[0049] In an illustrated embodiment, the deep learning model includes a first basic network; the prediction unit is specifically configured to:

[0050] Perform feature splicing on the video features of the multiple dimensions to obtain target features;

[0051] The target feature is input into the first basic network, and the first basic network predicts, based on the target feature, a video quality curve and a video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values.

[0052] In an illustrated embodiment, the first basic network includes a batch normalization layer, a self-attention mechanism layer, a residual feature layer and a fully connected layer connected in sequence; the prediction unit is specifically used to:

[0053] Inputting the target feature into a batch normalization layer, and the batch normalization layer performs batch normalization processing on the video features of multiple dimensions contained in the target feature;

[0054] Inputting the normalized video features of the multiple dimensions into a self-attention mechanism layer, the self-attention mechanism layer extracts correlation information between the video features of the multiple dimensions, and integrating the video features of the multiple dimensions into deep features based on the correlation information;

[0055] Inputting the depth feature into a residual feature layer, and performing residual correction on the depth feature by the residual feature layer to obtain a residual feature;

[0056] The residual feature is input into a fully connected layer, and the fully connected layer predicts, based on the residual feature, a video quality curve and a video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values.

[0057] In an illustrated embodiment, the deep learning model further includes a suspension operator, and the apparatus further includes a suspension processing unit, configured to:

[0058] Inputting the video quality curve and the video bit rate curve predicted by the first basic network into the suspension operator, and the suspension operator performs suspension processing on the video quality curve based on the CRF feature value and the VMAF feature value, so that the video quality curve after suspension processing passes through a first anchor point formed by the CRF feature value and the VMAF feature value; and

[0059] The video bit rate curve is suspended based on the CRF feature value and the video bit rate feature value, so that the video bit rate curve after the suspension process passes through a second anchor point formed by the CRF feature value and the video bit rate feature value.

[0060] In an illustrated embodiment, the deep learning model further includes a second basic network, and the device further includes a residual correction unit, which is used to:

[0061] Inputting the video quality curve and the video bit rate curve after the suspension processing into the second basic network, and performing residual correction on the video quality curve and the video bit rate curve after the suspension processing by the second basic network, respectively, to obtain the video quality curve and the video bit rate curve after the residual correction;

[0062] The acquisition unit is specifically used for:

[0063] A CRF target value that matches the VMAF value and the video bit rate required for video encoding of the video to be encoded is obtained from the residual-corrected video quality curve and the video bit rate curve.

[0064] In an illustrated embodiment, the acquisition unit is specifically configured to:

[0065] Determining a first CRF value range corresponding to a video quality value range required for video encoding of the video to be encoded from the video quality curve; and

[0066] Determine, from the video bit rate curve, a second CRF value range corresponding to a video bit rate value range required for video encoding of the video to be encoded;

[0067] A CRF target value is selected from the intersection of the first CRF value range and the second CRF value range.

[0068] In an illustrated embodiment, the apparatus further comprises a model training unit, configured to:

[0069] Acquire multiple sample videos, perform feature extraction on the multiple sample videos respectively, and obtain video features of multiple dimensions related to each sample video;

[0070] Based on the preset multiple CRF values, each sample video is respectively encoded multiple times to obtain multiple encoded videos corresponding to each sample video, and the video quality and video bit rate of the multiple encoded videos are obtained;

[0071] The deep learning model is supervisedly trained by taking video features of multiple dimensions related to each video sample as training samples, and taking video quality and video bit rate of multiple encoded videos corresponding to each sample video as sample labels.

[0072] In a third aspect, the present application provides a model training method, the method comprising:

[0073] Acquire multiple sample videos, perform feature extraction on the multiple sample videos respectively, and obtain video features of multiple dimensions related to each sample video;

[0074] Based on the preset multiple CRF values, each sample video is respectively encoded multiple times to obtain multiple encoded videos corresponding to each sample video, and the video quality and video bit rate of the multiple encoded videos are obtained;

[0075] The deep learning model is supervisedly trained using video features of multiple dimensions related to each video sample as training samples, and video quality and video bit rate of multiple encoded videos corresponding to each sample video as sample labels; wherein the trained deep learning model is used to predict the video quality curve and video bit rate curve corresponding to video encoding based on different CRF values ​​when the video to be encoded is encoded based on the input video features of multiple dimensions related to the video to be encoded.

[0076] In a fourth aspect, the present application provides a model training device, the device comprising:

[0077] A feature extraction unit, used to obtain multiple sample videos, perform feature extraction on the multiple sample videos respectively, and obtain video features of multiple dimensions related to each sample video;

[0078] An acquisition unit, configured to perform video encoding on each sample video multiple times based on multiple preset CRF values, obtain multiple encoded videos corresponding to each sample video, and obtain video quality and video bit rate of the multiple encoded videos;

[0079] A training unit is used to perform supervised training on a deep learning model using video features of multiple dimensions related to each video sample as training samples, and using video quality and video bit rate of multiple encoded videos corresponding to each sample video as sample labels; wherein the trained deep learning model is used to predict the video quality curve and video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values ​​based on the input video features of multiple dimensions related to the video to be encoded.

[0080] Accordingly, the present application also provides a computing device, comprising: a processor and a memory for storing processor executable instructions; when the processor executes the executable instructions, it implements the video encoding method described in the first aspect or the model training method described in the third aspect.

[0081] Accordingly, the present application also provides a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, the video encoding method described in the first aspect or the model training method described in the third aspect is implemented.

[0082] Accordingly, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the video encoding method described in the first aspect or the model training method described in the third aspect.

[0083] In summary, the present application obtains video features of multiple dimensions related to the video to be encoded by extracting features from the video to be encoded. Furthermore, based on the extracted video features of multiple dimensions, the corresponding video quality curves and video bit rate curves are predicted when the video to be encoded is encoded based on different CRF values. Based on this, the user can combine their actual needs, comprehensively consider the video quality and bit rate, and quickly and accurately select a suitable CRF value from the curve to encode the video to be encoded. Furthermore, according to the above-mentioned video quality curve and video bit rate curve, the gradient information between video quality and bit rate can also be discovered, such as how much bit rate needs to be increased to improve the video quality of one unit, how much bit rate can be saved by reducing the video quality of one unit, and so on. In this way, users can be assisted in designing quality improvement or cost reduction strategies to maximize profits. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] Figure 1 is a schematic diagram of a system architecture of video encoding provided by an exemplary embodiment;

[0085] Figure 2 is a flowchart of a video encoding method provided by an exemplary embodiment;

[0086] Figure 3 is a schematic diagram of the structure of a deep learning model provided by an exemplary embodiment;

[0087] Figure 4 is a schematic diagram of a video quality curve provided by an exemplary embodiment;

[0088] Figure 5 is a schematic diagram of a video bit rate curve provided by an exemplary embodiment;

[0089] Figure 6 is a flowchart of a model training method provided by an exemplary embodiment;

[0090] Figure 7 is a structural schematic diagram of a video encoding device provided by an exemplary embodiment;

[0091] Figure 8 is a structural schematic diagram of a model training device provided by an exemplary embodiment;

[0092] Fig. 9 It is a structural diagram of a computing device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0093] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with one or more embodiments of the present application. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of the present application as detailed in the appended claims.

[0094] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this application. In some other embodiments, the steps included in the method may be more or less than those described in this application. In addition, a single step described in this application may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this application may also be combined into a single step for description in other embodiments.

[0095] First, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0096] (1) CRF is a parameter in constant quality encoding mode. After setting a fixed CRF value, the encoder will automatically adjust the bitrate when encoding the source video to maintain the consistency of the visual quality of the output video as much as possible.

[0097] (2) Bit rate (or bit rate) refers to the number of bits transmitted per second. The higher the bit rate, the more data is transmitted per second, and the clearer the video quality is. The larger the CRF value, the more severely the source video is compressed during the encoding process, and the smaller the bit rate of the encoded video is, that is, the smaller the amount of encoded video data is, and accordingly, the worse the video quality is.

[0098] (3) Video Muitimethod Assessment Fusion (VMAF) is a common video quality evaluation index. VMAF can better evaluate the subjective quality loss of the encoded video (or transcoded video) compared with the source video based on the subjective perception of the human eye. The larger the VMAF value, the better the video quality.

[0099] As mentioned above, it is not difficult to understand that if you want to reduce the amount of data by reducing the video bit rate during video encoding, thereby saving more costs, you will inevitably have to sacrifice video quality; if you need to ensure the quality of the encoded video, you will inevitably have to increase the bit rate and increase costs. Therefore, for the video to be encoded, considering the quality and bit rate of the encoded video, it is particularly important to quickly and accurately select a suitable CRF value for it to perform video encoding.

[0100] However, in conventional video encoding schemes, an exhaustive search for each CRF value corresponding to each resolution is generally used, and through a large number of transcodings, transcoding parameters (including CRF value) and resolution levels with video quality (i.e. VMAF value) constant within a certain range are selected. Obviously, this consumes a lot of transcoding resources and is not worth the cost. Alternatively, in some other schemes, a model is also used to predict the CRF value corresponding to each video to be encoded at a fixed VMAF value, and the video to be encoded is encoded based on the CRF value. Although this can control the video quality of the encoded video within the expected range, it does not take into account the video bit rate. In this way, the bit rate cost cannot be estimated when improving video quality, and the bit rate benefit cannot be evaluated when reducing video quality, making it impossible for users to formulate reasonable quality improvement or cost reduction strategies based on actual needs.

[0101] Based on this, the present application provides a video encoding method, which first extracts features from a video to be encoded to obtain video features of multiple dimensions related to the video to be encoded. Furthermore, based on the extracted video features of multiple dimensions, the video quality curves and video bit rate curves corresponding to the video to be encoded based on different CRF values ​​are predicted. In this way, by combining the above-mentioned video quality curve and video bit rate curve, the user can combine their actual needs, comprehensively consider the video quality and bit rate, and quickly and accurately select a suitable CRF value from the curve to encode the video to be encoded. Furthermore, according to the above-mentioned video quality curve and video bit rate curve, the gradient information between video quality and bit rate can also be discovered, such as how much bit rate needs to be increased to improve the video quality of one unit, how much bit rate can be saved by reducing the video quality of one unit, and so on. In this way, users can be assisted in designing quality improvement or cost reduction strategies to maximize profits.

[0102] See also Figure 1 , Figure 1 is a schematic diagram of a video coding system architecture provided by an exemplary embodiment. The technical solution of the embodiment of the present application can be Figure 1 The system architecture shown in the figure or a similar system architecture is specifically implemented. Figure 1As shown, the system architecture may include a server 100 and at least one client 200. The server 100 and at least one client 200 may establish a communication connection in any possible manner, which is not specifically limited in the present application.

[0103] The server 100 may be a program installed in a background device to provide services to users. For example, Figure 1 As shown, the background device can be a server, which can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0104] The client 200 may be a program installed in a user terminal to provide services to the user, wherein the client 200 includes but is not limited to an application APP, a web page, a small program, a plug-in or a component, etc. For example, Figure 1 As shown, user terminals include but are not limited to smart phones, personal digital assistants, tablet computers, personal computers, laptops, virtual reality terminal devices, augmented reality terminal devices, etc.

[0105] In an illustrated embodiment, a video encoding method provided by the present application can be applied to the server 100. Exemplarily, a user can upload a video shot or produced by himself through the client 200 to publish the corresponding video work in the client. The client 200 can send the video uploaded by the user to the server 100. Accordingly, the server 100 can predict the corresponding video quality curve and video bit rate curve when the video is encoded based on different CRF values ​​through the video encoding method provided by the present application. Among them, the video quality curve can be used to describe the changing relationship between CRF and video quality, and the video bit rate curve can be used to describe the changing relationship between CRF and video bit rate. Further, the server 100 can select a suitable CRF value from the video quality curve and the video bit rate curve for video encoding, and return the encoded video to the client 200, and the client 200 displays the encoded video to the user through the corresponding interface, etc. For details, please refer to the following Figure 2 The description of the corresponding embodiments will not be elaborated in detail here.

[0106] In some possible implementations, a video encoding method provided in this application can also be applied to Figure 1In the client 200 shown. Exemplarily, after acquiring the video uploaded by the user, the client 200 can predict the video quality curve and the video bit rate curve related to the video to be encoded through the video encoding method provided by the present application, and select a suitable CRF value from the curve for video encoding, and display the encoded video to the user through the corresponding interface, etc., which is not specifically limited in the present application.

[0107] The following will Figure 1 The server 100 in the system architecture shown in the figure is used as an example to execute the video encoding method provided in the embodiment of the present application for exemplary description. Figure 2 , Figure 2 FIG. 1 is a flow chart of a video encoding method provided by an exemplary embodiment. Figure 2 As shown, the method may specifically include the following steps S201 to S204.

[0108] Step S201, extracting features from a video to be encoded to obtain video features of multiple dimensions related to the video to be encoded.

[0109] First, it should be noted that the present application does not specifically limit the source, type, and content of the video to be encoded. In an illustrated embodiment, the video to be encoded may be a source video uploaded by a user (individual or organization) through a client, such as a video work shot or produced by oneself. In an illustrated embodiment, the video to be encoded may also be some surveillance videos uploaded by the client at a fixed time, or some videos that have been published on a video website, etc., and the present application does not specifically limit this.

[0110] In an illustrated implementation manner, the video to be encoded may be a complete video, or a video segment of a complete video, etc., which is not specifically limited in the present application.

[0111] Furthermore, after acquiring the video to be encoded, the server may perform feature extraction on the video to be encoded to obtain video features of multiple dimensions related to the video to be encoded.

[0112] It should be noted that the present application does not impose any particular limitation on the specific implementation method of feature extraction.

[0113] In an illustrated embodiment, feature extraction may include three parts, namely, video content feature extraction, online complete encoding feature extraction, and fast pre-encoding feature extraction.

[0114] The video content feature extraction may include a combination of one or more feature extraction methods shown below:

[0115] The video spatial texture features of the video to be encoded are extracted based on the gray-level co-occurrence matrix (GLCM). The gray-level co-occurrence matrix is ​​a commonly used image processing technology used to analyze the texture features of an image. The co-occurrence matrix reflects the co-occurrence probability of different gray levels in space, thereby capturing the texture information of the image, such as roughness, regularity, etc. When applied to video, each color video frame in the video can be converted into a grayscale image first, and then the co-occurrence matrix of the pixel grayscale value in each frame is calculated. By analyzing these matrices, indicators reflecting the texture characteristics of the video frame can be extracted, such as contrast, correlation, entropy, etc., which will not be elaborated here.

[0116] Based on a preset quality assessment algorithm, the quality information of the video to be encoded is extracted. Exemplarily, the quality information may include one or more of noise information, blind video quality assessment (BVQA) information, block effect information and blur degree information. Among them, the noise information can be used to evaluate the intensity and distribution of noise in the video, and the noise will affect the clarity and perception of the video. Among them, the blind quality assessment information refers to the quality score predicted directly from the video to be encoded based on the statistical analysis or machine learning model of the video signal of the video to be encoded, without relying on the reference video. Among them, the block effect information can represent the image block effect caused by compression or other processing, which is usually manifested as a clear boundary in the image (i.e., the video frame of the video to be encoded), affecting the visual continuity. Among them, the blur degree information can measure the blur degree of the video, which can usually be determined by analyzing the sharpness or edge information of the video frame.

[0117] The video spatiotemporal correlation features of the video to be encoded are extracted based on a preset spatiotemporal domain algorithm. The spatiotemporal domain algorithm may include motion estimation, optical flow calculation or a technology based on time series analysis to capture information such as dynamic behavior, motion trajectory, scene transition, etc. of objects in the video. Through these analyses, features in both time and space dimensions such as the law of video content change, action coherence or scene complexity can be extracted, and the details will not be elaborated here.

[0118] Among them, feature extraction of online complete encoding may include: performing complete video encoding on the video to be encoded based on the selected CRF feature value to obtain the encoded video, then obtaining the VMAF value and video bit rate of the encoded video, and determining the VMAF value and video bit rate as the VMAF feature value and video bit rate feature value corresponding to the CRF feature value.

[0119] In an illustrated embodiment, the selected CRF feature value may be a more appropriate CRF feature value selected based on historical experience, such as 33, 32 or 30, etc., and the present application does not specifically limit this. For example, taking the selected CRF feature value equal to 32 as an example, the CRF feature value is used to perform complete video encoding on the video to be encoded, and the VMAF feature value corresponding to the encoded video may be 92, and the video bit rate feature value may be 800 (bit / s).

[0120] For example, the CRF feature value may be recorded as anchor_crf, the video bitrate feature value may be recorded as anchor_bitrate, and the VMAF feature value may be recorded as anchor_vmaf.

[0121] It should be noted that the present application does not specifically limit the implementation method of the above-mentioned online complete encoding. In an illustrated embodiment, the present application can use H.265 / HEVC to completely encode the encoded video, or can also use any other possible encoding method to completely encode the encoded video based on the selected CRF feature value.

[0122] Among them, the feature extraction of fast precoding may include: fast encoding the video to be encoded, and extracting the corresponding intra-frame prediction / inter-frame prediction encoding information, motion vector information, quantization step information, peak signal-to-noise ratio, prediction mode (or encoding mode) information, block division information, video bit rate and VMAF value of the video after fast encoding, and one or more information of the video width and height and video frame rate of the video to be encoded according to the result of fast encoding. Among them, intra-frame (Intra) prediction refers to predicting the content of the current block within the same frame using the encoded information around the pixel block, which is suitable for I frames (intra-frame coded frames) and helps random access and error recovery of the video. Inter-frame (Inter) prediction uses the similarity between the previous and next frames to predict the content of the current frame, which is usually used for P frames (forward prediction frames) and B frames (bidirectional prediction frames), and can greatly improve compression efficiency. Among them, the motion vector refers to the displacement of the current block relative to the corresponding block in the reference frame in the inter-frame prediction, which is used to compensate for motion and is the key to reducing spatial redundancy in video compression. Among them, the size of the quantization step in the encoding process directly affects the degree of compression and the quality of the video. Among them, block division information and prediction mode information refer to the macroblock (or sub-macroblock) division of the video frame and the selection of the best prediction mode during the encoding process. The encoding process allows block division in different sizes and shapes (such as 16x16, 8x8, 4x4, etc.), as well as multiple prediction modes (such as DC, plane, directional prediction of various angles, etc.) to achieve the best compression effect, etc., which will not be elaborated here.

[0123] It should be noted that the present application does not specifically limit the implementation of the above-mentioned fast pre-coding. In an embodiment shown in the figure, the present application can use x264 to quickly encode the video to be encoded. Among them, x264 is an open source H.264 / MPEG-4 AVC video encoding library that can efficiently compress the video to be encoded into a smaller video file while maintaining good video quality.

[0124] To summarize, after a series of feature extractions are performed on the video to be encoded, the video features of multiple dimensions (such as dimensions related to video quality and dimensions related to video content, etc.) obtained may include but are not limited to: anchor_crf, anchor_vmaf, anchor_bitrate, video spatial texture features, noise information, non-parameter video quality assessment information, block effect information, blur degree information, video spatiotemporal correlation features, intra-frame prediction / inter-frame prediction encoding information, motion vector information, quantization step information, peak signal-to-noise ratio, mode / block division information, video bit rate and VMAF value of the video after fast encoding, video width and height and video frame rate of the video to be encoded, etc. This application does not make specific limitations on this.

[0125] In some possible implementations, the server may also extract features from the encoded video by any other possible method, and the video features of multiple dimensions may also include any other possible features in addition to the above features, which is not specifically limited in this application.

[0126] Step S202: based on the video features of the multiple dimensions, predicting the video quality curve and the video bit rate curve respectively corresponding to when the video to be encoded is encoded based on different constant quality factor CRF values.

[0127] Furthermore, after the server obtains video features of multiple dimensions related to the video to be encoded through a series of feature extractions, it can predict the video quality curve and video bit rate curve corresponding to the video to be encoded based on different CRF values ​​based on the video features of the multiple dimensions.

[0128] In an illustrated embodiment, the video quality may include a VMAF value. It should be noted that conventional peak signal-to-noise ratio (PSNR) and structural similarity (SSIM) can also evaluate video quality, but considering that both evaluate the pixel-level difference between the video to be encoded and the encoded video from a low level, which is quite different from the subjective perception of the human eye, the present application may preferably use a VMAF value to represent the video quality of the encoded video obtained after encoding the video to be encoded.

[0129] In an illustrated embodiment, the server can perform a prediction every 0.2 step within the CRF value range of 20-40. That is, the server needs to predict the VMAF value and video bit rate of the encoded video when the to-be-encoded video is encoded at 101 different CRF values ​​(including 20, 20.2, 20.4, ..., 39.8, 40), thereby predicting 101 VMAF values ​​and 101 video bit rates corresponding to the 101 CRF values, respectively.

[0130] In an illustrated embodiment, the server may also perform a prediction every 0.5 step within the CRF value range of 25-40. That is, the server needs to predict the VMAF value and video bit rate of the encoded video when the to-be-encoded video is encoded at 51 different CRF values ​​(including 25, 25.5, 30, ..., 39.5, 40), thereby predicting 51 VMAF values ​​and 51 video bit rates corresponding to the 51 CRF values, respectively.

[0131] Furthermore, the server can generate a video quality curve (which can be recorded as a crf-vmaf curve) for describing the changing relationship between CRF and video quality, and a video bitrate curve (which can be recorded as a crf-bitrate curve) for describing the changing relationship between CRF and video bitrate based on the predicted multiple VMAF values ​​and video bitrates (such as the 101 VMAF values ​​and 101 video bitrates corresponding to the 101 CRF values ​​mentioned above). Among them, the x-axis of the crf-vmaf curve can represent the CRF value, and the y-axis can represent the VMAF value; the x-axis of the crf-bitrate curve can represent the CRF value, and the y-axis can represent the bitrate value.

[0132] It should be noted that the present application does not specifically limit the specific implementation method of predicting the above-mentioned crf-vmaf curve and crf-bitrate curve.

[0133] In an illustrated embodiment, the server can predict the above-mentioned crf-vmaf curve and crf-bitrate curve through a pre-trained deep learning model. Exemplarily, the server can input the extracted video features of multiple dimensions into the pre-trained deep learning model, and the deep learning model predicts the above-mentioned crf-vmaf curve and crf-bitrate curve based on the video features of multiple dimensions. Exemplarily, the deep learning model can first predict the corresponding video quality and video bit rate when the video to be encoded is encoded based on different CRF values, and then generate the corresponding crf-vmaf curve and crf-bitrate curve based on the predicted multiple video qualities and video bit rates. Exemplarily, still taking the predicted multiple VMAF values ​​and video bit rates including 101 VMAF values ​​and 101 video bit rates corresponding to 101 CRF values ​​respectively as an example, the deep learning model can fit 101 discrete points consisting of 101 CRF values ​​and their corresponding 101 VMAF values ​​into a crf-vmaf curve; and, fit 101 discrete points consisting of 101 CRF values ​​and their corresponding 101 video bit rates into a crf-bitrate curve, which is not specifically limited in the present application.

[0134] It should be noted that this application does not specifically limit the specific type and internal structure of the above-mentioned deep learning model.

[0135] In one illustrated embodiment, see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of a deep learning model provided by an exemplary embodiment. Figure 3 As shown, the deep learning model can be connected to the feature extraction module used to implement the method flow in the above step S201.

[0136] like Figure 3 As shown, the feature extraction module may include video content feature extraction, online complete encoding feature extraction, and fast pre-encoding feature extraction, and output the extracted video features of multiple dimensions. For details, please refer to the description in the above step S201, which will not be repeated here.

[0137] like Figure 3 As shown, the deep learning model may include a first base network (base-net), a suspension operator, and a second base network connected in sequence.

[0138] In an illustrated embodiment, the video features of multiple dimensions output by the feature extraction module can be input into the first basic network, and the first basic network predicts the crf-vmaf curve and the crf-bitrate curve based on the video features of multiple dimensions, that is, Figure 3 Pred 1pass vmaf / bitrate curve shown.

[0139] In an illustrated embodiment, the server may first concatenate the video features of multiple dimensions output by the feature extraction module to obtain the corresponding target features, and then input the target features into the first basic network, which predicts the above-mentioned crf-vmaf curve and crf-bitrate curve based on the target features. It should be understood that by concatenating features, features from different sources or different types can be integrated together to obtain a more comprehensive feature, and the network can learn the interaction and combination effects between features to improve the prediction performance of the model, etc.

[0140] like Figure 3 As shown, the first basic network may include a batch normalization layer, a self-attention layer, a residual feature layer, and a fully connected layer. Figure 3 The internal structure of the first basic network is shown, and the process of predicting the crf-vmaf curve and the crf-bitrate curve by the first basic network is described.

[0141] First, the target feature obtained by splicing the video features of multiple dimensions is input to the batch normalization layer, and the batch normalization layer performs batch normalization processing on the video features of multiple dimensions contained in the target feature, and outputs the video features of multiple dimensions after normalization processing. It should be understood that the features of different scales can be converted to the same scale through normalization processing, for example, the values ​​of the video features of multiple dimensions are adjusted to the range of [0, 1], which is conducive to the mutual comparison and combination of different video features.

[0142] Then, the normalized video features of multiple dimensions are input into the self-attention mechanism layer, and the self-attention mechanism layer extracts the association information between the video features of the multiple dimensions, and integrates the video features of the multiple dimensions into deep features based on the association information. In an illustrated embodiment, the association information between the video features of the multiple dimensions may include the correlation coefficients between the video features of the multiple dimensions.

[0143] Then, the deep features output from the self-attention mechanism layer are input to the residual feature layer, and the residual feature layer performs residual correction on the deep features to obtain residual features. Figure 3As shown, the residual feature layer may include two residual blocks (res-block). It should be understood that setting the residual block can help the network learn the residual more easily, that is, the difference between the output and the input, promote deeper feature learning, and effectively solve the common gradient vanishing problem in deep networks, etc. This application does not make specific limitations on this.

[0144] Finally, the residual features output by the residual feature layer are input to the fully connected layer, and the fully connected layer predicts the crf-vmaf curve and crf-bitrate curve based on the residual features and outputs them.

[0145] In this way, the present application uses a combination of multi-dimensional video features such as coding information and quality information as the input of the first basic network, and uses reasonable normalization methods and self-attention mechanisms and other network designs in the first basic network to maximize network performance and improve the prediction accuracy of the crf-vmaf curve and the crf-bitrate curve.

[0146] As described above, in the feature extraction process described in step S201 of the present application, a complete encoding of the video to be encoded has been performed based on anchor_crf, and the corresponding anchor_vmaf and anchor_bitrate have been obtained. It is not difficult to understand that the real crf-vmaf curve corresponding to the video to be encoded must pass through the first anchor point (anchor_crf, anchor_vmaf) composed of anchor_crf and anchor_vmaf, and accordingly, the real anchor_bitrate curve corresponding to the video to be encoded must also pass through the second anchor point (anchor_crf, anchor_bitrate) composed of anchor_crf and anchor_bitrate.

[0147] Based on this, Figure 3 As shown, the present application further sets a suspension operator connected to the above-mentioned first basic network in the deep learning model, through which the crf-vmaf curve and crf-bitrate curve predicted by the first basic network can be further suspended based on the anchor_crf, anchor_vmaf and anchor_bitrate in the above-mentioned video features to obtain the crf-vmaf curve and crf-bitrate curve after suspension processing, that is, Figure 3 Pred1pass vmaf / bitrate hanging curve shown.

[0148] Among them, the crf-vmaf curve after hanging processing passes through the first anchor point (anchor_crf, anchor_vmaf), and the crf-bitrate curve after hanging processing passes through the second anchor point (anchor_crf, anchor_bitrate), thereby improving the prediction accuracy of the deep learning model and making the predicted curve closer to the real curve, that is, Figure 3 The label vmaf / bitrate curve shown.

[0149] In an illustrated embodiment, the suspension processing may specifically include: performing an offset operation on the overall vmaf value of the predicted crf-vmaf curve, wherein the offset value may be equal to anchor_vmaf minus the vmaf value corresponding to anchor_crf in the crf-vmaf curve; and performing an offset operation on the overall bitrate value of the predicted crf-bitrate curve, wherein the offset value may be equal to anchor_bitrate minus the bitrate value corresponding to anchor_crf in the crf-bitrate curve.

[0150] In this way, after the suspension process, the crf-vmaf curve must pass through the first anchor point (anchor_crf, anchor_vmaf), and the crf-bitrate curve must pass through the second anchor point (anchor_crf, anchor_bitrate).

[0151] Exemplarily, assuming that anchor_crf=32, anchor_vmaf=92, and the vmaf value corresponding to anchor_crf in the crf-vmaf curve is 91, the suspension processing of the crf-vmaf curve may include: performing an offset operation with an offset value equal to 1 on the overall vmaf value of the crf-vmaf curve, that is, increasing the overall vmaf value of the crf-vmaf curve by 1 unit.

[0152] Exemplarily, assuming that anchor_crf=32, anchor_bitrate=800, and the bitrate value corresponding to anchor_crf in the crf-bitrate curve is 760, the suspension processing of the crf-bitrate curve may include: performing an offset operation with an offset value equal to =40 on the overall bitrate value of the crf-bitrate curve, that is, increasing the overall bitrate value of the crf-bitrate curve by 40 units.

[0153] In an illustrated embodiment, in order to further improve the prediction accuracy of the deep learning model, Figure 3 As shown, the present application further sets a second basic network connected to the above-mentioned suspension operator in the deep learning model, and the second basic network can perform residual correction on the crf-vmaf curve and crf-bitrate curve after the suspension processing to obtain the residual corrected crf-vmaf curve and crf-bitrate curve, that is, Figure 3 Pred 2pass vmaf / bitrate curve shown.

[0154] It should be noted that the present application does not specifically limit the specific structure of the second basic network. In one illustrated embodiment, the second basic network can perform residual learning based on skip connection to enable the model to have better prediction performance, etc., and the present application does not specifically limit this.

[0155] See also Figure 4 , Figure 4 FIG. 1 is a schematic diagram of a video quality curve provided by an exemplary embodiment. Figure 4 As shown, curve ① is the basic crf-vmaf curve predicted by the first basic network in the deep learning model, curve ② is the crf-vmaf curve after the basic crf-vmaf curve is suspended by the suspension operator in the deep learning model, curve ③ is the crf-vmaf curve after the crf-vmaf curve after the suspension processing is residually corrected by the second basic network in the deep learning model, and curve ④ can be the true value, that is, the true crf-vmaf curve corresponding to the video to be encoded. Exemplary, Figure 4 The curve ④ shown may be a curve formed by a plurality of corresponding vmaf true values ​​after the to-be-encoded video is encoded multiple times using different CRF values.

[0156] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of a video bit rate curve provided by an exemplary embodiment. Figure 5 As shown, curve ⑤ is the basic crf-bitrate curve predicted by the first basic network in the deep learning model, curve ⑥ is the crf-bitrate curve after the basic crf-bitrate curve is suspended by the suspension operator in the deep learning model, and curve ⑦ is the crf-bitrate curve after the crf-bitrate curve after the suspension is corrected by the residual error of the second basic network in the deep learning model. Curve ⑧ can be the true value, that is, the true crf-bitrate curve corresponding to the video to be encoded. Exemplary, Figure 5The curve ⑧ shown may be a curve formed by a plurality of bitrate true values ​​corresponding to multiple encodings of the to-be-encoded video using different CRF values.

[0157] like Figure 4 and Figure 5 As shown, the basic crf-vmaf curve and crf-bitrate curve predicted only by the first basic network in the model do not necessarily pass through (anchor_crf, anchor_vmaf) and (anchor_crf, anchor_bitrate), and the crf-vmaf curve and crf-bitrate curve after the suspension processing must pass through (anchor_crf, anchor_vmaf) and (anchor_crf, anchor_bitrate). At the same time, the crf-vmaf curve and crf-bitrate curve after further residual correction also pass through (anchor_crf, anchor_vmaf) and (anchor_crf, anchor_bitrate).

[0158] like Figure 4 and Figure 5 As shown, based on the crf-vmaf curve and crf-bitrate curve predicted by the first basic network, further suspension processing and residual correction can make the crf-vmaf curve and crf-bitrate curve predicted by the model closer and closer to the true value, and the curve prediction accuracy is improved successively.

[0159] Step S203: Obtain a CRF target value selected from the video quality curve and the video bit rate curve and matching the video quality and video bit rate required for video encoding of the video to be encoded.

[0160] Furthermore, after the suspension processing and residual correction, the final crf-vmaf curve and crf-bitrate curve are predicted, and then the CRF target value that matches the video quality and video bit rate required for video encoding of the video to be encoded can be selected from the crf-vmaf curve and crf-bitrate curve according to actual needs.

[0161] It should be noted that the present application does not specifically limit the specific implementation method of selecting the CRF target value from the crf-vmaf curve and the crf-bitrate curve.

[0162] In an illustrated embodiment, a CRF target value can be manually selected from the crf-vmaf curve and the crf-bitrate curve. Exemplarily, the server can output the predicted crf-vmaf curve and crf-bitrate curve to the platform staff through the corresponding interface. Accordingly, the staff can select a suitable CRF target value from the crf-vmaf curve and the crf-bitrate curve based on actual needs. For example, the staff can enter the corresponding CRF target value in the input box provided in the interface, or can directly click the corresponding CRF target value in the crf-vmaf curve or the crf-bitrate curve, etc. This application does not make specific restrictions on this. Accordingly, the server can obtain the CRF target value selected by the staff from the crf-vmaf curve and the crf-bitrate curve based on the input operation of the staff.

[0163] For example, if the current demand of the platform is to improve the image quality as much as possible, the staff can give priority to the CRF value range corresponding to the high VMAF value (for example, 92-95) in the crf-vmaf curve, and further consider whether the bitrate value range corresponding to the CRF value range in the crf-bitrate curve is reasonable, so as to select a suitable CRF target value from the CRF value range, thereby achieving the goal of improving the image quality as much as possible while avoiding bit rate waste.

[0164] For example, if the current demand of the platform is to reduce the bitrate as much as possible to save costs, the staff can give priority to the CRF value range corresponding to the low bitrate value (for example, 500bit / s-800bit / s) in the crf-bitrat curve, and further consider whether the vmaf value range corresponding to the CRF value range in the crf-vmaf curve is reasonable, so as to select a suitable CRF target value from the CRF value range, thereby achieving the goal of reducing the bitrate as much as possible while avoiding serious degradation of video quality.

[0165] In an illustrated implementation, the staff can also combine the crf-vmaf curve and the crf-bitrate curve to determine the gradient information between vmaf and bitrate, such as how much bitrate needs to be increased by one unit of vmaf, how much bitrate can be saved by reducing one unit of vmaf, etc. In this way, the gradient information between vmaf and bitrate can be used as a reliable reference item to assist users in designing quality improvement or cost reduction strategies to maximize benefits.

[0166] In an illustrated implementation, the server may also automatically select a suitable CRF target value based on the predicted crf-vmaf curve and crf-bitrate curve.

[0167] In an illustrated implementation, the server may first determine the video quality value range and the video bitrate range required for video encoding of the video to be encoded, namely, the VMAF value range and the bitrate value range. Further, the server may determine a first CRF value range corresponding to the VMAF value range from the crf-vmaf curve; and determine a second CRF value range corresponding to the bitrate value range from the crf-bitrate curve. Furthermore, the server may select a CRF target value from the intersection of the first CRF value range and the second CRF value range.

[0168] Exemplarily, the vmaf value range can be 87-93. Generally speaking, if the vmaf value of the encoded video is lower than 87, the video may have a low bit rate, which leads to a serious degradation of the video quality; if the vmaf value of the transcoded video is higher than 93, the video may have a high bit rate, that is, a serious waste of bit rate, thereby wasting bandwidth and increasing unnecessary costs. Accordingly, the first CRF value range corresponding to the vmaf value range of 87-93 determined from the crf-vmaf curve can be 31-37.5.

[0169] Exemplarily, the bitrate value range may be 750 bit / s-1200 bit / s, and accordingly, the second CRF value range corresponding to the bitrate in the range of 600 bit / s-1200 bit / s determined from the crf-bitrate curve may be 28-33.5.

[0170] Exemplarily, the intersection of the first CRF value range (31-37.5) and the second CRF value range (28-33.5) is 31-33.5. Further, the server can select a CRF target value from the CRF value range of 31-33.5 according to the preset actual demand. Exemplarily, assuming that the preset actual demand is to improve image quality, the server can determine the CRF target value to 33 or 33.5, etc., assuming that the preset actual demand is to reduce costs, the server can determine the CRF target value to 31 or 31.5, etc., and this application does not make specific limitations on this.

[0171] In an illustrated embodiment, the server may also first determine the video quality target value and the video bit rate target value required for video encoding of the video to be encoded, namely, the VMAF target value and the bitrate target value. Further, the server may determine a first CRF value corresponding to the VMAF target value from the crf-vmaf curve; and determine a second CRF value corresponding to the bitrate target value from the crf-bitrate curve. Furthermore, the server may determine a suitable CRF target value based on the first CRF value and the second CRF value.

[0172] For example, the average value between the first CRF value and the second CRF value may be directly determined as the CRF target value. Assuming that the first CRF value and the second CRF value are 30 and 33 respectively, the average value 31.5 may be determined as the CRF target value.

[0173] Exemplarily, the weight of the first CRF value corresponding to the above-mentioned vmaf target value and the weight of the second CRF value corresponding to the above-mentioned bitrate target value can also be determined according to preset actual needs, and a weighted average of the first CRF value and the second CRF value can be obtained based on the weights of the two, and the weighted average can be determined as the CRF target value.

[0174] For example, assuming that the preset actual demand is to improve the image quality, the server can determine that the weight of the first CRF value is 0.6, and the weight of the second CRF value is 0.4. Correspondingly, still taking the first CRF value and the second CRF value as 30 and 33 respectively as an example, the calculated weighted average value can be 31.2, that is, the selected CRF target value is 31.2.

[0175] Exemplarily, assuming that the preset actual demand is to reduce costs, the server can determine that the weight of the first CRF value is 0.4, and the weight of the second CRF value is 0.6. Correspondingly, still taking the first CRF value and the second CRF value as 30 and 33 respectively as an example, the calculated weighted average can be 31.2, that is, the selected CRF target value is 31.8.

[0176] It should be noted that in addition to the manual and automatic methods of selecting the CRF target value described above, the present application may also select a suitable CRF target value from the predicted crf-vmaf curve and crf-bitrate curve in any other possible manner, and the present application does not make any specific limitations on this.

[0177] Step S204: encoding the video to be encoded based on the CRF target value to obtain a target video.

[0178] Furthermore, the server can perform video encoding on the video to be encoded based on the selected CRF target value to obtain the encoded target video. It should be noted that the specific implementation method of video encoding cannot be specifically limited in this application. In an embodiment shown, the server can use any possible encoding method such as H.264 / AVC, H.265 / HEVC, etc. to perform video encoding on the video to be encoded based on the CRF target value.

[0179] Furthermore, the server can send the encoded target video to the client connected to it (for example Figure 1 Any one of the multiple clients 200 shown in the figure), the client outputs and displays the target video to the user through a corresponding interface (such as a video browsing interface, etc.), etc., and this application does not make specific limitations on this.

[0180] Below, the model training process of the above-mentioned deep learning model will be explained. It should be noted that this application does not specifically limit the training process of the deep learning model.

[0181] In an illustrated embodiment, the present application can perform supervised training on a deep learning model through a large number of training samples and corresponding sample labels. Figure 6 , Figure 6 FIG. 1 is a flow chart of a model training method provided by an exemplary embodiment. Figure 6 As shown, the method may specifically include the following steps S601 to S603.

[0182] Step S601: Acquire multiple sample videos, perform feature extraction on the multiple sample videos respectively, and obtain video features of multiple dimensions related to each sample video.

[0183] In an illustrated embodiment, the present application may first obtain multiple sample videos, and perform feature extraction on the multiple sample videos respectively to obtain video features of multiple dimensions related to each sample video. The specific implementation of feature extraction can refer to the description in the above step S201, which will not be repeated here. In addition, it should be noted that the present application does not specifically limit the specific type and content of the sample videos. In an illustrated embodiment, the multiple sample videos can be multiple short videos or long videos with different contents that have been published online, etc.

[0184] Step S602: Perform video encoding on each sample video multiple times based on multiple preset CRF values ​​to obtain multiple encoded videos corresponding to each sample video, and obtain video quality and video bit rate of the multiple encoded videos.

[0185] Then, the present application can perform multiple video encodings on each sample video based on multiple preset CRF values ​​to obtain multiple encoded videos corresponding to each sample video, and obtain the video quality and video bit rate of the multiple encoded videos corresponding to each sample video.

[0186] Exemplarily, the present application can obtain 10,000 online videos, and perform feature extraction on each of the 10,000 videos to obtain multi-dimensional video features corresponding to each video. Furthermore, within the CRF value range of 20-40, each video is encoded every 0.2 steps, that is, each video is encoded based on CRF values ​​of 20, 20.2, 20.4, ..., 39.8, 40 in turn, and finally 101 encoded videos corresponding to each video are obtained, that is, a total of 1.01 million encoded videos are obtained. Furthermore, the bitrate information and vmaf information of these 1.01 million encoded videos are extracted.

[0187] Step S603, using the video features of multiple dimensions related to each video sample as training samples, and using the video quality and video bit rate of multiple encoded videos corresponding to each sample video as sample labels, to perform supervised training on the deep learning model.

[0188] Then, the present application can use video features of multiple dimensions related to each sample video as training samples (i.e., input data of the model), and use the bitrate information and VMAF information of multiple encoded videos corresponding to each sample video (for example, 101 (bitrate, VMAF) point pairs corresponding to 101 CRF values) as sample labels to perform supervised training on the deep learning model.

[0189] In an illustrated embodiment, the supervised training process may include: using the L1 loss function to supervise the crf-vmaf curve and crf-bitrate curve output by the first basic network in the deep learning model and the difference between each point and the label point pair in the crf-vmaf curve and crf-bitrate curve output by the second basic network, and using the L1loss loss function to supervise the gradient difference, the gradient can be defined as the vmaf_diff value of adjacent crf points divided by the bitrate_diff value, the vmaf_diff value is the difference between the two vamaf values ​​corresponding to the adjacent crf points, the bitrate_diff value is the difference between the two bitrate values ​​corresponding to the adjacent crf points, and so on. This application does not make any specific limitations on this.

[0190] Finally, the trained deep learning model can be used to predict the crf-vmaf curve and crf-bitrate curve corresponding to the video to be encoded based on the input video features of multiple dimensions related to the video to be encoded based on different CRF values.

[0191] Corresponding to the implementation of the above method flow, the embodiment of the present application also provides a video encoding device. Figure 7 , Figure 7 FIG. 1 is a schematic diagram of a video encoding device provided by an exemplary embodiment. Figure 7 As shown, the device 70 includes:

[0192] A feature extraction unit 701 is used to extract features from the video to be encoded, and obtain video features of multiple dimensions related to the video to be encoded;

[0193] A prediction unit 702 is used to predict, based on the video features of the multiple dimensions, video quality curves and video bit rate curves corresponding to when the to-be-encoded video is encoded based on different CRF values;

[0194] An acquisition unit 703 is used to acquire a CRF target value selected from the video quality curve and the video bit rate curve and matching the video quality and video bit rate required for video encoding of the video to be encoded;

[0195] The encoding unit 704 is configured to perform video encoding on the to-be-encoded video based on the CRF target value to obtain a target video.

[0196] In an illustrated embodiment, the video quality includes a VMAF value, a multi-method fusion evaluation index of video quality based on subjective perception of human eyes; the video features of the multiple dimensions include a CRF feature value, a VMAF feature value, and a video bit rate feature value; the feature extraction unit 701 is specifically used to:

[0197] Performing video encoding on the video to be encoded based on the selected CRF feature value to obtain an encoded video;

[0198] A VMAF value and a video bit rate of the encoded video are obtained, and the VMAF value and the video bit rate are determined as the VMAF characteristic value and the video bit rate characteristic value corresponding to the CRF characteristic value.

[0199] In an illustrated embodiment, the prediction unit 702 is specifically configured to:

[0200] The video features of the multiple dimensions are input into a pre-trained deep learning model, and the deep learning model predicts the video quality curve and the video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values ​​based on the video features of the multiple dimensions.

[0201] In an illustrated embodiment, the deep learning model includes a first basic network; the prediction unit 702 is specifically configured to:

[0202] Perform feature splicing on the video features of the multiple dimensions to obtain target features;

[0203] The target feature is input into the first basic network, and the first basic network predicts, based on the target feature, a video quality curve and a video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values.

[0204] In an illustrated embodiment, the first basic network includes a batch normalization layer, a self-attention mechanism layer, a residual feature layer and a fully connected layer connected in sequence; the prediction unit 702 is specifically used to:

[0205] Inputting the target feature into a batch normalization layer, and the batch normalization layer performs batch normalization processing on the video features of multiple dimensions contained in the target feature;

[0206] Inputting the normalized video features of the multiple dimensions into a self-attention mechanism layer, the self-attention mechanism layer extracts correlation information between the video features of the multiple dimensions, and integrating the video features of the multiple dimensions into deep features based on the correlation information;

[0207] Inputting the depth feature into a residual feature layer, and performing residual correction on the depth feature by the residual feature layer to obtain a residual feature;

[0208] The residual feature is input into a fully connected layer, and the fully connected layer predicts, based on the residual feature, a video quality curve and a video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values.

[0209] In an illustrated embodiment, the deep learning model further includes a suspension operator, and the device 70 further includes a suspension processing unit 705, which is used to:

[0210] Inputting the video quality curve and the video bit rate curve predicted by the first basic network into the suspension operator, and the suspension operator performs suspension processing on the video quality curve based on the CRF feature value and the VMAF feature value, so that the video quality curve after suspension processing passes through a first anchor point formed by the CRF feature value and the VMAF feature value; and

[0211] The video bit rate curve is suspended based on the CRF feature value and the video bit rate feature value, so that the video bit rate curve after the suspension process passes through a second anchor point formed by the CRF feature value and the video bit rate feature value.

[0212] In an illustrated embodiment, the deep learning model further includes a second basic network, and the device 70 further includes a residual correction unit 706, which is used to:

[0213] Inputting the video quality curve and the video bit rate curve after the suspension processing into the second basic network, and performing residual correction on the video quality curve and the video bit rate curve after the suspension processing by the second basic network, respectively, to obtain the video quality curve and the video bit rate curve after the residual correction;

[0214] The acquisition unit 703 is specifically used for:

[0215] A CRF target value that matches the VMAF value and the video bit rate required for video encoding of the video to be encoded is obtained from the residual-corrected video quality curve and the video bit rate curve.

[0216] In an illustrated embodiment, the acquisition unit 703 is specifically configured to:

[0217] Determining a first CRF value range corresponding to a video quality value range required for video encoding of the video to be encoded from the video quality curve; and

[0218] Determine, from the video bit rate curve, a second CRF value range corresponding to a video bit rate value range required for video encoding of the video to be encoded;

[0219] A CRF target value is selected from the intersection of the first CRF value range and the second CRF value range.

[0220] In an illustrated embodiment, the apparatus 70 further includes a model training unit 707, which is used to:

[0221] Acquire multiple sample videos, perform feature extraction on the multiple sample videos respectively, and obtain video features of multiple dimensions related to each sample video;

[0222] Based on the preset multiple CRF values, each sample video is respectively encoded multiple times to obtain multiple encoded videos corresponding to each sample video, and the video quality and video bit rate of the multiple encoded videos are obtained;

[0223] The deep learning model is supervisedly trained by taking video features of multiple dimensions related to each video sample as training samples, and taking video quality and video bit rate of multiple encoded videos corresponding to each sample video as sample labels.

[0224] In an illustrated embodiment, the video features of the multiple dimensions include one or more combinations of the following: video spatial texture features, video spatiotemporal correlation features, noise information, non-parametric video quality assessment information, block effect information and blur level information;

[0225] The feature extraction unit 701 is specifically used for:

[0226] Extracting the video spatial domain texture features of the video to be encoded based on the gray level co-occurrence matrix; and / or,

[0227] Based on a preset quality assessment algorithm, extracting quality information of the video to be encoded, wherein the quality information includes one or more of noise information, non-parameter video quality assessment information, block effect information and blur degree information; and / or,

[0228] The video spatiotemporal correlation features of the video to be encoded are extracted based on a preset spatiotemporal domain algorithm.

[0229] In an illustrated embodiment, the video features of the multiple dimensions include one or more combinations of the following: video width and height, video frame rate, motion vector information, quantization step information, peak signal-to-noise ratio, intra-frame prediction / inter-frame prediction encoding information, block partitioning information, video bit rate, and VMAF value;

[0230] The feature extraction unit 701 is specifically used for:

[0231] The video to be encoded is quickly encoded, and one or more of the following information is extracted according to the result of the fast encoding: video width and height, video frame rate, motion vector information, quantization step information, peak signal-to-noise ratio, intra-frame prediction / inter-frame prediction encoding information, block division information, video bit rate and VMAF value.

[0232] Corresponding to the implementation of the above method flow, the embodiment of the present application also provides a model training device. Figure 8 , Figure 8 FIG. 1 is a schematic diagram of a structure of a model training device provided by an exemplary embodiment. Figure 8As shown, the device 80 includes:

[0233] The feature extraction unit 801 is used to obtain multiple sample videos, perform feature extraction on the multiple sample videos respectively, and obtain video features of multiple dimensions related to each sample video;

[0234] The acquisition unit 802 is used to perform video encoding on each sample video multiple times based on multiple preset CRF values ​​to obtain multiple encoded videos corresponding to each sample video, and obtain the video quality and video bit rate of the multiple encoded videos;

[0235] The training unit 803 is used to perform supervised training on the deep learning model using video features of multiple dimensions related to each video sample as training samples, and using the video quality and video bit rate of multiple encoded videos corresponding to each sample video as sample labels; wherein the trained deep learning model is used to predict the video quality curve and video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values ​​based on the input video features of multiple dimensions related to the video to be encoded.

[0236] The implementation process of the functions and effects of each unit in the above-mentioned device 70 and device 80 is specifically described in the above-mentioned embodiment, and will not be repeated here. It should be understood that the above-mentioned device 70 and device 80 can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor (CPU) of the device where it is located reading the corresponding computer program instructions into the memory and running them. From the hardware level, in addition to the CPU and memory, the device where the above-mentioned device is located usually also includes other hardware such as chips for wireless signal transmission and reception, and / or other hardware such as boards and cards for realizing network communication functions.

[0237] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the units or modules may be selected according to actual needs to achieve the purpose of the present application. Those of ordinary skill in the art can understand and implement them without creative work.

[0238] The devices, units, and modules described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device, a vehicle-mounted computer, or a combination of any of these devices.

[0239] In some embodiments, the embodiments of the present application further provide a computing device, comprising: a processor; a memory for storing processor executable instructions; wherein the processor implements any of the methods described in the above embodiments by running the executable instructions.

[0240] For example, Fig. 9 is a schematic structural diagram of a computing device provided by an exemplary embodiment. Fig. 9 At the hardware level, the device includes a processor 902, an internal bus 904, a network interface 906, a memory 908, and a non-volatile memory 910, and may also include hardware required for other scenarios. One or more embodiments of the present application can be implemented based on software, such as the processor 902 reading the corresponding computer program from the non-volatile memory 910 into the memory 908 and then running it. Of course, in addition to the software implementation, one or more embodiments of the present application do not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0241] In some embodiments, the embodiments of the present application further provide a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the steps of any of the methods described above are implemented.

[0242] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0243] In some embodiments, the embodiments of the present application further provide a computer program product, including a computer program, which implements the steps of any of the methods described above when executed by a processor.

[0244] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0245] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0246] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0247] The above description is merely a preferred embodiment of one or more embodiments of the present application and is not intended to limit one or more embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present application shall be included in the scope of protection of one or more embodiments of the present application.

Claims

1. A video encoding method, characterized in that: The method comprises: Extracting features from the video to be encoded to obtain video features of multiple dimensions related to the video to be encoded; Based on the video features of the multiple dimensions, predicting the video quality curves and the video bit rate curves corresponding to when the video to be encoded is encoded based on different constant quality factor CRF values; Obtaining a CRF target value selected from the video quality curve and the video bit rate curve that matches the video quality and video bit rate required for video encoding of the video to be encoded; The video to be encoded is encoded based on the CRF target value to obtain a target video.

2. The method according to claim 1, characterized in that The video quality includes a VMAF value, a multi-method fusion evaluation index of video quality based on subjective perception of human eyes; the video features of the multiple dimensions include a CRF feature value, a VMAF feature value, and a video bit rate feature value; The feature extraction of the video to be encoded is performed to obtain video features of multiple dimensions related to the video to be encoded, including: Performing video encoding on the video to be encoded based on the selected CRF feature value to obtain an encoded video; A VMAF value and a video bit rate of the encoded video are obtained, and the VMAF value and the video bit rate are determined as the VMAF characteristic value and the video bit rate characteristic value corresponding to the CRF characteristic value.

3. The method according to claim 2, characterized in that The predicting, based on the video features of the multiple dimensions, corresponding video quality curves and video bit rate curves when the to-be-encoded video is encoded based on different CRF values, includes: The video features of the multiple dimensions are input into a pre-trained deep learning model, and the deep learning model predicts the video quality curve and the video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values ​​based on the video features of the multiple dimensions.

4. The method according to claim 3, characterized in that The deep learning model includes a first basic network; the video features of the multiple dimensions are input into the pre-trained deep learning model, and the deep learning model predicts the video quality curve and the video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values ​​based on the video features of the multiple dimensions, including: Perform feature splicing on the video features of the multiple dimensions to obtain target features; The target feature is input into the first basic network, and the first basic network predicts, based on the target feature, a video quality curve and a video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values.

5. The method according to claim 4, characterized in that The first basic network includes a batch normalization layer, a self-attention mechanism layer, a residual feature layer and a fully connected layer connected in sequence; the target feature is input into the first basic network, and the first basic network predicts the video quality curve and the video bit rate curve corresponding to the video encoding based on different CRF values ​​when the video to be encoded is encoded based on the target feature, including: Inputting the target feature into a batch normalization layer, and the batch normalization layer performs batch normalization processing on the video features of multiple dimensions contained in the target feature; Inputting the normalized video features of the multiple dimensions into a self-attention mechanism layer, the self-attention mechanism layer extracts correlation information between the video features of the multiple dimensions, and integrating the video features of the multiple dimensions into deep features based on the correlation information; Inputting the depth feature into a residual feature layer, and performing residual correction on the depth feature by the residual feature layer to obtain a residual feature; The residual feature is input into a fully connected layer, and the fully connected layer predicts, based on the residual feature, a video quality curve and a video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values.

6. The method according to claim 5, characterized in that The deep learning model also includes a suspension operator, and the method further includes: Inputting the video quality curve and the video bit rate curve predicted by the first basic network into the suspension operator, and the suspension operator performs suspension processing on the video quality curve based on the CRF feature value and the VMAF feature value, so that the video quality curve after suspension processing passes through a first anchor point formed by the CRF feature value and the VMAF feature value; and The video bit rate curve is suspended based on the CRF feature value and the video bit rate feature value, so that the video bit rate curve after the suspension process passes through a second anchor point formed by the CRF feature value and the video bit rate feature value.

7. The method according to claim 6, characterized in that The deep learning model also includes a second basic network, and the method further includes: Inputting the video quality curve and the video bit rate curve after the suspension processing into the second basic network, and performing residual correction on the video quality curve and the video bit rate curve after the suspension processing by the second basic network, respectively, to obtain the video quality curve and the video bit rate curve after the residual correction; The obtaining of a CRF target value selected from the video quality curve and the video bit rate curve and matching the video quality and video bit rate required for video encoding of the video to be encoded includes: A CRF target value that matches the VMAF value and the video bit rate required for video encoding of the video to be encoded is obtained from the residual-corrected video quality curve and the video bit rate curve.

8. The method according to claim 1, characterized in that: The obtaining of a CRF target value selected from the video quality curve and the video bit rate curve and matching the video quality and video bit rate required for video encoding of the video to be encoded includes: Determining a first CRF value range corresponding to a video quality value range required for video encoding of the video to be encoded from the video quality curve; and Determine, from the video bit rate curve, a second CRF value range corresponding to a video bit rate value range required for video encoding of the video to be encoded; A CRF target value is selected from the intersection of the first CRF value range and the second CRF value range.

9. The method according to claim 3, characterized in that: The method further comprises: Acquire multiple sample videos, perform feature extraction on the multiple sample videos respectively, and obtain video features of multiple dimensions related to each sample video; Based on the preset multiple CRF values, each sample video is respectively encoded multiple times to obtain multiple encoded videos corresponding to each sample video, and the video quality and video bit rate of the multiple encoded videos are obtained; The deep learning model is supervisedly trained by taking video features of multiple dimensions related to each video sample as training samples, and taking video quality and video bit rate of multiple encoded videos corresponding to each sample video as sample labels.

10. The method according to any one of claims 1 to 9, characterized in that: The video features of the multiple dimensions include one or more combinations of the following: video spatial texture features, video spatiotemporal correlation features, noise information, non-parametric video quality assessment information, block effect information and blur level information; The feature extraction of the video to be encoded is performed to obtain video features of multiple dimensions related to the video to be encoded, including: Extracting the video spatial domain texture features of the video to be encoded based on the gray level co-occurrence matrix; and / or, Based on a preset quality assessment algorithm, extracting quality information of the video to be encoded, wherein the quality information includes one or more of noise information, non-parameter video quality assessment information, block effect information and blur degree information; and / or, The video spatiotemporal correlation features of the video to be encoded are extracted based on a preset spatiotemporal domain algorithm.

11. The method according to any one of claims 1 to 9, characterized in that: The video features of the multiple dimensions include one or more combinations of the following: video width and height, video frame rate, motion vector information, quantization step information, peak signal-to-noise ratio, intra-frame prediction / inter-frame prediction encoding information, block partitioning information, video bit rate and VMAF value; The feature extraction of the video to be encoded is performed to obtain video features of multiple dimensions related to the video to be encoded, including: The video to be encoded is quickly encoded, and one or more of the following information is extracted according to the result of the fast encoding: video width and height, video frame rate, motion vector information, quantization step information, peak signal-to-noise ratio, intra-frame prediction / inter-frame prediction encoding information, block division information, video bit rate and VMAF value.

12. A model training method, characterized in that: The method comprises: Acquire multiple sample videos, perform feature extraction on the multiple sample videos respectively, and obtain video features of multiple dimensions related to each sample video; Based on the preset multiple CRF values, each sample video is respectively encoded multiple times to obtain multiple encoded videos corresponding to each sample video, and the video quality and video bit rate of the multiple encoded videos are obtained; The deep learning model is supervisedly trained using video features of multiple dimensions related to each video sample as training samples, and video quality and video bit rate of multiple encoded videos corresponding to each sample video as sample labels; wherein the trained deep learning model is used to predict the video quality curve and video bit rate curve corresponding to video encoding based on different CRF values ​​when the video to be encoded is encoded based on the input video features of multiple dimensions related to the video to be encoded.

13. A video encoding device, characterized in that: The device comprises: A feature extraction unit, used to extract features of the video to be encoded, and obtain video features of multiple dimensions related to the video to be encoded; A prediction unit, configured to predict, based on the video features of the multiple dimensions, corresponding video quality curves and video bit rate curves when the to-be-encoded video is encoded based on different CRF values; An acquisition unit, configured to acquire a CRF target value selected from the video quality curve and the video bit rate curve and matching the video quality and video bit rate required for video encoding of the video to be encoded; The encoding unit is used to perform video encoding on the video to be encoded based on the CRF target value to obtain a target video.

14. A model training device, characterized in that: The device comprises: A feature extraction unit, used to obtain multiple sample videos, perform feature extraction on the multiple sample videos respectively, and obtain video features of multiple dimensions related to each sample video; An acquisition unit, configured to perform video encoding on each sample video multiple times based on multiple preset CRF values, obtain multiple encoded videos corresponding to each sample video, and obtain video quality and video bit rate of the multiple encoded videos; A training unit is used to perform supervised training on a deep learning model using video features of multiple dimensions related to each video sample as training samples, and using video quality and video bit rate of multiple encoded videos corresponding to each sample video as sample labels; wherein the trained deep learning model is used to predict the video quality curve and video bit rate curve corresponding to when the video to be encoded is encoded based on different CRF values ​​based on the input video features of multiple dimensions related to the video to be encoded.

15. A computing device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 11 or 12 by running the executable instructions.

16. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the method according to any one of claims 1 to 11 or 12 is implemented.

17. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 10 or 12 is implemented.

Citation Information

Patent Citations

  • Data generation method and device, electronic equipment and storage medium

    CN113329226A

  • Code rate control method and device for video coding and storage medium

    CN115379228A

  • Video coding method and device, equipment and storage medium

    CN116886918A

  • Multimedia data coding method and device, electronic equipment and storage medium

    CN117478886A

  • Deep learning based quantization parameter estimation for video encoding

    US20190132591A1