[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN105338422B - The smoothing method of the network transmission rate of vedio data - Google Patents

The smoothing method of the network transmission rate of vedio data Download PDF

Info

Publication number
CN105338422B
CN105338422B CN201410253012.5A CN201410253012A CN105338422B CN 105338422 B CN105338422 B CN 105338422B CN 201410253012 A CN201410253012 A CN 201410253012A CN 105338422 B CN105338422 B CN 105338422B
Authority
CN
China
Prior art keywords
video
transmission rate
data
network
delivery network
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
CN201410253012.5A
Other languages
Chinese (zh)
Other versions
CN105338422A (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.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital 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 Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Priority to CN201410253012.5A priority Critical patent/CN105338422B/en
Publication of CN105338422A publication Critical patent/CN105338422A/en
Application granted granted Critical
Publication of CN105338422B publication Critical patent/CN105338422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of smoothing methods of the network transmission rate of vedio data, including:Buffering area is written into video code flow;Calculate the code stream variation of video encoder;The relationship for allowing delay according to video data size in current buffer and video delivery network, obtains transmission rate pending, and be compared with the fluctuation maximum value of video delivery network bandwidth and video code flow in video delivery network, to determine practical transmission rate;If send duration used in the video data in buffering area using practical transmission rate adjusts the hair flow velocity rate in next period more than the sampling period according to the size of data of current buffer and the permitted delay of network.The method of the present invention, it is smooth to may make that the network transmission rate of vedio data is constantly carried out according to the direction of anticipation, and finally realize smooth transmission of the vedio data in video delivery network, and then avoid the overshoot of network data, loss of data, the network congestion even possibility of network paralysis.

Description

The smoothing method of the network transmission rate of vedio data
Technical field
The present invention relates to transmission of video images field, more particularly to the video image during a kind of transmission of video images is flat Sliding method.
Background technology
In video monitoring, the applications such as the network teleconference, video image is from real-time acquisition until video image plays End, needs by links such as acquisition, buffering and network transmissions.
As shown in Figure 1, the collected video data of video capture front end institute is after the coding of video encoder 1, video is compiled Video data is stored in buffering area 2 by code device 1 by write pointer 11, and network hair stream device 3 will be deposited by read pointer 31 in buffering area The video data put is read, and is sent out by video delivery network 4.Video encoder 1 safeguards write pointer 11, is incited somebody to action in write pointer 11 When video data is stored in buffering area 2, position of the write pointer 11 in buffering area 2 can be updated with the write-in of video data; Network hair stream device 3 safeguards read pointer 31, and when read pointer 31 reads video data from buffering area 2, read pointer 31 is in buffering area 2 In position can be updated with the reading of video data.In the art, network hair stream device 3 quantity can be 1 or Multiple, each network hair stream device 3 respectively safeguards the read pointer 31 of oneself, in addition, network hair stream device 3 can also use multithreading skill Art is realized.
The renewal speed of write pointer 11 reflects the output speed of video encoder 1, and network hair stream device 3 is by read pointer 31 control, can adjust the rate that stream of video data is sent to video delivery network 4, and stream of video data is sent to video The smoothness (or uniformity) of the rate of transmission network 4 reflects that onto video delivery network 4, as network data flow is flat Slip.
When video image acquires in real time, and video delivery network sends collected video data in real time:On the one hand, due to The pictured scene variation of the video image of acquisition is random, and then the collected original data volume difference of institute is very big;On the other hand, depending on The method that frequency compression algorithm uses in frame (I frames) and interframe (P frames) compression, wherein I frames are also key frame, are interframe compressions Important frame in coding, I frames are the coded frames of full frame compression, only use the data of I frames with regard to restructural complete image, I frames when decoding Generated without necessarily referring to other pictures, and P frames by before it P frames or I frames prediction from, P frames compare with before it P frames or I frames between identical information or data, that is, consider movement characteristic carry out interframe compression, P frames be according to this frame with Distilled edition frame data are carried out in the difference of adjacent former frame (I frames or P frames), in this way, due to the heterogeneity of I frames and P frames, cause Compressed the video data volume difference is very big.
Due to the both sides, not perfectly flat cunning will be become by being finally reflected on transmitted data on network, can there is network The phenomenon that overshoot of data, in addition in practical application, there are the constraints such as bandwidth limitation, in this way, network data Overshoot would potentially result in loss of data or large number of equipment while mass data occurs, will lead to network congestion or even net Network is paralysed.
Therefore, vedio data is smoothed, is that overshoot does not occur for Logistics networks data, avoids network The important means of congestion and network paralysis.
In the prior art, someone uses the method being smoothed to vedio data for this situation.Example A kind of method for smoothing network transmission bit-rate of multi-view video streams as disclosed in patent CN102355577A is cached sending Area is further divided into two-level cache, and data are set as valve value and are calculated.This method can buffered data to a certain extent, in turn It is smooth to reach network, but this method also have it is clearly disadvantageous, for example, it is desired to which two core buffers, lack dynamic realtime tune It is whole, it is only smooth etc. by the progress of preset threshold value, lack the strain to real-time transmission rate.
Invention content
In view of this, the present invention provides a kind of smoothing method of the network transmission rate of vedio data, with to current Transmission bandwidth is measured in real time, and then dynamic adjusts transmission speed, achievees the purpose that code check is smooth.
What the technical solution of the application was realized in:
A kind of smoothing method of the network transmission rate of vedio data, including within each videograph sampling period The following process executed:
Within the current video record sampling period, buffering area is written into video code flow;
Calculate the code stream variation of the video encoder in the current video record sampling period;
Obtain video data size in current buffer;
Allow the relationship of delay according to video data size in the current buffer and video delivery network, obtains institute State the transmission rate pending of video data;
By the transmission rate pending respectively with current video transmission network bandwidth and video code flow in video delivery network Fluctuation maximum value be compared, to determine practical transmission rate;
The video data in the buffering area is sent using the practical transmission rate.
Further, it is more than if sending duration used in the video data in the buffering area using the practical transmission rate The sampling period, then adjusting video data size in the current buffer allows the pass of delay with video delivery network System, to be used within next videograph sampling period.
Further, the code stream variation of the video encoder for calculating the current video record sampling period, using such as Lower formula carries out:
Δ S=S-S0
Wherein, Δ S is the code stream variation for the video encoder that current video records the sampling period, and S records for current video The code flow of the video encoder in sampling period, S0For the code flow of the video encoder in previous videograph sampling period.
Further, the pass of delay is allowed according to video data size in the current buffer and video delivery network System, obtains the transmission rate pending of the video data, including:
First threshold point and second threshold point are set in the buffering area, and wherein first threshold point is less than second threshold Point;
When the video data volume buffered in the buffering area is less than first threshold point, waited for using described in the acquisition of following formula Transmission rate:
When the video data volume buffered in the buffering area is between the first threshold point and second threshold point, adopt The transmission rate pending is obtained with following formula:
When the video data volume buffered in the buffering area is more than second threshold point, waited for using described in the acquisition of following formula Transmission rate:
Wherein, V is transmission rate pending, V0To be sent to the final transmission speed of network in the previous videograph sampling period Rate, T are the videograph sampling period, and Δ y is level-one modifying factor, and Δ x is the Second level amendment factor.
Further, fluctuation maximum value of the video code flow in video delivery network is equal to video image target smooth value With the product of video delivery network code check.
Further, by the transmission rate pending respectively with current video transmission network bandwidth and video code flow in transmission of video Fluctuation maximum value in network is compared, to determine practical transmission rate, including:
By the transmission rate pending, the fluctuation of current video transmission network bandwidth, video code flow in video delivery network Minimum value in maximum value three is determined as practical transmission rate.
Further, the first threshold point is that the video delivery network is delayed the 3/8 of permitted amount of buffered data, institute It is that the video delivery network is delayed the 5/8 of permitted amount of buffered data to state second threshold point.
Further, when the video data volume buffered in the buffering area be more than or equal to 0, and be less than the video delivery network It is delayed the 1/8 of permitted amount of buffered data, the level-one modifying factor Δ y is -0.15;
When the video data volume buffered in the buffering area is more than or equal to, video delivery network delay is permitted to delay Rush the 1/8 of data volume, and the permitted amount of buffered data that is delayed less than the video delivery network 2/8 when, the level-one is repaiied Positive divisor Δ y is -0.1;
When the video data volume buffered in the buffering area is more than or equal to, video delivery network delay is permitted to delay Rush the 2/8 of data volume, and the permitted amount of buffered data that is delayed less than the video delivery network 3/8 when, the level-one is repaiied Positive divisor Δ y is -0.05;
When the video data volume buffered in the buffering area is more than or equal to, video delivery network delay is permitted to delay Rush the 3/8 of data volume, and the permitted amount of buffered data that is delayed less than or equal to the video delivery network 5/8 when, described one Grade modifying factor Δ y is 0;
When the video data volume buffered in the buffering area is more than the permitted buffer number of video delivery network delay According to the 5/8 of amount, and less than or equal to the video delivery network be delayed permitted amount of buffered data 6/8 when, the level-one is repaiied Positive divisor Δ y is 0.05;
When the video data volume buffered in the buffering area is more than the permitted buffer number of video delivery network delay According to amount 6/8 when, and less than or equal to the video delivery network be delayed permitted amount of buffered data 7/8 when, the level-one Modifying factor Δ y is 0.1;
When the video data volume buffered in the buffering area is more than the permitted buffer number of video delivery network delay According to amount 7/8 when, and less than or equal to the video delivery network be delayed permitted amount of buffered data 8/8 when, the level-one Modifying factor Δ y is 0.15.
Further, the Second level amendment factor determines by the following method:
According to video encoder code check, third threshold point and the 4th threshold point are set, wherein third threshold point is less than the 4th Threshold point;
2 seconds to 1 second before current time practical code flows, are denoted as the first practical code stream before statistics current time Amount counts 1 second practical code flow for arriving current time before current time, is denoted as the second practical code flow;
When the first practical code flow and the second practical code flow are below the third threshold point:
When the first practical code flow and the second practical code flow are above four threshold point:
Wherein, P3For third threshold point, P4For the 4th threshold point, T is the videograph sampling period, and S records for current video The code flow of the video encoder in sampling period, Δ x are the Second level amendment factor.
Further, the third threshold point is the 3/4 of the video encoder code check, and the 4th threshold point is compiled for the video The 5/4 of code device code check, i.e.,
Wherein, P0For the video encoder code check.
From said program as can be seen that the smoothing method of the network transmission rate of vedio data using the present invention, Can greatly it improve to video delivery network code check wave zone so that video delivery network code check fluctuation range can protect always It holds in a smaller range.The smoothing method of the network transmission rate of vedio data using the present invention, may make The network transmission rate of vedio data constantly carries out smoothly according to the direction of anticipation, and finally realizes vedio data Smooth transmission in video delivery network, and then avoid overshoot, loss of data, the network congestion even net of network data The possibility of network paralysis.Compared with prior art, method of the invention only used single buffer, and the space for reducing buffering area accounts for With;Hair flow velocity rate is adjusted by the instantaneous output quantity of encoder, the maximum delay of permission, network smoothing target value into Mobile state to reach The purpose smooth to network;It ensure that the reliability of system operation by two modifying factor dynamic adjustment hair flow velocity rates.
Description of the drawings
The process schematic that Fig. 1 is undergone by video data from video encoder to upload network;
Fig. 2 is the schematic diagram of the smoothing method of the network transmission rate of the vedio data of the present invention;
Fig. 3 is the schematic diagram that first threshold point and second threshold point is arranged;
Fig. 4 is the determination process schematic of the Second level amendment factor in the present invention;
Fig. 5 is the schematic diagram that third threshold point and the 4th threshold point is arranged;
Fig. 6 is the smoothing method embodiment flow chart of the network transmission rate of the vedio data of the present invention;
Fig. 7 is the embodiment flow chart that the Second level amendment factor is adjusted in the present invention;
Transmission of video net when Fig. 8 is the smoothing method of the network transmission rate of vedio data not using the present invention Network code check fluctuates situation schematic diagram;
Fig. 9 is the video delivery network after the smoothing method of the network transmission rate of vedio data using the present invention Code check fluctuates situation schematic diagram.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, develop simultaneously embodiment referring to the drawings, Invention is further described in detail.
As shown in Fig. 2, the smoothing method of the network transmission rate of the vedio data of the present invention includes mainly following step Suddenly.
Step 1 is recorded in current video in the sampling period, and buffering area is written in video code flow.
Wherein, it can refer to shown in Fig. 1, be video encoder by write pointer, buffering area is written in video code flow by realization Process, video encoder has the process that buffering area is written in video code flow for this field by write pointer, no longer superfluous herein It states.
The videograph sampling period is used for adjusting the period of the network transmission rate of vedio data, fineness There is important influence to the smooth effect of the network transmission rate of vedio data, it can if the videograph sampling period is too small It can cause to shake, smooth effect may not be had if the videograph sampling period is too big.It is also required to consider journey simultaneously The time factor that sequence code executes.As a specific embodiment, (tune of the operating system to thread under Linux system It is 10ms to spend the period), the smooth effect desired value of the network transmission rate of vedio data is 10%, determines videograph sampling Period is 1/16 second, i.e., each videograph sampling period is about 62.5ms.It is when being run under other systems system or described flat When sliding effect desired value changes, videograph sampling period needs are adjusted.Under normal circumstances, smooth effect desired value is got over Small, the sample frequency of videograph will increase.
Step 2 calculates the code stream variation that the current video records the video encoder in sampling period.
In this step 2, the code stream that the current video records the video encoder in sampling period is calculated using following formula Variation:
Δ S=S-S0
Wherein, Δ S is the code stream variation for the video encoder that current video records the sampling period, and S records for current video The code flow of the video encoder in sampling period, S0For the code flow of the video encoder in previous videograph sampling period.
Step 3 obtains video data size in current buffer.
Because when video data is stored in buffering area by write pointer, the position of write pointer in the buffer can be with video The write-in of data and update;When read pointer reads video data from buffering area, the position of read pointer in the buffer can be with It the reading of video data and updates.Therefore, in this step 3, read pointer and position of the write pointer in the buffering area can be passed through It sets, and then determines video data size in current buffer.
Step 4, the relationship for allowing delay according to video data size in the current buffer and video delivery network, Obtain the transmission rate pending of the video data.
Delay (delay) time of network is an important performance indicator in field of video monitoring, refers to collecting figure Time difference as seeing image to terminal, in the present invention, delay time refers exclusively to the delay of video delivery network permission.When delay Between with Rate smoothing desired value have the relationship for mutually restricting and mutually converting.For example, when the delay time that demand allows is 1 second, Then it is theoretically obtainable the absolute smooth of network transmission code stream, the i.e. effect of straight line.
The permitted amount of buffered data of video delivery network delay can be obtained by following formula:
Video delivery network is delayed permitted amount of buffered data=video delivery network code check × network delay time
Such as the code check of video delivery network is 1Mbps, permission network delay time is 40ms, then video passes in buffering area The defeated permitted amount of buffered data of network delay is 1Mbps × 40/1000S=40K, and video delivery network delay is permitted Amount of buffered data is used to mitigate the transient change of encoder output data.
Smooth value, i.e. the code stream peak value in network transmission are more than the permitted largest percentage of code check value.If for example, target Smooth value is 10%, i.e. code stream 10% of peak value maximum no more than code check value in network transmission, if code check is 1Mbps, Under the requirement of smooth target value, for network transmission speed maximum no more than 1.1Mpbs, this can be converted transmission rate most Big permissible value.
It is buffered in smoothing process and act as increasing when video encoder output moment, first video data can be put into Buffering area buffers, and when the data of video encoder output reduce, the data that can be buffered before buffering area are fed Under, reach smooth effect.Therefore the determination of threshold point just has the process for how utilizing buffering area.
As shown in figure 3, in the buffering area, it is delayed permitted amount of buffered data according to the video delivery network, First threshold point P is set1With second threshold point P2, wherein first threshold point P1Less than second threshold point P2
It is found according to a large amount of test value, when the first threshold point is that video delivery network delay is permitted slow Rush the 3/8 of data volume, the second threshold point be the video delivery network be delayed permitted amount of buffered data 5/8 when, Effect is more satisfactory, thus have 3/8 cushion space be used for take precautions against buffered data it is excessive and 3/8 data with existing supply The reduction of video encoder data output.Therefore, as a specific embodiment, the first threshold point is the transmission of video The 3/8 of the permitted amount of buffered data of network delay, the second threshold point are that video delivery network delay is permitted The 5/8 of amount of buffered data.
According to above description, in this step 4, the speed to be sent of the video data is obtained particular by following method Rate.
When the video data volume buffered in the buffering area is less than first threshold point P1When, described in the acquisition of following formula Transmission rate pending:
When the video data volume buffered in the buffering area is located at the first threshold point P1With second threshold point P2Between When, the transmission rate pending is obtained using following formula:
When the video data volume buffered in the buffering area is more than second threshold point P2When, described in the acquisition of following formula Transmission rate pending:
Wherein, V is transmission rate pending, V0To be sent to the final transmission speed of network in the previous videograph sampling period Rate, T are the videograph sampling period, and Δ y is level-one modifying factor, and Δ x is the Second level amendment factor.
Video data size and video delivery network allow the relationship being delayed in the current buffer, and as above-mentioned three Three formula of a condition.
Step 5, by the transmission rate pending respectively with current video transmission network bandwidth and video code flow in transmission of video Fluctuation maximum value in network is compared, to determine practical transmission rate.
Wherein, fluctuation maximum value of the video code flow in video delivery network be equal to video image target smooth value with The product of video delivery network code check.For example, if video image target smooth value is set to 10%, video delivery network code check 1Mbps, then fluctuation maximum value of the video code flow in video delivery network is 1Mbps × 10%=1.1Mbps, i.e. video code flow Fluctuation range maximum in video delivery network is no more than 1.1Mbps.
In this step 5, specifically by the transmission rate pending, current video transmission network bandwidth, video code flow regarding The minimum value in fluctuation maximum value three in frequency transmission network is determined as practical transmission rate.The even described transmission rate pending is It is minimum in the three, then transmission rate pending is determined as practical transmission rate, if current video transmission network bandwidth be this three It is minimum in person, then current video transmission network bandwidth is determined as practical transmission rate, if video code flow is in transmission of video net Fluctuation maximum value in network is minimum in the three, then the fluctuation maximum value by video code flow in video delivery network determines For practical transmission rate.Concrete implementation flow can first by transmission rate pending, current video transmission network bandwidth be compared with It determines a smaller value, then the smaller value is compared with fluctuation maximum value of the video code flow in video delivery network Using the minimum value that compares this time as practical transmission rate.
Step 6 sends video data in the buffering area using the practical transmission rate.
When executing this step 6, needs to record simultaneously regarding in the buffering area is sent using the practical transmission rate Frequency is according to duration used, then to use.
If step 7 sends duration used in the video data in the buffering area using the practical transmission rate and is more than The sampling period, then adjusting video data size in the current buffer allows the pass of delay with video delivery network System, to be used within next videograph sampling period.
Adjusting video data size in the current buffer allows the relationship of delay with video delivery network, as adjusts Level-one modifying factor Δ y in whole formula (1), formula (2) and formula (3), as a specific embodiment, the value model of Δ y Enclose is 0~0.15.
The adjustment process of level-one modifying factor includes:
When the video data volume buffered in the buffering area be more than or equal to 0, and less than the video delivery network be delayed institute The amount of buffered data of permission 1/8 when, the level-one modifying factor Δ y be -0.15;
When the video data volume buffered in the buffering area is more than or equal to, video delivery network delay is permitted to delay Rush the 1/8 of data volume, and the permitted amount of buffered data that is delayed less than the video delivery network 2/8 when, the level-one is repaiied Positive divisor Δ y is -0.1;
When the video data volume buffered in the buffering area is more than or equal to, video delivery network delay is permitted to delay Rush the 2/8 of data volume, and the permitted amount of buffered data that is delayed less than the video delivery network 3/8 when, the level-one is repaiied Positive divisor Δ y is -0.05;
When the video data volume buffered in the buffering area is more than or equal to, video delivery network delay is permitted to delay Rush the 3/8 of data volume, and the permitted amount of buffered data that is delayed less than or equal to the video delivery network 5/8 when, described one Grade modifying factor Δ y is 0;
When the video data volume buffered in the buffering area is more than the permitted buffer number of video delivery network delay According to the 5/8 of amount, and less than or equal to the video delivery network be delayed permitted amount of buffered data 6/8 when, the level-one is repaiied Positive divisor Δ y is 0.05;
When the video data volume buffered in the buffering area is more than the permitted buffer number of video delivery network delay According to the 6/8 of amount, and less than or equal to the video delivery network be delayed permitted amount of buffered data 7/8 when, the level-one is repaiied Positive divisor Δ y is 0.1;
When the video data volume buffered in the buffering area is more than the permitted buffer number of video delivery network delay According to the 7/8 of amount, and less than or equal to the video delivery network be delayed permitted amount of buffered data 8/8 when, the level-one is repaiied Positive divisor Δ y is 0.15.
In the above method of the present invention, as shown in figure 4, the Second level amendment factor is determined by following process.
Step a1, according to the code check of video encoder, third threshold point and the 4th threshold point, wherein third threshold point are set Less than the 4th threshold point.
Referring to Figure 5, it is assumed that wherein shadow region is the code check of video encoder, third threshold point P3With the 4th threshold value Point P4It is respectively arranged at the both sides of the code check of video encoder, and third threshold point P3Less than the 4th threshold point P4.Have as one Body embodiment, third threshold point P3It may be configured as the 3/4 of the code check of video encoder, the 4th threshold point P4It may be configured as video volume The 5/4 of the code check of code device, i.e.,
Wherein, P3For third threshold point, P4For the 4th threshold point, T is videograph sampling period, P0For video encoder Code check, wherein video encoder code check is set when configuring video encoder, after having set video encoder code check, Video encoder could work.
For example, the code check of video encoder is 2Mbps, then third threshold point P3For 3/4 × 2Mbps=1.5Mbps, the 4th Threshold point P4For 5/4 × 2Mbps=2.5Mbps.
Step a2,2 seconds to 1 second before current time practical code flows before current time are counted, are denoted as first Practical code flow counts 1 second practical code flow for arriving current time before current time, is denoted as the second practical code flow.
In this step, 2 seconds to 1 second before current time before current time practical code flows are counted, are that will work as 2 seconds sizes to video data transmitted by all sampling periods in before current time 1 second add up before the preceding time, If 1 second is made of N (N >=1) a sampling period, 2 seconds are counted before current time in before current time 1 second Video data transmitted by N number of sampling period.If for example, sampling period were 62.5ms, 1 second just by 16 (62.5ms × 16=1S) sampling period is formed, then in this step, count before current time 2 seconds to current time it First 1 second practical code flow is then to be sampled to 16 in before current time 1 second for 2 seconds before counting current time The size of video data transmitted by period simultaneously adds up, and then determines before current time 2 seconds to before current time 1 Practical code flow in second.Similarly, count current time before 1 second arrive current time practical code flow, be will be by The size of video data transmitted by all sampling periods adds up in 1 second current time before current time.
In practice, if current time, after having counted the first practical code flow and the second practical code flow, after 1 second Next timing statistics point when, can be directly using the second of current time the practical code flow as the of next timing statistics point One practical code flow, without re-starting statistics in next timing statistics point.
Step a3, according to the first practical code flow and the second practical code flow and the third threshold point and the 4th threshold point Comparison, it is determined whether adjustment the Second level amendment factor.
Specifically, when the first practical code flow and the second practical code flow are below the third threshold point, step is executed Rapid a4 executes step a5 when the first practical code flow and the second practical code flow are above four threshold point, and at it Adjustment in the case of him without the Second level amendment factor.
Step a4, when the first practical code flow and the second practical code flow are below the third threshold point, using such as Lower formula adjusts the Second level amendment factor:
Wherein, P3For third threshold point, P4For the 4th threshold point, T is the videograph sampling period, and S records for current video The code flow of the video encoder in sampling period, Δ x are the Second level amendment factor.
Step a5, when the first practical code flow and the second practical code flow are above four threshold point, using such as Lower formula adjusts the Second level amendment factor:
Wherein, P3For third threshold point, P4For the 4th threshold point, T is the videograph sampling period, and S records for current video The code flow of the video encoder in sampling period, Δ x are the Second level amendment factor.
The method of the present invention is further described below in conjunction with a specific embodiment.
As shown in fig. 6, the smoothing method embodiment flow of the network transmission rate of the vedio data of the present invention includes Each step below.
Step b1, within the record sampling period, video code flow is updated into buffering area by write pointer, is entered step later b2。
In this step b1, video encoder is updated video code flow into buffering area by write pointer, is existed by write pointer The update of position in buffering area can learn update to the most end position of the video code flow in buffering area.
Step b2, the code stream variation for calculating the video encoder in the current video record sampling period, enters step later b3。
The code stream variation of video encoder in this step b2 refers to that video encoder exports in former and later two sampling periods The difference of code flow, i.e.,
Δ S=S-S0
Wherein, Δ S is the code stream variation for the video encoder that current video records the sampling period, and S records for current video The code flow of the video encoder in sampling period, S0For the code flow of the video encoder in previous videograph sampling period.
Step b3, the reality of video data in current buffer is calculated in the position of buffering area by read pointer and write pointer Size enters step b4 later.
Because when video data is stored in buffering area by write pointer, the position of write pointer in the buffer can be with video The write-in of data and update;When read pointer reads video data from buffering area, the position of read pointer in the buffer can be with It the reading of video data and updates.Therefore, in this step, read pointer and position of the write pointer in the buffering area can be passed through It sets, and then determines video data size in current buffer.
Step b4, allow the pass of delay according to the actual size of video data in current buffer and video delivery network System, calculates the transmission rate pending of video data, enters step b5 later.
In this step b4, by the way that first threshold point P is arranged in the buffer1With second threshold point P2(shown in Fig. 3), and have Body is the transmission rate pending that the video data is obtained by following method.
When the video data volume buffered in the buffering area is less than first threshold point P1When, described in the acquisition of following formula Transmission rate pending:
When the video data volume buffered in the buffering area is located at the first threshold point P1With second threshold point P2Between When, the transmission rate pending is obtained using following formula:
When the video data volume buffered in the buffering area is more than second threshold point P2When, described in the acquisition of following formula Transmission rate pending:
Wherein, V is transmission rate pending, V0To be sent to the final transmission speed of network in the previous videograph sampling period Rate, T are the videograph sampling period, and Δ y is level-one modifying factor, and Δ x is the Second level amendment factor, the value range of Δ y is 0~ 0.15。
Step b5, transmission rate pending is compared with the current video transmission network bandwidth detected, if to be sent Rate is less than the current bandwidth detected, then transmission rate pending is brought into step b6, otherwise by current video transmission network bandwidth Bring step b6 into.
Step b6, the value for bringing step b5 into compares with fluctuation maximum value of the video code flow in video delivery network Compared with if the value that step b5 is brought into brings step b5 into less than fluctuation maximum value of the video code flow in video delivery network Value is determined as practical transmission rate, and otherwise the fluctuation maximum value by video code flow in video delivery network is determined as practical transmission Rate enters step b7 later.
Step b7, the video data in buffering area is sent using the practical transmission rate, enters step b8 later.
Step b8, it is sent used in the video data in buffering area using the practical transmission rate in judgment step b7 Whether the time is more than otherwise to enter step b10 if yes then enter step b9 in the record sampling period.
Step b9, level-one modifying factor is adjusted, and in next record sampling period return to step b1.
In this step b9, the method for adjustment of level-one modifying factor Δ y is:
When the video data volume buffered in buffering area is more than or equal to 0, and it is permitted slow less than video delivery network delay When rushing the 1/8 of data volume, Δ y=-0.15;When the video data volume buffered in buffering area is delayed more than or equal to video delivery network The 1/8 of permitted amount of buffered data, and less than video delivery network be delayed permitted amount of buffered data 2/8 when, Δ y =-0.1;When the video data volume buffered in buffering area is delayed permitted amount of buffered data more than or equal to video delivery network 2/8, and less than the video delivery network be delayed permitted amount of buffered data 3/8 when, Δ y=-0.05;When in buffering area The video data volume of buffering is delayed the 3/8 of permitted amount of buffered data more than or equal to video delivery network, and less than or equal to regarding When keeping pouring in the 5/8 of the permitted amount of buffered data of defeated network delay, Δ y=0;When the video data volume buffered in buffering area is more than Video delivery network is delayed the 5/8 of permitted amount of buffered data, and permitted slow less than or equal to video delivery network delay When rushing the 6/8 of data volume, Δ y=0.05;Permit when the video data volume buffered in buffering area is more than video delivery network delay Perhaps the 6/8 of amount of buffered data, and less than or equal to video delivery network be delayed permitted amount of buffered data 7/8 when, Δ y= 0.1;When the video data volume buffered in buffering area is delayed the 7/8 of permitted amount of buffered data more than video delivery network, and The permitted amount of buffered data that is delayed less than or equal to video delivery network 8/8 when, Δ y=0.15.
Step b10, the remaining time in this record of suspend mode sampling period, and in next record sampling period return to step b1.
After the above process, if level-one modifying factor Δ y is adjusted, it can make within the next record sampling period The determination of the transmission rate pending of step b4 is carried out with new level-one modifying factor Δ y, and then is led within the next record sampling period Subsequent step b5 and step b6 are crossed to determine new practical transmission rate, and then can be in step within the next record sampling period Using the video data in new practical transmission rate transmission buffering area in rapid b7.By being repeated for the above process, with The continuous adjustment of the level-one modifying factor Δ y in the sampling period is recorded each time.
For Second level amendment factor Δ x, main function is the reliability of guarantee system, if level-one modifying factor Δ The adjustment of y ensure that the stable operation of system, the i.e. adjustment of level-one modifying factor Δ y ensure that vedio data is passed in video Smooth transmission in defeated network will not then use Second level amendment factor Δ x, otherwise need using Second level amendment factor Δ x in turn The reliability of guarantee system.
As shown in fig. 7, the embodiment flow for adjusting Second level amendment factor Δ x in the present invention includes the following steps.
Step c1, setting third threshold point P3With the 4th threshold point P4, wherein third threshold point P3For video encoder code check 3/4, the 4th threshold point P4It is the 5/4 of video encoder code check.
Step c2, the video data volume sent to video delivery network in cumulative each videograph sampling period, goes forward side by side Enter step c3.
Step c3, according to the video data sent to video delivery network in added up each videograph sampling period Amount counts 2 seconds to 1 second before current time before current time practical code flows, is denoted as the first practical code flow, unites 1 second practical code flow for arriving current time, is denoted as the second practical code flow before meter current time.
Step c4, when the first practical code flow and the second practical code flow are below the third threshold point:
When the first practical code flow and the second practical code flow are above four threshold point:
Adjustment without the Second level amendment factor in other cases;
Wherein, P3For third threshold point, P4For the 4th threshold point, T is the videograph sampling period, and S records for current video The code flow of the video encoder in sampling period, Δ x are the Second level amendment factor.
Step c5, the Second level amendment factor Δ x obtained in step c4 is sent to formula (1), formula (2) and formula (3), with Network transmission rate for vedio data it is smooth.
As shown in figure 8, regarding when being the smoothing method of the network transmission rate of vedio data not using the present invention Keep pouring in defeated network code check undulating condition schematic diagram;As shown in figure 9, the network for vedio data using the present invention sends speed Video delivery network code check after the smoothing method of rate fluctuates situation schematic diagram.Pass through the comparison of Fig. 8 and Fig. 9, it can be seen that adopt After smoothing method with the network transmission rate of the vedio data of the present invention, brought to the fluctuation of video delivery network code check Greatly improve so that video delivery network code check fluctuation range can remain in a smaller range.Using this The smoothing method of the network transmission rate of the vedio data of invention may make the network transmission rate of vedio data not It disconnectedly is carried out smoothly according to the direction of anticipation, and finally realizes smooth transmission of the vedio data in video delivery network, And then avoid the overshoot of network data, loss of data, the network congestion even possibility of network paralysis.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention With within principle, any modification, equivalent substitution, improvement and etc. done should be included within the scope of protection of the invention god.

Claims (9)

1. a kind of smoothing method of the network transmission rate of vedio data, including held within each videograph sampling period Capable following process:
Within the current video record sampling period, buffering area is written into video code flow;
Calculate the code stream variation of the video encoder in the current video record sampling period;
Obtain video data size in current buffer;
Allow the relationship of delay according to video data size in the current buffer and video delivery network, is regarded described in acquisition The transmission rate pending of frequency evidence;
By the transmission rate pending wave with current video transmission network bandwidth and video code flow in video delivery network respectively Dynamic maximum value is compared, to determine practical transmission rate;
The video data in the buffering area is sent using the practical transmission rate;
Wherein, the relationship of delay is allowed according to video data size in the current buffer and video delivery network, is obtained The transmission rate pending of the video data, including:
First threshold point and second threshold point are set in the buffering area, and wherein first threshold point is less than second threshold point;
When the video data volume buffered in the buffering area is less than first threshold point, obtained using following formula described to be sent Rate:
When the video data volume buffered in the buffering area is between the first threshold point and second threshold point, using such as Lower formula obtains the transmission rate pending:
When the video data volume buffered in the buffering area is more than second threshold point, obtained using following formula described to be sent Rate:
Wherein, V is transmission rate pending, V0To be sent to the final transmission rate of network in the previous videograph sampling period, T is Videograph sampling period, Δ y are level-one modifying factor, and Δ x is the Second level amendment factor, and Δ S is current video record sampling week The code stream of the video encoder of phase changes.
2. the smoothing method of the network transmission rate of vedio data according to claim 1, which is characterized in that described Method further includes:
If sending duration used in the video data in the buffering area more than sampling week using the practical transmission rate Phase, then adjusting video data size in the current buffer allows the relationship of delay with video delivery network, with next It is used in a videograph sampling period.
3. the smoothing method of the network transmission rate of vedio data according to claim 1, which is characterized in that calculate The code stream variation of the video encoder in the current video record sampling period, is carried out using following formula:
Δ S=S-S0
Wherein, S is the code flow for the video encoder that current video records the sampling period, S0For the previous videograph sampling period Video encoder code flow.
4. the smoothing method of the network transmission rate of vedio data according to claim 1, it is characterised in that:It is described Fluctuation maximum value of the video code flow in video delivery network is equal to video image target smooth value and video delivery network code check Product.
5. the smoothing method of the network transmission rate of vedio data according to claim 1, which is characterized in that by institute State fluctuation maximum value of the transmission rate pending respectively with current video transmission network bandwidth and video code flow in video delivery network It is compared, to determine practical transmission rate, including:
The fluctuation of the transmission rate pending, current video transmission network bandwidth, video code flow in video delivery network is maximum Minimum value in value three is determined as practical transmission rate.
6. the smoothing method of the network transmission rate of vedio data according to claim 1, which is characterized in that described First threshold point is that the video delivery network is delayed the 3/8 of permitted amount of buffered data, and the second threshold point is described Video delivery network is delayed the 5/8 of permitted amount of buffered data.
7. the smoothing method of the network transmission rate of vedio data according to claim 1, it is characterised in that:
When the video data volume buffered in the buffering area be more than or equal to 0, and less than the video delivery network delay allowed Amount of buffered data 1/8, the level-one modifying factor Δ y be -0.15;
When the video data volume buffered in the buffering area is more than or equal to the permitted buffer number of video delivery network delay According to the 1/8 of amount, and less than the video delivery network be delayed permitted amount of buffered data 2/8 when, the level-one modifying factor Sub- Δ y is -0.1;
When the video data volume buffered in the buffering area is more than or equal to the permitted buffer number of video delivery network delay According to the 2/8 of amount, and less than the video delivery network be delayed permitted amount of buffered data 3/8 when, the level-one modifying factor Sub- Δ y is -0.05;
When the video data volume buffered in the buffering area is more than or equal to the permitted buffer number of video delivery network delay According to the 3/8 of amount, and less than or equal to the video delivery network be delayed permitted amount of buffered data 5/8 when, the level-one is repaiied Positive divisor Δ y is 0;
When the video data volume buffered in the buffering area is more than the permitted amount of buffered data of video delivery network delay 5/8, and less than or equal to the video delivery network be delayed permitted amount of buffered data 6/8 when, the level-one modifying factor Sub- Δ y is 0.05;
When the video data volume buffered in the buffering area is more than the permitted amount of buffered data of video delivery network delay 6/8 when, and less than or equal to the video delivery network be delayed permitted amount of buffered data 7/8 when, the level-one amendment Factor Δ y is 0.1;
When the video data volume buffered in the buffering area is more than the permitted amount of buffered data of video delivery network delay 7/8 when, and less than or equal to the video delivery network be delayed permitted amount of buffered data 8/8 when, the level-one amendment Factor Δ y is 0.15.
8. the smoothing method of the network transmission rate of vedio data according to claim 1, which is characterized in that described The Second level amendment factor determines by the following method:
According to video encoder code check, third threshold point and the 4th threshold point are set, wherein third threshold point is less than the 4th threshold value Point;
2 seconds to 1 second before current time practical code flows, are denoted as the first practical code flow before statistics current time, 1 second practical code flow for arriving current time, is denoted as the second practical code flow before statistics current time;
When the first practical code flow and the second practical code flow are below the third threshold point:
When the first practical code flow and the second practical code flow are above four threshold point:
Wherein, P3For third threshold point, P4For the 4th threshold point, T is the videograph sampling period, and S is current video record sampling The code flow of the video encoder in period, Δ x are the Second level amendment factor.
9. the smoothing method of the network transmission rate of vedio data according to claim 8, it is characterised in that:It is described Third threshold point is the 3/4 of the video encoder code check, and the 4th threshold point is the 5/4 of the video encoder code check, i.e.,
Wherein, P0For the video encoder code check.
CN201410253012.5A 2014-06-09 2014-06-09 The smoothing method of the network transmission rate of vedio data Active CN105338422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410253012.5A CN105338422B (en) 2014-06-09 2014-06-09 The smoothing method of the network transmission rate of vedio data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410253012.5A CN105338422B (en) 2014-06-09 2014-06-09 The smoothing method of the network transmission rate of vedio data

Publications (2)

Publication Number Publication Date
CN105338422A CN105338422A (en) 2016-02-17
CN105338422B true CN105338422B (en) 2018-11-13

Family

ID=55288644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410253012.5A Active CN105338422B (en) 2014-06-09 2014-06-09 The smoothing method of the network transmission rate of vedio data

Country Status (1)

Country Link
CN (1) CN105338422B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111083430B (en) * 2018-10-18 2021-04-23 杭州海康威视系统技术有限公司 Image acquisition method and device, electronic equipment and storage medium
WO2020133465A1 (en) 2018-12-29 2020-07-02 Zhejiang Dahua Technology Co., Ltd. Systems and methods for multi-video stream transmission
CN113099488B (en) * 2019-12-23 2024-04-09 中国移动通信集团陕西有限公司 Method, device, computing equipment and computer storage medium for solving network congestion
CN113573062B (en) * 2020-04-29 2023-12-29 华为技术有限公司 Traffic shaping method and device and electronic equipment
CN111954007B (en) * 2020-07-14 2022-03-25 烽火通信科技股份有限公司 VBR video rapid smooth sending method and device in UDP live broadcast
WO2023087177A1 (en) * 2021-11-17 2023-05-25 Intel Corporation Method and system of video coding with fast low-latency bitstream size control

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075957A (en) * 2007-06-26 2007-11-21 上海大学 Method for controlling AVS fluid-medium transmission
CN101123606A (en) * 2007-07-13 2008-02-13 上海广电(集团)有限公司中央研究院 AVS transmission control method based on real time transmission protocol or real time control protocol
CN101296184A (en) * 2008-05-30 2008-10-29 华为技术有限公司 Method, system and device for data transmission
CN102325274A (en) * 2011-10-13 2012-01-18 浙江万里学院 A kind of video flowing transfer control method of network bandwidth adaptive

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7016409B2 (en) * 2003-11-12 2006-03-21 Sony Corporation Apparatus and method for use in providing dynamic bit rate encoding
EP2383999A1 (en) * 2010-04-29 2011-11-02 Irdeto B.V. Controlling an adaptive streaming of digital content

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101075957A (en) * 2007-06-26 2007-11-21 上海大学 Method for controlling AVS fluid-medium transmission
CN101123606A (en) * 2007-07-13 2008-02-13 上海广电(集团)有限公司中央研究院 AVS transmission control method based on real time transmission protocol or real time control protocol
CN101296184A (en) * 2008-05-30 2008-10-29 华为技术有限公司 Method, system and device for data transmission
CN102325274A (en) * 2011-10-13 2012-01-18 浙江万里学院 A kind of video flowing transfer control method of network bandwidth adaptive

Also Published As

Publication number Publication date
CN105338422A (en) 2016-02-17

Similar Documents

Publication Publication Date Title
CN105338422B (en) The smoothing method of the network transmission rate of vedio data
CN104519325B (en) A kind of adaptive support method of wireless video monitoring system based on 4G network
US11159834B2 (en) Managing congestion response during content delivery
CN102246531B (en) Multiplexed video streaming
CN109743600B (en) Wearable field operation and maintenance self-adaptive video streaming transmission rate control method
CN108347645B (en) Method and device for decoding and displaying video frame
US11711553B2 (en) Transmission parameter control for segment delivery
CN103004190A (en) Video streaming
CN106993190B (en) Software-hardware synergism coding method and system
WO2021097865A1 (en) Adaptive code rate adjustment method for multi-user interactive live broadcast
CN106412721A (en) Estimated processor load
US9313243B2 (en) Video streaming over data networks
CN102724502B (en) The control method of code check and device in a kind of Video coding
EP2656560B1 (en) A method for delivering video content encoded at one or more quality levels over a data network
WO2024120214A1 (en) Coding control method and apparatus, and device, storage medium and product
CN102724507B (en) GPU (graphic processing unit) accelerating encoder rate control method
Tan et al. A frame rate optimization framework for improving continuity in video streaming
JP3055153B2 (en) Variable rate video coding control method
CN102685482A (en) Hybrid coding and decoding method and device
CN101568025A (en) Self-adaptive controlling method for a virtual buffering region in code rate control
CN202261655U (en) Adaptive coding and transmission system of multi-channel video at limited bandwidth
CN105306970A (en) Method and device for controlling stream media live broadcast transmitting speed
CN101360229B (en) Smoothing method and device for image code stream
CN109729354A (en) A kind of frame level bit-rate distribution method
Karimi et al. Vidaptive: Efficient and Responsive Rate Control for Real-Time Video on Variable Networks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant