Video code rate control method, device and equipment
By determining the target scene category for the video in the video library and setting a reasonable upper and lower limit of the code rate value, the problem of excessive overall video bit rate in the CRF bit rate control method is solved, and the overall code rate of the video in the video library is reduced while ensuring the picture quality.
Patent Information
- Application Number
- CN202510895716.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-08-26
AI Technical Summary
The existing CRF bit rate control method cannot effectively control the overall bit rate of the video while ensuring the video quality, resulting in a large overall bit rate of the video in the video library.
By determining the target scene category of the target video, setting the upper limit of the code rate value and the lower limit of the code rate value for the target video, which are less than and greater than the maximum code rate determined by the transmission bandwidth, respectively, to optimize the allocation of the code rate during the video encoding process.
While ensuring the overall picture quality of the video in the video library, it effectively reduces the overall bit rate of the video in the video library, avoiding the problem of greatly increasing the bit rate in order to improve the small-scale picture quality.
Smart Images

Figure CN120547336A_ABST
Abstract
Description
[0001] This application is a divisional application of Chinese patent application CN118972595A. The application date of the original application is October 15, 2024; the application number is 202411441077.2; the name of the invention is: A video bit rate control method, device and equipment. Technical Field
[0002] The present application relates to the field of video coding technology, and in particular to a video bit rate control method, apparatus and device. Background Art
[0003] In the prior art, when an encoder uses a constant rate factor (CRF) control method to encode video data in a video library, a quality factor is typically set. The encoder automatically adjusts the bitrate based on the set quality factor to control the encoding quality of the video, thereby ensuring that the encoded video quality reaches a specified quality level, thereby ensuring that users have a relatively consistent subjective perception of the overall quality of the encoded video. When using the CRF rate control method to encode videos in a video library, a maximum bitrate is sometimes also set. The encoder controls the video encoding bitrate based on the set maximum bitrate to ensure that the video encoding bitrate is less than the maximum bitrate.
[0004] Existing technologies typically set a maximum bitrate based on the transmission bandwidth. However, this maximum bitrate is often too high to effectively control the video encoding bitrate, resulting in a high overall bitrate. Therefore, how to maintain the overall image quality of videos in a video library while reducing the overall bitrate has become a pressing technical challenge. Summary of the Invention
[0005] The embodiments of this specification provide a video bit rate control method, apparatus, and device to solve the technical problem of a large overall video bit rate at the same image quality in the existing CRF bit rate control method.
[0006] To solve the above technical problems, the embodiments of this specification are implemented as follows: The embodiments of this specification provide a video bit rate control method, including: Get the target video; Determining a target scene category to which the target video belongs; Determining an upper limit of a bit rate for encoding the target video according to a target scene category to which the target video belongs; wherein the upper limit of the bit rate is less than a maximum bit rate determined according to a transmission bandwidth value in a CRF bit rate control method; Determining a lower limit of a bit rate value for encoding the target video according to a target scene category to which the target video belongs; The target video is encoded according to the bit rate upper limit and the bit rate lower limit.
[0007] The embodiment of this specification provides a video bit rate control device, including: A first acquisition module is used to acquire a target video; A first determining module is used to determine the target scene category to which the target video belongs; A second determining module is configured to determine an upper limit of a bit rate for encoding the target video according to a target scene category to which the target video belongs, wherein the upper limit of the bit rate is less than a maximum bit rate determined according to a transmission bandwidth value in a CRF bit rate control method; A third determining module is configured to determine a lower limit of a bit rate value for encoding the target video according to a target scene category to which the target video belongs; An encoding module is configured to encode the target video according to the bit rate upper limit and the bit rate lower limit.
[0008] The embodiments of this specification provide a video bit rate control device, including: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Get the target video; Determining a target scene category to which the target video belongs; Determining an upper limit of a bit rate for encoding the target video according to a target scene category to which the target video belongs; wherein the upper limit of the bit rate is less than a maximum bit rate determined according to a transmission bandwidth value in a CRF bit rate control method; Determining a lower limit of a bit rate value for encoding the target video according to a target scene category to which the target video belongs; The target video is encoded according to the bit rate upper limit and the bit rate lower limit.
[0009] At least one embodiment provided in this specification can achieve the following beneficial effects: When encoding videos in a video library, the upper and lower bitrate values used to encode the target videos are determined based on the target scene categories to which each target video in the video library belongs, and then the target videos are encoded based on the upper and lower bitrate values. The upper and lower bitrate values are obtained by first encoding the video set of the target scene category to obtain the encoded video quality and video bitrate, and then determining a more reasonable maximum and minimum bitrate based on the encoded video quality and video bitrate, which can reduce the overall bitrate of the video set of the target scene category while ensuring the overall image quality of the video set of the target scene category. Since setting the upper and lower bitrate values can reduce the encoding bitrate of the target videos in the video library, and setting the lower bitrate value can improve the encoding quality of the target videos in the video library, when encoding the videos in the video library using the upper and lower bitrate values, the overall bitrate of the videos in the video library can be effectively reduced while ensuring the overall image quality of the videos in the video library. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0011] Figure 1 A schematic diagram of an application scenario of a video bit rate control method provided in an embodiment of this specification; Figure 2 A flowchart of a video bit rate control method provided in an embodiment of this specification; Figure 3 A schematic diagram of the relationship between bit rate and image quality provided in an embodiment of this specification; Figure 4 A schematic diagram of the relationship between average bit rate and average image quality provided in an embodiment of this specification; Figure 5 A flowchart of another video bit rate control method provided in an embodiment of this specification; Figure 6 The embodiments of this specification provide corresponding Figure 2 A structural diagram of a video bit rate control device; Figure 7 The embodiments of this specification provide corresponding Figure 2 A structural diagram of a video bit rate control device. DETAILED DESCRIPTION
[0012] To make the purpose, technical solutions, and advantages of one or more embodiments of this specification more clear, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of one or more embodiments of this specification.
[0013] The technical solutions provided by the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0014] With the development of live broadcast and short video services, the application of video coding technology is becoming more and more extensive. The application of video coding technology can compress video data and control the bit rate to reduce the size of video files, save the storage space and transmission bandwidth required for video files, and at the same time maintain the video quality as much as possible.
[0015] Existing rate control methods typically include constant bit rate (CBR) and variable bit rate (VBR). CBR encodes video at a fixed bit rate, maintaining a constant bit rate independent of image complexity. While CBR maintains a stable bit rate during encoding, it doesn't guarantee image quality. It's generally suitable for scenarios with fixed and stable network bandwidth. VBR encodes video at a variable bit rate, adjusting the bit rate based on image complexity. For example, a higher bit rate is assigned to images with rich detail or significant motion, while a lower bit rate is assigned to flat images. This approach ensures quality while also addressing bandwidth constraints and adapting to fluctuating network bandwidth.
[0016] VBR can be further categorized into Average Bit Rate (ABR), Constant Quantization Parameter (CQP), and Constant Rate Factor (CRF). ABR rate control sets the average bitrate of a continuous segment of video frames to a target bitrate; CQP rate control encodes the video based on a fixed quantization parameter (e.g., QP); and CRF rate control controls the video encoding quality by setting a quality factor (e.g., CRF) rather than a fixed bitrate. Generally, lower CRF values result in higher compressed video quality and larger file sizes. Conversely, higher CRF values result in lower compressed video quality and smaller file sizes. In the CRF rate control method, a maximum bitrate is sometimes set. This maximum bitrate is typically determined based on the transmission bandwidth to ensure that the user does not experience stuttering when playing the video. For example, if the user's network transmission bandwidth is 3Mbps, the maximum bitrate could be 2.5Mbps. The encoder automatically adjusts the bitrate based on the set quality factor and maximum bitrate, ensuring that the video quality reaches the specified level while controlling the video encoding bitrate to keep it below the maximum bitrate.
[0017] Generally speaking, increasing the bitrate improves the quality of the encoded video. However, in practice, the increase in bitrate is not proportional to the improvement in quality. For example, some videos see a significant improvement in quality with only a small bitrate increase, while some videos show no noticeable improvement in quality even with a significant bitrate increase. Existing CRF rate control methods, when encoding videos in a video library using a set quality factor and a maximum bitrate determined by the transmission bandwidth, allocate a higher bitrate to the video to ensure quality, but the improvement in video quality is low. Therefore, existing CRF rate control methods suffer from irrational bitrate allocation, resulting in a higher overall bitrate for videos in the video library while maintaining the same overall video quality.
[0018] Based on this, how to ensure the image quality of the videos in the video library while reducing the bit rate has become a technical problem that needs to be solved urgently.
[0019] In order to solve the defects in the prior art, this solution provides the following embodiments.
[0020] Figure 1 Schematic diagram of an application scenario of a video bit rate control method in an embodiment of this specification.
[0021] like Figure 1 As shown, before sending a video from the first device 101 to the second device 102, the video may be encoded for ease of transmission. The first device 101 may include an encoding module for encoding the video, which is used to encode the video before sending it. The first device 101 and the second device 102 may be connected via a wired or wireless network.
[0022] Despite Figure 1 In the figure, the first device 101 is a server and the second device 102 is a terminal device. However, in actual application, the first device may include a server or a terminal device, and the second device may include a terminal device or a server. Moreover, the type and data of the server and the type and data of the terminal device are not limited to the following. Figure 1 For example, the types of terminal devices may include but are not limited to mobile phones, tablets, desktop computers, smart home devices, smart wearable devices, and vehicle-mounted terminals. Optionally, the first device may be a server, and the second device may be a terminal device. In actual application, a user of the terminal device can obtain videos from the server's video library, for example, for online video on demand, network disk video download, and other scenarios. Specifically, the terminal device may send a video acquisition request for a target video to the server. Before the server responds to the video acquisition request and sends the target video to the terminal device, it may utilize an encoding module in the server and employ the video bitrate control method of the embodiments of this specification to encode the target video.
[0023] Optionally, the first device may be a terminal device, and the second device may be a server. In actual applications, a user using the terminal device may upload a video to the server, for example, by uploading a video to a video platform or a network disk. Specifically, the user using the terminal device may initiate the transmission of a target video to the server. Before transmitting the target video to the server, the target video may be encoded using an encoding module in the terminal device and the video bitrate control method according to the embodiments of this specification.
[0024] Optionally, the first device may be a terminal device, and the second device may be another terminal device. In practical applications, a video may be transmitted from one user terminal device to another, for example, in scenarios such as live video streaming and video chatting. Specifically, before transmitting the video from the first terminal device to the second terminal device, the target video may be encoded using the encoding module in the first terminal device and the video bitrate control method described in the embodiments of this specification.
[0025] Optionally, the first device may be a server or a server cluster, and the second device may be another server or server cluster. In practical applications, based on actual business needs, a video may be transmitted from one server or server cluster to another server or server cluster. Specifically, before transmitting the video from the first server or server cluster to the other server or server cluster, the target video may be encoded using an encoding module in the first server or server cluster and the video bit rate control method of the embodiments of this specification.
[0026] Next, a video bit rate control method provided in the embodiments of the specification will be described in detail with reference to the accompanying drawings.
[0027] Figure 2 This is a flow chart of a video bit rate control method provided in an embodiment of this specification. From a program perspective, the execution subject of this process can be a program installed on a terminal device or a server. From a hardware perspective, the execution subject of this process can be an encoding device or an encoding device. Figure 2 As shown, the process may include the following steps.
[0028] Step 202: Acquire the target video.
[0029] In the embodiment of this specification, the target video may be a video in a video library that has not been rate controlled.
[0030] In actual applications, when a transmission terminal is used to transmit a video in a video library to another terminal, or when a user uses a user terminal to play a video, the video library can send the target video to be transmitted or played to the encoding module so that the encoding module can compress and encode the target video after obtaining the target video.
[0031] Step 204: Determine the target scene category to which the target video belongs.
[0032] In the embodiment of the present specification, the target scene category may be obtained by screening in advance from a plurality of preset scene categories.
[0033] In the embodiments of this specification, each video in the video library, including the target video, can include multiple-dimensional category tags. Specifically, the video category tags can include multiple-dimensional tags such as first-dimensional tags and second-dimensional tags. The first-dimensional tags can be used to reflect the application scenario or business scenario of the video; for example, the first-dimensional tags can be live broadcast, on-demand, etc. The second-dimensional tags can be used to reflect the content scenario of the video; for example, the second-dimensional tags can be indoor, outdoor, etc. Of course, the video category tags can also include third-dimensional tags, fourth-dimensional tags, and other dimensional tags. The multiple-dimensional category tags of the video can also be used to reflect other content of the video, which is not specifically limited here.
[0034] In actual applications, the preset scene category can be determined based on the scene category reflected by the category label of the video itself in the video library. Specifically, the preset scene category can be the scene category reflected by a category label of a single dimension. For example, the preset scene category can be the scene category reflected by the live category label and / or the scene category reflected by the on-demand category label; it can also be the scene category reflected by the indoor category label and / or the scene category reflected by the outdoor category label. Of course, the preset scene category can also be the scene category reflected by a combination of category labels of multiple dimensions. For example, the preset scene category can be the scene category reflected by the combination of the live category label and the indoor category label, and / or the scene category reflected by the combination of the live category label and the outdoor category label.
[0035] Typically, videos of different scene categories have different requirements for image quality and real-time performance. Therefore, in the embodiments of this specification, the maximum bit rate and minimum bit rate set during the video encoding process can be different. For example, when the overall image quality requirements for the videos in the video library are high, if the maximum bit rate is set too low, the overall image quality of the videos may not be guaranteed. Therefore, the maximum bit rate needs to be set to a larger value. In the embodiments of this specification, when determining the target scene category from the preset scene categories, more reasonable maximum bit rates and minimum bit rates are also determined for different target scene categories to ensure that when the maximum bit rate and minimum bit rate are used to encode the videos in the video library, the overall image quality of the videos in the video library can be guaranteed while reducing the overall bit rate of the videos. The overall bit rate of the videos in the video library can be a characteristic bit rate of all the videos in the video library. The characteristic bit rate can be the sum of the bit rates of all the videos in the video library, or it can be the average of the bit rates of all the videos in the video library.
[0036] In the embodiments of this specification, after the target scene category is determined from the preset scene categories, the target scene category to which the target video belongs can be determined based on the category label of the target video. If the target video itself does not have a category label, a pre-trained deep learning model can also be used to identify the target scene category to which the target video belongs. Since the use of a deep learning model to identify the target scene category to which the target video belongs is relatively common in the prior art, it will not be described in detail here. In actual applications, other image recognition technologies can also be used to determine the target scene category to which the target video belongs, which is not specifically limited here.
[0037] Step 206: Determine an upper limit of a bit rate for encoding the target video according to the target scene category to which the target video belongs; the upper limit of the bit rate is less than a maximum bit rate determined according to a transmission bandwidth value in a CRF bit rate control method.
[0038] In practical applications, bitrate refers to the number of data bits transmitted per unit time during data transmission, also known as bit rate. It indicates the number of bits per second required to transmit encoded video or audio data. Bitrate is typically expressed in kilobits per second (kbps) or megabits per second (Mbps). Bitrate can also be a sampling rate. A higher sampling rate per unit time results in a higher bitrate, resulting in clearer video image detail and more bandwidth and storage space for the encoded video file.
[0039] In the embodiment of this specification, the upper limit of the bit rate value may be a maximum bit rate set when encoding the target video.
[0040] In the CRF rate control method, the maximum bit rate can be determined based on the transmission bandwidth value. Specifically, the maximum bit rate can be determined based on the transmission bandwidth value and the video content to ensure that the user end does not experience stuttering when playing the video while ensuring a certain degree of video quality.
[0041] Figure 3 The following are the encoded rate-quality curves obtained by encoding three different videos using multiple quality factors. The three different videos can be any three different videos. In practice, to more clearly show the differences between the rate-quality curves of different videos, three different types of videos can be selected.
[0042] exist Figure 3In [1], a curve can correspond to a bitrate-quality curve after video encoding. A (bitrate, quality) data point on the curve can represent the bitrate and quality data obtained by encoding the video using a quality factor. Different (bitrate, quality) data points on the same curve can correspond to different quality factors.
[0043] Specifically, for each video in the video library, multiple different quality factors (such as Figure 3 As shown, each video can be encoded using four different quality factors to obtain the encoded (bitrate, image quality) data points corresponding to each quality factor. Furthermore, based on the multiple encoded (bitrate, image quality) data points for each video, a bitrate-quality curve can be plotted for each video.
[0044] according to Figure 3 It can be seen that even if the bit rate of some videos is increased a lot, the video quality will not be significantly improved, such as Figure 3 As shown in the third set of data in [1]. For videos where a significant increase in bitrate does not significantly improve video quality, reducing a portion of the allocated bitrate will not significantly affect the quality. Furthermore, the maximum bitrate determined based on the transmission bandwidth is typically large, making it impossible to effectively reduce the bitrate of videos where a significant increase in bitrate does not significantly improve video quality. Therefore, in the embodiments of this specification, by setting a more reasonable upper limit on the bitrate value to control the encoding bitrate of the video, the overall bitrate of the videos in the encoded video library can be reduced.
[0045] In an embodiment of the present specification, the upper limit of the bit rate value can be obtained by screening from multiple bit rate values based on the average bit rate and average image quality of the video set after encoding of the target scene category, which can be used to reduce the overall bit rate of the video set of the target scene category and ensure the overall image quality of the video set of the target scene category.
[0046] In the embodiment of this description, since the upper limit of the bit rate value is less than the maximum bit rate determined according to the transmission bandwidth value, and the upper limit of the bit rate value is obtained by screening from multiple bit rate values, the overall bit rate and overall image quality of the video set of the target scene category can be optimized; therefore, when the upper limit of the bit rate value corresponding to each target scene category is used to encode the target video of the corresponding target scene category in the video library, the overall bit rate of the video in the video library can be effectively reduced, but the overall image quality of the video in the video library is not affected or is not significantly affected.
[0047] Step 208: Determine a lower limit of a bit rate for encoding the target video according to the target scene category to which the target video belongs.
[0048] In the embodiment of this specification, the lower limit of the bit rate value may be a minimum bit rate set when encoding the target video.
[0049] The existing technology usually does not set a minimum bit rate when encoding videos using the CRF method. After research, this application found that for some videos, the video quality will be significantly improved by increasing the bit rate value by a small amount. Figure 3 For videos where a relatively small bitrate increase is required to significantly improve video quality, even a partial bitrate increase is not necessary. Therefore, in the embodiments of this specification, by setting a more reasonable bitrate lower limit to improve video quality, the overall quality of the videos in the encoded video library can be improved.
[0050] In the embodiments of this specification, the lower limit of the bit rate value is the average bit rate and average image quality of the video set pre-encoded based on the target scene category, which is obtained by screening from multiple bit rate values. It can be used to improve the overall image quality of the video set of the target scene category without increasing or significantly increasing the overall bit rate of the video set of the target scene category.
[0051] In the embodiment of this description, since the lower limit of the bit rate value is pre-screened from multiple bit rate values, it can be used to optimize the overall bit rate and overall image quality of the video set of the target scene category; therefore, using the lower limit of the bit rate value corresponding to each target scene category to encode the target video of the corresponding target scene category in the video library can effectively improve the overall image quality of the video in the video library, but does not increase or significantly increase the overall bit rate of the video in the video library.
[0052] In the embodiments of the present specification, a correspondence between the target scene category and the upper and lower bitrate values can be pre-established so that the upper and lower bitrate values for encoding the target video can be quickly determined based on the correspondence. For example, if the target scene category is live broadcast, the upper bitrate value is determined to be 3000kbps, and the lower bitrate value is determined to be 500kbps, then live broadcast can be associated with the upper bitrate value of 3000kbps and the lower bitrate value of 500kbps.
[0053] Step 210: Encode the target video according to the bit rate upper limit and the bit rate lower limit.
[0054] In the embodiments of this specification, among the numerous videos in a video library, there are often videos whose video quality is not significantly improved by increasing the bit rate by a large amount, and videos whose video quality is significantly improved by increasing the bit rate by a small amount. When the target video is a video whose video quality is not significantly improved by increasing the bit rate by a large amount, encoding the target video using the bit rate upper limit and the bit rate lower limit can effectively reduce the bit rate of the target video without significantly affecting the quality of the target video. When the target video is a video whose video quality is significantly improved by increasing the bit rate by a small amount, encoding the target video using the bit rate upper limit and the bit rate lower limit can effectively improve the quality of the target video without significantly increasing the bit rate of the target video.
[0055] In the embodiments of this specification, when encoding all videos in a video library using the upper and lower bitrate values, although the overall quality of the videos in the video library is reduced when encoding videos whose quality does not improve significantly with a larger bitrate value, the overall quality of the videos in the video library is effectively improved when encoding videos whose quality improves significantly with only a smaller bitrate value using the upper and lower bitrate values, thereby effectively ensuring the overall quality of the videos in the video library. Furthermore, because the bitrate reduction caused by using the upper and lower bitrate values when encoding videos whose quality does not improve significantly with a larger bitrate value is far greater than the bitrate increase caused by using the upper and lower bitrate values when encoding videos whose quality improves significantly with only a smaller bitrate value, the embodiments of this specification can effectively reduce the overall bitrate of the videos in the video library without affecting the overall quality of the videos in the video library.
[0056] Figure 2The method herein, when encoding videos in a video library, determines an upper and lower bitrate value for encoding the target video based on the target scene category to which each target video in the video library belongs. The target video is then encoded based on the upper and lower bitrate values. Because the upper and lower bitrate values are pre-determined, more reasonable maximum and minimum bitrates based on the video quality and bitrate of the encoded video set for the target scene category, they can ensure the overall image quality of the target scene category video set while reducing the overall bitrate of the target scene category video set. Because the upper bitrate value is less than the maximum bitrate determined based on the transmission bandwidth value, encoding the videos in the video library by setting the upper bitrate value effectively reduces the overall bitrate of the videos in the video library. Furthermore, applying the upper bitrate value to the target video during encoding avoids the problem of significantly increasing the bitrate to achieve a minor improvement in image quality, thereby significantly reducing the encoding bitrate of the target video without significantly reducing the encoding quality of the target video. Furthermore, applying the lower limit of the bitrate value to encode the target video can increase the encoding bitrate of the target video when the encoding bitrate of the target video is relatively low. In particular, when the encoding quality of the target video can be significantly improved by increasing the encoding bitrate slightly, applying the lower limit of the bitrate value to encode the target video can significantly improve the image quality of the target video without significantly increasing the encoding bitrate of the target video. Since setting the upper limit of the bitrate value can reduce the encoding bitrate of the target video in the video library, and setting the lower limit of the bitrate value can improve the encoding quality of the target video in the video library, encoding the videos in the video library using the upper and lower limits of the bitrate value can ensure the overall image quality of the videos in the video library while effectively reducing the overall bitrate of the videos in the video library.
[0057] In actual applications, the upper and lower bitrate values corresponding to different scene categories may be different. The upper and lower bitrate values for encoding videos for each target scene category can be determined in advance for subsequent applications.
[0058] Specifically, before determining the target scene category to which the target video belongs, the following steps may also be included: Get a set of videos of pre-defined scene categories.
[0059] Based on the video set of the preset scene category, an upper limit and a lower limit of a bit rate value for encoding the video of the preset scene category are determined.
[0060] In an embodiment of the present specification, the pre-set scene category can be obtained by filtering the category labels of the videos in the video library. Specifically, the pre-set scene category can be determined based on the category label of the video according to the business scenario; for example, the pre-set scene category can be determined based on the first dimension label, and the pre-set scene category can be live broadcast or on-demand. Of course, the pre-set scene category can also be determined based on the category label of the video according to the video content; for example, the pre-set scene category can be determined based on the second dimension label, and the pre-set scene category can be a movie, a TV series, or indoor or outdoor. Of course, the pre-set scene category can also be determined based on other actual needs, which is not specifically limited here.
[0061] The video set may be obtained from a video library. Specifically, whether the video is a video that needs to be obtained can be determined based on the category label of the video. When the category label of the video includes multiple dimensions, as long as the category label of the video includes a category label that can reflect that the video is a video of a pre-set scene category, the above video can be determined to be a video in the video set. Specifically, assuming that the pre-set scene category is movie, if the category label of the target video includes on-demand, movie, and indoor, since the category label of the target video includes a category label that reflects that the target video is a movie, it can be determined that the target video is a video in the video set that needs to be obtained. For another example, if the pre-set scene category is movie, if the category label of the target video includes on-demand, TV series, and indoor, since the category label of the target video does not include a category label that reflects that the target video is a movie, it can be determined that the target video is not a video in the video set that needs to be obtained.
[0062] In the embodiments of the present specification, the upper and lower bitrate values may be determined based on the average bitrate and average image quality of the encoded video set obtained by encoding based on a preset upper and lower bitrate value, and the average bitrate and average image quality of the encoded video set obtained by encoding based on a traditional CRF bitrate control method.
[0063] In the embodiments of this specification, the upper and lower bit rate limits for encoding videos of various target scene categories are predetermined, which can facilitate subsequent applications and improve video encoding efficiency.
[0064] To facilitate understanding of this solution, the embodiments of this specification also provide specific content for determining the upper and lower bitrate limits for encoding videos of the pre-set scene categories based on the video set of the pre-set scene categories.
[0065] Specifically, the determining, based on the video set of the preset scene category, an upper limit and a lower limit of a bit rate value for encoding a video of the preset scene category may include: A first video set of a first preset scene category is obtained.
[0066] Encoding the first video set using a plurality of first constant quality factors to obtain a bit rate-quality curve; Obtain a preset second constant quality factor.
[0067] The first video set is encoded using the second constant quality factor and multiple sets of preset bit rate pairs to obtain an encoding result; any of the preset bit rate pairs includes a preset bit rate value upper limit and a preset bit rate value lower limit.
[0068] According to the encoding result, a plurality of first data points in a rate-quality coordinate system are obtained; the rate-quality coordinate system is a coordinate system where the rate-quality curve is located.
[0069] An upper limit of a bit rate and a lower limit of a bit rate of the first preset scene category are determined according to a positional relationship between the plurality of first data points and the bit rate-quality curve.
[0070] In the embodiments of this specification, the first preset scene category may be any of the pre-set scene categories. The first video collection may be obtained from a video library. The method for obtaining the first video collection is substantially the same as the method for obtaining the video collection of the pre-set scene category described above and is not further described here.
[0071] In the embodiments of this specification, the first constant quality factor may be a CRF value set when performing CRF bitrate control on a video. Typically, the CRF value is any value between 0 and 51, where 0 represents lossless compression and 51 represents the highest compression rate. Since the user terminal may have different purposes for viewing videos of different scene categories, the specific value of the first constant quality factor may be determined based on the scene category. For example, when the first preset scene category is live streaming with goods, the user terminal may pay more attention to the live streamer's explanations and less attention to the details of the live video. Furthermore, the surrounding environment typically changes little during live streaming, so the requirements for the image quality of the live video may generally be lower. In this case, the multiple first constant quality factors may be set to 22, 23, 24, 25, and 26, respectively. Furthermore, when the first preset scene category is on-demand, specifically, on-demand videos may be online teaching videos, movies, or TV series. For on-demand videos, the user terminal may pay more attention to the video content, so the requirements for the image quality of on-demand videos may generally be higher. In this case, the multiple first constant quality factors may be set to 7, 8, 9, 10, and 11, respectively, to ensure that they meet the needs of the user terminal.
[0072] In the embodiments of this specification, the second constant quality factor may be any one of the first constant quality factors. Preferably, the second constant quality factor may be an intermediate value among multiple first constant quality factors. Specifically, when multiple first constant quality factors are 22, 23, 24, 25, and 26, the second constant quality factor may be 24. For another example, when multiple first constant quality factors are 7, 8, 9, 10, and 11, the second constant quality factor may be 9. Of course, the second constant quality factor may also be a specified value within a preset range from the first constant quality factor. For example, when the first constant quality factor is 22, 23, 24, 25, or 26, the second constant quality factor may be 21 or 27. This is not specifically limited here.
[0073] Figure 4 This is a schematic diagram of the relationship between average bit rate and average image quality. Figure 4 The horizontal axis of the bit rate-quality coordinate system in is the average bit rate, and the vertical axis is the average image quality. Each first constant quality factor can be used to encode the first video set, thereby obtaining the average bit rate and average image quality of the first video set after encoding corresponding to each first constant quality factor. Based on the average bit rate and average image quality of the first video set after encoding corresponding to each first constant quality factor, a bit rate-quality curve can be drawn in the bit rate-quality coordinate system, such as Figure 4 As shown in the curve.
[0074] exist Figure 4, the data points represented by dots on the curve are respectively used to represent the average bit rate and average image quality of the first video set after encoding corresponding to each first constant quality factor. For example, when the first constant quality factor is 22, 23, 24, 25, and 26, the (average bit rate, average image quality) of the first video set after encoding are (400, 42), (500, 43), (700, 44), (970, 44.7), and (1200, 45.4).
[0075] In this embodiment of the present specification, the upper limit of the preset bit rate value can be determined according to the generally possible bit rate of the first video set of the first preset scene category, and the upper limit of the preset bit rate value is less than the maximum bit rate determined according to the transmission bandwidth value.
[0076] In an embodiment of the present specification, the encoding result may include the encoded bit rate and image quality obtained by encoding each video in the first video set using the second constant quality factor and each set of preset bit rate pairs. Specifically, the second constant quality factor and a set of preset bit rate pairs may be used to encode each video in the first video set, thereby obtaining a set of encoded data including the encoded bit rate and image quality of each video in the first video set; then, the second constant quality factor and another set of preset bit rate pairs may be used to encode each video in the first video set, thereby obtaining another set of encoded data including the encoded bit rate and image quality of each video in the first video set; according to the above method, the encoded data corresponding to each set of preset bit rate pairs can be obtained, thereby obtaining the encoding result.
[0077] In the embodiments of this specification, each first data point may represent the average bit rate and average image quality of the first video set after encoding using a second constant quality factor and a set of preset bit rates. Specifically, for any set of encoded data obtained above, the average bit rate of the first video set can be obtained based on the encoded bit rate of each video in the group, and the average image quality of the first video set can be obtained based on the encoded image quality of each video in the group. Based on the average bit rate and average image quality, a first data point can be marked in the bit rate-image quality coordinate system. Similarly, other first data points can be obtained based on other sets of encoded data, which will not be repeated here.
[0078] To facilitate understanding of this solution, the embodiments of this specification also provide specific content for determining the upper and lower limits of the bitrate value of the first preset scene category based on the positional relationship between the multiple first data points and the bitrate-quality curve.
[0079] Specifically, determining the bitrate upper limit and bitrate lower limit of the first preset scene category based on the positional relationship between the plurality of first data points and the bitrate-quality curve may include: If the positional relationship indicates that there is a second data point among the multiple first data points, then the distance between each second data point and the bit rate-image quality curve is calculated; the second data point is a data point whose image quality coordinates are greater than the image quality coordinates of a specific point in the bit rate-image quality curve, and the bit rate coordinates of the specific point are the same as the bit rate coordinates of the second data point.
[0080] The upper limit of the preset bit rate value in the preset bit rate pair corresponding to the second data point with the largest distance is determined as the upper limit of the bit rate value of the first preset scene category.
[0081] The lower limit of the preset bit rate value in the preset bit rate pair corresponding to the second data point with the largest distance is determined as the lower limit of the bit rate value of the first preset scene category.
[0082] In the embodiment of this specification, the first data points may include data points located above the bit rate-image quality curve, or data points located below the bit rate-image quality curve, such as Figure 4 The second data point can be understood as a data point located above the bit rate-quality curve, as shown in Figure 4 In the example, four first data points are located above the rate-quality curve; the quality coordinates of the second data points are greater than the quality coordinates of a specific point in the rate-quality curve with the same rate coordinates. If a second data point exists among the first data points, that is, if the rate coordinates of the second data point are the same, the rate coordinate of the second data point is less than the rate coordinate of the specific point in the rate-quality curve; or if the rate coordinates are the same, the quality coordinate of the second data point is greater than the quality coordinate of the specific point in the rate-quality curve, then it can be indicated that there is a rate pair among the preset rate pairs that can optimize the encoded bit rate and image quality of the first video set.
[0083] In the embodiments of this specification, since the second data point is obtained by encoding the first video set using a second constant quality factor and different preset bitrate pairs, the upper and lower bitrate limits for the first preset scene category can be determined based on the second data point. In practical applications, the upper limit of the preset bitrate value for the preset bitrate pair corresponding to the second data point having the largest distance from the second data point to the bitrate-quality curve can be determined as the upper limit of the bitrate value for the first preset scene category, and the lower limit of the preset bitrate value for the preset bitrate pair corresponding to the second data point having the largest distance from the second data point to the bitrate-quality curve can be determined as the lower limit of the bitrate value for the first preset scene category.
[0084] In practical applications, the distance from the second data point to the bitrate-quality curve may be the vertical distance from the second data point to the bitrate-quality curve, or the longitudinal distance from the second data point to the bitrate-quality curve, which is not specifically limited here.
[0085] In the embodiment of this specification, in order to facilitate rapid determination of the upper and lower bitrate values corresponding to the target scene category in subsequent applications, the target scene category may be associated with the corresponding upper and lower bitrate values and stored.
[0086] Specifically, after determining the bitrate upper limit and bitrate lower limit of the first preset scene category, the method may further include: Determine the first preset scene category as the target scene category.
[0087] The target scene category is associated with the bit rate upper limit and the bit rate lower limit and stored.
[0088] In an embodiment of the present specification, if the second data point exists in the first data point, it means that it is more reasonable to use the first preset scene category to divide the videos in the video library. The upper limit and lower limit of the bit rate value of the videos in the video set of the first preset scene category are relatively uniform. Therefore, the first preset scene category can be determined as the target scene category.
[0089] In an embodiment of the present specification, the target scene category can be associated with the corresponding upper and lower bit rate values and stored, and the upper and lower bit rate values corresponding to the target scene category can be quickly determined in subsequent applications, thereby improving the encoding efficiency of the video.
[0090] In actual applications, if the selected first preset scene category is unreasonable, for example, if the first preset scene category includes a relatively complex number of videos, the bitrate obtained by encoding the first video set using the preset bitrate may not be lower than the bitrate obtained by encoding without the preset bitrate, at the same image quality. In other words, the second data point does not exist in the first data point. Based on this, the embodiments of this specification also provide the following technical solutions.
[0091] Specifically, determining the bitrate upper limit and bitrate lower limit of the first preset scene category based on the positional relationship between the plurality of first data points and the bitrate-quality curve may further include: If the positional relationship indicates that there is no second data point among the multiple first data points, then the second video set of the second preset scene category is filtered from the first video set of the first preset scene category; the second data point is a data point whose image quality coordinates are greater than the image quality coordinates of a specific point in the bit rate-image quality curve, and the bit rate coordinates of the specific point are the same as the bit rate coordinates of the second data point.
[0092] An upper bit rate value limit and a lower bit rate value limit of the second preset scene category under the first preset scene category are determined based on the second video set.
[0093] In the embodiments of this specification, if the second data point does not exist within the first data point, this may be because the first preset scene category represents a wide range of scenes, resulting in a relatively complex variety of videos in the first video set determined based on the first preset scene category, and thus no preset bitrate pair can optimize the first video set as a whole. Therefore, the videos in the first video set can be subdivided into scene categories. Specifically, a second video set of the second preset scene category can be selected from the first video set. Based on the second video set, the upper and lower bitrate limits for encoding the videos of the second preset scene category within the first preset scene category can be determined.
[0094] In actual applications, the second video set of the second preset scene category can also be directly filtered from the video library to determine the upper and lower bit rate values for encoding videos of the second preset scene category based on the second video set. No limitation is made here.
[0095] In actual applications, based on the second video set, the method for determining the upper limit and lower limit of the bit rate value for encoding videos for the second preset scene category or for encoding videos for the second preset scene category under the first preset scene category is generally the same as the method for determining the upper limit and lower limit of the bit rate value for encoding videos for the pre-set scene category, and will not be repeated here.
[0096] To facilitate understanding of the present application, the embodiments of this specification also provide specific content of encoding the first video set using multiple first constant quality factors to obtain a bit rate-quality curve.
[0097] Specifically, encoding the first video set using a plurality of first constant quality factors to obtain a bit rate-quality curve may include: The first video set is encoded using each of the first constant quality factors to obtain third data points corresponding to each of the first constant quality factors, wherein the third data points are used to reflect the average bit rate and average image quality of the encoded first video set.
[0098] The bit rate-image quality curve is drawn based on each of the third data points.
[0099] In the embodiments of the present specification, for each first constant quality factor, the first constant quality factor can be used to encode each video in the first video set to obtain the encoded bit rate and image quality of each video in the first video set; specifically, when the first constant quality factor is 7, 8, 9, 10, and 11, 7, 8, 9, 10, and 11 can be used to encode each video in the first video set to obtain the encoded bit rate and image quality of each video when the first constant quality factor is 7, the encoded bit rate and image quality of each video when the first constant quality factor is 8, and the encoded bit rate and image quality of each video when the first constant quality factor is 9, 10, and 11 respectively.
[0100] After obtaining the bit rate and image quality after encoding of the above-mentioned videos, the average value of the bit rates after encoding of the videos obtained when encoded using the specified first constant quality factor can be calculated to obtain the average bit rate after encoding of the first video set corresponding to the specified first constant quality factor; and the average value of the image quality after encoding of the videos obtained when encoded using the specified first constant quality factor can be calculated to obtain the average image quality after encoding of the first video set corresponding to the specified first constant quality factor.
[0101] Specifically, the average value of the encoded bit rates of each video obtained when the first constant quality factor is 7 can be calculated to obtain the average bit rate of the first video set when the first constant quality factor is 7; and the average value of the encoded picture quality of each video obtained when the first constant quality factor is 7 can be calculated to obtain the average picture quality of the first video set when the first constant quality factor is 7; according to the above method, the average bit rate and average picture quality of the first video set when the first constant quality factor is 8, 9, 10, and 11 can be obtained respectively, which will not be repeated here.
[0102] In the embodiments of this specification, the third data points may represent the average bitrate and average image quality after encoding the first video set. It is understood that the number of third data points is the same as the number of first constant quality factors. Based on the third data points, a rate-quality curve can be drawn in the rate-quality coordinate system.
[0103] To facilitate understanding of the present application, the embodiments of this specification also provide specific content of encoding the first video set using the second constant quality factor and multiple sets of preset bit rates to obtain encoding results.
[0104] Specifically, encoding the first video set using the second constant quality factor and multiple sets of preset bit rates to obtain an encoding result may include: For one set of preset bit rate pairs among the multiple sets of preset bit rate pairs, the second constant quality factor and the set of preset bit rate pairs are used to encode each video in the first video set to obtain the encoding bit rate and encoding image quality of each video corresponding to the set of preset bit rate pairs.
[0105] In the embodiment of this specification, multiple groups of preset bit rate pairs may be as shown in Table 1.
[0106] Table 1:
[0107] In an embodiment of the present specification, a second constant quality factor and a set of preset bit rates can be used to encode each video in the first video set to obtain a set of encoded bit rates and image quality of each video in the first video set; for example, CRF=9, the preset bit rate value upper limit=3000kbps, the preset bit rate value lower limit=500kbps can be used to encode each video in the first video set, thereby obtaining a set of encoded data including the encoded bit rates and image quality of each video when CRF=9, the preset bit rate value upper limit=3000kbps, and the preset bit rate value lower limit=500kbps.
[0108] It can be understood that the second constant quality factor and each set of preset bit rate pairs can be used to encode each video in the first video set according to the method described above, so as to obtain multiple groups of encoded data corresponding to each set of preset bit rate pairs, and then obtain the encoding result.
[0109] In order to facilitate understanding of the present application, the specific content of obtaining multiple first data points in the bit rate-image quality coordinate system based on the encoding result is also provided in the embodiments of this specification.
[0110] Specifically, obtaining a plurality of first data points in a bit rate-quality coordinate system according to the encoding result may include: An average bit rate of the first video set encoded based on the second constant quality factor and the set of preset bit rates is determined according to the encoding bit rates of the respective videos.
[0111] An average quality of the first video set encoded based on the second constant quality factor and the set of preset bit rates is determined according to the encoded quality of each video.
[0112] Based on the average image quality and the average bit rate, a first data point corresponding to the second constant quality factor and the set of preset bit rates is determined.
[0113] In practical applications, in the above-mentioned encoding results obtained, an average bit rate of the first video set can be determined based on the bit rates of each video in one group of encoded first video sets; an average picture quality of the first video set can be determined based on the picture quality of each video in one group of encoded first video sets, so that a first data point representing the average bit rate and average picture quality of the encoded first video set can be identified in the bit rate-quality curve; it can be understood that based on the bit rates and picture qualities of each video in multiple groups of encoded first video sets, multiple average bit rates and average picture qualities of the encoded first video set can be determined, and then multiple first data points representing the average bit rate and average picture quality of the encoded first video set can be identified in the bit rate-quality curve.
[0114] To facilitate understanding of the present application, the embodiments of this specification also provide specific content of encoding the target video according to the bit rate upper limit and the bit rate lower limit during the encoding process of the target video.
[0115] Specifically, encoding the target video according to the bit rate upper limit and the bit rate lower limit may include: If the bit rate value of the target video is greater than the bit rate value upper limit, encoding is performed on the target video according to the bit rate value upper limit.
[0116] If the bit rate value of the target video is less than the bit rate value lower limit, encoding is performed on the target video according to the bit rate value lower limit.
[0117] If the bit rate value of the target video is less than the bit rate value upper limit and greater than the bit rate value lower limit, encoding is performed on the target video according to the bit rate value of the target video.
[0118] In the embodiments of this specification, the target video bitrate value may be the real-time bitrate of the target video obtained during the encoding process of the target video based on setting a constant quality factor. If the target video bitrate value is greater than the bitrate value upper limit, the target video may be encoded according to the bitrate value upper limit. If the target video bitrate value is less than the bitrate value lower limit, the target video may be encoded according to the bitrate value lower limit, thereby effectively controlling the bitrate and image quality of the target video.
[0119] Of course, if the bit rate value of the target video is between the bit rate upper limit and the bit rate lower limit, encoding can be performed directly according to the bit rate value of the target video.
[0120] In the embodiments of this specification, a video may generally include multiple different target scene categories. When the scene of the video frame changes, the scene category of the video will generally change as well. Therefore, in order to ensure the overall image quality of the video while effectively reducing the overall bit rate of the video, the embodiments of this specification, after obtaining the video to be encoded, also split the video to be encoded according to the scene of the video frame.
[0121] Specifically, before obtaining the target video, it also includes: obtaining the video to be encoded; for the video to be encoded, starting from the first frame image, judging whether the scene of the subsequent frame image is consistent with the scene of the previous frame image, and obtaining a first judgment result; if the first judgment result indicates that the scene of the Nth frame image of the video to be encoded is inconsistent with the scene of the N-1th frame image, then determining that the first frame image to the N-1th frame image of the video to be encoded are sub-videos to be encoded.
[0122] In order to improve the efficiency of scene determination, the video to be encoded may be divided into video sequences containing a preset number of frames, so that scene determination is performed simultaneously for each video frame sequence.
[0123] Specifically, starting from the first frame image, determining whether the scene of the subsequent frame image is consistent with the scene of the previous frame image, before obtaining the first determination result, the following may also be included: For the video to be encoded, the frame sequence is divided according to a preset number of frames to obtain a video frame sequence including the preset number of frames.
[0124] The step of determining whether the scene of the subsequent frame image is consistent with the scene of the previous frame image from the first frame image to obtain a first determination result may specifically include: For each of the video frame sequences including the preset number of frames, starting from the first frame image, it is determined whether the scene of the subsequent frame image is consistent with the scene of the previous frame image, and a first determination result is obtained.
[0125] In the embodiment of this specification, the target video may be one sub-video to be encoded or multiple sub-videos to be encoded. It is understandable that the scene categories of the video frames in any of the sub-videos to be encoded are the same.
[0126] In the embodiment of this specification, the preset number of frames may be 256 frames. Of course, the preset number of frames may also be other values set according to actual needs, and is not specifically limited here.
[0127] In an embodiment of the present specification, image recognition technology can be used to determine whether the scene of the subsequent frame image is consistent with the scene of the previous frame image. Specifically, the scene of the subsequent frame image can be determined based on the similarity between the subsequent frame image and the previous frame image. If the similarity between the subsequent frame image and the previous frame image is greater than a preset value, it can be considered that the scene of the subsequent frame image is consistent with the scene of the previous frame image. If the similarity between the subsequent frame image and the previous frame image is less than a preset value, it can be considered that the scene of the subsequent frame image has changed compared to the scene of the previous frame image, and then the video frame of the same scene can be determined as a sub-video to be encoded.
[0128] In the embodiments of the present specification, when the scene of a video frame image changes, the target scene category of the video frame image may change; when the scene of a video frame image does not change, the target scene category of the video frame image usually does not change either; therefore, the video frame image of the same scene can be used as a sub-video to be encoded, and when it is determined that the scene of the video frame image has changed, the target scene category to which the video frame image belongs is re-determined, thereby effectively reducing the overall bit rate of the video while ensuring the overall image quality of the video.
[0129] In an embodiment of the present specification, when the target video includes only one sub-video to be encoded, the determination of the target scene category to which the target video belongs may specifically include: determining the target scene category to which the sub-video to be encoded belongs. When the target video includes multiple sub-videos to be encoded, the determination of the target scene category to which the target video belongs may specifically include: separately determining the target scene category to which each sub-video to be encoded belongs. It is understandable that when the target video includes multiple sub-videos to be encoded, encoding the target video according to the bit rate upper limit and the bit rate lower limit may specifically include: encoding each sub-video to be encoded using the bit rate upper limit and the bit rate lower limit associated with the target scene category to which each sub-video to be encoded belongs.
[0130] In the embodiments of this specification, based on Figure 2 With the same idea as the solution shown in , the embodiments of this specification also provide another video bit rate control method. Figure 5 This is a flow chart of another video bit rate control method provided in the embodiment of this specification. Figure 5 As shown, the process may include the following steps.
[0131] Step 502: Acquire a target video frame sequence.
[0132] In the embodiment of the present specification, the target video frame sequence may be a set of video frame sequences with the same scene and continuous video frames in the video to be encoded in the video library.
[0133] Since the video frames in the video to be encoded may undergo scene transitions, that is, the scene of the subsequent frame image may be different from the scene of the previous frame image, for example, the scene of the video frame may change from indoors to outdoors. When the scene of the video frame changes, the scene category of the video is very likely to change; and when the scene of the video frame does not change, the scene category of the video usually does not change either. Therefore, for the video frames in the video to be encoded, it is possible to first determine whether the scene of the video frame has changed, and then take a group of video frames with the same scene and continuous video frames as a target video frame sequence. It can be understood that the video to be encoded can be divided into multiple target video frame sequences.
[0134] Since the method for determining whether the scene of a video frame has changed is basically the same as the method described above for determining whether the scene of a subsequent frame image is consistent with the scene of a previous frame image starting from the first frame image, it will not be repeated here.
[0135] Step 504: Determine the target scene category to which the target video frame sequence belongs.
[0136] In the embodiment of this specification, the target video frame sequence may include category labels of multiple dimensions. Figure 2 This has been described in detail in step 204 and will not be repeated here.
[0137] In this embodiment of the specification, the target scene category in step 504 is Figure 2 The target scene category mentioned in step 204 can be consistent, and the method for determining the target scene category of the video to be encoded in step 504 is the same as Figure 2 The method for determining the target scene to which the target video belongs in step 204 is basically the same and will not be described in detail here.
[0138] Step 506: Determine an upper limit and a lower limit of a bit rate for encoding the target video frame sequence according to the target scene category to which the target video frame sequence belongs; the upper limit of the bit rate is less than the maximum bit rate determined according to the transmission bandwidth value in the CRF bit rate control method.
[0139] In the embodiment of this specification, the upper limit of the bit rate value in step 506 is Figure 2 The bitrate upper limit mentioned in step 206 can be consistent; it is understood that the consistency here refers to the meaning and determination method of the bitrate upper limit, rather than the specific value of the bitrate upper limit. The method for determining the bitrate upper limit for encoding the target video frame sequence in step 506 can be substantially the same as the method for determining the bitrate upper limit for encoding the target video in step 206, and will not be further described here.
[0140] In the embodiment of this specification, the lower limit of the bit rate value in step 506 is Figure 2The bitrate lower limit mentioned in step 208 can be consistent; it is understood that the consistency here refers to the meaning and determination method of the bitrate lower limit, rather than the specific value of the bitrate lower limit. The method for determining the bitrate lower limit for encoding the target video frame sequence in step 506 can be substantially the same as the method for determining the bitrate lower limit for encoding the target video in step 206, and will not be repeated here.
[0141] Step 508: Encode the target video frame sequence according to the bit rate upper limit and the bit rate lower limit.
[0142] In the embodiments of this specification, the method for encoding the target video frame sequence using the upper and lower bit rate values corresponding to the target video frame sequence can be basically the same as the method for encoding the target video according to the upper and lower bit rate values in the previous text, and will not be repeated here.
[0143] Step 510: Determine whether the target video frame sequence in the video to be encoded has been encoded. If the encoding is not completed, return to step 502. If the encoding is completed, the encoding process for the video to be encoded ends.
[0144] Specifically, in an embodiment of the present specification, when it is determined that multiple target video frame sequences in a video to be encoded have not been encoded, the next target video frame sequence can be obtained after the encoding of one target video frame sequence is completed, and then encoded in the same manner until all target video frame sequences in the video to be encoded are encoded.
[0145] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method. Figure 6 The embodiments of this specification provide corresponding Figure 2 A structural diagram of a video bit rate control device. Figure 6 As shown, the device may include: The first acquisition module 602 is configured to acquire a target video.
[0146] The first determining module 604 is configured to determine the target scene category to which the target video belongs.
[0147] The second determination module 606 is configured to determine an upper bit rate limit for encoding the target video according to the target scene category to which the target video belongs; the upper bit rate limit is less than a maximum bit rate determined according to a transmission bandwidth value in a CRF bit rate control method.
[0148] The third determining module 608 is configured to determine a lower limit of a bit rate for encoding the target video according to the target scene category to which the target video belongs.
[0149] The encoding module 610 is configured to encode the target video according to the bit rate upper limit and the bit rate lower limit.
[0150] based on Figure 6 The present specification also provides some specific implementation plans of the device, which are described below.
[0151] Optional, Figure 6 The device described in may further include: The second acquisition module is used to acquire a video set of a preset scene category.
[0152] The fourth determining module is configured to determine, based on the video set of the preset scene category, an upper limit and a lower limit of a bit rate for encoding the video of the preset scene category.
[0153] Optionally, the fourth determining module may specifically include: The first acquiring unit is configured to acquire a first video set of a first preset scene category.
[0154] The first encoding unit is configured to encode the first video set using a plurality of first constant quality factors to obtain a bit rate-quality curve.
[0155] The second acquiring unit is configured to acquire a preset second constant quality factor.
[0156] The second encoding unit is used to encode the first video set using the second constant quality factor and multiple sets of preset bit rate pairs to obtain an encoding result; any of the preset bit rate pairs includes a preset bit rate value upper limit and a preset bit rate value lower limit.
[0157] A data point processing unit is used to obtain a plurality of first data points in a rate-quality coordinate system according to the encoding result; the rate-quality coordinate system is a coordinate system where the rate-quality curve is located.
[0158] The bit rate value determining unit is configured to determine a bit rate upper limit and a bit rate lower limit of the first preset scene category according to a positional relationship between the plurality of first data points and the bit rate-image quality curve.
[0159] Optionally, the bit rate value determining unit may be specifically configured to: If the positional relationship indicates that there is a second data point among the multiple first data points, then the distance between each second data point and the bit rate-image quality curve is calculated; the second data point is a data point whose image quality coordinates are greater than the image quality coordinates of a specific point in the bit rate-image quality curve, and the bit rate coordinates of the specific point are the same as the bit rate coordinates of the second data point.
[0160] The upper limit of the preset bit rate value in the preset bit rate pair corresponding to the second data point with the largest distance is determined as the upper limit of the bit rate value of the first preset scene category.
[0161] The lower limit of the preset bit rate value in the preset bit rate pair corresponding to the second data point with the largest distance is determined as the lower limit of the bit rate value of the first preset scene category.
[0162] Optional, Figure 6 The device described in may further include: a fifth determining module, configured to determine that the first preset scene category is a target scene category; The associating module is used to associate and store the target scene category with the bit rate value upper limit and the bit rate value lower limit.
[0163] Optionally, the bit rate value determining unit may further be configured to: If the positional relationship indicates that there is no second data point among the multiple first data points, then the second video set of the second preset scene category is filtered from the first video set of the first preset scene category; the second data point is a data point whose image quality coordinates are greater than the image quality coordinates of a specific point in the bit rate-image quality curve, and the bit rate coordinates of the specific point are the same as the bit rate coordinates of the second data point.
[0164] An upper bit rate value limit and a lower bit rate value limit of the second preset scene category under the first preset scene category are determined based on the second video set.
[0165] Optionally, the first encoding unit may be specifically configured to: The first video set is encoded using each of the first constant quality factors to obtain third data points corresponding to each of the first constant quality factors, wherein the third data points are used to reflect the average bit rate and average image quality of the encoded first video set.
[0166] The bit rate-image quality curve is drawn based on each of the third data points.
[0167] Optionally, the second encoding unit may be specifically configured to: For one set of preset bit rate pairs among the multiple sets of preset bit rate pairs, the second constant quality factor and the set of preset bit rate pairs are used to encode each video in the first video set to obtain the encoding bit rate and encoding image quality of each video corresponding to the set of preset bit rate pairs.
[0168] Optionally, the data point processing unit may be specifically configured to: An average bit rate of the first video set encoded based on the second constant quality factor and the set of preset bit rates is determined according to the encoding bit rates of the respective videos.
[0169] An average quality of the first video set encoded based on the second constant quality factor and the set of preset bit rates is determined according to the encoded quality of each video.
[0170] Based on the average image quality and the average bit rate, a first data point corresponding to the second constant quality factor and the set of preset bit rates is determined.
[0171] Optionally, the encoding module 610 may be specifically configured to: If the bit rate value of the target video is greater than the bit rate value upper limit, encoding is performed on the target video according to the bit rate value upper limit.
[0172] If the bit rate value of the target video is less than the bit rate value lower limit, encoding is performed on the target video according to the bit rate value lower limit.
[0173] If the bit rate value of the target video is less than the bit rate value upper limit and greater than the bit rate value lower limit, encoding is performed on the target video according to the bit rate value of the target video.
[0174] Figure 7 The embodiments of this specification provide corresponding Figure 2 A structural diagram of a video bit rate control device. Figure 7 As shown, the device 700 may include: at least one processor 710; and, A memory 730 in communication with the at least one processor; wherein, The memory 730 stores instructions 720 that can be executed by the at least one processor 710. The instructions are executed by the at least one processor 710 to enable the at least one processor 710 to: Get the target video; Determine the target scene category to which the target video belongs.
[0175] An upper limit of a bit rate for encoding the target video is determined according to a target scene category to which the target video belongs; the upper limit of the bit rate is less than a maximum bit rate determined according to a transmission bandwidth value in a CRF bit rate control method.
[0176] According to the target scene category to which the target video belongs, a lower limit of a bit rate value for encoding the target video is determined.
[0177] The target video is encoded according to the bit rate upper limit and the bit rate lower limit.
[0178] The foregoing description of this specification describes specific embodiments. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0179] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. Figure 7 As for the device shown, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0180] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using physical hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly performed using software called a "logic compiler." This is similar to the software compilers used during program development. Before compilation, the original code must be written in a specific programming language, called a Hardware Description Language (HDL). There are many types of HDL, including ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that simply by programming a method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.
[0181] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the memory control logic. Those skilled in the art will also appreciate that, in addition to implementing the controller purely in computer-readable program code, the controller can also be implemented in the form of logic gates, switches, an application-specific integrated circuit, a programmable logic controller, an embedded microcontroller, etc. by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the means for implementing the various functions included therein can also be considered as structures within the hardware component. Alternatively, the means for implementing the various functions can be considered both a software module implementing the method and a structure within the hardware component.
[0182] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0183] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0184] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0185] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0186] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0187] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0188] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0189] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0190] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology for information storage. 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 RAM (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 technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage 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 transitory computer-readable media such as modulated data signals and carrier waves.
[0191] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0192] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0193] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0194] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A video bit rate control method, comprising: Get the target video; Determining an upper limit of a bit rate value for encoding the target video; The upper limit of the bit rate value is less than the maximum bit rate determined according to the transmission bandwidth value in the CRF bit rate control method; Determining a lower limit of a bit rate value for encoding the target video; The target video is encoded according to the bit rate upper limit and the bit rate lower limit.
2. The method of claim 1, further comprising: Determining a target scene category to which the target video belongs; Determining the upper limit of the bit rate value for encoding the target video specifically includes: Determining an upper limit of a bit rate value for encoding the target video according to the target scene category; Determining the lower limit of the bit rate value for encoding the target video specifically includes: According to the target scene category, a lower limit of a bit rate value for encoding the target video is determined.
3. The method according to claim 2, before determining the target scene category to which the target video belongs, further comprising: Obtain a video collection of pre-set scene categories; Based on the video set of the preset scene category, an upper limit and a lower limit of a bit rate value for encoding the video of the preset scene category are determined.
4. The method according to claim 3, wherein determining, based on the video set of the predetermined scene category, an upper bit rate value limit and a lower bit rate value limit for encoding the video of the predetermined scene category comprises: Obtaining a first video set of a first preset scene category; Encoding the first video set using a plurality of first constant quality factors to obtain a bit rate-quality curve; Encoding the first video set using a preset second constant quality factor and a plurality of preset bit rate pairs to obtain an encoding result, wherein each of the preset bit rate pairs includes a preset bit rate upper limit and a preset bit rate lower limit; According to the encoding result, a plurality of first data points in a rate-quality coordinate system are obtained; the rate-quality coordinate system is a coordinate system where the rate-quality curve is located; An upper limit of a bit rate and a lower limit of a bit rate of the first preset scene category are determined according to a positional relationship between the plurality of first data points and the bit rate-quality curve.
5. The method of claim 4 , wherein determining the upper and lower bitrate limits of the first preset scene category based on the positional relationship between the plurality of first data points and the bitrate-quality curve comprises: If the positional relationship indicates that there is a second data point among the plurality of first data points, calculating a distance between each second data point and the bitrate-quality curve; The second data point is a data point whose image quality coordinate is greater than the image quality coordinate of a specific point in the rate-quality curve, and the rate coordinate of the specific point is the same as the rate coordinate of the second data point; determining an upper limit of a preset bit rate value in the preset bit rate pair corresponding to the second data point having the largest distance as an upper limit of a bit rate value for the first preset scene category; The lower limit of the preset bit rate value in the preset bit rate pair corresponding to the second data point with the largest distance is determined as the lower limit of the bit rate value of the first preset scene category.
6. The method according to claim 4, further comprising: after determining the upper and lower bitrate limits of the first preset scene category; Determining the first preset scene category as a target scene category; The target scene category is associated with the bit rate upper limit and the bit rate lower limit and stored.
7. The method of claim 4, wherein determining the upper and lower bitrate limits of the first preset scene category based on the positional relationship between the plurality of first data points and the bitrate-quality curve further comprises: If the positional relationship indicates that the second data point does not exist among the plurality of first data points, then selecting a second video set of a second preset scene category from the first video set of the first preset scene category; the second data point is a data point whose image quality coordinates are greater than the image quality coordinates of a specific point in the bitrate-image quality curve, and the bitrate coordinate of the specific point is the same as the bitrate coordinate of the second data point; An upper bit rate value limit and a lower bit rate value limit of the second preset scene category under the first preset scene category are determined based on the second video set.
8. The method according to claim 4, wherein encoding the first video set using a plurality of first constant quality factors to obtain a rate-quality curve comprises: Encoding the first video set using each of the first constant quality factors to obtain third data points corresponding to each of the first constant quality factors, wherein the third data points are used to reflect an average bit rate and an average image quality of the encoded first video set; The bit rate-image quality curve is drawn based on each of the third data points.
9. The method according to claim 4, wherein encoding the first video set using the second constant quality factor and multiple sets of preset bit rates to obtain an encoding result specifically comprises: For one set of preset bit rate pairs among the multiple sets of preset bit rate pairs, the second constant quality factor and the set of preset bit rate pairs are used to encode each video in the first video set to obtain the encoding bit rate and encoding image quality of each video corresponding to the set of preset bit rate pairs.
10. The method according to claim 9, wherein obtaining a plurality of first data points in a bit rate-quality coordinate system based on the encoding result specifically comprises: Determining, according to the encoding bitrates of the respective videos, an average bitrate of the first video set encoded based on the second constant quality factor and the set of preset bitrates; Determining, based on the encoded image quality of each video, an average image quality of the first video set encoded based on the second constant quality factor and the set of preset bit rates; Based on the average image quality and the average bit rate, a first data point corresponding to the second constant quality factor and the set of preset bit rates is determined.
11. The method according to claim 1, wherein encoding the target video according to the bit rate upper limit and the bit rate lower limit comprises: If the bit rate value of the target video is greater than the bit rate value upper limit, encoding the target video according to the bit rate value upper limit; If the bit rate value of the target video is less than the bit rate value lower limit, encoding the target video according to the bit rate value lower limit; If the bit rate value of the target video is less than the bit rate value upper limit and greater than the bit rate value lower limit, encoding is performed on the target video according to the bit rate value of the target video.
12. A method for determining an upper limit and a lower limit of a bit rate for video encoding, comprising: Obtaining a first video set of a first preset scene category; Encoding the first video set using a plurality of first constant quality factors to obtain a bit rate-quality curve; Encoding the first video set using a plurality of preset bitrate pairs and a second constant quality factor to obtain a plurality of first data points in a bitrate-quality coordinate system where the bitrate-quality curve resides; each of the preset bitrate pairs includes a preset bitrate upper limit and a preset bitrate lower limit; An upper limit and a lower limit of a bit rate for encoding a video of the first preset scene category are determined according to a positional relationship between the plurality of first data points and the bit rate-quality curve.
13. The method of claim 12, wherein determining an upper limit and a lower limit of a bitrate for encoding a video of the first preset scene category based on a positional relationship between the plurality of first data points and the bitrate-quality curve comprises: If the positional relationship indicates that there is a second data point among the plurality of first data points, calculating a distance between each second data point and the bitrate-quality curve; The second data point is a data point whose image quality coordinate is greater than the image quality coordinate of a specific point in the rate-quality curve, and the rate coordinate of the specific point is the same as the rate coordinate of the second data point; determining an upper limit of a preset bit rate value in the preset bit rate pair corresponding to the second data point having the largest distance as an upper limit of a bit rate value for the first preset scene category; The lower limit of the preset bit rate value in the preset bit rate pair corresponding to the second data point with the largest distance is determined as the lower limit of the bit rate value of the first preset scene category.
14. The method according to claim 12, wherein encoding the first video set using a plurality of first constant quality factors to obtain a rate-quality curve comprises: Encoding the first video set using each of the first constant quality factors to obtain third data points corresponding to each of the first constant quality factors, wherein the third data points are used to reflect an average bit rate and an average image quality of the encoded first video set; The bit rate-image quality curve is drawn based on each of the third data points.
15. The method of claim 12, wherein encoding the first video set using multiple sets of preset bitrate pairs and a second constant quality factor to obtain multiple first data points in a rate-quality coordinate system where the rate-quality curve resides, specifically comprises: For one preset bit rate pair from the plurality of preset bit rate pairs, encoding each video in the first video set using the second constant quality factor and the preset bit rate pair to obtain an encoding bit rate and an encoding quality for each video corresponding to the preset bit rate pair; Determining, according to the encoding bitrates of the respective videos, an average bitrate of the first video set encoded based on the second constant quality factor and the set of preset bitrates; Determining, based on the encoded image quality of each video, an average image quality of the first video set encoded based on the second constant quality factor and the set of preset bit rates; Based on the average image quality and the average bit rate, a first data point is marked in the rate-quality coordinate system where the rate-quality curve is located; the first data point is the first data point corresponding to the second constant quality factor and the set of preset bit rate pairs.
16. The method of claim 12, wherein determining an upper limit and a lower limit of a bit rate for encoding a video of the first preset scene category further comprises: Determining the first preset scene category as a target scene category; The target scene category is associated with the bit rate upper limit and the bit rate lower limit and stored.
17. The method of claim 12, further comprising: If the positional relationship indicates that the second data point does not exist among the plurality of first data points, then selecting a second video set of a second preset scene category from the first video set of the first preset scene category; the second data point is a data point whose image quality coordinates are greater than the image quality coordinates of a specific point in the bitrate-image quality curve, and the bitrate coordinate of the specific point is the same as the bitrate coordinate of the second data point; An upper bit rate value limit and a lower bit rate value limit of the second preset scene category under the first preset scene category are determined based on the second video set.
18. The method of claim 12, further comprising: Get the target video; Determining a scene category of the target video; Obtaining an upper limit of a bit rate for encoding the target video according to the scene category; Obtaining a lower limit of a bit rate for encoding the target video according to the scene category; The target video is encoded according to the bit rate upper limit and the bit rate lower limit.
19. A video bit rate control device, comprising: A first acquisition module is used to acquire a target video; A second determining module is used to determine an upper limit of a bit rate value for encoding the target video; The upper limit of the bit rate value is less than the maximum bit rate determined according to the transmission bandwidth value in the CRF bit rate control method; A third determining module is used to determine a lower limit of a bit rate value for encoding the target video; An encoding module is configured to encode the target video according to the bit rate upper limit and the bit rate lower limit.
20. An apparatus for determining an upper limit and a lower limit of a bit rate for video encoding, comprising: A third acquisition module is used to acquire a first video set of a first preset scene category; A first encoding module, configured to encode the first video set using a plurality of first constant quality factors to obtain a bit rate-quality curve; a second encoding module, configured to encode the first video set using a plurality of preset bitrate pairs and a second constant quality factor to obtain a plurality of first data points in a bitrate-quality coordinate system where the bitrate-quality curve resides; wherein each of the preset bitrate pairs includes a preset bitrate upper limit and a preset bitrate lower limit; The bit rate value determination module is used to determine the upper limit and lower limit of the bit rate value for encoding the video of the first preset scene category according to the positional relationship between the multiple first data points and the bit rate-image quality curve.
21. A video bit rate control device, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Get the target video; Determining an upper limit of a bit rate for encoding the target video; wherein the upper limit of the bit rate is less than a maximum bit rate determined according to a transmission bandwidth value in a CRF bit rate control method; Determining a lower limit of a bit rate value for encoding the target video; The target video is encoded according to the bit rate upper limit and the bit rate lower limit.
22. A device for determining an upper limit and a lower limit of a bit rate for video encoding, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtaining a first video set of a first preset scene category; Encoding the first video set using a plurality of first constant quality factors to obtain a bit rate-quality curve; Encoding the first video set using a plurality of preset bitrate pairs and a second constant quality factor to obtain a plurality of first data points in a bitrate-quality coordinate system where the bitrate-quality curve resides; each of the preset bitrate pairs includes a preset bitrate upper limit and a preset bitrate lower limit; An upper limit and a lower limit of a bit rate for encoding a video of the first preset scene category are determined according to a positional relationship between the plurality of first data points and the bit rate-quality curve.
