CN116668619A - Video processing method and device and electronic equipment - Google Patents
Video processing method and device and electronic equipment Download PDFInfo
- Publication number
- CN116668619A CN116668619A CN202310632275.6A CN202310632275A CN116668619A CN 116668619 A CN116668619 A CN 116668619A CN 202310632275 A CN202310632275 A CN 202310632275A CN 116668619 A CN116668619 A CN 116668619A
- Authority
- CN
- China
- Prior art keywords
- image
- video
- code rate
- current
- feature data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/01—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level
- H04N7/0127—Conversion of standards, e.g. involving analogue television standards or digital television standards processed at pixel level by changing the field or frame frequency of the incoming video signal, e.g. frame rate converter
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/266—Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
- H04N21/2662—Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The disclosure provides a method, a device and an electronic device for processing video, wherein one specific embodiment of the method comprises the following steps: acquiring current image characteristic data of a video; the image feature data represents an image complexity of the video; acquiring a frame rate corresponding to the video; and based on the image characteristic data and the frame rate, adjusting the current code rate of the video so that the current code rate of the video is positively correlated with the image complexity of the video. The implementation mode not only ensures that the speed and fluency of the coding processing of the video and the image quality of the video are more stable, but also improves the utilization rate of image processing resources.
Description
Technical Field
The disclosure relates to the technical field of video processing, and in particular relates to a method and device for processing video and electronic equipment.
Background
With the continuous development of network technology and streaming media technology, videos are increasingly applied to lives of people, entertainment services are provided for lives of people, and a plurality of convenience is brought. Conventionally, in the process of uploading or playing video, there is a problem that the speed and smoothness of video processing and the image quality of video are generally unstable. Therefore, there is a need for an efficient method of processing video.
Disclosure of Invention
The disclosure provides a method and device for processing video and electronic equipment.
According to a first aspect, there is provided a method of processing video, the method comprising:
acquiring current image characteristic data of a video; the image feature data represents an image complexity of the video;
acquiring a frame rate corresponding to the video;
and based on the image characteristic data and the frame rate, adjusting the current code rate of the video so that the current code rate of the video is positively correlated with the image complexity of the video.
According to a second aspect, there is provided an apparatus for processing video, the apparatus comprising:
the first acquisition module is used for acquiring current image characteristic data of the video; the image feature data represents an image complexity of the video;
the second acquisition module is used for acquiring the frame rate corresponding to the video;
and the adjusting module is used for adjusting the current code rate of the video based on the image characteristic data and the frame rate so that the current code rate of the video is positively correlated with the image complexity of the video.
According to a third aspect, there is provided a computer readable storage medium storing a computer program which when executed by a processor implements the method of any one of the first aspects.
According to a fourth aspect, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of the first aspects when executing the program.
The technical scheme provided by the embodiment of the disclosure can comprise the following beneficial effects:
according to the method and the device for processing the video, the current code rate of the video is adjusted based on the image characteristic data representing the current image complexity of the video and the frame rate corresponding to the video, so that the current code rate of the video is positively related to the image complexity of the video. The code rate of the processed video changes along with the image complexity of the video, so that the speed and fluency of the encoding processing of the video and the image quality of the video are more stable, and the utilization rate of image processing resources is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present disclosure, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a scene diagram of a process video according to an exemplary embodiment;
FIG. 2 is a flowchart illustrating a method of processing video according to an exemplary embodiment of the present disclosure;
FIG. 3A is a schematic diagram of a scenario in which the present disclosure illustrates one process video according to an exemplary embodiment;
FIG. 3B is a schematic diagram of another scenario in which video is processed, according to an exemplary embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating another method of processing video according to an exemplary embodiment of the present disclosure;
FIG. 5 is a block diagram of an apparatus for processing video according to an exemplary embodiment of the present disclosure;
FIG. 6 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure;
FIG. 7 is a schematic block diagram of another electronic device provided by some embodiments of the present disclosure;
fig. 8 is a schematic diagram of a storage medium provided by some embodiments of the present disclosure.
Detailed Description
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
Conventionally, in the process of uploading or playing video, it is necessary to encode the video. Therefore, it is necessary to allocate a code rate (i.e., the amount of data of the video image processed per unit time) to an application program performing the encoding process. In the related art, the same code rate is generally set for video of the same resolution, and the code rate may be the optimal code rate for the global. However, the inventors of the present disclosure found that there are problems in that the speed and smoothness of the encoding process of video are unstable, and the image quality of video is degraded. The reason for the above problem is that the complexity of the image in the video may vary greatly, and the code rate value is always fixed.
According to the scheme for processing the video, the current code rate of the video is adjusted based on the image characteristic data representing the current image complexity of the video and the corresponding frame rate of the video, so that the current code rate of the video is positively related to the image complexity of the video. The code rate of the processed video changes along with the image complexity of the video, so that the speed and fluency of the encoding processing of the video and the image quality of the video are more stable, and the utilization rate of image processing resources is improved.
Referring to fig. 1, a schematic view of a scenario for processing video is shown according to an exemplary embodiment.
As shown in fig. 1, in the process of processing the video a, if the nth frame image is currently being processed, the first feature data SI of the video a may be calculated based on the nth frame image, and the second feature data TI of the video a may be calculated based on the nth frame image and the N-1 th frame image. The first feature data SI may represent the complexity level of the current image of the video, and the second feature data TI may represent the magnitude level of the inter-frame variation of the current image of the video.
Then, the first feature data SI, the second feature data TI, and a frame rate f preset for the video a may be input into a pre-trained target model G, and the target model G predicts a reference code rate BR0. And acquiring the data quantity S of the processed previous N-1 frame image. Finally, a final target code rate BR1 is determined based on the first characteristic data SI, the second characteristic data TI, the data quantity S of the processed previous N-1 frame image and the reference code rate BR0, and the current code rate of the video A is adjusted to be the target code rate BR1.
The present disclosure will be described in detail with reference to specific embodiments.
Fig. 2 is a flowchart illustrating a method of processing video according to an exemplary embodiment. The execution body of the method may be implemented as any device, platform, server or cluster of devices having computing, processing capabilities. The method comprises the following steps:
as shown in fig. 2, in step 201, current image feature data of a video is acquired.
In this embodiment, the video involved may be a video being processed (such as an encoding process, etc.), for example, the video may be a video being uploaded or a video being played, etc. In the process of processing the video, the current image feature data of the video can be obtained, for example, when each frame of image is processed, the current image feature data of the video can be obtained at intervals of images with preset frames, and the current image feature data of the video can be obtained periodically. It will be appreciated that the present embodiment is not limited in terms of the specific timing for acquiring image feature data.
In this embodiment, the image feature data may be data representing the image complexity of the video. For example, the image feature data may include first feature data representing a complexity level of the current image of the video, and/or second feature data representing a magnitude of a change between frames of the current image of the video, and so on. It will be appreciated that the image feature data may also include other data that can represent the complexity of the image of the video, and the embodiment is not limited in terms of the specific content included in the image feature data.
In this embodiment, if the image feature data includes first feature data, the first feature data that can represent the complexity of the current image of the video may be determined by acquiring the current image of the video and based on each pixel point of the current image. Specifically, the first feature data may be determined based on differences in pixel values of a plurality of pixel points and adjacent pixel points in the current frame image.
In one implementation, for any pixel in the current frame image, the sum of the differences between the pixel and the pixel values of neighboring pixels may be calculated. For example, as shown in fig. 3A, p0 is any pixel point in the previous frame image, p1, p2, p3, and p4 are adjacent pixel points of p0, and s= (m 0-m 1) + (m 0-m 2) + (m 0-m 3) + (m 0-m 4), where m0, m1, m2, m3, and m4 are pixel values of the pixel points p0, p1, p2, p3, and p4, respectively, and S represents a sum of pixel values of the pixel point p0 and the adjacent pixel points. After the sum of the differences between the pixel values of each of some or all of the pixel points and the adjacent pixel points in the current frame image is calculated, the first feature data may be determined based on the calculation result. For example, a standard deviation of the sum of pixel values of each of the above-described partial or all pixel points and adjacent pixel points may be calculated as the first characteristic data SI.
In another implementation manner, for any pixel point in the current frame image, a mean value of differences between pixel values of the pixel point and adjacent pixel points may be calculated, and a standard deviation of the mean value of differences between pixel values of each of some or all of the pixel points in the current frame image and the adjacent pixel points may be calculated as the first feature data. It will be appreciated that the first characteristic data may also be determined in any other reasonable manner, as the present embodiment is not limited in this respect.
In this embodiment, if the image feature data includes second feature data, the second feature data that can represent the degree of variation between frames of the current image of the video may be determined by acquiring the current frame image and the previous frame image of the video and based on each pixel point of the current frame image and the previous frame image. Specifically, the second feature data may be determined by a difference between pixel values of pixel points in the current frame image and the previous frame image, which are located at the same position.
In one implementation, the sum of the differences between pixel values of pixel points at the same location for the current frame image and the previous frame image may be calculated. For example, as shown in fig. 3B, p0, p1, p2, and p3 are pixel points in the current frame image, and their coordinates are (x 0, y 0) (x 1, y 1) (x 2, y 2) (x 3, y 3), respectively. p4, p5, p6, and p7 are pixel points in the previous frame image, and their coordinates are (x 0, y 0) (x 1, y 1) (x 2, y 2) (x 3, y 3), respectively. It is possible to calculate t= (m 0-m 4) + (m 1-m 5) + (m 2-m 6) + (m 3-m 7), where m0, m1, m2, m3, m4, m5, m6, m7 are pixel values of pixel points p0, p1, p2, p3, p4, p5, p6, p7, respectively, and T represents a sum of pixel values of pixel points having the same positions of the previous frame image and the previous frame image. After the sum of the pixel values of the pixel points at which the positions of the current frame image and the previous frame image are partially or entirely identical is calculated, second feature data may be determined based on the calculation result. For example, the standard deviation of the sum of the pixel values of the pixel points at the same positions in part or all of the above-described pixel points may be calculated as the second characteristic data TI. It will be appreciated that the second characteristic data may also be determined in any other reasonable manner, as the present embodiment is not limited in this respect.
In step 202, the frame rate corresponding to the video is obtained, and in step 203, the current code rate of the video is adjusted based on the image feature data and the frame rate.
In this embodiment, in processing the video, the number of frames of the video image processed per unit time may be represented by a frame rate, and the amount of data of the video image processed per unit time may be represented by a code rate. In the process of processing video, the frame rate is kept unchanged, and the code rate can be adjusted at any time. The frame rate and the code rate corresponding to the video affect the image quality of the video together, so that the current code rate of the video can be adjusted at any time based on the image characteristic data and the frame rate. And, the current code rate of the video is positively correlated with the image complexity of the video.
For example, when it is determined that the image complexity of the video is increased based on the current image feature data of the video, the current code rate of the video may be increased according to the frame rate corresponding to the video; when the image complexity of the video is determined to be reduced based on the current image feature data of the video, the current code rate of the video can be reduced according to the corresponding frame rate of the video, so that the code rate of the video changes along with the image complexity of the video.
According to the method for processing the video, the current code rate of the video is adjusted based on the image characteristic data representing the current image complexity of the video and the corresponding frame rate of the video, so that the current code rate of the video is positively related to the image complexity of the video. The code rate of the processed video changes along with the image complexity of the video, so that the speed and fluency of the encoding processing of the video and the image quality of the video are more stable, and the utilization rate of image processing resources is improved.
Fig. 4 is a flow chart illustrating another method of processing video, according to an exemplary embodiment, which describes a process of adjusting a current code rate of the video, comprising the steps of:
as shown in fig. 4, in step 401, a reference code rate is determined based on current image feature data of a video and a frame rate corresponding to the video.
In this embodiment, the reference code rate may be primarily determined based on the current image feature data of the video and the frame rate corresponding to the video. Specifically, the current image characteristic data of the video and the frame rate corresponding to the video can be input into a pre-trained target model, and the reference code rate is predicted through the target model.
For example, when the target model is trained, a plurality of sample videos with different contents can be collected, each sample video is processed by using different code rates, the image quality index of the video processed by using the different code rates is calculated, and meanwhile, the image characteristic data corresponding to each frame of each sample video is calculated to obtain a training set. And fitting the relation among the image characteristic data, the frame rate, the code rate and the image quality index of the video by using a training set in a machine learning mode to obtain a target model. When the target model is used, the current image characteristic data of the video and the frame rate corresponding to the video can be input into the target model, so that the code rates meeting different image quality indexes are obtained, and the minimum code rate meeting the preset image quality indexes can be obtained as the reference code rate.
In step 402, the reference code rate is adjusted according to the current image characteristic data of the video, so as to obtain a target code rate, and in step 403, the current code rate of the video is adjusted to the target code rate.
In this embodiment, the reference code rate may be further adjusted according to the current image feature data of the video, so as to obtain the target code rate, so that the target code rate can be better suitable for processing the video. In particular, it may be determined whether a current image of the video satisfies a condition of a complex image based on current image feature data of the video. And when the current image of the video does not meet the condition of the complex image, taking the reference code rate as the target code rate. When the current image of the video meets the condition of the complex image, the reference code rate can be directly increased to obtain the target code 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 larger than the specified data volume, the reference code rate is still used as the target code rate, and if the data volume of the processed image is smaller than or equal to the specified data volume, the reference code rate is increased to obtain the target code rate.
In one aspect, the data size of the processed image corresponding to the video may include a sum of data sizes of all images before the image of the current frame of the video. For example, if a video is currently processing an nth frame of images, the amount of data for the processed image corresponding to the video may be the sum of the total amounts of data for the previous N-1 frames of images. On the other hand, the specified data amount may be a processing size theoretically accumulated by processing the previous N-1 frame image in accordance with the reference code rate. The specified data amount can be expressed by the following formula, for example:
M=BR0*(N-1)/f
wherein M represents a specified data amount, BR0 represents a reference code rate, N-1 represents the number of frames of the processed image, and f represents a frame rate corresponding to the video.
According to the embodiment, when the data volume of the processed image corresponding to the video is smaller, the predicted reference code rate is further increased, so that a larger code rate is distributed to the video currently, and the image quality of the video is further improved.
In some embodiments, if the data amount of the processed image is less than or equal to the specified data amount, a code rate increment may be determined based on the data amount of the processed image, and a sum of the reference code rate and the code rate increment may be determined as the target code rate. Wherein the code rate increment is inversely related to the data amount of the processed image, so that the larger the data amount of the processed image is, the smaller the code rate increment is, and the larger the data amount of the processed image is. For example, the target code rate may be calculated by the following formula:
BR1=[BR0*(N-1)/f-S]/f+BR0
wherein BR1 represents a target code rate, [ BR0 (N-1)/f-S ]/f represents a code rate increment, BR0 represents a reference code rate, N-1 represents the number of frames of the processed image, f represents a frame rate corresponding to the video, and S represents the data amount of the processed N-1 frame image.
According to the method and the device, when the data volume of the processed image corresponding to the video is smaller, the predicted reference code rate can be further increased, and the code rate increment is inversely related to the data volume of the processed image, so that the target code rate currently allocated to the video is more reasonable.
It can be understood that the target code rate may also be obtained by increasing the reference code rate in any other reasonable manner, and the specific determination manner of the target code rate in this embodiment is not limited.
It should be noted that, whether the current image of the video satisfies the condition of the complex image may be determined by:
if the image feature data only includes the first feature data, when the first feature data is greater than a first preset threshold, it may be determined that the current image of the video satisfies a condition of a complex image. When the first characteristic data is smaller than or equal to a first preset threshold value, it can be determined that the current image of the video does not meet the condition of the complex image.
If the image feature data only includes the second feature data, when the second feature data is greater than a second preset threshold, it may be determined that the current image of the video satisfies a condition of the complex image. And when the second characteristic data is smaller than or equal to a second preset threshold value, determining that the current image of the video does not meet the condition of the complex image.
If the image feature data includes the first feature data and the second feature data, 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 may be determined that the current image of the video satisfies the condition of the complex image. When the first feature data is smaller than or equal to a first preset threshold value and the second feature data is smaller than or equal to a second preset threshold value, it can be determined that the current image of the video does not meet the condition of the complex image.
According to the method for processing the video, the reference code rate is predicted based on the current image characteristic data of the video and the frame rate corresponding to the video, the reference code rate is further adjusted according to the image characteristic data, the target code rate is obtained, and the current code rate of the video is adjusted to the target code rate. On the premise of stabilizing the encoding processing speed and fluency of the video, the image quality of the video image is further improved, and the utilization rate of image processing resources is further improved.
It should be noted that while in the above embodiments, the operations of the methods of the embodiments of the present disclosure are described in a particular order, this does not require or imply that the operations must be performed in that particular order or that all of the illustrated operations be performed in order to achieve desirable results. Rather, the steps depicted in the flowcharts may change the order of execution. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step to perform, and/or one step decomposed into multiple steps to perform.
Corresponding to the foregoing embodiments of the method of processing video, the present disclosure also provides embodiments of an apparatus for processing video.
As shown in fig. 5, fig. 5 is a block diagram of an apparatus for processing video, which may include: a first acquisition module 501, a second acquisition module 502 and an adjustment module 503.
The first obtaining module 501 is configured to obtain current image feature data of a video, where the image feature data represents an image complexity of the video.
A second obtaining module 502, configured to obtain a frame rate corresponding to the video.
And the adjusting module 503 is configured to adjust the current code rate of the video based on the image feature data and the frame rate, so that the current code rate of the video is positively correlated with the image complexity of the video.
In some embodiments, the image feature data may include first feature data representing a complexity level of the current image of the video, and/or second feature data representing a magnitude of a change between frames of the current image of the video.
In other embodiments, if the image feature data includes the first feature data, the first obtaining module 501 may determine the first feature data by: and acquiring a current frame image of the video, and determining first characteristic data based on the difference between pixel values of a plurality of pixel points and adjacent pixel points in the current frame image.
If the image feature data includes the second feature data, the first obtaining module 501 may determine the second feature data by: and acquiring a current frame image and a previous frame image of the video, and determining second characteristic data based on the difference of pixel values of pixel points with the same positions in the current frame image and the previous frame image.
In other embodiments, the adjustment module 503 may include: a determination sub-module, an acquisition sub-module and an adjustment sub-module (not shown).
The determining submodule is used for determining a reference code rate based on the image characteristic data and the frame rate.
And the acquisition sub-module is used for adjusting the reference code rate according to the image characteristic data to obtain the target code rate.
And the adjusting sub-module is used for adjusting the current code rate of the video to be the target code rate.
In other embodiments, the acquisition sub-module is configured to: and determining whether the current image of the video meets the condition of the complex image or not based on the image characteristic data. When the current image does not meet the condition of the complex image, taking the reference code rate as a target code rate; and increasing the reference code rate to obtain the target code rate when at least the current image meets the condition of the complex image.
In other embodiments, the obtaining submodule may increase the reference code rate to obtain the target code rate when at least the current image satisfies the condition of the complex image by: when the current image meets the condition of the complex image, determining the data volume of the processed image corresponding to the video, and if the data volume of the processed image is smaller than or equal to the specified data volume, increasing the reference code rate to obtain the target code rate.
In other embodiments, the obtaining submodule may increase the reference code rate to obtain the target code rate by: based on the data amount of the processed image, determining a code rate increment, and determining the sum of the reference code rate and the code rate increment as a target code rate. Wherein the code rate increment is inversely related to the data amount of the processed image.
For the device embodiments, reference is made to the description of the method embodiments for the relevant points, since they essentially correspond to the method embodiments. The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purposes of the embodiments of the present disclosure. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
Fig. 6 is a schematic block diagram of an electronic device provided by some embodiments of the present disclosure. As shown in fig. 6, the electronic device 910 includes a processor 911 and memory 912, which may be used to implement a client or server. Memory 912 is used to non-transitory store computer-executable instructions (e.g., one or more computer program modules). The processor 911 is operable to execute computer-executable instructions that, when executed by the processor 911, perform one or more steps of the method of processing video described above, thereby implementing the method of processing video described above. The memory 912 and the processor 911 may be interconnected by a bus system and/or other form of connection mechanism (not shown).
For example, the processor 911 may be a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), or other form of processing unit having data processing capabilities and/or program execution capabilities. For example, the Central Processing Unit (CPU) may be an X86 or ARM architecture, or the like. The processor 911 may be a general-purpose processor or a special-purpose processor that can control other components in the electronic device 910 to perform desired functions.
For example, 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 can include, for example, random Access Memory (RAM) and/or cache memory (cache) and the like. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, flash memory, and the like. One or more computer program modules may be stored on the computer-readable storage medium and executed by the processor 911 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, etc., may also be stored in the computer readable storage medium.
It should be noted that, in the embodiments of the present disclosure, specific functions and technical effects of the electronic device 910 may refer to the description of the method for processing video above, which is not repeated herein.
Fig. 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 use in implementing the methods of processing video provided by embodiments of the present disclosure. The electronic device 920 may be a terminal device or the like, and may 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, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), wearable electronic devices, and the like, and stationary terminals such as digital TVs, desktop computers, smart home devices, and the like. It should be noted that the electronic device 920 shown in fig. 7 is only an example, and does not impose any limitation on the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 7, the electronic device 920 may include a processing apparatus (e.g., a central processing unit, a graphics processor, etc.) 921, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 922 or a program loaded from the storage apparatus 928 into a Random Access Memory (RAM) 923. In the RAM 923, various programs and data required for the operation of the electronic device 920 are also stored. The processing device 921, the ROM922, and the RAM 923 are connected to each other through a bus 924. An input/output (I/O) interface 925 is also connected to bus 924.
In general, the following devices may be connected to the I/O interface 925: input devices 926 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 927 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 928 including, for example, magnetic tape, hard disk, etc.; and communication device 929. The communication device 929 may allow the electronic apparatus 920 to communicate wirelessly or by wire with other electronic apparatuses to exchange data. While fig. 7 shows the electronic device 920 with various means, it is to be understood that not all of the illustrated means are required to be implemented or provided, and that the electronic device 920 may alternatively be implemented or provided with more or fewer means.
For example, the method of processing video described above may be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the above-described method of processing video. In such an embodiment, the computer program may be downloaded and installed from a network via the communications device 929, or from the storage device 928, or from the ROM 922. The functions defined in the method of processing video provided by the embodiments of the present disclosure may be implemented when the computer program is executed by the processing device 921.
Fig. 8 is a schematic diagram of a storage medium according to some embodiments of the present disclosure. For example, as shown in FIG. 8, the storage medium 930 may be a non-transitory computer-readable storage medium for storing non-transitory computer-executable instructions 931. The methods of processing video described in embodiments of the present disclosure may be implemented when the non-transitory computer-executable instructions 931 are executed by a processor, for example, one or more steps of the methods of processing video according to the above may be performed when the non-transitory computer-executable instructions 931 are executed by a processor.
For example, the storage medium 930 may be applied to the above-described electronic device, and for example, the storage medium 930 may include a memory in the electronic device.
For example, the storage medium may include a memory card of a smart phone, a memory component of a tablet computer, a hard disk of a personal computer, random Access Memory (RAM), read Only Memory (ROM), erasable Programmable Read Only Memory (EPROM), portable compact disc read only memory (CD-ROM), flash memory, or any combination of the foregoing, as well as other suitable storage media.
For example, the description of the storage medium 930 may refer to the description of the memory in the embodiment of the electronic device, and the repetition is omitted. The specific functions and technical effects of the storage medium 930 may be referred to the above description of the method for processing video, and will not be repeated here.
It should be noted that in the context of this disclosure, a computer-readable medium can be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable medium may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The 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 a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (10)
1. A method of processing video, the method comprising:
acquiring current image characteristic data of a video; the image feature data represents an image complexity of the video;
acquiring a frame rate corresponding to the video;
and based on the image characteristic data and the frame rate, adjusting the current code rate of the video so that the current code rate of the video is positively correlated with the image complexity of the video.
2. The method of claim 1, wherein the image feature data comprises first feature data representing a complexity level of the video current image and/or second feature data representing a magnitude of a variation between frames of the video current image.
3. The method of 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 characteristic data based on the difference between pixel values of a plurality of pixel points and adjacent pixel points in the current frame image;
if the image feature data includes the second feature data, determining the second feature data by: and acquiring a current frame image and a last frame image of the video, and determining the second characteristic data based on the difference of pixel values of pixel points with the same positions in the current frame image and the last frame image.
4. The method of claim 1, wherein the adjusting the current code rate of the video based on the image feature data and the frame rate comprises:
determining a reference code rate based on the image feature data and the frame rate;
adjusting the reference code rate according to the image characteristic data to obtain the target code rate;
and adjusting the current code rate of the video to the target code rate.
5. The method of claim 4, wherein said adjusting the reference code rate according to the image feature data to obtain the target code rate comprises:
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, the reference code rate is used as the target code rate;
and increasing the reference code rate when at least the current image meets the condition of the complex image to obtain the target code rate.
6. The method of claim 5, wherein increasing the reference code rate when the at least the current image satisfies the condition of the complex image, to obtain the target code rate, comprises:
when the current image meets the condition of the complex image, determining the data quantity of the processed image corresponding to the video;
and if the data volume of the processed image is smaller than or equal to the specified data volume, increasing the reference code rate to obtain the target code rate.
7. The method of claim 6, wherein the increasing the reference code rate results in the target code rate, comprising:
determining a code rate increment based on the data amount of the processed image; wherein the code rate increment is inversely related to the data amount of the processed image;
and determining the sum of the reference code rate and the code rate increment as the target code rate.
8. A device for processing video, the device comprising:
the first acquisition module is used for acquiring current image characteristic data of the video; the image feature data represents an image complexity of the video;
the second acquisition module is used for acquiring the frame rate corresponding to the video;
and the adjusting module is used for adjusting the current code rate of the video based on the image characteristic data and the frame rate so that the current code rate of the video is positively correlated with the image complexity of the video.
9. A computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of claims 1-7.
10. An electronic device comprising a memory having executable code stored therein and a processor, which when executing the executable code, implements the method of any of claims 1-7.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310632275.6A CN116668619A (en) | 2023-05-31 | 2023-05-31 | Video processing method and device and electronic equipment |
PCT/CN2024/095201 WO2024245140A1 (en) | 2023-05-31 | 2024-05-24 | Video processing method and apparatus, and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310632275.6A CN116668619A (en) | 2023-05-31 | 2023-05-31 | Video processing method and device and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116668619A true CN116668619A (en) | 2023-08-29 |
Family
ID=87718541
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310632275.6A Pending CN116668619A (en) | 2023-05-31 | 2023-05-31 | Video processing method and device and electronic equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN116668619A (en) |
WO (1) | WO2024245140A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024245140A1 (en) * | 2023-05-31 | 2024-12-05 | 北京字跳网络技术有限公司 | Video processing method and apparatus, and electronic device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100735233B1 (en) * | 2005-02-25 | 2007-07-03 | 삼성전자주식회사 | Personal Broadcasting Service Provision System |
CN105282547B (en) * | 2014-07-03 | 2019-06-25 | 深圳市腾讯计算机系统有限公司 | A kind of bit rate control method and device of Video coding |
CN111385576B (en) * | 2018-12-28 | 2021-08-10 | 北京字节跳动网络技术有限公司 | Video coding method and device, mobile terminal and storage medium |
CN111787318A (en) * | 2020-06-24 | 2020-10-16 | 浙江大华技术股份有限公司 | Video code rate control method, device, equipment and storage device |
CN113949874B (en) * | 2021-10-18 | 2025-04-04 | 北京金山云网络技术有限公司 | Video encoding method, device and electronic device |
CN116668619A (en) * | 2023-05-31 | 2023-08-29 | 北京字跳网络技术有限公司 | Video processing method and device and electronic equipment |
-
2023
- 2023-05-31 CN CN202310632275.6A patent/CN116668619A/en active Pending
-
2024
- 2024-05-24 WO PCT/CN2024/095201 patent/WO2024245140A1/en unknown
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024245140A1 (en) * | 2023-05-31 | 2024-12-05 | 北京字跳网络技术有限公司 | Video processing method and apparatus, and electronic device |
Also Published As
Publication number | Publication date |
---|---|
WO2024245140A1 (en) | 2024-12-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111918066B (en) | Video encoding method, device, equipment and storage medium | |
CN110413812B (en) | Neural network model training method and device, electronic equipment and storage medium | |
CN112954354B (en) | Video transcoding method, device, equipment and medium | |
EP4131983A1 (en) | Method and apparatus for processing three-dimensional video, readable storage medium, and electronic device | |
CN111258519B (en) | Screen split implementation method, device, terminal and medium | |
WO2024120396A1 (en) | Video coding method and apparatus, and electronic device and storage medium | |
CN116668619A (en) | Video processing method and device and electronic equipment | |
CN110555861B (en) | Optical flow calculation method and device and electronic equipment | |
CN110971943B (en) | Video code rate adjusting method, device, terminal and storage medium | |
CN111325668A (en) | Training method and device for image processing deep learning model and electronic equipment | |
CN112261408B (en) | Image processing method and device for head-mounted display equipment and electronic equipment | |
WO2025031323A1 (en) | Image processing method and apparatus, and electronic device | |
CN111478916A (en) | Data transmission method, device and storage medium based on video stream | |
CN117241092A (en) | Video processing method and device, storage medium and electronic equipment | |
US20240357054A1 (en) | Video frame adjustment method, electronic device and non-transient computer-readable storage medium | |
CN110378936A (en) | Optical flow computation method, apparatus and electronic equipment | |
CN112949850B (en) | Super-parameter determination method, device, deep reinforcement learning framework, medium and equipment | |
CN116456091A (en) | Video coding method, device, equipment and storage medium | |
CN109788339B (en) | Video recording method and device, electronic equipment and storage medium | |
CN116248991A (en) | Camera position adjustment method, camera position adjustment device, electronic equipment and computer readable medium | |
CN111200705B (en) | Image processing method and device | |
CN110222287A (en) | Content displaying method, device, electronic equipment and computer readable storage medium | |
CN111292329B (en) | Training method and device of video segmentation network and electronic equipment | |
CN112926735B (en) | Method, device, framework, medium and equipment for updating deep reinforcement learning model | |
CN115103023B (en) | Video caching method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |