CN107529097A - A kind of method and device of adaptive regulating video buffer size - Google Patents

A kind of method and device of adaptive regulating video buffer size Download PDF

Info

Publication number
CN107529097A
CN107529097A CN201610444826.6A CN201610444826A CN107529097A CN 107529097 A CN107529097 A CN 107529097A CN 201610444826 A CN201610444826 A CN 201610444826A CN 107529097 A CN107529097 A CN 107529097A
Authority
CN
China
Prior art keywords
frame
buffer
current
network
size
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610444826.6A
Other languages
Chinese (zh)
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.)
BEIJING XINYOUDA VIDEO TECHNOLOGY Co Ltd
Beijing Xinwei Telecom Technology Inc
Original Assignee
BEIJING XINYOUDA VIDEO TECHNOLOGY Co Ltd
Beijing Xinwei Telecom Technology Inc
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 BEIJING XINYOUDA VIDEO TECHNOLOGY Co Ltd, Beijing Xinwei Telecom Technology Inc filed Critical BEIJING XINYOUDA VIDEO TECHNOLOGY Co Ltd
Priority to CN201610444826.6A priority Critical patent/CN107529097A/en
Publication of CN107529097A publication Critical patent/CN107529097A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64723Monitoring of network processes or resources, e.g. monitoring of network load
    • H04N21/6473Monitoring network processes errors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64746Control signals issued by the network directed to the server or the client
    • H04N21/64761Control signals issued by the network directed to the server or the client directed to the server
    • H04N21/64769Control signals issued by the network directed to the server or the client directed to the server for rate control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/85Assembly of content; Generation of multimedia applications
    • H04N21/854Content authoring
    • H04N21/8547Content authoring involving timestamps for synchronizing content

Abstract

The embodiment of the invention discloses a kind of method and device of adaptive regulating video buffer size, obtain the data message of video data bag, and according to the data message calculating network situation, the data message includes reception time difference and the time tolerance of adjacent two interframe;The size of buffering area is calculated according to the network condition, by counting the arrival time of video data bag come sensing network change conditions, the size of buffering area is adjusted according to network condition dynamic, unnecessary cache-time is avoided as far as possible so that transmission of video is preferably balanced between real-time and fluency, i.e., on the premise of fluency is ensured, in the good situation of network state, using relatively small time delay, and in the case of network state difference, then using relatively large time delay.

Description

A kind of method and device of adaptive regulating video buffer size
Technical field
The present embodiments relate to the technical field of communication, more particularly to a kind of side of adaptive regulating video buffer size Method and device.
Background technology
Change of the real-time video traffic to network environment in wireless network is very sensitive, it is thus typically necessary to receive Rational cache management strategy is taken at end, to alleviate network fluctuation influence to caused by user watches video.
Traditional stream media system caches the media data received using the buffering area of a regular length.Matchmaker is flowed playing During body, the media data received is first put into buffering area, matchmaker is commenced play out after the data volume in buffering area reaches certain threshold value Body.If channel condition is deteriorated, buffering area then suspends media play, pending buffer area data volume, which reaches, specifies there occurs underflow The follow-up continued broadcasting of threshold value put.The method of this data buffer storage can effectively reduce client because packet loss, packet delay, shake etc. Caused interruption.Obvious, if the data that caching is more, it is possible to reduce play the possibility of interruption, but commencing play out The preceding stand-by period also can be longer, and more time delays can be then introduced for real-time streaming transport, it is difficult to ensure that transmission of video is real-time Property.And for the high application of the requirement of real-time such as video conference, video monitoring, it can use and not cached directly after receiving video The low delay method of broadcasting, it using the method for buffered video frame, can also exchange the fluency of video for certain time delay.
But the video frame number in conventional methods where, initially cached is a fixed value, such as network state very well and network bar In the case of very poor two kinds of part, the frame of fixed qty is cached, it is impossible to according to the adaptively selected initial caching frame number of network condition. In playing process, will not dynamically adjust the size of buffering area, only by frame of video from one end be stored in buffering area, the other end according to Timestamp information is read, and because deposit reads the inconsistent of data rate, easily causes buffering area to change larger, buffer area occurs The phenomenon of overflow or underflow, cause the not smooth of video playback.
Conventional method can not estimate network condition, can not provide the theory to initial caching frame number, dynamic adjusting method etc. Calculate and selection gist, adjustment can be caused not in time, do not reach video real-time and purpose that fluency is balanced.
The content of the invention
The purpose of the embodiment of the present invention is to propose a kind of method and device of adaptive regulating video buffer size, it is intended to Solves the problems, such as the size that buffering area how is adjusted according to network condition dynamic.
To use following technical scheme up to this purpose, the embodiment of the present invention:
In a first aspect, a kind of method of adaptive regulating video buffer size, methods described include:
The data message of video data bag is obtained, and according to the data message calculating network situation, the data message Reception time difference and time tolerance including adjacent two interframe;
The size of buffering area is calculated according to the network condition.
Preferably, it is described according to the data message calculating network situation, including:
According to the net for receiving time difference and time tolerance acquisition adjacent two interframe of adjacent two interframe Network changing value;
Desired value and mean square deviation are calculated according to the network change value, the desired value is used for the state for representing the network Whether normal, the mean square deviation is used for the fluctuation situation for representing the network.
Preferably, the size that buffering area is calculated according to the network condition, including:
The frame number n cached according to the needs under the desired value and mean square deviation calculating current network conditions.
Preferably, after the size that buffering area is calculated according to the network condition, in addition to:
Count the frame number n in current buffercurrent_buffer_frame
If n>ncurrent_buffer_frame, then present frame is stored in the buffering area, and return to execution and obtain video data bag Data message, and according to the step of the data message calculating network situation;
If ncurrent_buffer_frame>=n, then recording the frame number that the needs under the current network conditions cache is ncurrent_buffer_frame, while the other end of the current buffer starts temporally to stab interval reading video data.
Preferably, after the size that buffering area is calculated according to the network condition, in addition to:
If the size of current buffer is more than default first threshold, two frames for adjusting the video data bag play speed Rate is first rate;
If the size of the current buffer is less than default Second Threshold, two frames for adjusting the video data bag are broadcast It is the second speed to put speed;
If the size of the current buffer is more than the Second Threshold and is less than the first threshold, regarded described in adjustment Frequency packet stabs interval according to normal time and played.
Preferably, after the size that buffering area is calculated according to the network condition, in addition to:
Work as ncurrent_buffer_frame>Nmax_buffer1_frameWhen, if being configured to " low delay " pattern, do not enable standby slow Area is rushed, if being configured to " adaptive " pattern, enables stand-by buffer area;
Wherein, Nmax_buffer 1_frameFor the largest buffered frame number of main buffering region, " low delay " pattern is that buffering area is small Pattern, " adaptive " pattern is the big pattern of buffering area.
Second aspect, a kind of device of adaptive regulating video buffer size, described device include:
Acquisition module, for obtaining the data message of video data bag;
First computing module, for including adjacent two according to the data message calculating network situation, the data message The reception time difference of interframe and time tolerance;
Second computing module, for calculating the size of buffering area according to the network condition.
Preferably, first computing module, is used for:
According to the net for receiving time difference and time tolerance acquisition adjacent two interframe of adjacent two interframe Network changing value;
Desired value and mean square deviation are calculated according to the network change value, the desired value is used for the state for representing the network Whether normal, the mean square deviation is used for the fluctuation situation for representing the network.
Preferably, second computing module, is used for:
The frame number n cached according to the needs under the desired value and mean square deviation calculating current network conditions.
Preferably, described device also includes:
Statistical module, for counting the frame number n in current buffercurrent_buffer_frame
Module is returned to, if for n>ncurrent_buffer_frame, then present frame is stored in the buffering area, and return and perform institute State acquisition module;
Logging modle, if for ncurrent_buffer_frame>=n, then record what the needs under the current network conditions cached Frame number is ncurrent_buffer_frame, while the other end of the current buffer starts temporally to stab interval reading video data.
Preferably, described device also includes:
First adjusting module, if the size for current buffer is more than default first threshold, adjust the video Two frame playback rates of packet are first rate;
Second adjusting module, if the size for the current buffer is less than default Second Threshold, described in adjustment Two frame playback rates of video data bag are the second speed;
3rd adjusting module, if the size for the current buffer is more than the Second Threshold and less than described first Threshold value, then adjust the video data bag and stab interval broadcasting according to normal time.
Preferably, described device also includes:
Processing module, for working as ncurrent_buffer_frame>Nmax_buffer1_frameWhen, if being configured to " low delay " pattern, Stand-by buffer area is not enabled, if being configured to " adaptive " pattern, enables stand-by buffer area;
Wherein, Nmax_buffer1_frameFor the largest buffered frame number of main buffering region, " low delay " pattern is that buffering area is small Pattern, " adaptive " pattern is the big pattern of buffering area.
The embodiment of the present invention provides a kind of method and device of adaptive regulating video buffer size, obtains video data bag Data message, and according to the data message calculating network situation, when the data message includes the reception of adjacent two interframe Between difference and time tolerance;The size of buffering area is calculated according to the network condition, during by the arrival that counts video data bag Between carry out sensing network change conditions, according to network condition dynamic adjust buffering area size, when avoiding unnecessary caching as far as possible Between so that transmission of video is preferably balanced between real-time and fluency, i.e., on the premise of fluency is ensured, in net During the good situation of network state, using relatively small time delay, and in the case of network state difference, then using relatively large time delay.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of the method for adaptive regulating video buffer size provided in an embodiment of the present invention;
Fig. 2 is the flow signal of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Figure;
Fig. 3 is the flow signal of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Figure;
Fig. 4 is the flow signal of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Figure;
Fig. 5 is the flow signal of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Figure;
Fig. 6 is the flow signal of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Figure;
Fig. 7 is the flow signal of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Figure;
Fig. 8 is a kind of functional module signal of the device of adaptive regulating video buffer size provided in an embodiment of the present invention Figure.
Embodiment
The embodiment of the present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this The specific embodiment of place description is used only for explaining the embodiment of the present invention, rather than the restriction to the embodiment of the present invention.In addition also It should be noted that for the ease of describing, the part related to the embodiment of the present invention rather than entire infrastructure are illustrate only in accompanying drawing.
With reference to figure 1, Fig. 1 is a kind of flow of the method for adaptive regulating video buffer size provided in an embodiment of the present invention Schematic diagram.
As shown in figure 1, the method for the adaptive regulating video buffer size includes:
Step 101, the data message of video data bag is obtained, and according to the data message calculating network situation, it is described Data message includes reception time difference and the time tolerance of adjacent two interframe;
Specifically, receiving terminal receives each video data bag, record RTP has parsed the local zone time per frame video data, Reception time TR as the framei, unit is millisecond.The frame time stamp TS contained in RTP packet header is recorded simultaneouslyi, unit is milli Second.
Calculate the reception time difference Δ TR of adjacent two interframei=TRi-TRi-1, (i >=1), and the time tolerance of two frame ΔTSi=TSi-TSi-1, (i >=1), the network change X of finally estimation reception two interframei=Δ Ti=Δ TRi-ΔTSi,(i≥ 1), Xi>The 0 actual time difference that receives of sign two frame is more than time tolerance, and network condition is poor;Xi<0 sign network has change Good trend.
Step 102, the size of buffering area is calculated according to the network condition.
Preferably, it is described according to the data message calculating network situation, including:
According to the net for receiving time difference and time tolerance acquisition adjacent two interframe of adjacent two interframe Network changing value;
Desired value and mean square deviation are calculated according to the network change value, the desired value is used for the state for representing the network Whether normal, the mean square deviation is used for the fluctuation situation for representing the network.
Specifically, calculate XiExpectation:EX=0 under network normal condition.
Calculate XiMean square deviation:For characterizing the fluctuation situation of network, if σ levels off to 0 It is relatively stable to characterize network, situation is preferable.
Preferably, the size that buffering area is calculated according to the network condition, including:
The frame number n cached according to the needs under the desired value and mean square deviation calculating current network conditions.
Specifically, the establishment of buffering area:Selected to create the number of buffering area, main buffering region buffer1 according to configuration mode Or stand-by buffer area buffer2, decided whether according to configuration mode to enable stand-by buffer area in the case of using up in main buffering region, To tackle extreme case as far as possible.
The calculating of initial deposit main buffering region video frame number:
When receiving terminal parses first frame of video, buffering area is put into, remembers frame number i=0, while count in current buffer Frame number ncurrent_buffer_frame
When receiving next frame, the frame number for needing to cache under current network conditions is calculated: Wherein A, B, C are constant, according to the delay situation of heterogeneous networks, can be adjusted;F is current frame per second, and i is frame number, It is the symbol to round up.If n>ncurrent_buffer_frame, then the frame is stored in buffering area.A frame is often received, continues to change In generation, calculates, until ncurrent_buffer_frame>=n, record the frame number n of now buffering areacurrent_buffer_frame, simultaneous buffering area The other end starts temporally to stab interval reading video data.
The embodiment of the present invention provides a kind of method of adaptive regulating video buffer size, obtains the data of video data bag Information, and according to the data message calculating network situation, the data message include reception time difference of adjacent two interframe with Time tolerance;The size of buffering area is calculated according to the network condition, is felt by counting the arrival time of video data bag Hownet network change conditions, the size of buffering area is adjusted according to network condition dynamic, avoids unnecessary cache-time as far as possible so that Transmission of video is preferably balanced between real-time and fluency, i.e., on the premise of fluency is ensured, in network state During situation about getting well, using relatively small time delay, and in the case of network state difference, then using relatively large time delay.
With reference to figure 2, Fig. 2 is the stream of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Journey schematic diagram.
As shown in Fig. 2 the method for the adaptive regulating video buffer size includes:
Step 201, the data message of video data bag is obtained, and according to the data message calculating network situation, it is described Data message includes reception time difference and the time tolerance of adjacent two interframe;
Step 202, the size of buffering area is calculated according to the network condition;
Step 203, the frame number n in current buffer is countedcurrent_buffer_frame
Step 204, if n>ncurrent_buffer_frame, then present frame is stored in the buffering area, and return to execution acquisition and regard The data message of frequency packet, and according to the step of the data message calculating network situation;
Step 205, if ncurrent_buffer_frame>=n, then record the frame number that the needs under the current network conditions cache For ncurrent_buffer_frame, while the other end of the current buffer starts temporally to stab interval reading video data.
With reference to figure 3, Fig. 3 is the stream of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Journey schematic diagram.
As shown in figure 3, the method for the adaptive regulating video buffer size includes:
Step 301, the data message of video data bag is obtained, and according to the data message calculating network situation, it is described Data message includes reception time difference and the time tolerance of adjacent two interframe;
Step 302, the size of buffering area is calculated according to the network condition;
Step 303, if the size of current buffer is more than default first threshold, the two of the video data bag is adjusted Frame playback rate is first rate;
Step 304, if the size of the current buffer is less than default Second Threshold, the video data bag is adjusted Two frame playback rates be the second speed;
Step 305, if the size of the current buffer is more than the Second Threshold and is less than the first threshold, adjust The whole video data bag is stabbed interval according to normal time and played.
Specifically, calculate the threshold value of buffering area dynamic adjustment:By the slow play of small particle size and come in increase respectively soon and Reduce buffering area, based on experience value, when the visual characteristic of human eye is in 25% reproduction time interval, speed will not be felt Change, so from buffering area read data time interval scope be:Unit is millisecond, and F is frame per second.
WhenTwo frame playing intervals are adjusted to
WhenTwo frame playing intervals are adjusted to
WhenWhen, by it is normal when Between stamp interval play.
The size of buffering area is adjusted by the slow play or dynamic of coming in soon of small particle size, when propagation delay time is smaller, adjusted Minibuffer area so that the frame of video of buffering can play as early as possible, ensure the real-time of transmission of video as far as possible;When being delayed larger, energy Buffering area is enough tuned up, prevents buffer underflow from causing video hiccups.
With reference to figure 4, Fig. 4 is the stream of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Journey schematic diagram.
As shown in figure 4, the method for the adaptive regulating video buffer size includes:
Step 401, the data message of video data bag is obtained, and according to the data message calculating network situation, it is described Data message includes reception time difference and the time tolerance of adjacent two interframe;
Step 402, the size of buffering area is calculated according to the network condition;
Step 403, n is worked ascurrent_buffer_frame>Nmax_buffer1_frameWhen, if being configured to " low delay " pattern, do not open With stand-by buffer area, if being configured to " adaptive " pattern, stand-by buffer area is enabled;
Wherein, Nmax_buffer1_frameFor the largest buffered frame number of main buffering region, " low delay " pattern is that buffering area is small Pattern, " adaptive " pattern is the big pattern of buffering area.
With reference to figure 5, Fig. 5 is the stream of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Journey schematic diagram.
As shown in figure 5, the method for the adaptive regulating video buffer size includes:
It is smooth by adaptively adjusting reception buffering area progress I frames under wireless network
So that communication equipment A carries out real-time video transmission to communication equipment B as an example, this method is carried out at receiving device B Processing, detailed process are:
Step 501, communication equipment A carries out RTP packings to the code stream after capturing and coding and sent, frame where each bag carries Timestamp information.
Step 502, communication equipment B is received, and after RTP is parsed, every frame of reception is put into buffering area, record RTP has parsed the local zone time per frame video data, the reception time TR as the framei, unit is millisecond.Record RTP simultaneously The frame time stamp information TS contained in packet headeri, unit is millisecond.
Step 503, the reception time difference Δ TR of adjacent two interframe is calculatedi=TRi-TRi-1, the time of (i >=1) and two frame Stab difference DELTA TSi=TSi-TSi-1, (i >=1), the network change X of finally estimation reception two interframei=Δ Ti=Δ TRi-Δ TSi, (i >=1), Xi>The 0 actual time difference that receives of sign two frame is more than time tolerance, and network condition is poor;Xi<0 characterizes Network has the trend to improve.
Step 504, X is calculatediExpectation:EX=0 under network normal condition.Calculated again to reduce Miscellaneous degree, it is frame per second typically to take N=F, F.
Calculate XiMean square deviation:For characterizing the fluctuation situation of network, if σ levels off to 0 It is relatively stable to characterize network, situation is preferable.
The calculating of initial deposit buffering area video frame number:
When receiving terminal parses first frame of video, buffering area is put into, remembers frame number i=0, while count in current buffer Frame number ncurrent_buffer_frame;When receiving next frame, the frame number for needing to cache under current network conditions is calculated:F is frame per second, and i is frame number.If n>ncurrent_buffer_frame, the frame is stored in Buffering area, and adjust the frame number n in current buffercurrent_buffer_frameAdd 1.A frame is often received, is iterated calculating successively, Until ncurrent_buffer_frame>=n, record the frame number n of now buffering areacurrent_buffer_frame, the other end in simultaneous buffering area Start temporally stamp interval and carry out read operation.
Step 505, the threshold value of buffering area dynamic adjustment is calculated:
Following unit of account is millisecond, and F is frame per second.
WhenTwo frame playing intervals are adjusted to
WhenTwo frame playing intervals are adjusted to
WhenWhen, by normal Interval of timestamps plays.
Step 506, when network is deteriorated suddenly, when there is buffer underflow, deposit buffering area is recalculated by step 505 Number of video frames.
Step 507, by the size of dynamic regulation buffering area, can smooth I frames propagation delay time change, and can expire Caching is increased when sufficient time delay is big to prevent buffer underflow as far as possible, when time delay is small, caching is reduced, to ensure the frame It can play faster.
With reference to figure 6, Fig. 6 is the stream of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Journey schematic diagram.
As shown in fig. 6, the method for the adaptive regulating video buffer size includes:
In unstable wireless network environment, the method that buffering area is received by adaptively adjusting carries out real-time video Smooth playing.
So that communication equipment A carries out real-time video transmission by wireless network to communication equipment B as an example, A can be terminal, Can be video server etc., B is terminal device.This method is handled at receiving device B, and detailed process is:
Step 601, communication equipment A carries out RTP packings to the video code flow after capturing and coding and sent, and each bag carries institute In the timestamp information of frame.
Step 602, communication equipment B is received, and after RTP is parsed, every frame of reception is put into buffering area, record RTP has parsed the local zone time per frame video data, the reception time TR as this framei, unit is millisecond.Record RTP simultaneously The frame time stamp information TS contained in packet headeri, unit is millisecond.
Step 603, X is calculatediExpectation:And mean square deviation:
In unstable wireless environment, be generally configured to " adaptive " pattern, create two buffering areas, main buffering region and Stand-by buffer area, stand-by buffer area enable under certain condition, for tackling fluctuation big under wireless environment, reduce on buffering area Excessive probability.
Step 604, the initially calculating of deposit buffering area video frame number:
When receiving terminal parses first frame of video, buffering area is put into, remembers frame number i=0, while count in current buffer Frame number ncurrent_buffer_frame;When receiving next frame, the frame number for needing to cache under current network conditions is calculated:F is frame per second, and i is frame number.If n>ncurrent_buffer_frame, the frame is stored in Buffering area, and adjust the frame number n in current buffercurrent_buffer_frameAdd 1.A frame is often received, is iterated calculating successively, Until ncurrent_buffer_frame>=n, record the frame number n of now buffering areacurrent_buffer_frame, the other end in simultaneous buffering area Start temporally stamp interval and carry out read operation.
Step 605, the threshold value of buffering area dynamic adjustment is calculated:
Following unit of account is millisecond, and F is frame per second.
WhenTwo frame playing intervals are adjusted to
WhenTwo frame playing intervals are adjusted to
WhenWhen, by normal Interval of timestamps plays.
Step 606, when network is deteriorated suddenly, when there is buffer underflow, deposit buffering area is recalculated by step 605 Number of video frames.
Step 607, stand-by buffer area enables:If the largest buffered frame number of main buffering region is Nmax_buffer1_frame, when ncurrent_buffer_frame>Nmax_buffer1_frameWhen, stand-by buffer area is enabled, prevents from causing video counts because main buffering region is full The problems such as according to losing.
With reference to figure 7, Fig. 7 is the stream of the method for another adaptive regulating video buffer size provided in an embodiment of the present invention Journey schematic diagram.
As shown in fig. 7, the method for the adaptive regulating video buffer size includes:
Step 701, receiving terminal receives data and carries out RTP Packet analyzings;
Step 702, reception time and timestamp information of the statistics per frame, calculating two frames reception time and time tolerance Change;
Step 703, expectation and the variance of change are calculated;
Step 704, the frame number for meeting initial deposit buffering area is judged whether;
Step 705, if judging the frame number for not meeting initial deposit buffering area, the frame of video of initial deposit buffering area is calculated Number;
Step 706, if judging the frame number for meeting initial deposit buffering area, the threshold value of buffering area adjustment is calculated;
Step 707, dynamic adjustment buffering area;
Step 708, judge whether main buffering region is full;
Step 709, if so, then enabling stand-by buffer area;
Step 710, if it is not, then temporally stamp interval reads video data from buffering area.
With reference to figure 8, Fig. 8 is a kind of function of the device of adaptive regulating video buffer size provided in an embodiment of the present invention Module diagram.
As shown in figure 8, a kind of device of adaptive regulating video buffer size, described device include:
Acquisition module 801, for obtaining the data message of video data bag;
First computing module 802, for including adjacent according to the data message calculating network situation, the data message The reception time difference of two interframe and time tolerance;
Second computing module 803, for calculating the size of buffering area according to the network condition.
Preferably, first computing module 802, is used for:
According to the net for receiving time difference and time tolerance acquisition adjacent two interframe of adjacent two interframe Network changing value;
Desired value and mean square deviation are calculated according to the network change value, the desired value is used for the state for representing the network Whether normal, the mean square deviation is used for the fluctuation situation for representing the network.
Preferably, second computing module 803, is used for:
The frame number n cached according to the needs under the desired value and mean square deviation calculating current network conditions.
Preferably, described device also includes:
Statistical module, for counting the frame number n in current buffercurrent_buffer_frame
Module is returned to, if for n>ncurrent_buffer_frame, then present frame is stored in the buffering area, and return and perform institute State acquisition module;
Logging modle, if for ncurrent_buffer_frame>=n, then record what the needs under the current network conditions cached Frame number is ncurrent_buffer_frame, while the other end of the current buffer starts temporally to stab interval reading video data.
Preferably, described device also includes:
First adjusting module, if the size for current buffer is more than default first threshold, adjust the video Two frame playback rates of packet are first rate;
Second adjusting module, if the size for the current buffer is less than default Second Threshold, described in adjustment Two frame playback rates of video data bag are the second speed;
3rd adjusting module, if the size for the current buffer is more than the Second Threshold and less than described first Threshold value, then adjust the video data bag and stab interval broadcasting according to normal time.
Preferably, described device also includes:
Processing module, for working as ncurrent_buffer_frame>Nmax_buffer1_frameWhen, if being configured to " low delay " pattern, Stand-by buffer area is not enabled, if being configured to " adaptive " pattern, enables stand-by buffer area;
Wherein, Nmax_buffer1_frameFor the largest buffered frame number of main buffering region, " low delay " pattern is that buffering area is small Pattern, " adaptive " pattern is the big pattern of buffering area.
The embodiment of the present invention provides a kind of device of adaptive regulating video buffer size, obtains the data of video data bag Information, and according to the data message calculating network situation, the data message include reception time difference of adjacent two interframe with Time tolerance;The size of buffering area is calculated according to the network condition, is felt by counting the arrival time of video data bag Hownet network change conditions, the size of buffering area is adjusted according to network condition dynamic, avoids unnecessary cache-time as far as possible so that Transmission of video is preferably balanced between real-time and fluency, i.e., on the premise of fluency is ensured, in network state During situation about getting well, using relatively small time delay, and in the case of network state difference, then using relatively large time delay.
The technical principle of the embodiment of the present invention is described above in association with specific embodiment.These descriptions are intended merely to explain this The principle of inventive embodiments, and the limitation to protection domain of the embodiment of the present invention can not be construed in any way.Based on herein Explanation, those skilled in the art, which would not require any inventive effort, can associate the other specific of the embodiment of the present invention Embodiment, these modes are fallen within the protection domain of the embodiment of the present invention.

Claims (12)

  1. A kind of 1. method of adaptive regulating video buffer size, it is characterised in that methods described includes:
    The data message of video data bag is obtained, and is included according to the data message calculating network situation, the data message The reception time difference of adjacent two interframe and time tolerance;
    The size of buffering area is calculated according to the network condition.
  2. 2. according to the method for claim 1, it is characterised in that described according to the data message calculating network situation, bag Include:
    Become according to the network for receiving time difference and time tolerance acquisition adjacent two interframe of adjacent two interframe Change value;
    Desired value and mean square deviation are calculated according to the network change value, the desired value be used to representing the network state whether Normally, the mean square deviation is used for the fluctuation situation for representing the network.
  3. 3. according to the method for claim 2, it is characterised in that described that the big of buffering area is calculated according to the network condition It is small, including:
    The frame number n cached according to the needs under the desired value and mean square deviation calculating current network conditions.
  4. 4. according to the method described in claims 1 to 3 any one, it is characterised in that described to be calculated according to the network condition After the size of buffering area, in addition to:
    Count the frame number n in current buffercurrent_buffer_frame
    If n>ncurrent_buffer_frame, then present frame is stored in the buffering area, and return to the number for performing and obtaining video data bag It is believed that breath, and according to the step of the data message calculating network situation;
    If ncurrent_buffer_frame>=n, then recording the frame number that the needs under the current network conditions cache is ncurrent_buffer_frame, while the other end of the current buffer starts temporally to stab interval reading video data.
  5. 5. according to claim according to the method described in claims 1 to 3 any one, it is characterised in that described in the basis After network condition calculates the size of buffering area, in addition to:
    If the size of current buffer is more than default first threshold, the two frame playback rates for adjusting the video data bag are First rate;
    If the size of the current buffer is less than default Second Threshold, two frames for adjusting the video data bag play speed Rate is the second speed;
    If the size of the current buffer is more than the Second Threshold and is less than the first threshold, the video counts are adjusted Interval is stabbed according to bag according to normal time to play.
  6. 6. according to the method described in claims 1 to 3 any one, it is characterised in that described to be calculated according to the network condition After the size of buffering area, in addition to:
    Work as ncurrent_buffer_frame>Nmax_buffer1_frameWhen, if being configured to " low delay " pattern, stand-by buffer area is not enabled, If being configured to " adaptive " pattern, stand-by buffer area is enabled;
    Wherein, Nmax_buffer1_frameFor the largest buffered frame number of main buffering region, " low delay " pattern is the small mould of buffering area Formula, " adaptive " pattern are the big pattern of buffering area.
  7. 7. a kind of device of adaptive regulating video buffer size, it is characterised in that described device includes:
    Acquisition module, for obtaining the data message of video data bag;
    First computing module, for including adjacent two interframe according to the data message calculating network situation, the data message The reception time difference and time tolerance;
    Second computing module, for calculating the size of buffering area according to the network condition.
  8. 8. device according to claim 7, it is characterised in that first computing module, be used for:
    Become according to the network for receiving time difference and time tolerance acquisition adjacent two interframe of adjacent two interframe Change value;
    Desired value and mean square deviation are calculated according to the network change value, the desired value be used to representing the network state whether Normally, the mean square deviation is used for the fluctuation situation for representing the network.
  9. 9. device according to claim 8, it is characterised in that second computing module, be used for:
    The frame number n cached according to the needs under the desired value and mean square deviation calculating current network conditions.
  10. 10. according to the device described in claim 7 to 9 any one, it is characterised in that described device also includes:
    Statistical module, for counting the frame number n in current buffercurrent_buffer_frame
    Module is returned to, if for n>ncurrent_buffer_frame, then present frame is stored in the buffering area, and return and obtained described in execution Modulus block;
    Logging modle, if for ncurrent_buffer_frame>=n, then record the frame number that the needs under the current network conditions cache For ncurrent_buffer_frame, while the other end of the current buffer starts temporally to stab interval reading video data.
  11. 11. according to the device described in claim 7 to 9 any one, it is characterised in that described device also includes:
    First adjusting module, if the size for current buffer is more than default first threshold, adjust the video data Two frame playback rates of bag are first rate;
    Second adjusting module, if the size for the current buffer is less than default Second Threshold, adjust the video Two frame playback rates of packet are the second speed;
    3rd adjusting module, if the size for the current buffer is more than the Second Threshold and is less than first threshold Value, then adjust the video data bag and stab interval broadcasting according to normal time.
  12. 12. according to the device described in claim 7 to 9 any one, it is characterised in that described device also includes:
    Processing module, for working as ncurrent_buffer_frame>Nmax_buffer1_frameWhen, if being configured to " low delay " pattern, do not open With stand-by buffer area, if being configured to " adaptive " pattern, stand-by buffer area is enabled;
    Wherein, Nmax_buffer1_frameFor the largest buffered frame number of main buffering region, " low delay " pattern is the small mould of buffering area Formula, " adaptive " pattern are the big pattern of buffering area.
CN201610444826.6A 2016-06-20 2016-06-20 A kind of method and device of adaptive regulating video buffer size Pending CN107529097A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610444826.6A CN107529097A (en) 2016-06-20 2016-06-20 A kind of method and device of adaptive regulating video buffer size

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610444826.6A CN107529097A (en) 2016-06-20 2016-06-20 A kind of method and device of adaptive regulating video buffer size

Publications (1)

Publication Number Publication Date
CN107529097A true CN107529097A (en) 2017-12-29

Family

ID=60734465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610444826.6A Pending CN107529097A (en) 2016-06-20 2016-06-20 A kind of method and device of adaptive regulating video buffer size

Country Status (1)

Country Link
CN (1) CN107529097A (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108347645A (en) * 2018-01-19 2018-07-31 浙江大华技术股份有限公司 A kind of method and device that video frame decoding is shown
CN108966028A (en) * 2018-08-17 2018-12-07 上海悠络客电子科技股份有限公司 A kind of anti-shaking method based on Network status dynamic regulation broadcasting speed
CN109525887A (en) * 2018-12-27 2019-03-26 长沙理工大学 A kind of self-regulation playback method, system and the device of Online Video
CN109769140A (en) * 2018-12-20 2019-05-17 南京杰迈视讯科技有限公司 A kind of network video smoothness control method for playing back based on stream media technology
CN110072125A (en) * 2018-01-23 2019-07-30 北京大学 Video broadcasting method and device
CN110113597A (en) * 2019-04-08 2019-08-09 视联动力信息技术股份有限公司 A kind of view networking data channel detection methods and system
CN110493164A (en) * 2018-05-15 2019-11-22 视联动力信息技术股份有限公司 A kind for the treatment of method and apparatus of media packet
CN110856028A (en) * 2018-08-20 2020-02-28 上海途擎微电子有限公司 Media data playing method, equipment and storage medium
CN111556361A (en) * 2020-04-29 2020-08-18 腾讯科技(深圳)有限公司 Buffer zone setting method, device, equipment and storage medium for Bluetooth audio playing
CN112333526A (en) * 2020-10-26 2021-02-05 浙江大华技术股份有限公司 Video buffer adjustment method and device, storage medium and electronic device
CN112954397A (en) * 2021-02-05 2021-06-11 广州市奥威亚电子科技有限公司 Data transmission adjusting method and device
CN113285931A (en) * 2021-05-12 2021-08-20 阿波罗智联(北京)科技有限公司 Streaming media transmission method, streaming media server and streaming media system
CN113867820A (en) * 2021-09-29 2021-12-31 深圳市智微智能软件开发有限公司 Method, device and equipment for dynamically modifying frame buffer and storage medium
CN113965779A (en) * 2020-07-01 2022-01-21 北京字节跳动网络技术有限公司 Cloud game data transmission method, device and system and electronic equipment
CN114040247A (en) * 2021-11-09 2022-02-11 新智认知数据服务有限公司 Network video stream processing method, electronic equipment and computer readable storage medium
WO2022052852A1 (en) * 2020-09-10 2022-03-17 华为技术有限公司 Data buffering method and electronic device
CN114979091A (en) * 2022-07-28 2022-08-30 腾讯科技(深圳)有限公司 Data transmission method, related device, equipment and storage medium
CN115022667A (en) * 2022-06-28 2022-09-06 武汉斗鱼鱼乐网络科技有限公司 Live broadcast control method and related equipment
CN115086779A (en) * 2021-12-17 2022-09-20 浙江大华技术股份有限公司 Video transmission system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547449A (en) * 2011-12-22 2012-07-04 华为技术有限公司 Method, set-top box and media server of control terminal buffer media stream data
CN103402136A (en) * 2013-07-29 2013-11-20 重庆大学 Self-adaptive cache adjustment control method and device and self-adaptive player
CN103533451A (en) * 2013-09-30 2014-01-22 广州华多网络科技有限公司 Method and system for regulating jitter buffer
CN103916716A (en) * 2013-01-08 2014-07-09 北京信威通信技术股份有限公司 Code rate smoothing method of video live transmission through wireless network
CN104935643A (en) * 2015-05-27 2015-09-23 河北远东通信系统工程有限公司 Digital trunk system data frame dynamic buffer processing method
CN105119755A (en) * 2015-09-10 2015-12-02 广州市百果园网络科技有限公司 Jitter buffer regulation method and device
CN105430475A (en) * 2015-11-04 2016-03-23 北京奇虎科技有限公司 Buffering method and device of video data

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102547449A (en) * 2011-12-22 2012-07-04 华为技术有限公司 Method, set-top box and media server of control terminal buffer media stream data
CN103916716A (en) * 2013-01-08 2014-07-09 北京信威通信技术股份有限公司 Code rate smoothing method of video live transmission through wireless network
CN103402136A (en) * 2013-07-29 2013-11-20 重庆大学 Self-adaptive cache adjustment control method and device and self-adaptive player
CN103533451A (en) * 2013-09-30 2014-01-22 广州华多网络科技有限公司 Method and system for regulating jitter buffer
CN104935643A (en) * 2015-05-27 2015-09-23 河北远东通信系统工程有限公司 Digital trunk system data frame dynamic buffer processing method
CN105119755A (en) * 2015-09-10 2015-12-02 广州市百果园网络科技有限公司 Jitter buffer regulation method and device
CN105430475A (en) * 2015-11-04 2016-03-23 北京奇虎科技有限公司 Buffering method and device of video data

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108347645A (en) * 2018-01-19 2018-07-31 浙江大华技术股份有限公司 A kind of method and device that video frame decoding is shown
CN110072125A (en) * 2018-01-23 2019-07-30 北京大学 Video broadcasting method and device
CN110493164A (en) * 2018-05-15 2019-11-22 视联动力信息技术股份有限公司 A kind for the treatment of method and apparatus of media packet
CN108966028A (en) * 2018-08-17 2018-12-07 上海悠络客电子科技股份有限公司 A kind of anti-shaking method based on Network status dynamic regulation broadcasting speed
CN108966028B (en) * 2018-08-17 2021-04-30 上海悠络客电子科技股份有限公司 Anti-jitter method for dynamically adjusting play speed based on network condition
CN110856028B (en) * 2018-08-20 2021-12-14 上海途擎微电子有限公司 Media data playing method, equipment and storage medium
CN110856028A (en) * 2018-08-20 2020-02-28 上海途擎微电子有限公司 Media data playing method, equipment and storage medium
CN109769140A (en) * 2018-12-20 2019-05-17 南京杰迈视讯科技有限公司 A kind of network video smoothness control method for playing back based on stream media technology
CN109525887A (en) * 2018-12-27 2019-03-26 长沙理工大学 A kind of self-regulation playback method, system and the device of Online Video
CN110113597A (en) * 2019-04-08 2019-08-09 视联动力信息技术股份有限公司 A kind of view networking data channel detection methods and system
CN111556361A (en) * 2020-04-29 2020-08-18 腾讯科技(深圳)有限公司 Buffer zone setting method, device, equipment and storage medium for Bluetooth audio playing
CN113965779A (en) * 2020-07-01 2022-01-21 北京字节跳动网络技术有限公司 Cloud game data transmission method, device and system and electronic equipment
WO2022052852A1 (en) * 2020-09-10 2022-03-17 华为技术有限公司 Data buffering method and electronic device
CN112333526B (en) * 2020-10-26 2022-08-16 浙江大华技术股份有限公司 Video buffer adjustment method and device, storage medium and electronic device
CN112333526A (en) * 2020-10-26 2021-02-05 浙江大华技术股份有限公司 Video buffer adjustment method and device, storage medium and electronic device
CN112954397A (en) * 2021-02-05 2021-06-11 广州市奥威亚电子科技有限公司 Data transmission adjusting method and device
CN113285931A (en) * 2021-05-12 2021-08-20 阿波罗智联(北京)科技有限公司 Streaming media transmission method, streaming media server and streaming media system
US11601489B2 (en) 2021-05-12 2023-03-07 Apollo Intelligent Connectivity (Beijing) Technology Co., Ltd. Method for transmitting stream, streaming server and storage medium
CN113867820A (en) * 2021-09-29 2021-12-31 深圳市智微智能软件开发有限公司 Method, device and equipment for dynamically modifying frame buffer and storage medium
CN114040247A (en) * 2021-11-09 2022-02-11 新智认知数据服务有限公司 Network video stream processing method, electronic equipment and computer readable storage medium
CN115086779A (en) * 2021-12-17 2022-09-20 浙江大华技术股份有限公司 Video transmission system
CN115086779B (en) * 2021-12-17 2024-04-16 浙江大华技术股份有限公司 Video transmission system
CN115022667A (en) * 2022-06-28 2022-09-06 武汉斗鱼鱼乐网络科技有限公司 Live broadcast control method and related equipment
CN114979091A (en) * 2022-07-28 2022-08-30 腾讯科技(深圳)有限公司 Data transmission method, related device, equipment and storage medium
WO2024021777A1 (en) * 2022-07-28 2024-02-01 腾讯科技(深圳)有限公司 Data transmission method, related apparatus, device and storage medium

Similar Documents

Publication Publication Date Title
CN107529097A (en) A kind of method and device of adaptive regulating video buffer size
CN103916716B (en) The code rate smoothing method of realtime video transmission under a kind of wireless network
US11546399B2 (en) Method and apparatus for providing a low latency transmission system using adjustable buffers
US8351762B2 (en) Adaptive media playout method and apparatus for intra-media synchronization
CN104618786B (en) Audio and video synchronization method and device
US8346959B2 (en) Client-controlled adaptive streaming
EP2255535B1 (en) Device and method for adaptation of target rate of video signals
US10686704B2 (en) Method and apparatus for providing a low latency transmission system using adaptive buffering estimation
JP4462996B2 (en) Packet receiving method and packet receiving apparatus
JP2005269632A (en) Communication terminal device, telephone data receiving method, communication system, and gateway
US20040057381A1 (en) Codec aware adaptive playout method and playout device
CN108259964B (en) Video playing rate adjusting method and system
MX2011005782A (en) Audio/video data play control method and apparatus.
JP5140952B2 (en) Content distribution system, content distribution server, content reproduction terminal, program, and content distribution method
CN101207822A (en) Method for synchronization of audio frequency and video frequency of stream media terminal
CN105791735A (en) Method and system for dynamically adjusting video call code streams
CN110225385B (en) Audio and video synchronization adjustment method and device
US20070177625A1 (en) Packet communication system, packet communication method, transmission apparatus, and storage medium having stored therein computer program
US10382155B2 (en) Data processing
JP2006050488A (en) Communication terminal device and buffer control method
JP2004214755A (en) Dynamic coding rate revision method and apparatus thereof
US20120009892A1 (en) Wireless communication system and method for adjusting used depth of buffer unit in wireless communication system
CN111556345A (en) Network quality detection method and device, electronic equipment and storage medium
CN114866859B (en) Real-time video transmission dynamic delay control system based on time stamp and packet loss detection
JP2010136159A (en) Data receiver

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20171229

WD01 Invention patent application deemed withdrawn after publication