CN114501015B - Video coding rate processing method and device, storage medium and electronic equipment - Google Patents

Video coding rate processing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN114501015B
CN114501015B CN202210352794.2A CN202210352794A CN114501015B CN 114501015 B CN114501015 B CN 114501015B CN 202210352794 A CN202210352794 A CN 202210352794A CN 114501015 B CN114501015 B CN 114501015B
Authority
CN
China
Prior art keywords
coding
rate
video frame
code rate
current
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.)
Active
Application number
CN202210352794.2A
Other languages
Chinese (zh)
Other versions
CN114501015A (en
Inventor
张鹏
刘星宇
向国庆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Advanced Institute of Information Technology AIIT of Peking University
Hangzhou Weiming Information Technology Co Ltd
Original Assignee
Advanced Institute of Information Technology AIIT of Peking University
Hangzhou Weiming Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Advanced Institute of Information Technology AIIT of Peking University, Hangzhou Weiming Information Technology Co Ltd filed Critical Advanced Institute of Information Technology AIIT of Peking University
Priority to CN202210352794.2A priority Critical patent/CN114501015B/en
Publication of CN114501015A publication Critical patent/CN114501015A/en
Application granted granted Critical
Publication of CN114501015B publication Critical patent/CN114501015B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a video coding rate processing method and device, a storage medium and electronic equipment. Wherein, the method comprises the following steps: respectively determining an original video coding rate and a characteristic coding rate corresponding to each coding unit according to a target code rate of each coding unit in a current video frame and a preset code rate distribution model; video coding is carried out on each coding unit according to the original video coding rate, and image characteristics in the coding units are compressed according to the characteristic coding rate; when all coding units in the current video frame finish video coding and image characteristic compression, acquiring the actual coding code rate of the current video frame; and adjusting the target code rate of the next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame. The invention solves the technical problem of low video coding rate processing efficiency.

Description

Video coding rate processing method and device, storage medium and electronic equipment
Technical Field
The invention relates to the technical field of video processing, in particular to a video coding rate processing method and device, a storage medium and electronic equipment.
Background
Image and video data are key elements in an intelligent living system. The current intelligent life application scene can realize the functions of identification, retrieval, tracking and the like in a mode of selecting and transmitting visual characteristic signals, and the original video signals can be stored and viewed off line by a user. Therefore, the intelligent living system needs to set two code streams in the data transmission process, one is a video coding compressed stream, and the other is a characteristic coding compressed stream, and the two code streams are transmitted to the user side through the intelligent terminal network. However, in general, due to the limited bandwidth of the intelligent terminal network, appropriate code rates cannot be allocated to the video coding code stream and the characteristic coding code stream under a given bandwidth, and the processing efficiency of the video coding code rate is low.
Disclosure of Invention
The embodiment of the invention provides a video coding rate processing method and device, a storage medium and electronic equipment, which at least solve the technical problem of low video coding rate processing efficiency.
According to an aspect of the embodiments of the present invention, there is provided a video coding rate processing method, including: respectively determining an original video coding rate and a characteristic coding rate corresponding to each coding unit according to a target code rate of each coding unit in a current video frame and a preset code rate distribution model; performing video coding on each coding unit according to the original video coding rate, and compressing image characteristics in the coding units according to a characteristic coding rate; when all coding units in the current video frame complete video coding and image feature compression, acquiring the actual coding rate of the current video frame; adjusting the target code rate of the next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame; and the target transmission code rate is the target code rate of each video frame in the current network environment.
According to another aspect of the embodiments of the present invention, there is also provided a video coding rate processing apparatus, including: the first determining unit is used for respectively determining an original video coding rate and a characteristic coding rate corresponding to each coding unit according to a target code rate of each coding unit in a current video frame and a preset code rate distribution model; the coding and compressing unit is used for carrying out video coding on each coding unit according to the original video coding rate and compressing the image characteristics in the coding units according to the characteristic coding rate; the acquiring unit is used for acquiring the actual coding rate of the current video frame when all the coding units in the current video frame finish video coding and image feature compression; the adjusting unit is used for adjusting the target code rate of the next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame; and the target transmission code rate is the target code rate of each video frame in the current network environment.
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, including a memory and a processor, where the memory stores a computer program, and the processor is configured to execute the video coding rate processing method through the computer program.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the video coding rate processing method when running.
In the embodiment of the invention, an original video coding rate and a characteristic coding rate corresponding to each coding unit are respectively determined according to a target code rate of each coding unit in a current video frame and a preset code rate distribution model; video coding is carried out on each coding unit according to the original video coding code rate, and image features in the coding units are compressed according to the feature coding code rate; when all coding units in the current video frame complete video coding and image feature compression, acquiring the actual coding code rate of the current video frame; adjusting the target code rate of the next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame; in the method, the original video coding rate and the characteristic coding rate corresponding to each coding unit are determined according to a preset rate allocation model, and the target rate of the next video frame of the current video frame is adjusted according to the actual coding rate of the current video frame and the target transmission rate of the video frame, so that the video coding code stream and the characteristic coding code stream can be reasonably allocated, the video coding rate processing efficiency and accuracy are improved, and the technical problem of low video coding rate processing efficiency is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a schematic diagram of an application environment of an alternative video coding rate processing method according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating an application environment of an alternative video coding rate processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating an alternative video coding rate process according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating an alternative video coding rate processing method according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating an alternative video encoding rate processing method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a system architecture of another alternative video coding rate processing method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of an alternative hardware circuit internal flow architecture according to an embodiment of the present invention;
FIG. 8 is a block diagram of an alternative video coding rate processing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an alternative electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present invention, a video coding rate processing method is provided, and optionally, as an optional implementation manner, the video coding rate processing method may be applied, but not limited to, in an application environment as shown in fig. 1. The application environment comprises: the terminal equipment 102, the network 104 and the server 106 are used for human-computer interaction with the user. The user 108 and the terminal device 102 can perform human-computer interaction, and a video coding rate processing application program runs in the terminal device 102. The terminal device 102 includes a human-machine interaction screen 1022, a processor 1024, and a memory 1026. The man-machine interaction screen 1022 is used to display video frames of the current video; the processor 1024 is configured to obtain each coding unit corresponding to the current video. The memory 1026 is configured to store the original video coding rate and the characteristic coding rate corresponding to each coding unit.
In addition, the server 106 includes a database 1062 and a processing engine 1064, where the database 1062 is used to store the original video coding rate and the characteristic coding rate corresponding to each coding unit. The processing engine 1064 is configured to determine, according to a target code rate of each coding unit in a current video frame and a preset code rate allocation model, an original video coding code rate and a characteristic coding code rate corresponding to each coding unit; performing video coding on each coding unit according to the original video coding rate, and compressing image characteristics in the coding units according to a characteristic coding rate; when all coding units in the current video frame complete video coding and image feature compression, acquiring the actual coding rate of the current video frame; adjusting the target code rate of the next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame; and the target transmission code rate is the target code rate of each video frame in the current network environment.
In one or more embodiments, the video coding rate processing method described above in this application may be applied to the application environment shown in fig. 2. As shown in fig. 2, a human-computer interaction may be performed between a user 202 and a user device 204. The user device 204 includes a memory 206 and a processor 208. The user equipment 204 in this embodiment may refer to, but is not limited to, performing the above operations performed by the terminal equipment 102 to obtain the target bitrate of the video frame.
Optionally, the terminal device 102 and the user device 204 include, but are not limited to, a mobile phone, a tablet computer, a notebook computer, a PC, a vehicle-mounted electronic device, a wearable device, and the like, and the network 104 may include, but is not limited to, a wireless network or a wired network. Wherein, this wireless network includes: WIFI and other networks that enable wireless communication. Such wired networks may include, but are not limited to: wide area networks, metropolitan area networks, local area networks. The server 106 may include, but is not limited to, any hardware device capable of performing computations. The server may be a single server, a server cluster composed of a plurality of servers, or a cloud server. The above is merely an example, and this is not limited in this embodiment.
In order to solve the above technical problem, as an optional implementation manner, as shown in fig. 3, an embodiment of the present invention provides a video coding rate processing method, including the following steps:
s302, respectively determining an original video coding rate and a characteristic coding rate corresponding to each coding unit according to a target code rate of each coding unit in a current video frame and a preset code rate distribution model.
In the embodiment of the invention, an original video corresponding to a video to be transmitted currently and video characteristics corresponding to the original video are obtained; the video features are image features obtained from the original video; here, the division of each video frame in the original video into a plurality of coding units (also referred to as coding blocks) includes, but is not limited to, the division of one frame of image into N coding units, each of which has a size MxM.
S304, video coding is carried out on each coding unit according to the original video coding rate, and image features in the coding units are compressed according to the feature coding rate.
Here, each of the coding units is video-coded based on the original video coding rate, for example, the original video coding rate is 5-10Mbps, and each of the coding units is coded according to the h.264 standard to output video with 720P and 1080I resolutions; and if the characteristic coding rate is 1-5Mbps, compressing the image characteristics in the coding unit according to the characteristic coding rate.
S306, when all the coding units in the current video frame complete video coding and image feature compression, acquiring the actual coding rate of the current video frame.
In the embodiment of the present invention, when all the coding units in the current video frame complete video coding and image feature compression, because the pixel complexity, such as texture complexity, of each coding unit in the video frame is different, the actual coding rate of the current video frame is different from the target transmission rate of the video frame set in advance.
S308, adjusting the target code rate of the next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame; and the target transmission code rate is the target code rate of each video frame in the current network environment.
In the embodiment of the present invention, in order to enable a target transmission rate of a video frame to be 10Mbps and an actual coding rate of a current video frame to be 9Mbps in a given network environment, a target rate of a next video frame of the current video frame is adjusted to be 11Mbps, so that a transmission rate of the entire video can be maintained at about 10 Mbps.
In the embodiment of the invention, an original video coding rate and a characteristic coding rate corresponding to each coding unit are respectively determined according to a target code rate of each coding unit in a current video frame and a preset code rate distribution model; performing video coding on each coding unit according to the original video coding rate, and compressing image characteristics in the coding units according to a characteristic coding rate; when all coding units in the current video frame complete video coding and image feature compression, acquiring the actual coding rate of the current video frame; adjusting the target code rate of the next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame; in the method, an original video coding rate and a characteristic coding rate corresponding to each coding unit are determined according to a preset rate allocation model, and a target rate of a next video frame of a current video frame is adjusted according to an actual coding rate of the current video frame and a target transmission rate of the video frame, so that a video coding stream and a characteristic coding stream can be reasonably allocated, the video coding rate processing efficiency is improved, and the technical problem of low video coding rate processing efficiency is solved.
In one or more embodiments, the determining, according to a target code rate of each coding unit in a current video frame and a preset code rate allocation model, an original video coding rate and a characteristic coding rate corresponding to each coding unit respectively includes:
obtaining an original video coding rate and a characteristic coding rate corresponding to each coding unit through formulas (1) and (2):
B=Bv+a*Bc+b(1)
Bv=0.66B (2)
wherein, B is a target code rate of a current coding unit, Bv is an original video coding rate, Bc is a characteristic coding rate, a =2, and B = 1000.
The code rate distribution model can reasonably distribute the target code rate of each coding unit to the original video coding rate and the characteristic coding rate corresponding to each coding unit, and the video coding rate processing efficiency is improved.
In one or more embodiments, before determining, according to a target code rate of each coding unit in a current video frame and a preset code rate allocation model, an original video coding rate and a characteristic coding rate corresponding to each coding unit respectively, the method further includes:
dividing the current video frame into a plurality of coding units; and equally dividing the target transmission code rate to the plurality of coding units to obtain the target code rate of each coding unit.
Specifically, for example, one frame image is divided into N coding units, the target transmission code rate is Bt, and the target code rate Bf = Bt/N of each coding unit.
In one or more embodiments, the method further comprises: and adjusting the target code rate of the current coding unit based on the texture complexity of the current coding unit to obtain an adjusted target code rate.
Specifically, since the texture complexity is different in different coding units in one frame image; here, the target code rate of the coding unit with high texture complexity can be correspondingly increased, and the target code rate of the coding unit with low texture complexity can be correspondingly decreased.
The determining, based on the target code rate of each coding unit and according to a preset code rate allocation model, an original video coding rate and a characteristic coding rate corresponding to each coding unit includes:
and respectively determining the original video coding rate and the characteristic coding rate corresponding to each coding unit according to the adjusted target code rate of each coding unit in the current video frame and a preset code rate distribution model.
Specifically, assuming that the adjusted target bitrate of the current coding unit is 0.9B, according to the formula 0.9B = Bv + a × Bc + B, the original video coding bitrate Bv and the characteristic coding bitrate Bc corresponding to each coding unit can be obtained, where a =2 and B = 1000.
In one or more embodiments, the adjusting the target bitrate of a video frame next to the current video frame according to the actual coding bitrate of the current video frame and the target transmission bitrate of the video frame includes:
when the actual coding rate of the current video frame is greater than the target transmission rate of the video frame, increasing the target rate of the next video frame of the current video frame;
and when the actual coding rate of the current video frame is smaller than the target transmission rate of the video frame, reducing the target rate of the next video frame of the current video frame.
In one or more embodiments, the method further comprises: and determining the target transmission code rate according to the current network environment parameters.
Specifically, if the current network bandwidth is 10M, the target transmission code rate can be set to 10Mbps under the condition that the network is relatively stable; under the condition that the current network is easy to block or drop, the target transmission code rate can be set to be less than 10 Mbps.
Based on the foregoing embodiments, in an application embodiment, as shown in fig. 4 and fig. 5, the video coding rate processing method includes:
1. and acquiring the original video and video characteristics in each frame of image in the original video.
2. And acquiring the target code rate Bt of the current frame image in the video frame.
3. Dividing a current frame image into N coding blocks (coding units) with the size of MxM, and acquiring a target code rate Bf of the current block, wherein Bf = Bt/N.
4. And further adjusting the target code rate of the block level to be B according to the complexity of the current coding block.
5. And B is allocated to the encoding code rates Bv and Bc of the image characteristics in the original video and the video frame according to the target code rate B of the current block, the video and the code rate allocation model of the characteristics.
6. And carrying out video coding on the original video according to Bv, and compressing image characteristics in video frames according to Bc.
7. If the current video frame is coded to finish all blocks, if so, acquiring the sum Bs of the actual coding code rates of the video block of the current coding frame and the code stream of the characteristic block, and adjusting the target code rate of the next frame according to the Bs so as to adjust the target code rate of each block level; if the current video frame does not finish encoding all blocks, go to step 5 to continue encoding and compressing.
As shown in fig. 6, the overall circuit structure of the embodiment of the present invention adopts a software and hardware combined implementation scheme, wherein the frame-level rate estimation of the original video rate estimation is implemented by software, and the block-level (coding unit) rate control is implemented by hardware. The video characteristics comprise two parts of characteristic extraction and characteristic compression, the code stream estimation is realized by adopting software in the characteristic compression, and the characteristic extraction can be executed by adopting hardware in a blocking way.
As shown in fig. 7, different operations may be performed on each different coding block (block) in a video frame at different times, so as to utilize computing resources to the maximum extent and improve video coding efficiency.
The embodiment of the invention also has the following beneficial effects:
1. in a hardware circuit for simultaneously supporting feature coding and video coding, the problem of code rate estimation is solved.
2. By setting the code rate estimation microstructure circuit, the configuration processing effect of the real-time or low-delay coding code rate is realized.
It should be noted that for simplicity of description, the above-mentioned method embodiments are shown as a series of combinations of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
According to another aspect of the embodiment of the present invention, there is also provided a video coding rate processing apparatus for implementing the video coding rate processing method. As shown in fig. 8, the apparatus includes:
a first determining unit 802, configured to determine, according to a target code rate of each coding unit in a current video frame and a preset code rate allocation model, an original video coding rate and a characteristic coding rate corresponding to each coding unit respectively;
the encoding and compressing unit 804 is configured to perform video encoding on each encoding unit according to the original video encoding rate, and compress image features in the encoding units according to a feature encoding rate;
an obtaining unit 806, configured to obtain an actual coding rate of the current video frame when all coding units in the current video frame complete video coding and image feature compression;
an adjusting unit 808, configured to adjust a target code rate of a next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame; and the target transmission code rate is the target code rate of each video frame in the current network environment.
In the embodiment of the invention, an original video coding rate and a characteristic coding rate corresponding to each coding unit are respectively determined according to a target code rate of each coding unit in a current video frame and a preset code rate distribution model; performing video coding on each coding unit according to the original video coding rate, and compressing image characteristics in the coding units according to a characteristic coding rate; when all coding units in the current video frame complete video coding and image feature compression, acquiring the actual coding rate of the current video frame; adjusting the target code rate of the next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame; in the method, because the original video coding rate and the characteristic coding rate corresponding to each coding unit are determined according to a preset rate allocation model, and the target rate of the next video frame of the current video frame is adjusted according to the actual coding rate of the current video frame and the target transmission rate of the video frame, the video coding code stream and the characteristic coding code stream can be reasonably allocated, the video coding rate processing efficiency is improved, and the technical problem of low video coding rate processing efficiency is solved.
In one or more embodiments, the first determining unit 802 specifically includes:
the obtaining module is used for obtaining the original video coding rate and the characteristic coding rate corresponding to each coding unit through formulas (1) and (2):
B=Bv+a*Bc+b (1)
Bv=0.66B (2)
wherein, B is a target code rate of a current coding unit, Bv is an original video coding rate, Bc is a characteristic coding rate, a =2, and B = 1000.
In one or more embodiments, the apparatus for processing video coding rate further includes:
a dividing unit for dividing the current video frame into a plurality of coding units;
and the dividing unit is used for dividing the target transmission code rate to the plurality of coding units equally to obtain the target code rate of each coding unit.
In one or more embodiments, the apparatus for processing video coding rate further comprises:
the adjusting unit is used for adjusting the target code rate of the current coding unit based on the texture complexity of the current coding unit to obtain an adjusted target code rate;
the first determining unit 802 further includes:
and the determining module is used for respectively determining the original video coding rate and the characteristic coding rate corresponding to each coding unit according to the adjusted target code rate of each coding unit in the current video frame and a preset code rate distribution model.
In one or more embodiments, the adjusting unit specifically includes:
the first adjusting module is used for increasing the target code rate of the next video frame of the current video frame when the actual coding code rate of the current video frame is greater than the target transmission code rate of the video frame;
and the second adjusting module is used for reducing the target code rate of the next video frame of the current video frame when the actual coding code rate of the current video frame is smaller than the target transmission code rate of the video frame.
In one or more embodiments, the apparatus for processing video coding rate further comprises:
and the second determining unit is used for determining the target transmission code rate according to the current network environment parameters.
According to another aspect of the embodiment of the present invention, there is also provided an electronic device for implementing the video coding rate processing method, where the electronic device may be a terminal device or a server shown in fig. 9. The present embodiment takes the electronic device as an example for explanation. As shown in fig. 9, the electronic device comprises a memory 902 and a processor 904, the memory 902 having stored therein a computer program, the processor 904 being arranged to perform the steps of any of the above-described method embodiments by means of the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of a computer network.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, respectively determining an original video coding rate and a characteristic coding rate corresponding to each coding unit according to a target code rate of each coding unit in a current video frame and a preset code rate distribution model;
s2, carrying out video coding on each coding unit according to the original video coding rate, and compressing the image characteristics in the coding units according to the characteristic coding rate;
s3, when all coding units in the current video frame finish video coding and image feature compression, acquiring the actual coding rate of the current video frame;
s4, according to the actual coding rate of the current video frame and the target transmission rate of the video frame, adjusting the target rate of the next video frame of the current video frame; and the target transmission code rate is the target code rate of each video frame in the current network environment.
Alternatively, it can be understood by those skilled in the art that the structure shown in fig. 9 is only an illustration, and the electronic device may also be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Fig. 9 is a diagram illustrating a structure of the electronic apparatus. For example, the electronics may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 9, or have a different configuration than shown in FIG. 9.
The memory 902 may be configured to store software programs and modules, such as program instructions/modules corresponding to the video coding rate processing method and apparatus in the embodiment of the present invention, and the processor 904 executes various functional applications and data processing by running the software programs and modules stored in the memory 902, that is, implements the video coding rate processing method. The memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 902 may further include memory located remotely from the processor 904, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 902 may be, but is not limited to, specifically configured to store information such as video frames and image features. As an example, as shown in fig. 9, the memory 902 may include, but is not limited to, the first determining unit 802, the encoding and compressing unit 804, the obtaining unit 806, and the adjusting unit 808 in the video encoding rate processing apparatus. In addition, the apparatus may further include, but is not limited to, other module units in the video coding rate processing apparatus, which is not described in this example again.
Optionally, the transmitting device 906 is used for receiving or sending data via a network. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 906 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 906 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In addition, the electronic device further includes: a display 908 for displaying the video frames; and a connection bus 910 for connecting the respective module components in the electronic apparatus.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting a plurality of nodes through a network communication. Nodes can form a Peer-To-Peer (P2P, Peer To Peer) network, and any type of computing device, such as a server, a terminal, and other electronic devices, can become a node in the blockchain system by joining the Peer-To-Peer network.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. A processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to make the computer device execute the video coding rate processing method, wherein the computer program is configured to execute the steps in any of the method embodiments.
Alternatively, in the present embodiment, the above-mentioned computer-readable storage medium may be configured to store a computer program for executing the steps of:
s1, respectively determining an original video coding rate and a characteristic coding rate corresponding to each coding unit according to a target code rate of each coding unit in a current video frame and a preset code rate distribution model;
s2, carrying out video coding on each coding unit according to the original video coding rate, and compressing the image characteristics in the coding units according to the characteristic coding rate;
s3, when all the coding units in the current video frame finish video coding and image feature compression, acquiring the actual coding code rate of the current video frame;
s4, adjusting the target code rate of the next video frame of the current video frame according to the actual coding rate of the current video frame and the target transmission code rate of the video frame; and the target transmission code rate is the target code rate of each video frame in the current network environment.
Alternatively, in this embodiment, a person skilled in the art may understand that all or part of the steps in the methods of the foregoing embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be substantially or partially implemented in the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, or network devices) to execute all or part of the steps of the method according to the embodiments of the present invention.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that it is obvious to those skilled in the art that various modifications and improvements can be made without departing from the principle of the present invention, and these modifications and improvements should also be considered as the protection scope of the present invention.

Claims (8)

1. A method for processing a video coding rate, comprising:
respectively determining an original video coding rate and a characteristic coding rate corresponding to each coding unit according to a target code rate of each coding unit in a current video frame and a preset code rate distribution model; the characteristic coding rate is a coding rate for compressing the image characteristics in the coding unit;
performing video coding on each coding unit according to the original video coding rate, and compressing image characteristics in the coding units according to a characteristic coding rate;
when all coding units in the current video frame complete video coding and image feature compression, acquiring the actual coding rate of the current video frame;
adjusting the target code rate of the next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame; the target transmission code rate is the target code rate of each video frame in the current network environment;
the method for respectively determining the original video coding rate and the characteristic coding rate corresponding to each coding unit according to the target code rate of each coding unit in the current video frame and a preset code rate distribution model comprises the following steps:
obtaining an original video coding rate and a characteristic coding rate corresponding to each coding unit through formulas (1) and (2):
B=Bv+a*Bc+b (1)
Bv=0.66B (2)
wherein, B is a target code rate of a current coding unit, Bv is an original video coding rate, Bc is a characteristic coding rate, a =2, and B = 1000.
2. The method of claim 1, wherein before determining an original video coding rate and a characteristic coding rate corresponding to each coding unit according to a target coding rate of each coding unit in a current video frame and a preset code rate allocation model, the method further comprises:
dividing the current video frame into a plurality of coding units;
and equally dividing the target transmission code rate to the plurality of coding units to obtain the target code rate of each coding unit.
3. The method of claim 2, further comprising:
adjusting the target code rate of the current coding unit based on the texture complexity of the current coding unit to obtain an adjusted target code rate;
the method for respectively determining the original video coding rate and the characteristic coding rate corresponding to each coding unit according to the target code rate of each coding unit in the current video frame and a preset code rate distribution model comprises the following steps:
respectively determining an original video coding rate and a characteristic coding rate corresponding to each coding unit according to the adjusted target code rate of each coding unit in the current video frame and a preset code rate distribution model.
4. The method of claim 1, wherein adjusting the target bitrate of a video frame next to the current video frame according to the actual coding bitrate of the current video frame and the target transmission bitrate of the video frame comprises:
when the actual coding rate of the current video frame is greater than the target transmission rate of the video frame, increasing the target rate of the next video frame of the current video frame;
and when the actual coding rate of the current video frame is smaller than the target transmission rate of the video frame, reducing the target rate of the next video frame of the current video frame.
5. The method of claim 3, further comprising: and determining the target transmission code rate according to the current network environment parameters.
6. An apparatus for processing a video coding rate, comprising:
the first determining unit is configured to respectively determine an original video coding rate and a feature coding rate corresponding to each coding unit according to a target code rate of each coding unit in a current video frame and a preset code rate allocation model, and includes:
the obtaining module is used for obtaining the original video coding rate and the characteristic coding rate corresponding to each coding unit through formulas (1) and (2):
B=Bv+a*Bc+b (1)
Bv=0.66B (2)
b is a target code rate of a current coding unit, Bv is an original video coding rate, Bc is a characteristic coding rate, a =2, B = 1000; the characteristic coding rate is a coding rate for compressing the image characteristics in the coding unit;
the coding and compressing unit is used for carrying out video coding on each coding unit according to the original video coding rate and compressing the image characteristics in the coding units according to the characteristic coding rate;
the acquiring unit is used for acquiring the actual coding rate of the current video frame when all the coding units in the current video frame finish video coding and image feature compression;
the adjusting unit is used for adjusting the target code rate of the next video frame of the current video frame according to the actual coding code rate of the current video frame and the target transmission code rate of the video frame; and the target transmission code rate is the target code rate of each video frame in the current network environment.
7. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 5 by means of the computer program.
8. A computer-readable storage medium, comprising a stored program, wherein the program when executed performs the method of any one of claims 1 to 5.
CN202210352794.2A 2022-04-06 2022-04-06 Video coding rate processing method and device, storage medium and electronic equipment Active CN114501015B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210352794.2A CN114501015B (en) 2022-04-06 2022-04-06 Video coding rate processing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210352794.2A CN114501015B (en) 2022-04-06 2022-04-06 Video coding rate processing method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN114501015A CN114501015A (en) 2022-05-13
CN114501015B true CN114501015B (en) 2022-09-02

Family

ID=81488205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210352794.2A Active CN114501015B (en) 2022-04-06 2022-04-06 Video coding rate processing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN114501015B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050049644A (en) * 2003-11-22 2005-05-27 삼성전자주식회사 Bit-rate control method and apparatus for normalizing visual quality
CN102067610A (en) * 2008-06-16 2011-05-18 杜比实验室特许公司 Rate control model adaptation based on slice dependencies for video coding
CN104349167A (en) * 2014-11-17 2015-02-11 电子科技大学 Adjustment method of video code rate distortion optimization
CN104602018A (en) * 2014-10-21 2015-05-06 腾讯科技(北京)有限公司 Video data motion information obtaining method and device and video data coding method and device
CN105744271A (en) * 2016-02-17 2016-07-06 浙江大华技术股份有限公司 Video coding method and device
CN108769737A (en) * 2018-05-29 2018-11-06 中南大学 A kind of code rate adjustment method, server and computer-readable medium
CN108965881A (en) * 2017-05-25 2018-12-07 福州瑞芯微电子股份有限公司 Bit rate control method, system, server and readable storage medium storing program for executing
CN111385576A (en) * 2018-12-28 2020-07-07 北京字节跳动网络技术有限公司 Video coding method and device, mobile terminal and storage medium
US10834385B1 (en) * 2018-06-11 2020-11-10 Facebook, Inc. Systems and methods for encoding videos using reference objects
CN112272299A (en) * 2020-11-27 2021-01-26 广州市网星信息技术有限公司 Video coding method, device, equipment and storage medium
CN112543372A (en) * 2019-09-20 2021-03-23 珠海格力电器股份有限公司 Method, device and storage medium for distributing video code rate

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111953978A (en) * 2020-07-07 2020-11-17 西安万像电子科技有限公司 Frame rate control method, device and storage medium

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050049644A (en) * 2003-11-22 2005-05-27 삼성전자주식회사 Bit-rate control method and apparatus for normalizing visual quality
CN102067610A (en) * 2008-06-16 2011-05-18 杜比实验室特许公司 Rate control model adaptation based on slice dependencies for video coding
CN104602018A (en) * 2014-10-21 2015-05-06 腾讯科技(北京)有限公司 Video data motion information obtaining method and device and video data coding method and device
CN104349167A (en) * 2014-11-17 2015-02-11 电子科技大学 Adjustment method of video code rate distortion optimization
CN105744271A (en) * 2016-02-17 2016-07-06 浙江大华技术股份有限公司 Video coding method and device
CN108965881A (en) * 2017-05-25 2018-12-07 福州瑞芯微电子股份有限公司 Bit rate control method, system, server and readable storage medium storing program for executing
CN108769737A (en) * 2018-05-29 2018-11-06 中南大学 A kind of code rate adjustment method, server and computer-readable medium
US10834385B1 (en) * 2018-06-11 2020-11-10 Facebook, Inc. Systems and methods for encoding videos using reference objects
CN111385576A (en) * 2018-12-28 2020-07-07 北京字节跳动网络技术有限公司 Video coding method and device, mobile terminal and storage medium
CN112543372A (en) * 2019-09-20 2021-03-23 珠海格力电器股份有限公司 Method, device and storage medium for distributing video code rate
CN112272299A (en) * 2020-11-27 2021-01-26 广州市网星信息技术有限公司 Video coding method, device, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A Fast CU Partition Decision Strategy for AVS3 Intra Coding;Changxin Chen;《2022 IEEE International Conference on Consumer Electronics (ICCE)》;20220315;全文 *
H.264/SVC的编码依赖问题研究;张鹏;《军事通信技术》;20100331;全文 *

Also Published As

Publication number Publication date
CN114501015A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN102984495A (en) Video image processing method and device
CN105049949A (en) Coding method of instant video and electronic equipment
CN109845260A (en) Decoding method and device
CN110650357B (en) Video decoding method and device
CN110719526B (en) Video playing method and device
CN205105347U (en) Video wireless transmission equipment, video playback devices and system
CN103945165A (en) Method and device for processing remote video transmission of terminal device
CN104967917A (en) Instant video coding method and electronic device
CN103399649A (en) Data processing method based on K virtual machine (KVM) and KVM transmitting device
CN110572673A (en) Video encoding and decoding method and device, storage medium and electronic device
CN104052992A (en) Image processing method and electronic equipment
CN114501015B (en) Video coding rate processing method and device, storage medium and electronic equipment
CN112004101B (en) Virtual live broadcast data transmission method and device and storage medium
CN110662071B (en) Video decoding method and device, storage medium and electronic device
CN104994333A (en) Medical image transfer device, client terminal, transmission system and transmission method thereof
CN114157868B (en) Video frame coding mode screening method and device and electronic equipment
CN114466224B (en) Video data encoding and decoding method and device, storage medium and electronic equipment
CN110572672A (en) Video encoding and decoding method and device, storage medium and electronic device
CN114792284A (en) Image switching method and device, storage medium and electronic equipment
CN114374841A (en) Optimization method and device for video coding rate control and electronic equipment
CN112650596B (en) Cross-process sharing method, device and equipment for target data and storage medium
CN110582022B (en) Video encoding and decoding method and device and storage medium
CN110636293A (en) Video encoding method, video decoding method, video encoding apparatus, video decoding apparatus, storage medium, and electronic apparatus
CN110536134B (en) Video encoding method, video decoding method, video encoding apparatus, video decoding apparatus, storage medium, and electronic apparatus
CN210183461U (en) Augmented reality device

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
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20220513

Assignee: Zhejiang smart video security Innovation Center Co.,Ltd.

Assignor: Institute of Information Technology, Zhejiang Peking University

Contract record no.: X2022330000930

Denomination of invention: Video coding rate processing method and device, storage medium and electronic equipment

Granted publication date: 20220902

License type: Common License

Record date: 20221229

EE01 Entry into force of recordation of patent licensing contract