Video Bitrate Control Method

By constructing a short-term complexity factor to adjust the target code rate of each frame in the video surveillance system according to the motion complexity of the frame and the number of ROIs, the problem of video quality degradation at low code rates is solved, and a higher subjective video experience is achieved.

CN114339241BActive Publication Date: 2025-06-03HANGZHOU ARCVIDEO TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111567675.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2025-06-03
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

In low-code rate video surveillance systems, how to maintain video quality while reducing the code rate, especially in scenarios where there is a large amount of exercise and a large number of ROIs.

Method used

By constructing a short-term complexity factor, the target code rate of each frame is adjusted according to the motion complexity of the frame and the number of ROIs, so that scenes with large amounts of motion and large number of ROIs allocate more code rates, and bit allocation is performed on the CU layer to optimize the code rate.

Benefits of technology

It achieves the maintenance of good subjective video quality while reducing transmission code rate, reduces inter-frame quality fluctuations, and improves the subjective video experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114339241B_ABST
    Figure CN114339241B_ABST
Patent Text Reader

Abstract

The present invention discloses a video bit rate control method, comprising: an encoder divides a video into a plurality of GOPs, each GOP contains a plurality of frames, performs GOP layer bit rate control, and calculates the target bit rate of each GOP according to video characteristics and network bandwidth; performs frame layer bit rate control, divides the target bit rate of a GOP into each frame in the GOP, constructs a fuzzy complexity factor according to motion complexity and the number of ROIs to adjust the target bit rate of each frame, so that a scene with a large amount of motion and a large number of ROIs is allocated a larger bit rate; performs CU layer bit rate control, divides a frame into a plurality of CUs, and allocates bits to each CU according to complexity and importance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of video encoding, and in particular relates to a monitoring video bit rate control method. Background Art

[0002] With the rapid development of network communication and video processing technology, video surveillance is increasingly widely used in all aspects of people's lives, such as banks, subways, roads, and community monitoring. The video bit rate of traditional video surveillance is usually around 4000kbps, but due to limited network bandwidth, it is impossible to simultaneously review multiple channels of video at the center end. Therefore, some low-bit-rate video surveillance systems have emerged, such as edge computing-based video surveillance, which compresses the video bit rate shot at the edge end to 400kbps to 1300kbps. In this way, the number of channels reviewed at the center end can be increased to about 3 to 10 times that of traditional methods, greatly improving the review efficiency. Of course, the reduction in bit rate means that the video quality will be reduced. Therefore, how to reduce the bit rate while ensuring the video quality is the key to the development of this type of low-bit-rate video surveillance technology.

[0003] Bit rate control is an important part of video encoding. Figure 1 , which is a general bit rate control flow chart. After the video sequence is encoded and compressed, it is transmitted to the decoder through the network to obtain the reconstructed sequence. The bit rate control during encoding and compression is as follows: by obtaining the characteristics of the video source (such as the intensity of motion, the complexity of image texture, etc.) and the available network bandwidth, the number of bits and quantization parameters that should be allocated to each frame image and each area in the image are calculated, and the encoder is guided to encode the video so that the output bit stream meets the transmission of the channel and the output video quality is as good as possible. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a video bit rate control method, which is used to construct a short-term complexity factor according to motion complexity and the number of ROIs to adjust the target bit rate of each frame, so that scenes with large motion and a large number of ROIs are allocated more bit rates.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] An embodiment of the present invention provides a video bit rate control method, including:

[0007] The encoder divides a video into several GOPs, each of which contains several frames, and performs GOP-level bitrate control, calculating the target bitrate of each GOP based on the video characteristics and network bandwidth;

[0008] Perform frame-level bitrate control. Divide the target bitrate of a GOP among the frames in the GOP. Based on the motion complexity and the number of ROIs, construct a fuzzy complexity factor to adjust the target bitrate of each frame, so that more bitrate is allocated to scenarios with large amounts of motion and a large number of ROIs.

[0009] Perform CU-level bitrate control. Divide a frame into several CUs, and perform bit allocation for each CU according to complexity and importance.

[0010] In a possible design, perform GOP-level bitrate control. Calculating the target bitrate of each GOP according to video characteristics and network bandwidth includes:

[0011] Define the target bitrate R of the GOP GOP as:

[0012]

[0013] where TB represents the network bandwidth, Fr represents the video playback frame rate, and N represents the number of frames in a GOP.

[0014] In a possible design, perform frame-level bitrate control. Divide the target bitrate of a GOP among the frames in the GOP. Based on the motion complexity and the number of ROIs, construct a fuzzy complexity factor to adjust the target bitrate of each frame, so that more bitrate is allocated to scenarios with large amounts of motion and a large number of ROIs includes:

[0015] The calculation of the short-term fuzzy complexity C(i) of the i-th frame is:

[0016]

[0017] where M(i) is the number of CUs in the i-th frame with the absolute value of the motion vector greater than 16, RT(i) is the number of CUs in the ROI region of the i-th frame, and the short-term fuzzy complexity C(i) represents the weighted value of the frame-level complexity of the current frame and the previous frames. It is used to measure the complexity of each frame and reduce the excessive fluctuation of the single-frame complexity on the frame-level bitrate control;

[0018] S(i) is the statistical number of frames corresponding to the short-term fuzzy complexity:

[0019]

[0020] Calculate the bitrate allocation coefficient α(i) of the i-th frame:

[0021]

[0022] where T is the number of CUs in the current frame, TH1 and TH2 are constants, the value range of TH1 is between [0, 1], and the value range of TH2 is between [0, 1];

[0023] Calculate the target bit rate R of the i-th frame F (i)

[0024]

[0025] In one possible design, CU-level bit rate control is performed to divide a frame into several CUs, and bits are allocated to each CU according to complexity and importance, including:

[0026] Define the ROI weight factor of the j-th CU in the i-th frame as β(i,j), and the complexity of the j-th CU in the i-th frame as MAD(i,j). Then the target bit rate R of the j-th CU in the i-th frame is CU( i,j) is:

[0027]

[0028] in,

[0029]

[0030] In one possible design, the encoder is one of HEVC, H.264, H.266, AVS, AVS2 or AVS3.

[0031] The present invention has the following beneficial effects: How to maintain good subjective video quality while reducing the transmission bit rate is the key to surveillance video encoding at low bit rates. In video encoding, the importance of each frame is different, and the required bit rates are also different. The video bit rate control method of the embodiment of the present invention constructs a short-term complexity factor according to the motion complexity and the number of ROIs to adjust the target bit rate of each frame, so that scenes with large motion and a large number of ROIs are allocated more bit rates, and at the same time, the inter-frame quality fluctuation can be reduced, and a higher subjective video experience can be obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 It is a general rate control flow chart in the prior art;

[0033] Figure 2 The figure is a flow chart of the steps of the video bit rate control method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Bitrate control can basically be divided into three layers: GOP (Group of Picture) layer bitrate control, frame layer bitrate control, and CU (Coding Unit) layer bitrate control. The encoder divides a video into several GOPs, each GOP contains several frames. The GOP layer bitrate control is used to calculate the target bitrate of each GOP according to the video characteristics and network bandwidth; the frame layer bitrate control is used to divide the target bitrate of a GOP into each frame in the GOP, and calculate the target bitrate of each frame according to the complexity of each frame. In the frame-level bitrate control, the quality fluctuation between consecutive frames should be minimized, otherwise the encoded video will look good and bad, seriously affecting the subjective feeling; the CU layer bitrate control divides a frame into several CUs, and performs bit allocation for each CU according to the complexity. The more complex the CU is, the more bitrate is allocated. The complexity of the CU is usually measured by MAD (Mean Absolute Differences).

[0036] There is a strong similarity between the data of video frames, which is called temporal redundancy information. The inter-frame coding technology can remove temporal redundancy and improve the compression ratio. The inter-frame coding uses the correlation existing between adjacent frames, divides a frame image into several CUs (Coding Units), and tries to search for the block with the closest pixel value to each CU in the adjacent frame, which is called the matching block, calculates the relative offset of the spatial position between the current CU and the matching block, and the obtained relative offset is the motion vector. The process of obtaining the motion vector is called motion estimation. The value range of the absolute value of the motion vector is (0, ), where w is the number of pixels of the frame in the horizontal direction, and h is the number of pixels of the frame in the vertical direction. For frames with more motion regions, because the motion estimation matching error will form more coding residuals, and at the same time, intra-frame coding blocks are needed to fill the blocks that do not appear in the reference frame, so such frames require more bitrate.

[0037] ROI (Region of Interest) is an image area selected from the image that is most likely to arouse the user's interest. For example, in the subway surveillance video, the user is more inclined to pay attention to the face and luggage, rather than the billboards and walls beside. At this time, the face and luggage in the video can be classified as ROI. The surveillance video coding based on ROI can perform lossless compression or near-lossless compression on the ROI area, which also means that the ROI area requires more bitrate to describe.

[0038] According to the above definitions, the embodiments of the present invention disclose a video bitrate control method, including:

[0039] The encoder divides a video into several GOPs, each of which contains several frames, and performs GOP-level bitrate control, calculating the target bitrate of each GOP based on the video characteristics and network bandwidth;

[0040] Perform frame-level bitrate control, divide the target bitrate of a GOP into each frame in the GOP, and construct a fuzzy complexity factor to adjust the target bitrate of each frame according to the motion complexity and the number of ROIs, so that scenes with large motion and a large number of ROIs are allocated more bitrate;

[0041] Perform CU layer rate control, divide a frame into several CUs, and allocate bits to each CU based on complexity and importance.

[0042] In one embodiment of the present invention, specifically, performing GOP layer bit rate control, and calculating the target bit rate of each GOP according to video characteristics and network bandwidth includes:

[0043] Calculate the target bit rate R for each GOP GOP :

[0044]

[0045] Where TB represents the network bandwidth, Fr represents the video playback frame rate, and N represents the number of frames in a GOP;

[0046] When the frame layer bit rate control is performed, M(i) is defined as the number of CUs whose motion vector absolute value is greater than 16 in the i-th frame, RT(i) is the number of CUs in the ROI area in the i-th frame, and the calculation of the short-term blur complexity C(i) of the i-th frame is defined as:

[0047]

[0048] The short-term blur complexity C(i) represents the weighted value of the frame-level complexity of the current frame and the previous frame with different proportional coefficients. Using it to measure the complexity of each frame can reduce the impact of excessive fluctuations in the complexity of a single frame on frame-level bitrate control. S(i) is defined as the statistical frame number corresponding to the short-term blur complexity:

[0049]

[0050] Calculate the bit rate allocation coefficient α(i) of the i-th frame:

[0051]

[0052] Where T is the number of CUs in the current frame, TH1 and TH2 are constants, the value range of TH1 is between [0, 1], and the typical value is 0.3, and the value range of TH2 is between [0, 1], and the typical value is 0.05.

[0053] Calculate the target bit rate R of the i-th frameF (i)

[0054]

[0055] In the CU layer rate control, the ROI weight factor of the j-th CU in the i-th frame is defined as β(i, j), and the complexity of the j-th CU in the i-th frame is MAD(i, j). Then the target rate R of the j-th CU in the i-th frame is CU( i,j) is:

[0056]

[0057] in,

[0058]

[0059] In the embodiment of the present invention, the encoder may be any one of HEVC, H264, MPEG4, AVS, AVS2, and AVS3.

[0060] How to reduce the transmission bit rate while maintaining good subjective video quality is the key to surveillance video encoding at low bit rates. In video encoding, the importance of each frame is different, and the required bit rates are also different. Through the above technical solution, the embodiment of the present invention constructs a short-term fuzzy complexity factor according to the motion complexity and the number of ROIs to adjust the target bit rate of each frame, so that scenes with large motion and a large number of ROIs are allocated more bit rates, and at the same time, the inter-frame quality fluctuation can be reduced, thereby obtaining a higher subjective video experience.

[0061] It should be understood that the exemplary embodiments described herein are illustrative rather than restrictive. Although one or more embodiments of the present invention have been described in conjunction with the accompanying drawings, it should be understood by those skilled in the art that various changes in form and detail may be made without departing from the spirit and scope of the present invention as defined by the appended claims.

Claims

1. A video bit rate control method, It is characterized in that include: The encoder divides a video into several GOPs, each of which contains several frames, and performs GOP-level bitrate control, calculating the target bitrate of each GOP based on the video characteristics and network bandwidth; Perform frame-level bitrate control, divide the target bitrate of a GOP into each frame in the GOP, and construct a fuzzy complexity factor to adjust the target bitrate of each frame according to the motion complexity and the number of ROIs, so that scenes with large motion and a large number of ROIs are allocated more bitrate; Perform CU layer rate control, divide a frame into several CUs, and allocate bits to each CU based on complexity and importance; Perform GOP layer bitrate control and calculate the target bitrate of each GOP based on video characteristics and network bandwidth, including: Define the target bit rate R of the GOP GOP as follows: Where TB represents the network bandwidth, Fr represents the video playback frame rate, and N represents the number of frames in a GOP; Perform frame-level bitrate control, divide the target bitrate of a GOP into each frame in the GOP, and construct a fuzzy complexity factor to adjust the target bitrate of each frame according to the motion complexity and the number of ROIs, so that scenes with large motion and a large number of ROIs are allocated more bitrates. The short-term blur complexity C(i) of the i-th frame is calculated as: Where M(i) is the number of CUs whose motion vector absolute value is greater than 16 in the i-th frame, RT(i) is the number of CUs in the ROI area in the i-th frame, and the short-term blur complexity C(i) represents the weighted value of the frame-level complexity of the current frame and the previous frame. It is used to measure the complexity of each frame and reduce the frame-level bit rate control caused by excessive fluctuations in the complexity of a single frame. S(i) is the statistical frame number corresponding to the short-term blur complexity: Calculate the bit rate allocation coefficient α(i) of the i-th frame: Where T is the number of CUs in the current frame, TH1 and TH2 are constants, the value range of TH1 is between [0,1], and the value range of TH2 is between [0,1]; Calculate the target bitrate R of the i-th frame F (i):

2. The video bit rate control method according to claim 1, It is characterized in that Perform CU layer rate control, divide a frame into several CUs, and allocate bits to each CU according to complexity and importance, including: Define the ROI weight factor of the j-th CU in the i-th frame as β(i, j), and the complexity of the j-th CU in the i-th frame as MAD(i, j). Then the target bitrate R CU (i, j) is as follows: in, 3. The video bit rate control method according to claim 1 or 2, It is characterized in that The encoder is one of HEVC, H.264, H.266, AVS, AVS2 or AVS3.

Citation Information

Patent Citations

  • Image processing method, image processing device and electronic equipment

    CN104980740A

  • Video coding method

    CN106534862A

  • System and Method for Bit-Allocation in Video Coding

    US20100098162A1