CN114501014A - Video coding parameter processing method, system, device and storage medium - Google Patents
Video coding parameter processing method, system, device and storage medium Download PDFInfo
- Publication number
- CN114501014A CN114501014A CN202210160160.7A CN202210160160A CN114501014A CN 114501014 A CN114501014 A CN 114501014A CN 202210160160 A CN202210160160 A CN 202210160160A CN 114501014 A CN114501014 A CN 114501014A
- Authority
- CN
- China
- Prior art keywords
- frame rate
- coding
- rate
- target
- code rate
- 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
- 238000003672 processing method Methods 0.000 title claims description 17
- 238000013507 mapping Methods 0.000 claims abstract description 58
- 238000000034 method Methods 0.000 claims abstract description 29
- 238000012545 processing Methods 0.000 claims abstract description 27
- 230000008569 process Effects 0.000 claims description 9
- 230000009467 reduction Effects 0.000 claims description 9
- 238000012887 quadratic function Methods 0.000 claims description 5
- 230000005540 biological transmission Effects 0.000 description 11
- 230000000694 effects Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 6
- 238000009825 accumulation Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 230000015556 catabolic process Effects 0.000 description 4
- 238000006731 degradation reaction Methods 0.000 description 4
- 238000010276 construction Methods 0.000 description 3
- 230000001960 triggered effect Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000009499 grossing Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/146—Data rate or code amount at the encoder output
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The embodiment of the application discloses a method, a system, equipment and a storage medium for processing video coding parameters. According to the technical scheme provided by the embodiment of the application, the target code rate is determined according to the real-time bandwidth and the cache information; inquiring mapping relation information based on the target code rate to determine a corresponding target frame rate, wherein the mapping relation information is constructed in advance according to different code rate intervals and corresponding frame rate values, and the frame rate values are configured in a fixed step size step; and determining an encoding frame rate based on the target frame rate so as to encode the video in the current encoding period by using the encoding frame rate. By adopting the technical means, the coding frame rate is decided by determining the frame rate values corresponding to different code rate intervals, so that the coding frame rate is prevented from being frequently modified due to the influence of bandwidth, the stability of the coding frame rate is improved, the smoothness of video playing is further improved, and the watching experience of a user is optimized.
Description
Technical Field
The embodiments of the present application relate to the field of video coding technologies, and in particular, to a method, a system, a device, and a storage medium for processing video coding parameters.
Background
Currently, in a video coding scenario, in order to facilitate video coding, a code table is usually preset to decide video coding parameters, such as resolution, code rate, and frame rate, according to factors such as real-time bandwidth and transmission buffer accumulation. Generally, when a code table is used to decide video coding parameters, if the bandwidth is sufficient, a high bit rate and a high frame rate are selected for coding, so that a receiving end user can have high-definition video experience. When the bandwidth is low, the bit rate and the frame rate are reduced to ensure that the video data can be normally transmitted, and the basic watching requirements of the user are ensured. Different frame rate parameters are configured in the code table, so that the corresponding coding frame rate is selected for video coding according to the fluctuation of factors such as real-time bandwidth, sending buffer accumulation and the like.
However, since the frame rate parameters in the code table are configured continuously, once the bandwidth fluctuates slightly, the adjustment of the coding frame rate is triggered according to the code table, the encoder needs to be reset after the frame rate adjustment, and frequent resetting of the encoder affects the video coding efficiency, and also causes the problem of coding frame loss, thereby affecting the video coding transmission effect.
Disclosure of Invention
Embodiments of the present application provide a method, a system, a device, and a storage medium for processing video coding parameters, which can improve stability of a video coding frame rate decision and solve a technical problem of frequent adjustment of a video coding frame rate.
In a first aspect, an embodiment of the present application provides a method for processing video coding parameters, including:
determining a target code rate according to the real-time bandwidth and the cache information;
inquiring mapping relation information based on the target code rate to determine a corresponding target frame rate, wherein the mapping relation information is constructed in advance according to different code rate intervals and corresponding frame rate values, and the frame rate values are configured in a fixed step size step;
and determining an encoding frame rate based on the target frame rate so as to encode the video in the current encoding period by using the encoding frame rate.
In a second aspect, an embodiment of the present application provides a video coding parameter processing system, including:
the target code rate determining module is configured to determine a target code rate according to the real-time bandwidth and the cache information;
the target frame rate determining module is configured to determine a corresponding target frame rate based on target code rate query mapping relation information, the mapping relation information is constructed in advance according to different code rate intervals and corresponding frame rate values, and the frame rate values are configured in a fixed step size step;
and the coding frame rate determining module is configured to determine a coding frame rate based on the target frame rate so as to perform video coding of the current coding period by using the coding frame rate.
In a third aspect, an embodiment of the present application provides a video coding parameter processing apparatus, including:
a memory and one or more processors;
the memory configured to store one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the video coding parameter processing method of the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium containing computer-executable instructions which, when executed by a computer processor, are configured to perform the video coding parameter processing method according to the first aspect.
The target code rate is determined according to the real-time bandwidth and the cache information; inquiring mapping relation information based on the target code rate to determine a corresponding target frame rate, wherein the mapping relation information is constructed in advance according to different code rate intervals and corresponding frame rate values, and the frame rate values are configured in a fixed step size step; and determining an encoding frame rate based on the target frame rate so as to encode the video in the current encoding period by using the encoding frame rate. By adopting the technical means, the coding frame rate is decided by determining the frame rate values corresponding to different code rate intervals, so that the coding frame rate is prevented from being frequently modified due to the influence of bandwidth, the stability of the coding frame rate is improved, the smoothness of video playing is further improved, and the watching experience of a user is optimized.
Drawings
Fig. 1 is a flowchart of a video coding parameter processing method according to an embodiment of the present application;
fig. 2 is a flow chart of mapping relationship information construction in the embodiment of the present application;
fig. 3 is a mapping relationship usage diagram of a frame rate and a code rate in the embodiment of the present application;
FIG. 4 is a flow chart of determining a coding rate in an embodiment of the present application;
fig. 5 is a video coding parameter decision flow diagram in an embodiment of the present application;
fig. 6 is a schematic structural diagram of a video coding parameter processing system according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a video coding parameter processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, specific embodiments of the present application will be described in detail with reference to the accompanying drawings. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some but not all of the relevant portions of the present application are shown in the drawings. Before discussing exemplary embodiments in more detail, it should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although a flowchart may describe the operations (or steps) as a sequential process, many of the operations can be performed in parallel, concurrently or simultaneously. In addition, the order of the operations may be re-arranged. The process may be terminated when its operations are completed, but may have additional steps not included in the figure. The processes may correspond to methods, functions, procedures, subroutines, and the like.
The method and the device aim at making the coding frame rate decision based on the mapping relation information constructed by different code rate intervals and corresponding frame rate values, so that the stability of the coding frame rate decision is improved, the target code rate fluctuation caused by slight bandwidth fluctuation is avoided, the situation that the coding frame rate changes frequently is further caused, and the video coding transmission effect is optimized. For a traditional video coding decision scheme based on a code table, a mapping relation between continuous different frame rate parameters and corresponding code rate parameters is constructed in the code table, so that the corresponding code rate parameters are determined according to fluctuation of factors such as real-time bandwidth, sending cache accumulation and the like, and then the corresponding coding frame rate is selected for video coding. When video coding is carried out based on the code table, under the condition that the bandwidth of a sending end slightly fluctuates, frame rate adjustment is often triggered, an encoder needs to be reset after the frame rate adjustment, the efficiency of the video coding is influenced by frequently resetting the encoder, and meanwhile, the problem of frame loss in coding can be caused. In fact, the user is insensitive to the frame rate change of 1-2fps when watching the video, and the video pause caused by frame loss is more easily perceived by the user. Therefore, the video coding parameter processing method provided by the embodiment of the application is provided to solve the technical problem that the video coding frame rate is frequently adjusted when video coding is performed based on the code table in the prior art.
Example (b):
fig. 1 is a flowchart of a video coding parameter processing method provided in an embodiment of the present application, where the video coding parameter processing method provided in this embodiment may be executed by a video coding parameter processing device, the video coding parameter processing device may be implemented in a software and/or hardware manner, and the video coding parameter processing device may be formed by two or more physical entities or may be formed by one physical entity. In general, the video coding parameter processing device may be a video transmitting end, a coding device of a video coding server.
The following description will be given taking the video coding parameter processing apparatus as an example of a subject that performs the video coding parameter processing method. Referring to fig. 1, the method for processing video coding parameters specifically includes:
and S110, determining the target code rate according to the real-time bandwidth and the cache information.
When video coding is carried out, the method and the device facilitate the subsequent decision of coding frame rate by constructing the mapping relation information. The essence of the mapping information is a code table for coding parameter decision for video coding. Based on the mapping relationship between the frame rate and the code rate provided in the mapping relationship information, the embodiment of the present application first determines the target code rate of the current video coding, so as to query the mapping relationship according to the target code rate to make a coding frame rate decision.
According to the embodiment of the application, the target code rate is determined according to the real-time bandwidth and the cache information, and it can be understood that a higher code rate can be selected for video coding under the condition that the real-time bandwidth is sufficient and the accumulation of data to be sent in the cache is less. On the contrary, if the real-time bandwidth is low and the data to be transmitted is accumulated more, a low code rate needs to be selected for video coding. Based on this, in the embodiment of the application, a video coding rate parameter is determined according to the real-time bandwidth and the cache information by presetting a relational formula of the real-time bandwidth, the cache information and the video coding rate parameter, and the rate parameter is defined as a target rate. There are many implementation ways to determine the video coding rate parameter based on the real-time bandwidth and the cache information of the video data, and no fixed limitation is made in the embodiments of the present application, which is not described herein repeatedly.
It should be noted that the target code rate is a code rate parameter expected by the current video coding, and a better video coding transmission effect can be achieved by performing video coding at the target code rate. However, since the coding rate parameter may be influenced by the frame rate of the video coding, the coding rate of the current video coding needs to be determined according to different scene adaptability, and the too large fluctuation of the coding rates of the two previous and next video coding periods is avoided. And because the mapping relationship between the frame rate parameter and the code rate interval is pre-constructed in the mapping relationship information, the current target frame rate can be determined by inquiring the mapping relationship information based on the target code rate.
S120, determining a corresponding target frame rate based on target code rate query mapping relation information, wherein the mapping relation information is constructed in advance according to different code rate intervals and corresponding frame rate values, and the frame rate values are configured in a fixed step size step mode.
It can be understood that the mapping relationship between the frame rate value and the code rate interval is pre-constructed in the mapping relationship information. Under the condition that the target code rate is determined, a corresponding frame rate value can be determined by inquiring the mapping relation information, and the frame rate value is defined as the target frame rate. The target frame rate is a coding frame rate parameter expected by the current video coding, and the video coding at the target frame rate can adapt to real-time bandwidth and data caching, so that a better video coding transmission effect is achieved. However, since the abrupt frame rate change may affect the viewing experience of the viewer, the encoding frame rate used in the current video encoding needs to be considered. Therefore, the encoding frame rate of the current video encoding needs to be determined for different scene adaptations. That is, the process of deciding the encoding frame rate needs to first determine the target frame rate, and then adjust according to the target frame rate to obtain the encoding frame rate of the current video encoding.
Specifically, before that, the mapping relationship information needs to be constructed in advance. Referring to fig. 2, the mapping relationship information construction process includes:
s1001, determining a frame rate set and a code rate set;
s1002, performing quadratic function fitting by using data in the frame rate set and the code rate set to construct mapping relation information.
When the bandwidth fluctuates, the code rate can also follow the fluctuation in order to guarantee the video transmission effect. And the frame rate of video coding once fluctuates frequently affects the experience of the viewer watching the video. Therefore, when the mapping relationship is constructed, a frame rate value and a code rate interval construct a corresponding mapping relationship. When the video coding is carried out, if the code rate fluctuates in a fixed interval, the coding frame rate cannot easily fluctuate. But when the bandwidth fluctuation is large, the target code rate changes greatly (jump from one code rate interval to another code rate interval), another target frame rate value can be inquired according to the mapping relation. Therefore, the decision of the coding frame rate is carried out, so that the stability of the decision of the coding frame rate can be improved, and the coding frame rate is prevented from changing repeatedly. As shown in fig. 3, for a code table scheme in which a frame rate value and a corresponding code rate value construct a mapping relationship, in the embodiment of the present application, a mapping relationship is constructed by using a frame rate value and a corresponding code rate interval, and then a target code rate is determined, and a code rate interval in which the target code rate is located is determined by querying mapping relationship information, so as to determine a frame rate value mapped by the code rate interval, that is, a target frame rate of the current video coding.
Further, when the mapping relation is constructed, a frame rate set and a code rate set for quadratic function fitting are constructed first. Different from the traditional code table scheme, the method takes continuous frame rate values to construct a frame rate set, and in order to resist frame rate fluctuation caused by small-amplitude bandwidth fluctuation, the frame rate values of the frame rate set are configured in a fixed step size step. Referring to fig. 3, frame rate values configured in a ladder manner correspond to different code rate intervals, so that the larger the value of the fixed step length is, the wider the range of the code rate interval is.
For example, in the conventional code table scheme, the frame rate value of the frame rate set is F ═ 1, 2, …, 24, and after the frame rate set is configured by the fixed step ladder, the frame rate value of the frame rate set is limited to F ═ k, 2k, …, nk, that is, the frame rate value can only be an integer multiple of k, and if k is 3, the frame rate value of the frame rate set is F ═ 3, 6, …, 3 n. Therefore, the code rate interval range is wider, and the frame rate jitter caused by small-amplitude bandwidth fluctuation is resisted.
When a code rate set is further constructed, determining the signal noise power ratio of a plurality of different video codes, giving a maximum code rate value, and determining the video codes according to different code rates and frame rate parameter combinations by the signal noise power ratio; and determining each code rate value of the code rate set through a preset relational formula based on the maximum code rate value, the signal noise power ratio, the combination of the code rate and frame rate parameters and the maximum reduction value of the signal noise power ratio.
Specifically, an off-line test mode is adopted when determining the signal-to-noise power ratio of different video codes. Under different scenes, video coding is carried out according to different code rates and frame rate parameter combinations, and then a corresponding PSNR value (namely a signal-to-noise power ratio) is calculated to be used as a judgment standard of video coding quality under the corresponding scenes. Then, according to the PSNR value of each combination of the code rate and the frame rate parameter, by giving a maximum code rate value and a maximum reduction value of the signal-to-noise power ratio, each code rate value of the code rate set can be determined by using a preset relational formula according to the maximum code rate value, the signal-to-noise power ratio, the combination of the code rate and the frame rate parameter, and the maximum reduction value of the signal-to-noise power ratio. The maximum code rate value is set according to actual needs, and is the maximum value of the code rate value in the code rate and frame rate parameter combination. The maximum reduction value of the signal-noise power ratio is the maximum value of the allowable reduction of the signal-noise power ratio, which represents the maximum degree of the allowable reduction of the video coding quality, and if the maximum reduction value exceeds the range, the video coding quality is greatly fluctuated, so that the video coding transmission effect is realized.
More specifically, the relational formula is:
P(Fi,Bi)-P(Fi,Bi-1)≤ΔP
wherein i ∈ [1, n ]],Bn=Bmax,BmaxIs the maximum code rate value, FiA frame rate parameter being a combination of said code rate and frame rate parameter, BiAnd a code rate parameter which is the combination of the code rate and the frame rate parameter, wherein P is the corresponding signal noise power ratio, and Δ P is the maximum drop value, for example, the value is 1.
Based on the relational formula, in BnIn the case of determination, the combination of the code rate and the frame rate parameter is inquired, and the corresponding frame rate parameter F is determinednThe code rate parameter BnAnd a frame rate parameter FnSubstituting into the above relational formula to determine Bi-1The value of (a). Then inquiring the combination of the code rate and the frame rate parameters and determining a corresponding code rate parameter Bi-1Frame rate parameter Fn-1The code rate parameter Bn-1And a frame rate parameter Fn-1Substituting into the above relational formula to determine Bi-2The value of (a). And so on, finally determining a code rate set B ═ B1,B2,...,Bn]。
Then, based on the frame rate set F and the code rate set B, a quadratic function fitting may be used to obtain a function B for (F, B)i=f(Fi) And taking the function as mapping relation information. And then, according to the target code rate determined in the step S110, substituting the target code rate into the mapping relationship information, so as to determine the value of the target frame rate.
And S130, determining an encoding frame rate based on the target frame rate, so as to encode the video in the current encoding period by using the encoding frame rate.
Further, according to the determined target frame rate, when the encoding frame rate is determined based on the target frame rate, in order to avoid the problem that the viewing experience of the user is not good due to sudden frame rate drop under the condition of sudden bandwidth drop, an exponential smoothing strategy is added when the frame rate is lowered. And determining the coding frame rate of the current coding period according to the comparison result of the coding frame rate of the previous coding period and the target frame rate instead of directly taking the target frame rate as the coding frame rate.
It can be understood that, in order to avoid the coding frame rate fluctuation from being too large, when determining the coding frame rate of the current period, it is necessary to refer to the video coding frame rate of the previous period, so that the difference between the coding frame rates of the previous period and the next period is not too large. In the case of a sudden change in bandwidth, the change in the encoding frame rate is controlled within a suitable range.
Specifically, the determination formula of the encoding frame rate of the current encoding period is as follows:
wherein,for the coding frame rate of the current coding period, FtargetIn order to achieve the target frame rate,and the coding frame rate of the last coding period is alpha, a is a weight coefficient, and K is a fixed step length.
When the value of the encoding frame rate is determined, the target frame rate and the encoding frame rate of the previous encoding period are adaptively determined according to two situations of frame rate increase and frame rate decrease.
In the case of frame rate degradation, both the case of frame rate degradation too large is avoided, and the case of code rate degradation without adaptive frame rate adjustment when bandwidth degradation occurs is also avoided. When the code rate is greatly reduced and the frame rate is almost kept unchanged, the video has obvious blocking effect. Therefore, in the embodiment of the present application, when the target frame rate is less than the coding frame rate of the previous period, that is, when the frame rate is decreased, the coding frame rate of the current period is calculated by using the preset weight coefficient by referring to the coding frame rate determination formula and combining the target frame rate and the coding frame rate of the previous period. The weight coefficient represents the influence weight of the last period coding frame rate on the current period coding frame rate. The weighting factor should be too large to avoid the situation that the frame rate is suddenly reduced too much, and also to avoid the situation that the code rate is greatly reduced and the frame rate is not adaptively adjusted when the bandwidth is suddenly reduced. In the embodiment of the present application, the weight coefficient value is 0.5. The influence weight of the target frame rate and the previous frame rate on the current period of the encoding frame rate is 50% according to the above encoding frame rate determining formula, so that it can be ensured that a suitable encoding frame rate is determined according to the previous period of the encoding frame rate and the target frame rate to perform the current period of video encoding under the condition that the frame rate is decreased.
In addition, for the case of increasing frame rate, it is considered that when the bandwidth fluctuates around a breakpoint of a certain rate interval, the target frame rate also fluctuates back and forth. In order to limit the frame rate fluctuation in this case, it is necessary to add a more strict limit to the frame rate increase. Based on this, in the embodiment of the present application, when the target frame rate is greater than the sum of the encoding frame rate of the previous period and the fixed step size, the target frame rate is directly used as the encoding frame rate of the current period. Otherwise, the coding frame rate of the current period of the coding frame rate of the previous period is directly obtained. That is, only when the target frame rate exceeds the encoding frame rate of the previous period by a fixed step length, the encoding frame rate of the current period is increased. Therefore, the problem that the coding frame rate of the current period is easy to fluctuate, so that the coding frame rate fluctuates in continuous coding periods to influence the video watching experience of audiences is avoided.
Based on the coding frame rate decision scheme, a coding frame rate parameter which is suitable for the current bandwidth and the buffer environment and avoids frequent fluctuation of the frame rate can be obtained, so that the video coding of the current period is carried out, the experience of watching the video by audiences can be guaranteed, and the situation of frame loss of the video is avoided.
Optionally, the embodiment of the present application further provides a decision scheme for a coding rate. Different from the traditional scheme of deciding the value of the coding rate completely by the coding frame rate, the embodiment of the application performs decision decoupling on the coding frame rate and the coding rate so as to avoid that the fluctuation of the parameter values of the coding frame rate and the coding rate excessively affects the other.
Referring to fig. 4, the decision process of the coding rate includes:
s1401, inquiring mapping relation information according to the coding frame rate of the current coding period to determine a target code rate interval;
s1402, determining the coding rate of the current coding period based on the comparison result of the target code rate interval and the target code rate.
When making coding code rate decision, firstly referring to formula B of the mapping relation informationi=f(Fi) Substituting the coding frame rate of the current period into the formula, wherein one frame rate value of the mapping relation information corresponds to one code rate interval, so that the code rate interval corresponding to the coding frame rate of the current period can be inquired, the maximum value of the code rate removing interval is compared with the coding code rate determined in the step S110, and the minimum value of the two is selected as the coding code rate of the current coding period according to the comparison result.
Specifically, the determination formula of the coding rate of the current coding period is as follows:
Bencode=min(Btarget,f(Fencode)max)
wherein, BencodeFor the coding rate of the current coding period, BtargetIs the target code rate, F (F)encode)maxIs the maximum value of the target code rate interval.
It can be understood that, since the target bitrate is a bitrate parameter adaptively determined according to the current real-time bandwidth and the buffer information, the video coding at the target bitrate can achieve a better video coding transmission effect. In order to avoid that the video coding transmission effect is affected by the fact that the coding rate based on the coding frame rate decision exceeds the value of the target rate due to too large coding rate, the minimum value between the coding rate value based on the coding frame rate decision and the target rate is determined by comparing the coding rate value and the target rate, and the optimal rate parameter is selected adaptively to perform video coding.
It should be noted that the decision period of the video coding parameters may be set according to actual coding requirements, or a new video coding period may be triggered when the bandwidth change reaches a set threshold, so as to perform decision of video coding parameters such as a new coding frame rate and a coding rate.
Optionally, the decision for the video coding parameters such as the coding resolution may be based on the real-time bandwidth and the buffer information, or the coding resolution may be adaptively adjusted according to the coding frame rate and the coding rate, so that the video coding parameters are matched with each other, and the video coding transmission effect is optimized.
Illustratively, referring to FIG. 5, a video coding decision flow of a1-a9 is provided. When a new video coding period is started, firstly, the current real-time network bandwidth is detected, and cache information is determined according to cache accumulation of a data packet to be sent, so that the target code rate of the current video coding period is decided. And inquiring the mapping relation information constructed in advance according to the target code rate, determining the target frame rate, and deciding the coding frame rate based on the target frame rate. And after the coding frame rate is determined, the coding frame rate, the mapping relation information and the target code rate are further combined to decide the coding code rate. And after the decision of the coding frame rate and the coding rate is completed, video coding can be performed by using the coding frame rate and the coding rate. When the video real-time bandwidth and the cache information are used for making video coding parameter decision, the frequent fluctuation of the coding frame rate and the coding code rate is avoided, and the stability of the video coding parameter decision is improved.
Determining a target code rate according to the real-time bandwidth and the cache information; inquiring mapping relation information based on the target code rate to determine a corresponding target frame rate, wherein the mapping relation information is constructed in advance according to different code rate intervals and corresponding frame rate values, and the frame rate values are configured in a fixed step size step; and determining an encoding frame rate based on the target frame rate so as to encode the video in the current encoding period by using the encoding frame rate. By adopting the technical means, the coding frame rate is decided by determining the frame rate values corresponding to different code rate intervals, so that the coding frame rate is prevented from being frequently modified due to the influence of bandwidth, the stability of the coding frame rate is improved, the smoothness of video playing is further improved, and the watching experience of a user is optimized.
Based on the above embodiments, fig. 6 is a schematic structural diagram of a video coding parameter processing system provided in the present application. Referring to fig. 6, the video coding parameter processing system provided in this embodiment specifically includes: a target code rate determining module 21, a target frame rate determining module 22 and an encoding frame rate determining module 23.
The target code rate determining module 21 is configured to determine a target code rate according to the real-time bandwidth and the cache information;
the target frame rate determining module 22 is configured to determine a corresponding target frame rate based on the target code rate query mapping relationship information, where the mapping relationship information is constructed in advance according to different code rate intervals and corresponding frame rate values, and the frame rate values are configured in fixed step sizes;
the construction process of the mapping relation information comprises the following steps:
determining a frame rate set and a code rate set;
and performing quadratic function fitting by using the data in the frame rate set and the code rate set to construct mapping relation information.
Determining the set of frame rates and the set of code rates comprises:
determining signal noise power ratios of a plurality of different video codes, and giving a maximum code rate value, wherein the signal noise power ratios are determined by video coding according to different code rates and frame rate parameter combinations;
and determining each code rate value of the code rate set through a preset relational formula based on the maximum code rate value, the signal noise power ratio, the combination of the code rate and frame rate parameters and the maximum reduction value of the signal noise power ratio.
The relational formula is as follows:
P(Fi,Bi)-P(Fi,Bi-1)≤ΔP
wherein i ∈ [1, n ]],Bn=Bmax,BmaxIs the maximum code rate value, FiFrame rate parameter being a combination of code rate and frame rate parameter, BiThe code rate parameter is the code rate parameter of the combination of the code rate and the frame rate parameter, P is the corresponding signal noise power ratio, and delta P is the maximum drop value.
The encoding frame rate determining module 23 is configured to determine an encoding frame rate based on the target frame rate, so as to perform video encoding for the current encoding period using the encoding frame rate.
Specifically, the encoding frame rate determining module 23 determines the encoding frame rate of the current encoding period according to the comparison result between the encoding frame rate of the previous encoding period and the target frame rate.
The determination formula of the coding frame rate of the current coding period is as follows:
wherein,for the coding frame rate of the current coding period, FtargetIn order to achieve the target frame rate,and the coding frame rate of the last coding period is alpha, a is a weight coefficient, and K is a fixed step length.
In particular, the video coding parameter processing system is further configured to
Inquiring mapping relation information according to the coding frame rate of the current coding period to determine a target code rate interval;
and determining the coding rate of the current coding period based on the comparison result of the target code rate interval and the target code rate. The determination formula of the coding rate of the current coding period is as follows:
Bencode=min(Btarget,f(Fencode)max)
wherein, BencodeFor the coding rate of the current coding period, BtargetIs the target code rate, F (F)encode)maxIs the maximum value of the target code rate interval.
Determining a target code rate according to the real-time bandwidth and the cache information; inquiring mapping relation information based on the target code rate to determine a corresponding target frame rate, wherein the mapping relation information is constructed in advance according to different code rate intervals and corresponding frame rate values, and the frame rate values are configured in a fixed step size step; and determining an encoding frame rate based on the target frame rate so as to encode the video in the current encoding period by using the encoding frame rate. By adopting the technical means, the coding frame rate is decided by determining the frame rate values corresponding to different code rate intervals, so that the coding frame rate is prevented from being frequently modified due to the influence of bandwidth, the stability of the coding frame rate is improved, the smoothness of video playing is further improved, and the watching experience of a user is optimized.
The video coding parameter processing system provided by the embodiment of the application can be configured to execute the video coding parameter processing method provided by the embodiment, and has corresponding functions and beneficial effects.
On the basis of the above practical example, an embodiment of the present application further provides a video coding parameter processing apparatus, and with reference to fig. 7, the video coding parameter processing apparatus includes: a processor 31, a memory 32, a communication module 33, an input device 34, and an output device 35. The memory 32, as a computer-readable storage medium, may be configured to store software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the video coding parameter processing method according to any embodiment of the present application (for example, the target bitrate determining module, the target frame rate determining module, and the coding frame rate determining module in the video coding parameter processing system). The communication module 33 is configured for data transmission. The processor 31 executes various functional applications of the device and data processing by executing software programs, instructions and modules stored in the memory, that is, implements the video coding parameter processing method described above. The input device 34 may be configured to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 35 may include a display device such as a display screen. The video coding parameter processing device provided by the above can be configured to execute the video coding parameter processing method provided by the above embodiment, and has corresponding functions and beneficial effects.
On the basis of the above embodiments, the present application further provides a storage medium containing computer-executable instructions, which when executed by a computer processor are configured to perform a video coding parameter processing method, and the storage medium may be any of various types of memory devices or storage devices. Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the video coding parameter processing method described above, and may also perform related operations in the video coding parameter processing method provided in any embodiment of the present application.
Claims (11)
1. A method for processing video coding parameters, comprising:
determining a target code rate according to the real-time bandwidth and the cache information;
inquiring mapping relation information based on the target code rate to determine a corresponding target frame rate, wherein the mapping relation information is constructed in advance according to different code rate intervals and corresponding frame rate values, and the frame rate values are configured in a fixed step size step;
and determining an encoding frame rate based on the target frame rate so as to encode the video in the current encoding period by using the encoding frame rate.
2. The method of claim 1, wherein the process of constructing the mapping relation information comprises:
determining a frame rate set and a code rate set;
and performing quadratic function fitting by using the data in the frame rate set and the code rate set to construct the mapping relation information.
3. The method of claim 2, wherein determining the set of frame rates and the set of code rates comprises:
determining signal noise power ratios of a plurality of different video codes, and giving a maximum code rate value, wherein the signal noise power ratios are determined by video coding according to different code rates and frame rate parameter combinations;
and determining each code rate value of the code rate set through a preset relational formula based on the maximum code rate value, the signal-to-noise power ratio, the combination of the code rate and frame rate parameters and the maximum reduction value of the signal-to-noise power ratio.
4. The method of claim 3, wherein the relational formula is:
P(Fi,Bi)-P(Fi,Bi-1)≤ΔP
wherein i ∈ [1, n ]],Bn=Bmax,BmaxIs said maximum code rate value, FiA frame rate parameter being a combination of said code rate and frame rate parameters, BiAnd the code rate parameter is the code rate parameter of the combination of the code rate and the frame rate parameter, P is the corresponding signal noise power ratio, and delta P is the maximum drop value.
5. The method of claim 1, wherein determining an encoding frame rate based on the target frame rate comprises:
and determining the coding frame rate of the current coding period according to the comparison result of the coding frame rate of the previous coding period and the target frame rate.
6. The method of claim 5, wherein the coding frame rate of the current coding period is determined by the following formula:
7. The method of claim 1, further comprising, after determining an encoding frame rate based on the target frame rate:
inquiring mapping relation information according to the coding frame rate of the current coding period to determine a target code rate interval;
and determining the coding rate of the current coding period based on the comparison result of the target code rate interval and the target code rate.
8. The method of claim 7, wherein the coding rate of the current coding period is determined by the following formula:
Bencode=min(Btarget,f(Fencode)max)
wherein, BencodeFor the coding rate of the current coding period, BtargetFor the target code rate, F (F)encode)maxThe maximum value of the target code rate interval.
9. A video coding parameter processing system, comprising:
the target code rate determining module is configured to determine a target code rate according to the real-time bandwidth and the cache information;
the target frame rate determining module is configured to query mapping relation information to determine a corresponding target frame rate based on the target code rate, wherein the mapping relation information is constructed in advance according to different code rate intervals and corresponding frame rate values, and the frame rate values are configured in a fixed step size step;
and the coding frame rate determining module is configured to determine a coding frame rate based on the target frame rate so as to perform video coding of the current coding period by using the coding frame rate.
10. A video coding parameter processing apparatus, comprising:
a memory and one or more processors;
the memory configured to store one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method for video coding parameter processing according to any of claims 1-8.
11. A storage medium containing computer-executable instructions, which when executed by a computer processor are configured to perform the video coding parameter processing method of any of claims 1-8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210160160.7A CN114501014A (en) | 2022-02-22 | 2022-02-22 | Video coding parameter processing method, system, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210160160.7A CN114501014A (en) | 2022-02-22 | 2022-02-22 | Video coding parameter processing method, system, device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114501014A true CN114501014A (en) | 2022-05-13 |
Family
ID=81481449
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210160160.7A Pending CN114501014A (en) | 2022-02-22 | 2022-02-22 | Video coding parameter processing method, system, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114501014A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117596425A (en) * | 2023-10-24 | 2024-02-23 | 书行科技(北京)有限公司 | Method and device for determining coding frame rate, electronic equipment and storage medium |
-
2022
- 2022-02-22 CN CN202210160160.7A patent/CN114501014A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117596425A (en) * | 2023-10-24 | 2024-02-23 | 书行科技(北京)有限公司 | Method and device for determining coding frame rate, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021244341A1 (en) | Picture coding method and apparatus, electronic device and computer readable storage medium | |
US8099755B2 (en) | Systems and methods for controlling the encoding of a media stream | |
CN101621351B (en) | Method, device and system for adjusting multimedia encoding rate | |
US8578436B2 (en) | Method for two time-scales video stream transmission control | |
US9826260B2 (en) | Video encoding device and video encoding method | |
CN113573101B (en) | Video coding method, device, equipment and storage medium | |
CN105430532A (en) | Control method and system for adaptive adjustment of video data transmission | |
CN102098547A (en) | Transmission method of self-adaptive/real-time high-definition video for embedded network | |
CN113301392B (en) | Code rate determining method, device, equipment and storage medium | |
CN104394484A (en) | Wireless live streaming media transmission method | |
US11722719B2 (en) | Systems, methods, and devices for optimizing streaming bitrate based on variations in processor load | |
CN112543328A (en) | Auxiliary encoding method, auxiliary encoding device, computer equipment and storage medium | |
CN114501014A (en) | Video coding parameter processing method, system, device and storage medium | |
US8234683B2 (en) | Method and apparatus for controlling channel for providing internet protocol television service | |
CN115883848A (en) | Code control method, device, equipment, storage medium and product | |
CN112468764B (en) | Method, system, server and storage medium for streaming media adaptive transmission | |
EP2874398B1 (en) | Method of embedding of an image with a color transform | |
Yang et al. | Video transmission control for networked vision system based on RTCP | |
CN116582717A (en) | Initial video gear setting method, system, equipment and storage medium | |
CN117956177A (en) | Cloud rendering method, cloud rendering device, medium and equipment | |
CN117956167A (en) | Code rate control method and device for video coding and computer readable storage medium | |
CN115396733A (en) | Video frame transmission method, device, equipment, storage medium and product | |
CN117201805A (en) | Encoding quality speed balance control method, device, equipment, storage medium and product | |
CN116456103A (en) | Virtual desktop coding method, device, equipment and storage medium | |
CN117793414A (en) | Configuration initialization method for optimizing real-time rendering audio and video stream experience |
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 |