Video processing method and apparatus, and electronic device

By dynamically adjusting the bit rate of the video, the image feature data and frame rate are related to the image complexity of the video, the problem of unstable video processing speed and fluency is solved, and the image quality and resource utilization are improved.

WO2024245140A1PCT designated stage expired Publication Date: 2024-12-05BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/095201
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-31
Filing Date
2024-05-24
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

During the upload or playback of videos, the speed and smoothness of video processing are unstable, resulting in a decrease in image quality. The reason is that the image complexity varies and the bit rate remains unchanged.

Method used

By acquiring the image feature data and frame rate of the video, adjusting the bit rate of the video, making it positively correlated with the image complexity, and dynamically adjusting the bit rate to adapt to the changes in the image complexity.

Benefits of technology

It improves the speed and fluency of video encoding processing, stabilizes the picture quality, and improves the utilization rate of image processing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024095201_05122024_PF_FP_ABST
    Figure CN2024095201_05122024_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure provides a video processing method and apparatus, and an electronic device. One specific embodiment of the method comprises: acquiring current image feature data of a video, wherein the image feature data represents the image complexity of the video; acquiring a frame rate corresponding to the video; and adjusting the current bit rate of the video on the basis of the image feature data and the frame rate, so that the current bit rate of the video is positively correlated with the image complexity of the video.
Need to check novelty before this filing date? Find Prior Art

Description

Video processing method, device and electronic device

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on the Chinese application with application number 202310632275.6 and application date May 31, 2023, and claims its priority. The disclosed content of the Chinese application is hereby introduced as a whole into this application. Technical Field

[0003] The present disclosure relates to the field of video processing technology, and in particular to a method, device and electronic device for processing video. Background Art

[0004] With the continuous development of network and streaming technologies, video is increasingly used in people's lives, providing entertainment services and bringing numerous conveniences. Currently, when uploading or playing videos, the speed and smoothness of video processing, as well as the quality of the video, are often unstable. Therefore, an effective method for video processing is needed.

[0005] Summary of the Invention

[0006] The present disclosure provides a method, apparatus, and electronic device for processing video.

[0007] According to a first aspect, a method for processing a video is provided, the method comprising:

[0008] Obtaining current image feature data of the video; the image feature data represents the image complexity of the video;

[0009] Obtaining the frame rate corresponding to the video;

[0010] Based on the image feature data and the frame rate, the current bit rate of the video is adjusted so that the current bit rate of the video is positively correlated with the image complexity of the video.

[0011] According to a second aspect, there is provided an apparatus for processing a video, the apparatus comprising:

[0012] A first acquisition module is configured to acquire current image feature data of a video; the image feature data indicates the image complexity of the video;

[0013] A second acquisition module is used to obtain the frame rate corresponding to the video;

[0014] The adjustment module is used to adjust the current bit rate of the video based on the image feature data and the frame rate, so that the current bit rate of the video is positively correlated with the image complexity of the video.

[0015] According to a third aspect, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of the above-mentioned first aspects is implemented.

[0016] According to a fourth aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods described in the first aspect when executing the program.

[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0019] FIG1 is a schematic diagram showing a scenario of processing a video according to an exemplary embodiment;

[0020] FIG2 is a flowchart of a method for processing a video according to an exemplary embodiment of the present disclosure;

[0021] FIG3A is a schematic diagram of a video processing scenario according to an exemplary embodiment of the present disclosure;

[0022] FIG3B is a schematic diagram of another video processing scenario according to an exemplary embodiment of the present disclosure;

[0023] FIG4 is a flowchart of another method for processing a video according to an exemplary embodiment of the present disclosure;

[0024] FIG5 is a block diagram of a device for processing video according to an exemplary embodiment of the present disclosure;

[0025] FIG6 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure;

[0026] FIG7 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure;

[0027] FIG8 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure. DETAILED DESCRIPTION

[0028] To help those skilled in the art better understand the technical solutions in this specification, the following will provide a clear and complete description of the technical solutions in the embodiments of this specification, in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. All other embodiments derived by those skilled in the art based on the embodiments in this specification without creative effort shall fall within the scope of protection of this specification.

[0029] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

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

[0031] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."

[0032] At present, in the process of uploading or playing a video, the video needs to be encoded. Therefore, it is necessary to allocate a bit rate (that is, the amount of video image data processed per unit time) to the application that performs the encoding process. In the related art, for videos of the same resolution, the same bit rate is generally set, and the bit rate can be the optimal bit rate for the global video. However, the inventors of the present disclosure found that there are unstable problems in the speed and smoothness of the video encoding process, and the image quality of the video will be reduced. The reason for the above problems is that the complexity of the image in the video may change greatly, while the bit rate value is always fixed.

[0033] This disclosure provides a video processing solution that adjusts the video's current bitrate based on image feature data representing the video's current image complexity and the video's corresponding frame rate, ensuring a positive correlation between the video's current bitrate and the video's image complexity. Because the bitrate varies with the video's image complexity, this not only improves the speed and smoothness of video encoding and stabilizes video quality, but also enhances the utilization of image processing resources.

[0034] Referring to FIG1 , it is a schematic diagram showing a scenario of video processing according to an exemplary embodiment.

[0035] As shown in Figure 1, during the processing of video A, if the Nth frame is currently being processed, the current first feature data SI of video A can be calculated based on the Nth frame, and the current second feature data TI of video A can be calculated based on the Nth frame and the N-1th frame. The first feature data SI can represent the complexity of the current video image, and the second feature data TI can represent the degree of change between frames of the current video image.

[0036] Next, the first feature data SI, the second feature data TI, and the preset frame rate f for video A can be input into a pre-trained target model G, which predicts a reference bitrate BR0. The data volume S of the first N-1 processed image frames is then obtained. Finally, based on the first feature data SI, the second feature data TI, the data volume S of the first N-1 processed image frames, and the reference bitrate BR0, the final target bitrate BR1 is determined, and the current bitrate of video A is adjusted to the target bitrate BR1.

[0037] The present disclosure will be described in detail below with reference to specific embodiments.

[0038] FIG2 is a flow chart of a method for processing a video according to an exemplary embodiment. The execution subject of the method can be implemented as any device, platform, server or device cluster with computing and processing capabilities. The method includes the following steps:

[0039] As shown in FIG2 , in step 201 , the current image feature data of the video is obtained.

[0040] In this embodiment, the video involved may be a video being processed (e.g., encoded), for example, a video being uploaded or being played. During the processing of the video, the current image feature data of the video may be obtained. For example, the current image feature data of the video may be obtained when processing each frame of the image, or may be obtained every preset number of frames, or may be obtained periodically. It will be understood that this embodiment does not limit the specific timing of obtaining the image feature data.

[0041] In this embodiment, the image feature data may be data indicating the complexity of the video image. For example, the image feature data may include first feature data indicating the complexity of the current image in the video, and / or second feature data indicating the magnitude of the change between the current image frames in the video. It is understood that the image feature data may also include other data that can indicate the complexity of the video image, and this embodiment does not limit the specific content of the image feature data.

[0042] In this embodiment, if the image feature data includes first feature data, the first feature data representing the complexity of the current image of the video can be determined based on each pixel of the current frame by acquiring the current frame of the video. Specifically, the first feature data can be determined based on the difference between the pixel values ​​of multiple pixels in the current frame and adjacent pixels.

[0043] In one implementation, for any pixel in the current frame of image, the sum of the differences between the pixel values ​​of the pixel and its adjacent pixels can be calculated. For example, as shown in FIG3A , p0 is any pixel in the current frame of image, and p1, p2, p3, and p4 are the adjacent pixels of p0, respectively. S=(m0-m1)+(m0-m2)+(m0-m3)+(m0-m4) can be calculated, where m0, m1, m2, m3, and m4 are the pixel values ​​of the pixels p0, p1, p2, p3, and p4, respectively, and S represents the sum of the differences between the pixel values ​​of the pixel p0 and its adjacent pixels. After calculating the sum of the differences between the pixel values ​​of some or all pixels in the current frame of image and their adjacent pixels, the first feature data can be determined based on the calculation results. For example, the standard deviation of the sum of the differences between the pixel values ​​of some or all pixels and their adjacent pixels can be calculated as the first feature data SI.

[0044] In another implementation, for any pixel in the current image frame, the mean of the pixel value differences between the pixel and its adjacent pixels may be calculated, and the standard deviation of the mean of the pixel value differences between some or all pixels in the current image frame and their adjacent pixels may be calculated as the first feature data. It will be appreciated that the first feature data may also be determined using any other reasonable method, and this embodiment is not limited in this respect.

[0045] In this embodiment, if the image feature data includes second feature data, the second feature data representing the degree of change between the current image frame of the video can be determined by obtaining the current image frame and the previous image frame and based on the individual pixels in the current image frame and the previous image frame. Specifically, the second feature data can be determined based on the difference in pixel values ​​between the pixels at the same position in the current image frame and the previous image frame.

[0046] In one implementation, the sum of the differences in pixel values ​​between the pixels at the same position in the current image and the previous image can be calculated. For example, as shown in FIG3B , p0, p1, p2, and p3 are pixels in the current image, and their coordinates are (x0, y0) (x1, y1) (x2, y2) (x3, y3). p4, p5, p6, and p7 are pixels in the previous image, and their coordinates are also (x0, y0) (x1, y1) (x2, y2) (x3, y3). T = (m0-m4) + (m1-m5) + (m2-m6) + (m3-m7) can be calculated, where m0, m1, m2, m3, m4, m5, m6, and m7 are the pixel values ​​of the pixels p0, p1, p2, p3, p4, p5, p6, and p7, respectively, and T represents the sum of the differences in pixel values ​​between the pixels at the same position in the current image and the previous image. After calculating the sum of the differences between the pixel values ​​of partially or completely identically located pixels in the current image frame and the previous image frame, the second feature data can be determined based on the calculation result. For example, the standard deviation of the sum of the differences between the pixel values ​​of partially or completely identically located pixels can be calculated as the second feature data TI. It will be appreciated that the second feature data can also be determined using any other reasonable method, and this embodiment is not limited in this respect.

[0047] In step 202, the frame rate corresponding to the video is obtained, and in step 203, the current bit rate of the video is adjusted based on the image feature data and the frame rate.

[0048] In this embodiment, during video processing, the number of video frames processed per unit time can be expressed as a frame rate, and the amount of video data processed per unit time can be expressed as a bit rate. During video processing, the frame rate remains constant, while the bit rate can be adjusted at any time. The frame rate and bit rate of a video jointly affect its image quality. Therefore, the current bit rate of the video can be adjusted at any time based on the image feature data and the frame rate. Furthermore, the current bit rate of the video is positively correlated with the image complexity of the video.

[0049] For example, when it is determined based on the current image feature data of the video that the image complexity of the video increases, the current bit rate of the video can be increased according to the corresponding frame rate of the video; when it is determined based on the current image feature data of the video that the image complexity of the video decreases, the current bit rate of the video can be reduced according to the corresponding frame rate of the video, so that the bit rate of the video changes with the image complexity of the video.

[0050] This disclosure provides a method for processing video. By adjusting the video's current bitrate based on image feature data representing the video's current image complexity and the video's corresponding frame rate, the method ensures a positive correlation between the video's current bitrate and the video's image complexity. Because the bitrate varies with the video's image complexity, this method not only improves the speed and smoothness of video encoding and stabilizes video quality, but also enhances the utilization of image processing resources.

[0051] FIG4 is a flow chart showing another method for processing a video according to an exemplary embodiment. This embodiment describes a process of adjusting the current bit rate of the video, including the following steps:

[0052] As shown in FIG4 , in step 401 , a reference bit rate is determined based on the current image feature data of the video and the frame rate corresponding to the video.

[0053] In this embodiment, the reference bit rate can be preliminarily determined based on the current image feature data of the video and the corresponding frame rate of the video. Specifically, the current image feature data of the video and the corresponding frame rate of the video can be input into a pre-trained target model, and the reference bit rate can be predicted by the target model.

[0054] For example, when training a target model, you can collect multiple sample videos with different content, process each sample video using a different bitrate, and calculate the image quality indicators of the videos processed at different bitrates. At the same time, calculate the image feature data corresponding to each frame of each sample video to obtain a training set. Then, using the training set, fit the relationship between the video's image feature data, frame rate, bitrate, and image quality indicators through machine learning to obtain the target model. When using the target model, you can input the video's current image feature data and the video's corresponding frame rate into the target model to obtain bitrates that meet different image quality indicators. The minimum bitrate that meets the preset image quality indicators can be obtained as a reference bitrate.

[0055] In step 402, the reference bit rate is adjusted according to the current image feature data of the video to obtain a target bit rate, and in step 403, the current bit rate of the video is adjusted to the target bit rate.

[0056] In this embodiment, the reference bit rate can be further adjusted according to the current image feature data of the video to obtain the target bit rate, so that the target bit rate can be better applied to the processing of the video. Specifically, it can be determined whether the current image of the video meets the conditions of a complex image based on the current image feature data of the video. When the current image of the video does not meet the conditions of a complex image, the reference bit rate is used as the target bit rate. When the current image of the video meets the conditions of a complex image, the reference bit rate can be directly increased to obtain the target bit rate; or, the data volume of the processed image corresponding to the video can be further determined. If the data volume of the processed image is greater than the specified data volume, the reference bit rate is still used as the target bit rate. If the data volume of the processed image is less than or equal to the specified data volume, the reference bit rate is further increased to obtain the target bit rate.

[0057] Among them, on the one hand, the data volume of the processed image corresponding to the video may include the sum of the data volume of all images before the current frame image of the video. For example, if the video is currently processing the Nth frame image, the data volume of the processed image corresponding to the video may be the sum of the total data volume of the previous N-1 frames of images. On the other hand, the specified data volume may be the theoretically accumulated processing size of processing the first N-1 frames of images according to the reference bit rate. For example, the specified data volume can be expressed by the following formula: M = BR0*(N-1) / f

[0058] Where M represents the specified data volume, BR0 represents the reference bit rate, N-1 represents the number of processed image frames, and f represents the corresponding frame rate of the video.

[0059] Since this embodiment can further increase the predicted reference bit rate when the data volume of the processed image corresponding to the video is small, a larger bit rate is currently allocated to the video, thereby further improving the image quality of the video.

[0060] In some embodiments, if the data volume of the processed image is less than or equal to the specified data volume, a bit rate increment can be determined based on the data volume of the processed image, and the sum of the reference bit rate and the bit rate increment is determined as the target bit rate. The bit rate increment is negatively correlated with the data volume of the processed image, so that the larger the data volume of the processed image, the smaller the bit rate increment, and the smaller the data volume of the processed image, the larger the bit rate increment. For example, the target bit rate can be calculated using the following formula: BR1 = [BR0*(N-1) / fS] / f+BR0

[0061] Where BR1 represents the target bit rate, [BR0*(N-1) / fS] / f represents the bit rate increment, BR0 represents the reference bit rate, N-1 represents the number of processed image frames, f represents the corresponding frame rate of the video, and S represents the data volume of the processed N-1 frames.

[0062] Since this embodiment can further increase the predicted reference bit rate when the data volume of the processed image corresponding to the video is small, and the bit rate increment is negatively correlated with the data volume of the processed image, the target bit rate currently allocated to the video is more reasonable.

[0063] It is understandable that the target bit rate can be obtained by increasing the reference bit rate in any other reasonable manner. This embodiment does not limit the specific method for determining the target bit rate.

[0064] It should be noted that whether the current image of the video meets the conditions of a complex image can be determined in the following way:

[0065] If the image feature data only includes the first feature data, then when the first feature data is greater than a first preset threshold, it can be determined that the current image of the video meets the condition of a complex image. When the first feature data is less than or equal to the first preset threshold, it can be determined that the current image of the video does not meet the condition of a complex image.

[0066] If the image feature data only includes the second feature data, then when the second feature data is greater than a second preset threshold, it can be determined that the current image of the video meets the condition of a complex image. When the second feature data is less than or equal to the second preset threshold, it can be determined that the current image of the video does not meet the condition of a complex image.

[0067] If the image feature data includes first feature data and second feature data, then when the first feature data is greater than a first preset threshold, or when the second feature data is greater than a second preset threshold, or when the first feature data is greater than the first preset threshold and the second feature data is greater than the second preset threshold, it can be determined that the current image of the video meets the condition of a complex image. When the first feature data is less than or equal to the first preset threshold and the second feature data is less than or equal to the second preset threshold, it can be determined that the current image of the video does not meet the condition of a complex image.

[0068] This disclosure provides a method for processing video. This method predicts a reference bitrate based on the video's current image feature data and the video's corresponding frame rate, further adjusts the reference bitrate based on the image feature data, and obtains a target bitrate. The method then adjusts the video's current bitrate to the target bitrate. This method improves the video's image quality and the utilization of image processing resources, while maintaining a more stable speed and smoothness in video encoding.

[0069] It should be noted that although the operations of the methods of the embodiments of the present disclosure are described in a specific order in the above embodiments, this does not require or imply that these operations must be performed in this specific order, or that all of the operations shown must be performed to achieve the desired results. On the contrary, the steps depicted in the flowcharts can be performed in a different order. Additionally or alternatively, certain steps can be omitted, multiple steps can be combined into one step, and / or one step can be decomposed into multiple steps.

[0070] Corresponding to the aforementioned embodiment of the method for processing a video, the present disclosure also provides an embodiment of an apparatus for processing a video.

[0071] As shown in FIG5 , FIG5 is a block diagram of a device for processing a video according to an exemplary embodiment of the present disclosure. The device may include: a first acquisition module 501 , a second acquisition module 502 and an adjustment module 503 .

[0072] The first acquisition module 501 is used to acquire the current image feature data of the video, where the image feature data represents the image complexity of the video.

[0073] The second acquisition module 502 is configured to acquire a frame rate corresponding to the video.

[0074] The adjustment module 503 is configured to adjust the current bit rate of the video based on the image feature data and the frame rate, so that the current bit rate of the video is positively correlated with the image complexity of the video.

[0075] In some embodiments, the image feature data may include first feature data indicating the complexity of the current image of the video, and / or second feature data indicating the degree of change between frames of the current image of the video.

[0076] In other embodiments, if the above-mentioned image feature data includes first feature data, the first acquisition module 501 can determine the first feature data in the following manner: obtain the current frame image of the video, and determine the first feature data based on the difference between the pixel values ​​of multiple pixel points in the current frame image and the adjacent pixel points.

[0077] Among them, if the above-mentioned image feature data includes second feature data, the first acquisition module 501 can determine the second feature data in the following manner: obtain the current frame image and the previous frame image of the video, and determine the second feature data based on the difference in pixel values ​​of the pixel points at the same position in the current frame image and the previous frame image.

[0078] In other implementations, the adjustment module 503 may include: a determination submodule, an acquisition submodule, and an adjustment submodule (not shown in the figure).

[0079] The determination submodule is configured to determine a reference bit rate based on the image feature data and the frame rate.

[0080] The acquisition submodule is used to adjust the reference bit rate according to the above image feature data to obtain the target bit rate.

[0081] The adjustment submodule is used to adjust the current bit rate of the video to the target bit rate.

[0082] In other embodiments, the acquisition submodule is configured to determine, based on the image feature data, whether the current image of the video meets the conditions for a complex image. If the current image does not meet the conditions for a complex image, the reference bit rate is used as the target bit rate; if at least the current image meets the conditions for a complex image, the reference bit rate is increased to obtain the target bit rate.

[0083] In other embodiments, the acquisition submodule can increase the reference bit rate to obtain the target bit rate when at least the current image meets the conditions of a complex image in the following manner: when the current image meets the conditions of a complex image, determine the data amount of the processed image corresponding to the video; if the data amount of the processed image is less than or equal to the specified data amount, increase the reference bit rate to obtain the target bit rate.

[0084] In other embodiments, the acquisition submodule may increase the reference bit rate to obtain the target bit rate by determining a bit rate increment based on the amount of processed image data, and determining the target bit rate as the sum of the reference bit rate and the bit rate increment, wherein the bit rate increment is negatively correlated with the amount of processed image data.

[0085] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment scheme of the present disclosure. A person of ordinary skill in the art can understand and implement it without paying any creative work.

[0086] Figure 6 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure. As shown in Figure 6, the electronic device 910 includes a processor 911 and a memory 912, which can be used to implement a client or a server. The memory 912 is used to store computer-executable instructions (e.g., one or more computer program modules) non-transiently. The processor 911 is used to run the computer-executable instructions, and when the computer-executable instructions are run by the processor 911, one or more steps in the method for processing a video described above can be executed, thereby implementing the method for processing a video described above. The memory 912 and the processor 911 can be interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0087] For example, the processor 911 may be a central processing unit (CPU), a graphics processing unit (GPU), or other processing units with data processing capabilities and / or program execution capabilities. For example, the central processing unit (CPU) may be an X86 or ARM architecture. The processor 911 may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device 910 to perform desired functions.

[0088] For example, the memory 912 may include any combination of one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory. Non-volatile memory may include, for example, read-only memory (ROM), a hard disk, an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, a flash memory, etc. One or more computer program modules may be stored on the computer-readable storage medium, and the processor 911 may execute one or more computer program modules to implement various functions of the electronic device 910. Various applications and various data, as well as various data used and / or generated by the applications, may also be stored in the computer-readable storage medium.

[0089] It should be noted that, in the embodiment of the present disclosure, the specific functions and technical effects of the electronic device 910 can be referred to the description of the method for processing video above, and will not be repeated here.

[0090] Figure 7 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure. The electronic device 920 is, for example, suitable for implementing the method for processing video provided by an embodiment of the present disclosure. The electronic device 920 may be a terminal device, etc., which can be used to implement a client or a server. The electronic device 920 may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, etc., and fixed terminals such as digital TVs, desktop computers, smart home devices, etc. It should be noted that the electronic device 920 shown in Figure 7 is only an example and does not impose any restrictions on the functions and scope of use of the embodiments of the present disclosure.

[0091] As shown in FIG7 , the electronic device 920 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 921, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 922 or a program loaded from a storage device 928 into a random access memory (RAM) 923. Various programs and data required for the operation of the electronic device 920 are also stored in the RAM 923. The processing device 921, the ROM 922, and the RAM 923 are connected to each other via a bus 924. An input / output (I / O) interface 925 is also connected to the bus 924.

[0092] Typically, the following devices may be connected to the I / O interface 925: an input device 926 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 927 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 928 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 929. The communication device 929 may allow the electronic device 920 to communicate with other electronic devices wirelessly or by wire to exchange data. Although FIG. 7 shows the electronic device 920 having various devices, it should be understood that it is not required to implement or have all of the devices shown, and the electronic device 920 may alternatively implement or have more or fewer devices.

[0093] For example, according to an embodiment of the present disclosure, the above-mentioned method for processing a video can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the above-mentioned method for processing a video. In such an embodiment, the computer program can be downloaded and installed from a network via the communication device 929, or installed from the storage device 928, or installed from the ROM 922. When the computer program is executed by the processing device 921, the functions defined in the method for processing a video provided by the embodiment of the present disclosure can be implemented.

[0094] Figure 8 is a schematic diagram of a storage medium provided in some embodiments of the present disclosure. For example, as shown in Figure 8, storage medium 930 may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 931. When non-transitory computer-executable instructions 931 are executed by a processor, the method for processing a video described in an embodiment of the present disclosure may be implemented. For example, when non-transitory computer-executable instructions 931 are executed by a processor, one or more steps of the method for processing a video described above may be performed.

[0095] For example, the storage medium 930 may be applied to the above-mentioned electronic device. For example, the storage medium 930 may include a memory in the electronic device.

[0096] For example, the storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a flash memory, or any combination of the above storage media, or other applicable storage media.

[0097] For example, the description of the storage medium 930 can refer to the description of the memory in the embodiment of the electronic device, and the repeated parts are not repeated. The specific functions and technical effects of the storage medium 930 can refer to the description of the method for processing video above, and are not repeated here.

[0098] It should be noted that in the context of the present disclosure, a computer-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in conjunction with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0099] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the claims.

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

Claims

1. A method for processing a video, the method comprising: Get the current image feature data of the video; The image feature data represents the image complexity of the video; Obtaining a frame rate corresponding to the video; Based on the image feature data and the frame rate, the current bit rate of the video is adjusted so that the current bit rate of the video is positively correlated with the image complexity of the video.

2. The method according to claim 1, wherein: The image feature data includes first feature data indicating the complexity of the current image of the video, and / or second feature data indicating the degree of change between frames of the current image of the video.

3. The method according to claim 2, wherein: If the image feature data includes the first feature data, the first feature data is determined by: acquiring a current frame image of the video, and determining the first feature data based on differences between pixel values ​​of a plurality of pixel points in the current frame image and adjacent pixel points; Among them, if the image feature data includes the second feature data, the second feature data is determined in the following manner: a current frame image and a previous frame image of the video are obtained, and the second feature data is determined based on the difference in pixel values ​​of pixel points at the same position in the current frame image and the previous frame image.

4. The method according to any one of claims 1 to 3, wherein: The adjusting the current bit rate of the video based on the image feature data and the frame rate includes: Determining a reference bit rate based on the image feature data and the frame rate; Adjust the reference bit rate according to the image feature data to obtain the target bit rate; The current bit rate of the video is adjusted to the target bit rate.

5. The method according to claim 4, wherein: The adjusting the reference bit rate according to the image feature data to obtain the target bit rate includes: Determining whether a current image of the video meets a condition of a complex image based on the image feature data; When the current image does not meet the condition of the complex image, using the reference bit rate as the target bit rate; When at least the current image meets the condition of the complex image, the reference bit rate is increased to obtain the target bit rate.

6. The method according to claim 5, wherein: When at least the current image satisfies the condition of the complex image, increasing the reference bit rate to obtain the target bit rate includes: When the current image satisfies the condition of the complex image, determining the data amount of the processed image corresponding to the video; If the data amount of the processed image is less than or equal to the specified data amount, the reference bit rate is increased to obtain the target bit rate.

7. The method according to claim 6, wherein: The increasing the reference bit rate to obtain the target bit rate includes: Determining a bit rate increment based on the data volume of the processed image; wherein the bit rate increment is negatively correlated with the data volume of the processed image; The sum of the reference bit rate and the bit rate increment is determined as the target bit rate.

8. A device for processing a video, the device comprising: The first acquisition module is used to acquire the current image feature data of the video; The image feature data represents the image complexity of the video; A second acquisition module is used to acquire a frame rate corresponding to the video; The adjustment module is used to adjust the current bit rate of the video based on the image feature data and the frame rate, so that the current bit rate of the video is positively correlated with the image complexity of the video.

9. A computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method according to any one of claims 1 to 7.

10. An electronic device comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 7 is implemented.

11. A computer program comprising: Instructions, which, when executed by a processor, implement the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Code rate control method and device of video encoding

    CN105282547A

  • Video coding method and device, mobile terminal and storage medium

    CN111385576A

  • Video code rate control method, device and equipment and storage device

    CN111787318A

  • Video coding method and device and electronic equipment

    CN113949874A

  • Video processing method and device and electronic equipment

    CN116668619A