CN105472404B - A kind of data processing method in video traffic - Google Patents

A kind of data processing method in video traffic Download PDF

Info

Publication number
CN105472404B
CN105472404B CN201410460491.8A CN201410460491A CN105472404B CN 105472404 B CN105472404 B CN 105472404B CN 201410460491 A CN201410460491 A CN 201410460491A CN 105472404 B CN105472404 B CN 105472404B
Authority
CN
China
Prior art keywords
frame
video
data
packet
setting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410460491.8A
Other languages
Chinese (zh)
Other versions
CN105472404A (en
Inventor
成建敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TD Tech Ltd
Original Assignee
TD Tech Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TD Tech Ltd filed Critical TD Tech Ltd
Priority to CN201410460491.8A priority Critical patent/CN105472404B/en
Publication of CN105472404A publication Critical patent/CN105472404A/en
Application granted granted Critical
Publication of CN105472404B publication Critical patent/CN105472404B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

This application discloses the data processing methods in a kind of video traffic, including:The video RTP packets of reception are sent into video display buffer by receiving terminal;The video RTP packets of caching are sent to decoder and handled by the video display buffer;Wherein, by the handling result of the RTP packets for belonging to same video frame of caching while the decoder is sent to.Using the application, video playing quality can be improved.

Description

A kind of data processing method in video traffic
Technical field
This application involves the communication technology, more particularly to the data processing method in a kind of video traffic.
Background technology
Video traffic can be transmitted in the wireless network, and specifically, in transmitting terminal, equipment is by video counts to be transmitted According to being sent after carrying out compressed encoding, receiving terminal is sent to by transmission channel;Receiving terminal receives the compression that transmitting terminal is sent Data afterwards play to user after being decoded processing to it.When will produce transmission during being transferred to receiving terminal by transmitting terminal Prolong.
In the prior art, receiving terminal receives the specific processing after video data and includes:Receiving terminal can incite somebody to action after receiving data The RTP bag datas of reception are sent to decoder processes, and decoder front end includes that a processing caches, can be to input decoder RTP packets carry out caching process, then the data of caching are decoded processing.Currently, the processing of decoder front end is buffered in logarithm When according to being cached, data cached output is controlled according only to the processing capability requirements of decoder.Due to the variation of wireless environment, Transmitting terminal can be caused to be fluctuated to the propagation delay time of receiving terminal, but the decoder of receiving terminal will not be according to biography after to data buffer storage The variation of defeated time delay carries out package control, therefore the variation of propagation delay time can be extended in decoding process, it is thus possible to lead Cause receiving terminal decoding process after carry out video playing when will appear can not smooth playing video, influence video playing quality, such as Phenomena such as causing interim card.
Invention content
The application provides a kind of processing method of video traffic, and the data that can effectively control buffer to decoder are defeated Go out, improves video playing quality.
To achieve the above object, the application adopts the following technical scheme that:
A kind of data processing method in video traffic, including:
The video RTP packets of reception are sent into video display buffer by receiving terminal;The video display buffer is by the video RTP packets of caching Decoder is sent to be handled;Wherein, by the handling result of the RTP packets for belonging to same video frame of caching while institute is sent to State decoder;
The mode that the video display buffer sends the video RTP packets of caching includes:
When the total amount N of data cached packet in video display buffer is less than reference capacity thresholding Thred0, for primary data Packet, before the cache-time of data cached packet is less than the initial caching waiting time of setting, does not send data cached packet, is more than After the initial caching waiting time, the data packet for entering frame frame per second and sending caching of data is received according to the video display buffer; For non-initial data packet, according to it is described enter frame frame per second, send data cached packet;Wherein, it is described enter frame frame per second be the video The buffer unit interval inscribed quantity for receiving video frame;
Work as Thred0<When the capacity threshold Thred1 of N≤setting, if RTP packet delay shake mean value Jitteraverage≤ set Fixed delay variation thresholding then sends the data cached packet according to the interval of timestamps for entering frame;If the RTP in timing statistics Packet delay shakes mean value Jitteraverage>The delay variation thresholding, then it is described enter frame frame per second be greater than or equal to setting people When eye perception frame per second, the data cached packet is sent according to the interval of timestamps for entering frame, it is described enter frame frame per second be less than setting When human eye perceives frame per second, the data cached packet is sent according to human eye perception frame per second;Wherein, it is described enter frame timestamp between The sending time being divided between two adjacent video frame of timestamp that the video display buffer receives is poor;
Work as Thred1<When the capacity threshold Thred2 of N≤setting, if (1/ enters frame frame per second)<Enter the interval of timestamps of frame, then The data cached packet is sent according to frame frame per second is entered;If the interval of timestamps of (1/ enters frame frame per second) >=enter frame, according to entering frame Interval of timestamps sends the data cached packet;
Work as N>When Thred2 or video display buffer overflow, the data packet of the caching more than Thred2 is all sent.
Preferably, the mode for entering frame frame per second described in calculating includes:
The number for receiving video frame is inscribed in the timing statistics of setting, by the video frame of reception divided by the setting time;Or Person determines that the buffer receives the video frame required time of setting number, by the setting number divided by determines Time.
Preferably, when calculating RTP packet delay shake mean value, calculation delay shake is initial equal in the timing statistics of setting Value, on the basis of delay variation initial mean value at least twice, carries out long-term filtering and determines the delay variation mean value.
Preferably, this method further comprises:The audio RTP packets of reception are sent into audio buffer by receiving terminal, and audio is slow Storage synchronizes the transmission audio RTP packets according to the transmission frequency of the video display buffer and is handled to decoder.
As seen from the above technical solution, in the application, when the data volume in buffer is less, can ensure to protect in caching Certain data volume is stayed, the continuity of presentation of video frames is deteriorated when to avoid time delay from increasing;When in the data volume in buffer Whens equal, on the one hand ensure that delay variation in the limit that can be tolerated, on the other hand ensures certain buffer data size;Work as caching It when data volume in device is more, can ensure certain spare space as possible, reduce overflow probability.As it can be seen that the side in the application Formula can effectively control buffer and be exported to the data of decoder, improve video playing quality.
Description of the drawings
Fig. 1 is position of the video display buffer in receiving device in the application;
Fig. 2 is the buffer control threshold de schematic diagram in the application video display buffer.
Specific implementation mode
In order to make the purpose, technological means and advantage of the application be more clearly understood, the application is done below in conjunction with attached drawing It is further described.
In the application, the position of buffer is as shown in Figure 1, buffer between RTP layers and decoder layer, is responsible for caching RTP data packets, and go out packet control strategy RTP data packets are issued decoder to handle according to certain.Spatial cache size Can with static state setting fixed value, or according to physical device ability dynamically distribute.Audio, the RTP data packets of video can be divided It is cached for two buffers, amount of audio data can be significantly less than the video data volume in the same time, and the application mainly describes Caching for video data and transmission.For synchronous audio data, can Frequency Synchronization be sent according to video data simultaneously Send corresponding audio data.The synchronization policy present invention does not constrain.Most basicly, when being cached for the RTP packets received, Based on No. SN sequence carried in RTP packets.It equally need to sequentially be exported according to No. SN when being exported from caching.Belong to same video frame Entrained timestamp timestamp values are identical in RTP packets;Belong to the RTP packets of same video frame while sending.
The specific control mode that buffer exports video RTP packets to decoder is given below.
When carrying out out packet control, three capacity thresholds are set first, as shown in Fig. 2, buffer carries out data packet output When, it is specifically controlled according to the relationship between current cache data volume and three capacity thresholds of setting.Three capacity thresholds point Not Wei Thred0, Thred1 and Thred2, Thred0<=Thred1<=Thred2<=100%;Wherein, (100%- capacity doors Limit Thred2) * buffer sizes<=decoder processes cache size, avoids when transient data amount is larger to decoder processes Generate impact.
Based on above three capacity threshold, the control process that buffer carries out video RTP packets is as follows:
If 1, buffer memory is less than capacity threshold Thred0, give out a contract for a project by following
It is sent if primary data, the data cached packet waiting time delay in buffer is less than " initial caching etc. of setting Wait for duration ", it wouldn't give out a contract for a project outward;After data cached packet in buffer waits for time delay to reach " initial caching waiting time ", press It is shining into frame frame per second, carries out video frame transmission.In this manner it is ensured that data volume certain in buffer, avoids video content first , will not be excessive due to data parlor time delay when beginning to play, cause video playing discontinuous;Meanwhile also avoiding video initial play When, period of reservation of number is long, improves user experience;
If not primary data is sent, according to frame frame per second is entered, video frame transmission is carried out.
If 2, Thred1>Buffer memory>=Thred0 gives out a contract for a project by following dynamics:
If the delay variation mean value calculated according to the video RTP packets of caching<=preset " delay variation thresholding ", then base It is spaced and is sent in the timestamp (timestamp) for entering frame.That is, when current delay variation situation is in the limit of tolerance When in degree, packet control is carried out out according to the transmission frequency of video frame.Here, the interval of timestamps for entering frame refers to that buffer receives Adjacent two video frame of timestamp between sending time it is poor.
If delay variation mean value>" shake thresholding " further judges the relationship that frame per second is perceived into frame frame per second and human eye, if Enter frame frame per second >=human eye perception frame per second, is then sent according to the intervals timestamp for entering frame;If entering frame frame per second<Human eye perceives Frame per second is then based on human eye perception frame per second and carries out frame transmission.Here, human eye for dynamic video there are one minimum perception frame per second, Referred to as human eye perceives frame per second, and when video frame rate perceives frame per second less than the human eye, the video fluency that human eye perceives is deteriorated.It can Frame per second is perceived to set human eye according to practical application scene.Such case shows do not tolerating when current delay variation situation Limit in when, buffer it is minimum with human eye perception frame per second output.In this way, on the one hand ensure the fluency of video playing, it is another Aspect ensures that the data volume of caching will not be excessive.
By the processing of two kinds of situations in above-mentioned 1 and 2 as it can be seen that on the one hand the setting of Thred0 needs guarantee to have certain data Amount still ensures that continuous data are sent when time delay becomes larger, and subsequent data is caused to reach continuity variation by caching;Separately On the one hand it needs to consider user's maximum waiting time;In summary the setting of 2 points of progress Thred0, such as could be provided as 20%.
If 3, Thred2 >=buffer memory >=Thred1, gives out a contract for a project by following dynamics:
Current if (1/ enters frame frame per second)<Enter the intervals timestamp of frame, then according to enter frame frame per second carry out data transmission;
The intervals timestamp of current if (1/ enters frame frame per second) >=enter frame, according to the intervals timestamp for entering frame Carry out data transmission.
When buffer memory meets this situation, need to limit the buffer data size in buffer, therefore receive according to buffer The maximum value that the frame per second and transmitting terminal of video frame are sent in the frame per second of video frame is exported, to control in buffer as possible Buffer data size not increase excessively.
By above-mentioned 2 and 3 two kind of situation processing as it can be seen that on the one hand the setting of Thred1 will ensure to cache no pressure, separately On the one hand to consider that can be tolerated enters the fluctuation of frame rate.In summary the setting of 2 points of progress Thred1, such as can set It is set to 50%.
If 4, buffer memory>Thred2 or instantaneous receives data and causes cache overflow, then will be complete more than the frame data of Thred2 Portion is sent.Here processing is when ensureing that buffer data size is more in both the buffers, to send out data packet as early as possible, to avoid slow Storage overflows.
By above-mentioned 3 and 4 two kind of situation processing as it can be seen that when buffer memory be higher than Thred2 after, show caching account for it is relatively high, this When remaining accommodation space become smaller, when transient data amount is higher, be easy to cause cache overflow, therefore, ensure certain sky as possible Complementary space reduces overflow probability.Therefore, it is necessary to which Thred2 is arranged on this basis, such as it could be provided as 80%.
It is above-mentioned go out packet control in, be related to buffer enters frame frame per second and the delay variation mean value of RTP packets, is described below The specific calculation of the two amounts:
1) video display buffer enters frame frame per second
The frame frame per second that enters that video cache buffer receives data is the number of video frames received in the unit interval.It can adopt With following appraisal procedure, following methods can be used independently:
It is reference with the set time, that is, counts the number of video frames received in specified time, calculate into frame frame per second.
It is reference with specified frame number, is i.e. the statistics specified time for receiving certain video frame needs and consuming, calculates into frame frame Rate.
It is as follows to enter the calculating of frame frame per second:
Frame number/the receiving terminal for entering frame frame per second=receive receives the time (unit of framing consumption:Frame/s)
2) receiving terminal RTP packet delay shakes mean value
The delay variation statistical of standard defined in RTP/RTCP agreements.The application uses the statistical, this In repeat no more.
It needs to continue the delay variation that statistics receives packet in the application, calculates the specified time into frame frame per second above-mentioned or refer to On the basis of framing number, count the delay variation mean value in the time interval, can it is above-mentioned go out packet control when directly using should Delay variation mean value.Alternatively, can also it be initially equal as delay variation using the delay variation mean value calculated in the manner described above Value executes long-term filtering, filtering mode is unlimited (such as alpha filtering), is put down for a long time between statistical interval at least twice It is sliding to obtain final delay variation mean value.
In addition, transmitting terminal and receiving terminal are due to device difference itself, it is understood that there may be crystal oscillator difference causes the both ends time to calculate Accuracy.In the application, it is believed that the difference that crystal oscillator introduces very little compared with the variation that propagation delay time introduces, therefore, the application In put aside the influence of crystal oscillator.If the two difference is excessive, need to consider crystal oscillator compensation, and according to the interval of timestamps for entering frame When carrying out data cached packet transmission, crystal oscillator compensation is considered in advance.The application does not constrain crystal oscillator compensation method.
By the processing of above-mentioned the application, when the data volume in buffer is less, can ensure to retain in caching certain Data volume, when to avoid time delay from increasing presentation of video frames continuity be deteriorated;When the data volume in buffer is medium, one Aspect ensures that delay variation in the limit that can be tolerated, on the other hand ensures certain buffer data size;When in buffer It when data volume is more, can ensure certain spare space as possible, reduce overflow probability.As it can be seen that the mode in the application, it can Effectively control buffer is exported to the data of decoder, improves video playing quality.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all essences in the present invention With within principle, any modification, equivalent substitution, improvement and etc. done should be included within the scope of protection of the invention god.

Claims (4)

1. the data processing method in a kind of video traffic, which is characterized in that including:
The video RTP packets of reception are sent into video display buffer by receiving terminal;The video display buffer sends the video RTP packets of caching It is handled to decoder;Wherein, by the handling result of the RTP packets for belonging to same video frame of caching while the solution is sent to Code device;
The mode that the video display buffer sends the video RTP packets of caching includes:
When the total amount N of data cached packet in video display buffer is less than reference capacity thresholding Thred0, for initial data packets, Before the cache-time of data cached packet is less than the initial caching waiting time of setting, data cached packet is not sent, is more than described After initial caching waiting time, the data packet for entering frame frame per second and sending caching of data is received according to the video display buffer;For Non-initial data packet, according to it is described enter frame frame per second, send data cached packet;Wherein, it is described enter frame frame per second be the video cache The device unit interval inscribed quantity for receiving video frame;
Work as Thred0<When the capacity threshold Thred1 of N≤setting, if RTP packet delay shake mean value Jitteraverage≤ setting Delay variation thresholding then sends the data cached packet according to the interval of timestamps for entering frame;If when RTP packets in timing statistics Prolong shake mean value Jitteraverage>The delay variation thresholding, then it is described enter frame frame per second be greater than or equal to setting human eye sense When knowing frame per second, the data cached packet is sent according to the interval of timestamps for entering frame, it is described enter frame frame per second be less than the human eye of setting When perceiving frame per second, the data cached packet is sent according to human eye perception frame per second;Wherein, it is described enter frame interval of timestamps be Sending time between two adjacent video frame of timestamp that the video display buffer receives is poor;
Work as Thred1<When the capacity threshold Thred2 of N≤setting, if (1/ enters frame frame per second)<Enter the interval of timestamps of frame, then according to Enter frame frame per second and sends the data cached packet;The interval of timestamps of (if 1/ enters frame frame per second) >=enter frame, according to the time for entering frame Stamp interval sends the data cached packet;
Work as N>When Thred2 or video display buffer overflow, the data packet of the caching more than Thred2 is all sent.
2. according to the method described in claim 1, it is characterized in that, the mode for entering frame frame per second described in calculating includes:
The number for receiving video frame is inscribed in the timing statistics of setting, by the video frame of reception divided by the setting time;Alternatively, really The fixed buffer receives the video frame required time of setting number, by the setting number divided by the time determined.
3. according to the method described in claim 1, it is characterized in that, calculate RTP packet delay shake mean value when, in the statistics of setting Calculation delay shakes initial mean value in time, and on the basis of delay variation initial mean value at least twice, it is flat to carry out long-term filtering It is sliding to determine the delay variation mean value.
4. according to the method described in claim 1, it is characterized in that, this method further comprises:Receiving terminal is by the audio of reception RTP packets are sent into audio buffer, and audio buffer synchronizes according to the transmission frequency of the video display buffer and sends the audio RTP It wraps and is handled to decoder.
CN201410460491.8A 2014-09-11 2014-09-11 A kind of data processing method in video traffic Active CN105472404B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410460491.8A CN105472404B (en) 2014-09-11 2014-09-11 A kind of data processing method in video traffic

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410460491.8A CN105472404B (en) 2014-09-11 2014-09-11 A kind of data processing method in video traffic

Publications (2)

Publication Number Publication Date
CN105472404A CN105472404A (en) 2016-04-06
CN105472404B true CN105472404B (en) 2018-11-13

Family

ID=55609618

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410460491.8A Active CN105472404B (en) 2014-09-11 2014-09-11 A kind of data processing method in video traffic

Country Status (1)

Country Link
CN (1) CN105472404B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109379168B (en) * 2018-11-23 2021-04-13 竞技世界(北京)网络技术有限公司 Voice smooth playing method for front-end real-time voice chat
CN111356002B (en) * 2018-12-24 2022-05-17 海能达通信股份有限公司 Video playing method and video player
CN111246284B (en) * 2020-03-09 2021-05-25 深圳创维-Rgb电子有限公司 Video stream playing method, system, terminal and storage medium
CN113923506B (en) * 2020-07-10 2023-07-18 成都鼎桥通信技术有限公司 Video data processing method, device, edge computing gateway and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003087317A (en) * 2001-09-12 2003-03-20 Nec Corp Apparatus and method for absorbing voice packet delay fluctuation
JP2005322995A (en) * 2004-05-06 2005-11-17 Nippon Telegr & Teleph Corp <Ntt> Buffer control method in real-time video image transfer, transmitting terminal, receiving terminal, video image distributing system and program
CN101123571A (en) * 2006-08-07 2008-02-13 北京三星通信技术研究有限公司 Adjustment method for scheduling policy based on self-adapted jitter buffer
CN101719808A (en) * 2009-11-23 2010-06-02 中兴通讯股份有限公司 Output processing method and output processing device of data packets
CN102378065A (en) * 2011-10-19 2012-03-14 江西省南城县网信电子有限公司 Method and system for configuring buffer area at streaming media server side based on MPEG (Moving Picture Experts Group)-4
CN102932676A (en) * 2012-11-14 2013-02-13 武汉烽火众智数字技术有限责任公司 Self-adaptive bandwidth transmitting and playing method based on audio and video frequency synchronization

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030048808A1 (en) * 2001-09-12 2003-03-13 Stahl Thomas Anthony Method and apparatus for changing received streaming content channels

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003087317A (en) * 2001-09-12 2003-03-20 Nec Corp Apparatus and method for absorbing voice packet delay fluctuation
JP2005322995A (en) * 2004-05-06 2005-11-17 Nippon Telegr & Teleph Corp <Ntt> Buffer control method in real-time video image transfer, transmitting terminal, receiving terminal, video image distributing system and program
CN101123571A (en) * 2006-08-07 2008-02-13 北京三星通信技术研究有限公司 Adjustment method for scheduling policy based on self-adapted jitter buffer
CN101719808A (en) * 2009-11-23 2010-06-02 中兴通讯股份有限公司 Output processing method and output processing device of data packets
CN102378065A (en) * 2011-10-19 2012-03-14 江西省南城县网信电子有限公司 Method and system for configuring buffer area at streaming media server side based on MPEG (Moving Picture Experts Group)-4
CN102932676A (en) * 2012-11-14 2013-02-13 武汉烽火众智数字技术有限责任公司 Self-adaptive bandwidth transmitting and playing method based on audio and video frequency synchronization

Also Published As

Publication number Publication date
CN105472404A (en) 2016-04-06

Similar Documents

Publication Publication Date Title
CN104519325B (en) A kind of adaptive support method of wireless video monitoring system based on 4G network
CN104618786B (en) Audio and video synchronization method and device
US10595068B2 (en) Method and apparatus for synchronizing video live broadcast
CN104735470B (en) A kind of streaming media data transmission method and device
CN105472404B (en) A kind of data processing method in video traffic
US8538176B2 (en) Method for sending compressed data representing a digital image and corresponding device
CN110351201B (en) Data processing method and device
CN104125429B (en) The adjusting method and device of video data transmission
US20150358686A1 (en) Code rate smoothing method for transmitting real-time video in a wireless network
CN107529097A (en) A kind of method and device of adaptive regulating video buffer size
CN107205160A (en) A kind of player method and device of the video issued for server
US20190281300A1 (en) Video frame coding method, terminal and storage medium
KR20150052826A (en) Systems and methods for using client-side video buffer occupancy for enhanced quality of experience in a communication network
US20150250001A1 (en) Circuit arrangement and method of determining a priority of packet scheduling
WO2018010119A1 (en) Video service resource allocation method and device
CN105393583B (en) Media distributing network with media bursts transfer capability
JP2009049529A5 (en)
CN103002354A (en) Method and system for eliminating network jitter of video data during transmission
WO2014190642A1 (en) Media data transmission method, apparatus and system
CN106331835B (en) A kind of dynamic adjusting data receives the method and video decoding apparatus of caching
CN105142002A (en) Audio/video live broadcasting method and device as well as control method and device
CN110225385B (en) Audio and video synchronization adjustment method and device
CN112788494A (en) Earphone control method, device, equipment and medium
KR101598441B1 (en) Apparatus for transmission of encoded video stream and Method for the same
CN104053002A (en) Video decoding method and device

Legal Events

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