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 currentTransmission 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 periodThe 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 instituteState 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 networkFluctuation 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 rateThe sampling period, then adjusting video data size in the current buffer allows the pass of delay with video delivery networkSystem, 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 asLower 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 videoThe 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 networkSystem, 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 thresholdPoint;
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 formulaTransmission rate:
When the video data volume buffered in the buffering area is between the first threshold point and second threshold point, adoptThe 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 formulaTransmission rate:
Wherein, V is transmission rate pending, V0To be sent to the final transmission speed of network in the previous videograph sampling periodRate, 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 valueWith 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 videoFluctuation 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 networkMinimum 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, instituteIt 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 networkIt 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 delayRush 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 repaiiedPositive 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 delayRush 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 repaiiedPositive 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 delayRush 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 oneGrade 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 delayAccording 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 repaiiedPositive 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 delayAccording 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-oneModifying 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 delayAccording 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-oneModifying 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 4thThreshold point;
2 seconds to 1 second before current time practical code flows, are denoted as the first practical code stream before statistics current timeAmount 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 videoThe 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 videoThe 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 alwaysIt holds in a smaller range.The smoothing method of the network transmission rate of vedio data using the present invention, may makeThe network transmission rate of vedio data constantly carries out smoothly according to the direction of anticipation, and finally realizes vedio dataSmooth transmission in video delivery network, and then avoid overshoot, loss of data, the network congestion even net of network dataThe possibility of network paralysis.Compared with prior art, method of the invention only used single buffer, and the space for reducing buffering area accounts forWith;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 reachThe purpose smooth to network;It ensure that the reliability of system operation by two modifying factor dynamic adjustment hair flow velocity rates.
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 stepSuddenly.
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 realizationProcess, video encoder has the process that buffering area is written in video code flow for this field by write pointer, no longer superfluous hereinIt states.
The videograph sampling period is used for adjusting the period of the network transmission rate of vedio data, finenessThere is important influence to the smooth effect of the network transmission rate of vedio data, it can if the videograph sampling period is too smallIt 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 simultaneouslyThe time factor that sequence code executes.As a specific embodiment, (tune of the operating system to thread under Linux systemIt is 10ms to spend the period), the smooth effect desired value of the network transmission rate of vedio data is 10%, determines videograph samplingPeriod 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 flatWhen sliding effect desired value changes, videograph sampling period needs are adjusted.Under normal circumstances, smooth effect desired value is got overSmall, 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 formulaVariation:
Δ 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 videoThe 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 videoThe 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 withIt 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 throughIt 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 figureTime difference as seeing image to terminal, in the present invention, delay time refers exclusively to the delay of video delivery network permission.When delayBetween 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 areaThe defeated permitted amount of buffered data of network delay is 1Mbps × 40/1000S=40K, and video delivery network delay is permittedAmount 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, targetSmooth 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 mostBig permissible value.
It is buffered in smoothing process and act as increasing when video encoder output moment, first video data can be put intoBuffering area buffers, and when the data of video encoder output reduce, the data that can be buffered before buffering area are fedUnder, 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 slowRush 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 supplyThe reduction of video encoder data output.Therefore, as a specific embodiment, the first threshold point is the transmission of videoThe 3/8 of the permitted amount of buffered data of network delay, the second threshold point are that video delivery network delay is permittedThe 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 methodRate.
When the video data volume buffered in the buffering area is less than first threshold point P1When, described in the acquisition of following formulaTransmission rate pending:
When the video data volume buffered in the buffering area is located at the first threshold point P1With second threshold point P2BetweenWhen, 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 formulaTransmission rate pending:
Wherein, V is transmission rate pending, V0To be sent to the final transmission speed of network in the previous videograph sampling periodRate, 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 threeThree 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 videoFluctuation 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 withThe product of video delivery network code check.For example, if video image target smooth value is set to 10%, video delivery network code check1Mbps, then fluctuation maximum value of the video code flow in video delivery network is 1Mbps × 10%=1.1Mbps, i.e. video code flowFluctuation 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 regardingThe minimum value in fluctuation maximum value three in frequency transmission network is determined as practical transmission rate.The even described transmission rate pending isIt is minimum in the three, then transmission rate pending is determined as practical transmission rate, if current video transmission network bandwidth be this threeIt 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 netFluctuation maximum value in network is minimum in the three, then the fluctuation maximum value by video code flow in video delivery network determinesFor practical transmission rate.Concrete implementation flow can first by transmission rate pending, current video transmission network bandwidth be compared withIt determines a smaller value, then the smaller value is compared with fluctuation maximum value of the video code flow in video delivery networkUsing 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 rateFrequency 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 thanThe sampling period, then adjusting video data size in the current buffer allows the pass of delay with video delivery networkSystem, 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 adjustsLevel-one modifying factor Δ y in whole formula (1), formula (2) and formula (3), as a specific embodiment, the value model of Δ yEnclose 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 instituteThe 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 delayRush 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 repaiiedPositive 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 delayRush 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 repaiiedPositive 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 delayRush 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 oneGrade 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 delayAccording 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 repaiiedPositive 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 delayAccording 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 repaiiedPositive 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 delayAccording 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 repaiiedPositive 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 setLess 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 valuePoint 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 oneBody 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 volumeThe 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 encoderCode 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 4thThreshold 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 firstPractical 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 as2 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 secondVideo 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 itFirst 1 second practical code flow is then to be sampled to 16 in before current time 1 second for 2 seconds before counting current timeThe size of video data transmitted by period simultaneously adds up, and then determines before current time 2 seconds to before current time 1Practical code flow in second.Similarly, count current time before 1 second arrive current time practical code flow, be will be byThe 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 secondNext timing statistics point when, can be directly using the second of current time the practical code flow as the of next timing statistics pointOne 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 pointComparison, 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 executedRapid a4 executes step a5 when the first practical code flow and the second practical code flow are above four threshold point, and at itAdjustment 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 asLower 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 videoThe 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 asLower 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 videoThe 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 includesEach step below.
Step b1, within the record sampling period, video code flow is updated into buffering area by write pointer, is entered step laterb2。
In this step b1, video encoder is updated video code flow into buffering area by write pointer, is existed by write pointerThe 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 laterb3。
The code stream variation of video encoder in this step b2 refers to that video encoder exports in former and later two sampling periodsThe 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 videoThe 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 pointerSize 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 videoThe 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 withIt 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 throughIt 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 networkSystem, 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 haveBody 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 formulaTransmission rate pending:
When the video data volume buffered in the buffering area is located at the first threshold point P1With second threshold point P2BetweenWhen, 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 formulaTransmission rate pending:
Wherein, V is transmission rate pending, V0To be sent to the final transmission speed of network in the previous videograph sampling periodRate, 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 sentRate is less than the current bandwidth detected, then transmission rate pending is brought into step b6, otherwise by current video transmission network bandwidthBring 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 networkCompared 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 networkValue is determined as practical transmission rate, and otherwise the fluctuation maximum value by video code flow in video delivery network is determined as practical transmissionRate 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 b7Whether 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 delayWhen 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 networkThe 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 network2/8, and less than the video delivery network be delayed permitted amount of buffered data 3/8 when, Δ y=-0.05;When in buffering areaThe 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 regardingWhen 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 thanVideo delivery network is delayed the 5/8 of permitted amount of buffered data, and permitted slow less than or equal to video delivery network delayWhen 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 delayPerhaps 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, andThe 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 periodThe 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 periodSubsequent step b5 and step b6 are crossed to determine new practical transmission rate, and then can be in step within the next record sampling periodUsing the video data in new practical transmission rate transmission buffering area in rapid b7.By being repeated for the above process, withThe 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 videoSmooth transmission in defeated network will not then use Second level amendment factor Δ x, otherwise need using Second level amendment factor Δ x in turnThe 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 check3/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 sideEnter step c3.
Step c3, according to the video data sent to video delivery network in added up each videograph sampling periodAmount counts 2 seconds to 1 second before current time before current time practical code flows, is denoted as the first practical code flow, unites1 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 videoThe 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), withNetwork 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 inventionKeep 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 speedVideo 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 adoptAfter smoothing method with the network transmission rate of the vedio data of the present invention, brought to the fluctuation of video delivery network code checkGreatly improve so that video delivery network code check fluctuation range can remain in a smaller range.Using thisThe smoothing method of the network transmission rate of the vedio data of invention may make the network transmission rate of vedio data notIt 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 inventionWith within principle, any modification, equivalent substitution, improvement and etc. done should be included within the scope of protection of the invention god.