CN108234997A - Time-delay measuring method, equipment, system and the computer-readable medium of live video - Google Patents

Time-delay measuring method, equipment, system and the computer-readable medium of live video Download PDF

Info

Publication number
CN108234997A
CN108234997A CN201711320836.XA CN201711320836A CN108234997A CN 108234997 A CN108234997 A CN 108234997A CN 201711320836 A CN201711320836 A CN 201711320836A CN 108234997 A CN108234997 A CN 108234997A
Authority
CN
China
Prior art keywords
video frame
target video
acquisition time
code stream
time stamp
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.)
Granted
Application number
CN201711320836.XA
Other languages
Chinese (zh)
Other versions
CN108234997B (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201711320836.XA priority Critical patent/CN108234997B/en
Publication of CN108234997A publication Critical patent/CN108234997A/en
Application granted granted Critical
Publication of CN108234997B publication Critical patent/CN108234997B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • H04N17/004Diagnosis, testing or measuring for television systems or their details for digital television systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)

Abstract

The present invention provides a kind of time-delay measuring method of live video, equipment, system and computer-readable medium.Its method includes:According to the incidence relation that the acquisition time of the PTS of the PTS of the target video frame after coding and the target video frame pre-established and acquisition target video frame stab, the acquisition time stamp of target video frame is obtained;Acquisition time stamp is encapsulated in code stream;To CDN ends, transmission is packaged with the data of the target video frame after encoding and the code stream of corresponding acquisition time stamp, while for CDN ends to the data for playing end transmission objectives video frame, the acquisition time of transmission objectives video frame by playing end when playing target video frame, measures the time delay of live streaming.Technical scheme of the present invention can save manual operation, effectively improve the precision of measurement.And technical scheme of the present invention, the various protocols such as flv, rtmp and hls can be supported simultaneously, and flexibility is very high, very wide using field.

Description

Time-delay measuring method, equipment, system and the computer-readable medium of live video
【Technical field】
The present invention relates to computer application technology more particularly to a kind of time-delay measuring method of live video, equipment, System and computer-readable medium.
【Background technology】
With the development of internet, occur various services along with internet.For example, live streaming is by mutual A kind of Video service networked and occurred.
Existing live broadcast system can specifically include plug-flow end, content distributing network (Content Delivery Network;CDN) end is high in the clouds and plays end.Wherein plug-flow end acquisition video frame, by video frame after coded treatment Initial data occurs to give CDN ends;It is a variety of resolution ratio by video frame transcoding after CDN terminates the initial data for receiving video frame Form;When then asking the live streaming of certain form at broadcasting end, the video requency frame data of corresponding form is transferred to and plays end, with The video frame is played for playing end.Each video frame is handled by using aforesaid way, can realize the straight of video It broadcasts.Since the process played belongs to live streaming, then time delay is to weigh an important references index of live streaming quality, which refers to Be to acquire video frame from plug-flow end to play time delay the video frame to end is played.In the prior art, in live streaming Latency measurement, can by way of manual setting clock, respectively record acquisition time stamp and reproduction time stamp, with to time delay into Row measures.
But the latency measurement mode in above-mentioned live streaming needs manual operations, causes the precision measured relatively low.
【Invention content】
The present invention provides a kind of time-delay measuring method of live video, equipment, system and computer-readable mediums, are used for Improve the measurement accuracy of time delay in live streaming.
The present invention provides a kind of time-delay measuring method of live video, the method includes:
According to the PTS of the PTS of the target video frame after coding and the target video frame pre-established and acquisition institute The incidence relation of the acquisition time stamp of target video frame is stated, obtains the acquisition time stamp of the target video frame;
Acquisition time stamp is encapsulated in code stream;
To CDN ends, transmission is packaged with the data of the target video frame after encoding and the corresponding acquisition time stamp Code stream, so that the CDN ends are to while playing end and transmit the data of the target video frame, transmit the target video frame The acquisition time, by it is described broadcasting end when playing the target video frame, measure the time delay of live streaming.
Still optionally further, in method as described above, acquisition time stamp is encapsulated in code stream, is specifically included:
Acquisition time stamp is encapsulated in the SEI of code stream.
Still optionally further, it in method as described above, further includes:
The presence mark of the acquisition time stamp is provided in the SEI of the code stream.
Still optionally further, it in method as described above, builds according to the PTS of the target video frame after coding and in advance The incidence relation of acquisition time stamps of the PTS of the vertical target video frame with acquiring the target video frame, obtains the mesh Before the acquisition time stamp for marking video frame, the method further includes:
When acquiring the target video frame, the acquisition time stamp during target video frame is obtained;
Establish the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
The present invention also provides a kind of time-delay measuring method of live video, the method includes:
Before the data of target video frame in the code stream transmitted to plug-flow end carry out transcoding, the institute in the code stream State the data of target video frame and the acquisition time stamp of the target video frame, establish the PTS of the target video frame with it is right The incidence relation of acquisition time stamp answered;
After transcoding is carried out to the data of the target video frame, according to the incidence relation, the acquisition time is stabbed Added in the code stream for the data for being packaged with the target video frame after transcoding;
To the data and the corresponding acquisition time for playing the target video frame after end transmission is packaged with transcoding The code stream of stamp so that the broadcasting end is when playing the target video frame, measures the time delay of live streaming.
Still optionally further, in method as described above, the data of the target video frame in the code stream with And the acquisition time stamp of the target video frame, establish the PTS of the target video frame and the corresponding acquisition time stamp Incidence relation specifically includes:
The PTS of the target video frame is obtained from the data of the target video frame in the code stream;
The acquisition time stamp of the target video frame is obtained from the SEI in the code stream;
Establish the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
Still optionally further, in method as described above, the target video frame is obtained from the SEI in the code stream Before the acquisition time stamp, the method further includes:
The presence mark in the SEI in the code stream, when determining to carry the acquisition in the SEI Between stab.
The present invention also provides a kind of time-delay measuring method of live video, the method includes:
Before target video frame in the code stream transmitted to CDN ends plays out, the target in the code stream The acquisition time of the data of video frame and the target video frame stabs, and establishes the PTS of the target video frame and corresponding institute State the incidence relation of acquisition time stamp;
When the target video frame is played, the PTS of the target video frame and broadcasting for the target video frame are established Put the correspondence of timestamp;
According to the incidence relation and the correspondence, the live streaming time delay for playing the target video frame is obtained.
Still optionally further, in method as described above, the data of the target video frame in the code stream with And the acquisition time stamp of the target video frame, establish the PTS of the target video frame and the corresponding acquisition time stamp Incidence relation specifically includes:
The PTS of the target video frame is obtained from the data of the target video frame in the code stream;
The acquisition time stamp of the target video frame is obtained from the SEI in the code stream;
Establish the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
Still optionally further, in method as described above, the target video frame is obtained from the SEI in the code stream Before the acquisition time stamp, the method further includes:
The presence mark in the SEI in the code stream, when determining to carry the acquisition in the SEI Between stab.
The present invention provides a kind of plug-flow end equipment, and the equipment includes:
Acquisition module, for the PTS according to the target video frame after coding and the target video frame pre-established Acquisition time stamps of the PTS with acquiring the target video frame incidence relation, obtain the acquisition of the target video frame Timestamp;
Package module, for acquisition time stamp to be encapsulated in code stream;
Transmission module, for the data of the target video frame after being packaged with coding to the transmission of CDN ends and corresponding The code stream of acquisition time stamp, so that the CDN ends are to while playing end and transmit the data of the target video frame, transmission The acquisition time of the target video frame, by it is described broadcasting end when playing the target video frame, measure live streaming when Prolong.
Still optionally further, in equipment as described above, the package module is sealed specifically for the acquisition time is stabbed In the SEI of code stream.
Still optionally further, in equipment as described above, the equipment further includes:
Setup module, for being provided with the presence mark of the acquisition time stamp in the SEI of the code stream.
Still optionally further, it in equipment as described above, further includes and establishes module;
The acquisition module is additionally operable to, when acquiring the target video frame, obtain the acquisition during target video frame Timestamp;
It is described to establish module, for establishing the PTS of the target video frame and the association of the corresponding acquisition time stamp Relationship.
The present invention also provides a kind of CDN end equipments, which is characterized in that the equipment includes:
Module is established, before the data progress transcoding of the target video frame in the code stream transmitted to plug-flow end, according to The data of the target video frame in the code stream and the acquisition time stamp of the target video frame, establish the target and regard The incidence relation that the PTS of frequency frame is stabbed with the corresponding acquisition time;
Add module, for the data of the target video frame carry out transcoding after, according to the incidence relation, by institute It states in the code stream of data that acquisition time stamp is added to the target video frame after being packaged with transcoding;
Transmission module, for being packaged with the data of the target video frame after transcoding and corresponding to playing end transmission The code stream of the acquisition time stamp so that the broadcasting end is when playing the target video frame, measures the time delay of live streaming.
Still optionally further, it is described to establish module in equipment as described above, it is specifically used for:
The PTS of the target video frame is obtained from the data of the target video frame in the code stream;
The acquisition time stamp of the target video frame is obtained from the SEI in the code stream;
Establish the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
Still optionally further, it in equipment as described above, further includes:
Determining module for the presence mark in the SEI in the code stream, determines to take in the SEI It is stabbed with the acquisition time.
The present invention also provides a kind of broadcasting end equipment, the equipment includes:
Module is established, before being played out for the target video frame in the code stream transmitted to CDN ends, according to the code stream In the target video frame data and the target video frame acquisition time stamp, establish the target video frame The incidence relation that PTS is stabbed with the corresponding acquisition time;
It is described to establish module, be additionally operable to when the target video frame is played, establish the PTS of the target video frame with The correspondence of the reproduction time stamp of the target video frame;
Acquisition module, for according to the incidence relation and the correspondence, obtaining and playing the target video frame Live streaming time delay.
Still optionally further, it is described to establish module in equipment as described above, it is specifically used for:
The PTS of the target video frame is obtained from the data of the target video frame in the code stream;
The acquisition time stamp of the target video frame is obtained from the SEI in the code stream;
Establish the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
Still optionally further, it in equipment as described above, further includes:
Determining module for the presence mark in the SEI in the code stream, determines to take in the SEI It is stabbed with the acquisition time.
The present invention also provides a kind of video living transmission system, including plug-flow end equipment as described above, CDN ends as described above Equipment and end equipment is played as described above;The CDN end equipments are set respectively with the plug-flow end equipment and the broadcasting end Standby communication connection.
The present invention also provides a kind of computer equipment, the equipment includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are performed by one or more of processors so that one or more of processing Device realizes the time-delay measuring method of live video as described above.
The present invention also provides a kind of computer-readable mediums, are stored thereon with computer program, which is held by processor The time-delay measuring method of live video as described above is realized during row.
Time-delay measuring method, equipment, system and the computer-readable medium of the live video of the present invention, by using above-mentioned The timestamp of target video frame can be encapsulated in code stream and be transmitted by technical solution, to ensure that acquisition time stamp can be by It is successfully transferred to and plays end so that the survey for effectively completing live streaming time delay can be stabbed when playing according to acquisition time by playing end Amount.The measurement of live streaming time delay is realized relative to existing manual operation, manual operation can be saved, effectively improve the essence of measurement Degree.And technical scheme of the present invention, the various protocols such as flv, rtmp and hls can be supported simultaneously, and flexibility is very high, uses Field is very wide.
【Description of the drawings】
Fig. 1 is the flow chart of the time-delay measuring method embodiment one of the live video of the present invention.
Fig. 2 is the flow chart of the time-delay measuring method embodiment two of the live video of the present invention.
Fig. 3 is the flow chart of the time-delay measuring method embodiment three of the live video of the present invention.
Fig. 4 is the signaling diagram of the time-delay measuring method example IV of the live video of the present invention.
Fig. 5 is the structure chart of the plug-flow end equipment embodiment of the present invention.
Fig. 6 is the structure chart of the CDN end equipment embodiments of the present invention.
Fig. 7 is the structure chart of the broadcasting end equipment embodiment of the present invention.
Fig. 8 is the structure chart of the video living transmission system embodiment of the present invention.
Fig. 9 is the structure chart of the computer equipment embodiment of the present invention.
Figure 10 is a kind of exemplary plot of computer equipment provided by the invention.
【Specific embodiment】
To make the objectives, technical solutions, and advantages of the present invention clearer, it is right in the following with reference to the drawings and specific embodiments The present invention is described in detail.
Fig. 1 is the flow chart of the time-delay measuring method embodiment one of the live video of the present invention.As shown in Figure 1, this implementation The time-delay measuring method of the live video of example, specifically may include steps of:
100th, according to Presentation Time Stamp (the Presentation Time Stamp of the target video frame after coding;PTS)、 And the incidence relation of the PTS of the target video frame pre-established and the acquisition time stamp of acquisition target video frame, obtain target The acquisition time stamp of video frame;
The executive agent of the time-delay measuring method of the live video of the present embodiment is that the plug-flow end in video living transmission system is set Standby, which for acquiring the image of each video frame in live video, and video frame is led in net cast Cross content distributing network (Content Delivery Network;CDN) end is that high in the clouds is sent to broadcasting end, is broadcast for playing end Each video frame is put, realizes net cast.In the present embodiment by taking a target video frame as an example, to introduce the live streaming of the present embodiment The latency measurement of video.
The target video frame of the present embodiment is specifically as follows the image of any frame in live video;In target video frame PTS can be carried in target video frame, for identifying the target video frame.The mesh can be got when acquiring target video frame The PTS of video frame is marked, related art can be referred in detail, no longer repeated herein.
Optionally, before step 100, can also include:When acquiring target video frame, adopting for target video frame is obtained Collect timestamp;Establish the incidence relation that the PTS of target video frame is stabbed with corresponding acquisition time.
Specifically, the present embodiment is when target video frame is acquired, it is also necessary to acquire the acquisition time of target video frame The stamp i.e. acquisition moment.The purpose of the present embodiment is finally to be transmitted to acquisition time stamp by CDN ends to play end, for playing end When playing, corresponding reproduction time stabs when stabbing and play according to the acquisition time, when measuring the live streaming of the target video frame Prolong.It can be assumed in the present embodiment under normal circumstances, the live streaming time delay of each video frame in live video is identical, can be with Using the time delay of either objective video frame as the time delay of live video, so as to obtain the time delay of live video.
It, can be by target video frame by the PTS unique marks of the target video frame in this present embodiment target video frame PTS and corresponding acquisition time stamp establish association, so as to fulfill by acquisition time stamp associated with target video frame.Plug-flow Target video frame feeding encoder is first encoded before target video frame is sent to CDN ends, obtains and compile from encoder by end The data of target video frame after code;Then according to the PTS of the target video frame after coding, from the target video frame pre-established PTS and acquisition time stamp incidence relation, the acquisition time stamp of the target video frame can be got.
101st, acquisition time stamp is encapsulated in code stream;
Specifically, the acquisition time of acquisition stamp is encapsulated in code stream, is encapsulated in for example, can specifically stab acquisition time Supplemental enhancement information (the Supplemental enhancement information of code stream;SEI in), it is further preferred that The SEI can be inserted in data packet i.e. network abstract layer (the Network Abstract of the target video frame in code stream Layer;NAL before) wrapping.In practical application, acquisition time stamp can also be encapsulated in the other positions in code stream, no longer superfluous herein It states.
In the present embodiment, being stabbed by the acquisition time of SEI transmission objectives video frame, SEI is a part for H.264 standard, It can support flash video (abbreviation flv) agreement, http live TV streams (http live streaming;Hls) agreement and Real-time messages transport protocol (real time messaging protocol;rtmp).Therefore, the present embodiment is by the way that target is regarded The acquisition time stamp of frequency frame is carried to be transmitted in SEI, even if carrying out transcoding frame rate conversion at CDN ends, can also take one Fixed measure ensures that the acquisition time stamp in SEI is not lost, so as to complete the measurement of live video time delay very well.
In addition, still optionally further, in the present embodiment, depositing for acquisition time stamp is also provided in the SEI of code stream It is identifying, such as when, there are during acquisition time stamp, can the numerical value of some predeterminated position being set as 1 in SEI, during as acquisition Between stab presence mark.And the numerical value of the predeterminated position is set as 0 there is no during acquisition time stamp in SEI.Make in this way Used time, such as whether it is 1 that CDN ends can first detect the numerical value of the predeterminated position, if 1, it is determined that the numerical value is acquisition time The presence mark of stamp can stab the position acquisition of the preset storage acquisition time stamp acquisition time from SEI.It and if should The numerical value of predeterminated position is 0, it is determined that without carrying acquisition time stamp in SEI.
102nd, to CDN ends, transmission is packaged with the data of the target video frame after encoding and the code of corresponding acquisition time stamp Stream, for CDN ends to play end transmission objectives video frame data while, the acquisition time of transmission objectives video frame, by broadcasting End is put when playing target video frame, measures the time delay of live streaming.
By above-mentioned processing, after target video frame is encapsulated in code stream, plug-flow end can be transmitted to CDN ends to be packaged with The data of target video frame after coding and corresponding acquisition time stamp code stream, for CDN ends to play end transmission objectives While the data of video frame, the acquisition time of transmission objectives video frame by playing end when playing target video frame, measures straight The time delay broadcast.
In the present embodiment, flv agreements, rtmp agreements or hls may be used in the bit stream between plug-flow end and CDN ends Agreement realizes data transmission.
It should be noted that be realized in the present embodiment live streaming time delay measurement, must be requested that plug-flow end, CDN ends and The clock for playing end synchronizes, and the method that specific clock synchronizes can refer to related art, not do in the present invention in detail It repeats.
By using the time-delay measuring method of the live video of the present embodiment, the time delay progress to live video can be realized It is accurate to measure, in order to subsequently according to the time delay of the live video of measurement, optimize the time delay of the live streaming in live broadcast system, improve straight Broadcast quality and live streaming efficiency.
The time-delay measuring method of the live video of the present embodiment, by the PTS according to the target video frame after coding and The incidence relation of the PTS of the target video frame pre-established and the acquisition time stamp of acquisition target video frame, obtain target video The acquisition time stamp of frame;Acquisition time stamp is encapsulated in code stream;To CDN ends, transmission is packaged with the target video frame after encoding Data and corresponding acquisition time stamp code stream, for CDN ends to play end transmission objectives video frame data while, pass The acquisition time of defeated target video frame by playing end when playing target video frame, measures the time delay of live streaming.The skill of the present embodiment It in art scheme, is transmitted by the way that the timestamp of target video frame is encapsulated in code stream, to ensure that acquisition time stamp can be by It is successfully transferred to and plays end so that the survey for effectively completing live streaming time delay can be stabbed when playing according to acquisition time by playing end Amount.The measurement of live streaming time delay is realized relative to existing manual operation, manual operation can be saved, effectively improve the essence of measurement Degree.
In addition, also have in the prior art by the way of the acquisition time stamp of video frame is transmitted in flv agreements, to broadcast It is stabbed when putting the video frame according to reproduction time stamp and acquisition time, realizes the measurement of time delay;But this kind of mode does not support code stream Conversion, flexibility is poor.It is also provided with a kind of timestamp command by increasing rtmp in the prior art, transmits video frame Acquisition time stabs, and to be stabbed when playing the video frame according to reproduction time stamp and acquisition time, realizes the measurement of time delay.This side Formula needs rtmp orders being associated with video requency frame data by force when realizing, the error for not only resulting in latency measurement is larger, simultaneously should Mode does not support that flv agreements and hls agreements, flexibility are poor yet.
And the time-delay measuring method of the live video of the present embodiment, compared with above-mentioned existing scheme, it can support simultaneously The various protocols such as flv, rtmp and hls, flexibility is very high, very wide using field.
Fig. 2 is the flow chart of the time-delay measuring method embodiment two of the live video of the present invention.As shown in Fig. 2, this implementation The time-delay measuring method of the live video of example, specifically may include steps of:
200th, before the data of the target video frame in the code stream transmitted to plug-flow end carry out transcoding, the mesh in code stream The data of video frame and the acquisition time stamp of target video frame are marked, establishes the PTS of target video frame and corresponding acquisition time The incidence relation of stamp;
The executive agent of the time-delay measuring method of the live video of the present embodiment is CDN end equipment or is referred to as cloud End, i.e., the present embodiment describes technical scheme of the present invention at CDN ends.Specifically, plug-flow end can pass through flv, rtmp or hls etc. Any agreement, the bit stream that the acquisition time of the data for being packaged with target video frame and acquisition target video frame is stabbed is extremely CDN ends.After CDN terminations receive code stream, need for target video frame to be converted into the form of various resolution ratio, to support height respectively Clearly, the broadcasting of standard and low clear video.For example, it can specifically be realized respectively by different encoders to target video frame Data carry out transcoding.But if directly code stream progress transcoding to realize that the data to target video frame carry out transcoding, can be caused The acquisition time stamp of the target video frame encapsulated in code stream is lost.It therefore, can be in the number to target video frame in the present embodiment Before transcoding, specifically it may include steps of:
(a) PTS of target video frame is obtained from the data of the target video frame in code stream;
(b) the acquisition time stamp of target video frame is obtained from the SEI in code stream;
(c) incidence relation that the PTS of target video frame is stabbed with corresponding acquisition time is established.
Not only include the data of target video frame, but also the stamp of the acquisition time including target video frame in the present embodiment in code stream, Specifically, acquisition time stamp can be encapsulated in the SEI of code stream.Specifically, which can be located at encapsulation target in code stream and regard Before the NAL packets of the data of frequency frame.Since the PTS of target video frame is for the unique mark target video frame, specifically may be used To obtain the PTS of target video frame from the data of the target video frame in code stream;Target video is obtained from the SEI in code stream The acquisition time stamp of frame;Then the incidence relation that the PTS of target video frame is stabbed with corresponding acquisition time is established.
A kind of specific implementations of the step of the present embodiment (a)-(c) for the step 200 in the present embodiment, practical application In, the acquisition time stamp in the present embodiment can also be encapsulated in the other positions in code stream, and details are not described herein.
Still optionally further, the presence mark for identifying acquisition time stamp can also be carried in the SEI of the present embodiment, If presence mark is carried in SEI, then it represents that acquisition time stamp is carried in the SEI;Otherwise acquisition time stamp is not carried. Therefore, before step (b) " the acquisition time stamp that target video frame is obtained from the SEI in code stream ", can also include:From code The numerical value of the position where the presence mark of acquisition time stamp is obtained in the SEI of stream, then according to the numerical value judge in SEI whether There are acquisition time stamps.If the numerical value is 1, identify presence stab there are acquisition time in the SEI in code stream to identify, the presence The position of mark both sides can be set in advance.Then the presence mark 1 in the SEI in code stream can be determined, it can be with It determines to carry acquisition time stamp in SEI.Otherwise such as the numerical value is 0, then identifies and acquisition time stamp is not present in the SEI in code stream Presence mark.
201st, after transcoding is carried out to the data of target video frame, according to incidence relation, acquisition time stamp is added to envelope In the code stream of data equipped with the target video frame after transcoding;
In CDN ends, the relevant technologies may be used, the data of target video frame are subjected to transcoding, obtain various resolution ratio The data of target video frame after transcoding.Then in the user's request target video frame for playing end, being further continued for will be after transcoding The data of target video frame, which are transferred to, plays end.It, can be with before transmission such as after transcoding is carried out to the data of target video frame According to the incidence relation that the PTS of the target video frame after transcoding and the PTS pre-established are stabbed with corresponding acquisition time, obtain Acquisition time stamp, is then added to the target video frame after being packaged with transcoding by the corresponding acquisition time stamp of the target video frame In the code stream of data.Such as can specifically acquisition time stamp be added in the SEI of the code stream, specifically, which can be located at code Before the NAL packets that target video frame is finally encapsulated in stream.In practical application, acquisition time stamp can also be encapsulated in other in code stream Position, details are not described herein.
202nd, to the data and corresponding acquisition time stamp for playing the target video frame after end transmission is packaged with transcoding Code stream for playing end when playing target video frame, measures the time delay of live streaming.
By above-mentioned processing, after target video frame is encapsulated in code stream, CDN ends are packaged with transcoding to end transmission is played The code stream of the data of target video frame afterwards and corresponding acquisition time stamp.The target video frame can be obtained by playing end in this way Acquisition time stamp, and play when record the target video frame reproduction time stamp, target video frame can be got in this way Time delay, and then get the time delay of live streaming.
The time-delay measuring method of the live video of the present embodiment, compared with the technical solution of above-mentioned embodiment illustrated in fig. 1 Difference lies in:Embodiment illustrated in fig. 1 describes technical scheme of the present invention at plug-flow end;And the present embodiment describes this hair at CDN ends Bright technical solution, realization principle is similar, can also refer to the record of embodiment described in above-mentioned Fig. 1 in detail, details are not described herein.
Similarly, the measurement of live streaming time delay is realized in the present embodiment, needs plug-flow end, CDN ends and the clock for playing end It must synchronize.
The time-delay measuring method of the live video of the present embodiment passes through the target video in the code stream transmitted to plug-flow end Before the data of frame carry out transcoding, the data of the target video frame in code stream and the acquisition time stamp of target video frame are built The incidence relation that the PTS of vertical target video frame is stabbed with corresponding acquisition time;After transcoding is carried out to the data of target video frame, According to incidence relation, in the code stream of data that acquisition time stamp is added to the target video frame after being packaged with transcoding;To broadcasting The data of the target video frame after being packaged with transcoding and the code stream of corresponding acquisition time stamp are transmitted in end, are being broadcast for playing end When putting target video frame, the time delay of live streaming is measured.In the technical solution of the present embodiment, by the way that the timestamp of target video frame is sealed It is transmitted in code stream, plays end to ensure that acquisition time stamp can be delivered successfully so that play end when playing The measurement for effectively completing live streaming time delay can be stabbed according to acquisition time.Live streaming time delay is realized relative to existing manual operation It measures, manual operation can be saved, effectively improve the precision of measurement.And the latency measurement side of the live video of the present embodiment Method can support the various protocols such as flv, rtmp and hls simultaneously, and flexibility is very high, very wide using field.
Fig. 3 is the flow chart of the time-delay measuring method embodiment three of the live video of the present invention.As shown in figure 3, this implementation The time-delay measuring method of the live video of example, specifically may include steps of:
300th, before the target video frame in the code stream transmitted to CDN ends plays out, the target video in code stream The data of frame and the acquisition time stamp of target video frame, establish the pass that the PTS of target video frame is stabbed with corresponding acquisition time Connection relationship;
The executive agent of the time-delay measuring method of the live video of the present embodiment is playing end description to play end equipment Technical scheme of the present invention.Specifically, CDN ends can will be packaged with target and regarded by any agreement such as flv, rtmp or hls The bit stream of the acquisition time stamp of the data of frequency frame and acquisition target video frame is to playing end.Play termination receive code stream it Afterwards, for the ease of measuring time delay, before being played out with the target video frame in code stream, target video frame is obtained from code stream The acquisition time of data and target video frame stabs, and then the pass that the PTS for establishing target video frame is stabbed with corresponding acquisition time Connection relationship.Specific implementation can refer to step (a)-(c) in above-described embodiment, can refer in above-described embodiment in detail It is related record, details are not described herein.
Similarly, optionally, before step (a) is performed, can also include:Presence mark in SEI in code stream, It determines to carry acquisition time stamp in SEI.The related record in above-described embodiment can also be referred in detail, and details are not described herein.
301st, when target video frame is played, the reproduction time of PTS and target video frame for establishing target video frame stab Correspondence;
301st, according to incidence relation and correspondence, the live streaming time delay for playing target video frame is obtained.
Specifically, end is played when playing target video frame, obtains the reproduction time stamp of target video frame, reproduction time stamp The as playing time of target video frame, because in video living transmission system, the clock at plug-flow end, CDN ends and broadcasting end is It is synchronous.So herein can by record target video frame reproduction time stab, then according to transmission come acquisition time stamp with Reproduction time stabs, to measure the time delay of live streaming.But due to net cast during, each target video frame is continuously It is transferred to from plug-flow end by CDN sections and plays end.For the ease of the monitoring and processing to each target video frame, regarded in target When frequency frame is played, it is also necessary to the PTS of target video frame is obtained from target video frame, since PTS is for the unique mark mesh Video frame is marked, the correspondence that the reproduction time of PTS and target video frame for then establishing target video frame stab just obtains target The correspondence that video frame is stabbed with corresponding reproduction time.Then it is associated with according to the PTS of target video frame with what acquisition time stabbed The correspondence that the reproduction time of the PTS of relationship and target video frame and target video frame stabs, just obtains the target video frame Corresponding acquisition time stamp and reproduction time stamp, so as to calculate the time difference of the two, obtain the straight of the target frame video The time delay broadcast.It is assumed that the time delay of the live streaming of each video frame is identical in the video living transmission system, so as to obtain the straight of live video The time delay broadcast.It according to the time delay of the live video of measurement, can subsequently optimize the time delay of the live streaming in live broadcast system, improve live streaming Quality and live streaming efficiency.
The time-delay measuring method of the live video of the present embodiment, compared with the technical solution of above-mentioned embodiment illustrated in fig. 2 Difference lies in:Embodiment illustrated in fig. 2 describes technical scheme of the present invention at CDN ends;And the present embodiment describes this hair at broadcasting end Bright technical solution, realization principle is similar, can also refer to the record of embodiment described in above-mentioned Fig. 2 in detail, details are not described herein.
The time-delay measuring method of the live video of the present embodiment passes through the target video in the code stream transmitted to CDN ends Before frame plays out, the data of the target video frame in code stream and the acquisition time stamp of target video frame establish target The incidence relation that the PTS of video frame is stabbed with corresponding acquisition time;When target video frame is played, target video frame is obtained The correspondence that the reproduction time of PTS and target video frame stabs;According to incidence relation and correspondence, obtain broadcasting target and regard The live streaming time delay of frequency frame.In the technical solution of the present embodiment, carried out by the way that the timestamp of target video frame is encapsulated in code stream Transmission plays end so that when broadcasting end can be according to acquisition when playing to ensure that acquisition time stamp can be delivered successfully Between stamp effectively complete live streaming time delay measurement.The measurement of live streaming time delay is realized relative to existing manual operation, can be saved Manual operation effectively improves the precision of measurement.And the time-delay measuring method of the live video of the present embodiment, it can prop up simultaneously The various protocols such as flv, rtmp and hls are held, flexibility is very high, very wide using field.
Fig. 4 is the signaling diagram of the time-delay measuring method example IV of the live video of the present invention.The live streaming of the present embodiment regards The time-delay measuring method of frequency on the basis of the technical solution of above-mentioned Fig. 1-embodiment illustrated in fig. 3, is further situated between in further detail Continue technical scheme of the present invention.As shown in figure 4, the time-delay measuring method of the live video of the present embodiment, can specifically be included such as Lower step:
400th, plug-flow end obtains acquisition time stamp during target video frame when acquiring target video frame;
401st, plug-flow end obtains the PTS of target video frame;
402nd, the incidence relation that the PTS of target video frame is stabbed with corresponding acquisition time is established at plug-flow end;
403rd, plug-flow end encoding to target video frame;According to the PTS and correspondence of the target video frame after coding Incidence relation, the acquisition time stamp of target video frame is obtained, by the SEI that is encapsulated in code stream of acquisition time stamp, and in SEI The presence mark that middle setting acquisition time stabs;
404th, plug-flow end is packaged with the data of the target video frame after encoding and corresponding acquisition time to the transmission of CDN ends The code stream of stamp;
405th, CDN ends obtain the PTS of target video frame from the data of the target video frame in the code stream that plug-flow end is transmitted;
406th, CDN ends judge and determine there are the presence mark that acquisition time stabs in SEI, and obtained from the SEI in code stream The acquisition time of target video frame is taken to stab;
407th, the incidence relation that the PTS of target video frame is stabbed with corresponding acquisition time is established at CDN ends;
408th, CDN ends carry out transcoding to the data of the target video frame in code stream;And according to incidence relation and transcoding after Target video frame in PTS, obtain acquisition time stamp;Acquisition time stamp is added to the target video frame after being packaged with transcoding Data code stream in;
409th, CDN ends are to the data and corresponding acquisition time for playing the target video frame after end transmission is packaged with transcoding The code stream of stamp;
410th, it plays end and target video frame is obtained from the data of the target video frame in the code stream that plug-flow end is transmitted PTS;
411st, end is played to judge and determine there are the presence mark that acquisition time stabs in SEI, and obtain from the SEI in code stream The acquisition time of target video frame is taken to stab;
412nd, it plays end and establishes the incidence relation that the PTS of target video frame is stabbed with corresponding acquisition time;
413rd, the target video frame in the broadcast code flow of end is played;Record the reproduction time stamp of target video frame;Establish target The correspondence that the PTS of video frame is stabbed with the reproduction time of target video frame;
414th, it plays end to broadcast according to incidence relation and correspondence, obtains the live streaming time delay for playing target video frame.
Plug-flow end in the framework for the live broadcast system that the time-delay measuring method of the live video of the present embodiment is applied, CDN End and the clock for playing end are all synchronous.
The present embodiment is to describe technical scheme of the present invention, realization principle and above-mentioned Fig. 1-Fig. 3 institutes along the trend of signaling Show the identical of embodiment, the record of above-mentioned Fig. 1-embodiment illustrated in fig. 3 can be referred in detail, details are not described herein.
The time-delay measuring method of the live video of the present embodiment, by using above-mentioned technical proposal, by by target video The timestamp of frame, which is encapsulated in code stream, to be transmitted, and can be played end to ensure that acquisition time stamp can be delivered successfully, be made End must be played can stab the measurement for effectively completing live streaming time delay when playing according to acquisition time.Relative to existing artificial behaviour Make to realize the measurement that time delay is broadcast live, manual operation can be saved, effectively improve the precision of measurement.And the live streaming of the present embodiment The time-delay measuring method of video can support the various protocols such as flv, rtmp and hls simultaneously, and flexibility is very high, uses field It is very wide.
Fig. 5 is the structure chart of the plug-flow end equipment embodiment of the present invention.As shown in figure 5, the plug-flow end equipment of the present embodiment, Can specifically it include:
Acquisition module 10 is used for according to the PTS of the target video frame after coding and the target video frame pre-established The incidence relation of PTS and the acquisition time stamp of acquisition target video frame obtain the acquisition time stamp of target video frame;
Package module 11 is used to the acquisition time stamp that acquisition module 10 obtains being encapsulated in code stream;
Transmission module 12 is used for that treated is packaged with the target video frame after coding to CDN ends transmission package module 11 Data and corresponding acquisition time stamp code stream, for CDN ends to play end transmission objectives video frame data while, pass The acquisition time of defeated target video frame by playing end when playing target video frame, measures the time delay of live streaming.
Still optionally further, in the plug-flow end equipment of the present embodiment, package module 11 is specifically used for obtaining acquisition module 10 The acquisition time stamp taken is encapsulated in the SEI of code stream.
Still optionally further, as shown in figure 5, being further included in the plug-flow end equipment of the present embodiment:
Setup module 13 be used for be provided in the SEI of code stream acquisition module 10 acquisition acquisition time stamp there are marks Know.
Still optionally further, as shown in figure 5, being further included in the plug-flow end equipment of the present embodiment:Establish module 14;
Acquisition module 10 is additionally operable to when acquiring target video frame, obtains acquisition time stamp during target video frame;
What the corresponding acquisition time for establishing module 14 for establishing the PTS of target video frame with acquisition module 10 obtains stabbed Incidence relation.
The plug-flow end equipment of the present embodiment realizes the realization principle of the latency measurement of live video by using above-mentioned module And technique effect is identical with the realization of above-mentioned related method embodiment, can refer to the note of above-mentioned related method embodiment in detail It carries, details are not described herein.
Fig. 6 is the structure chart of the CDN end equipment embodiments of the present invention.As shown in fig. 6, the CDN end equipments of the present embodiment, tool Body can include:
Before module 20 is established for the data progress transcoding of the target video frame in the code stream transmitted to plug-flow end, according to The acquisition time of the data of target video frame in code stream and target video frame stamp, establish the PTS of target video frame with it is corresponding Acquisition time stamp incidence relation;
Add module 21 is used for after transcoding is carried out to the data of target video frame, according to the association for establishing the foundation of module 20 Acquisition time stamp is added in the code stream for the data for being packaged with the target video frame after transcoding by relationship;
Transmission module 22 is used to be packaged with the target after transcoding and regard to playing the addition of end transmission add module 21 treated The code stream of the data of frequency frame and corresponding acquisition time stamp for playing end when playing target video frame, measures live streaming Time delay.
Still optionally further, it in the CDN end equipments of the present embodiment, establishes module 20 and is specifically used for:
The PTS of target video frame is obtained from the data of the target video frame in code stream;
The acquisition time stamp of target video frame is obtained from the SEI in code stream;
Establish the incidence relation that the PTS of target video frame is stabbed with corresponding acquisition time.
Still optionally further, as shown in fig. 6, being further included in the CDN end equipments of the present embodiment:
Determining module 23 determines to carry acquisition time stamp in SEI for the presence mark in the SEI in code stream. Then just the acquisition time stamp that module 20 obtains target video frame from the SEI in code stream is established in triggering.
The CDN end equipments of the present embodiment realize the realization principle of the latency measurement of live video by using above-mentioned module And technique effect is identical with the realization of above-mentioned related method embodiment, can refer to the note of above-mentioned related method embodiment in detail It carries, details are not described herein.
Fig. 7 is the structure chart of the broadcasting end equipment embodiment of the present invention.As shown in fig. 7, the broadcasting end equipment of the present embodiment, Can specifically it include:
It establishes before module 30 plays out for target video frame in the code stream transmitted to CDN ends, according in code stream Target video frame data and target video frame acquisition time stamp, establish the PTS of target video frame and corresponding acquisition The incidence relation of timestamp;
Module 30 is established to be additionally operable to when target video frame is played, establish the PTS of target video frame and target video frame Reproduction time stamp correspondence;
Acquisition module 31 is used for according to the incidence relation and correspondence for establishing the foundation of module 30, is obtained broadcasting target and is regarded The live streaming time delay of frequency frame.
Still optionally further, it in the broadcasting end equipment of the present embodiment, establishes module 30 and is specifically used for:
The PTS of target video frame is obtained from the data of the target video frame in code stream;
The acquisition time stamp of target video frame is obtained from the SEI in code stream;
Establish the incidence relation that the PTS of target video frame is stabbed with corresponding acquisition time.
Still optionally further, it as shown in fig. 7, in the broadcasting end equipment of the present embodiment, further includes:
Determining module 32 determines to carry acquisition time stamp in SEI for the presence mark in the SEI in code stream. Then just the acquisition time stamp that module 30 obtains target video frame from the SEI in code stream is established in triggering.
The broadcasting end equipment of the present embodiment realizes the realization principle of the latency measurement of live video by using above-mentioned module And technique effect is identical with the realization of above-mentioned related method embodiment, can refer to the note of above-mentioned related method embodiment in detail It carries, details are not described herein.
Fig. 8 is the structure chart of the video living transmission system embodiment of the present invention.As shown in figure 8, the net cast of the present embodiment System includes:Plug-flow end equipment 40, CDN end equipments 50 and broadcasting end equipment 60.
Specifically, CDN end equipments 50 communicate to connect respectively with plug-flow end equipment 40 and broadcasting end equipment 60.Specifically, it pushes away The plug-flow end equipment of above-mentioned embodiment illustrated in fig. 5 specifically may be used in stream end equipment 40;CDN end equipments 50 specifically may be used State the CDN end equipments of embodiment illustrated in fig. 6;Play the broadcasting end that above-mentioned embodiment illustrated in fig. 7 specifically may be used in end equipment 60 Equipment.
Plug-flow end equipment 40, CDN end equipments 50 and broadcasting end equipment 60, can in the latency measurement for realizing live video The latency measurement of live video is realized with the record with reference to above-mentioned Fig. 1-Fig. 4 any embodiments.
Fig. 9 is the structure chart of the computer equipment embodiment of the present invention.As shown in figure 9, the computer equipment of the present embodiment, Including:One or more processors 70 and memory 80, memory 80 work as memory for storing one or more programs The one or more programs stored in 80 are performed by one or more processors 70 so that one or more processors 70 are real respectively Now such as the time-delay measuring method of the live video of figure 1 above-Fig. 3 any embodiments.That is, the computer equipment of the present embodiment It is specifically as follows plug-flow end equipment, CDN end equipments or plays end equipment.To include multiple processors in embodiment illustrated in fig. 9 For 70.
For example, Figure 10 is a kind of exemplary plot of computer equipment provided by the invention.Figure 10 shows to be used for realizing The block diagram of the exemplary computer device 12a of embodiment of the present invention.The computer equipment 12a that Figure 10 is shown is only one and shows Example, should not bring any restrictions to the function and use scope of the embodiment of the present invention.Similarly, the computer equipment tool of the present embodiment Body can be plug-flow end equipment, CDN end equipments or play end equipment.
As shown in Figure 10, computer equipment 12a is showed in the form of universal computing device.The component of computer equipment 12a It can include but is not limited to:One or more processor 16a, system storage 28a, connection different system component is (including being Unite memory 28a and processor 16a) bus 18a.
Bus 18a represents one or more in a few class bus structures, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using the arbitrary bus structures in a variety of bus structures.It lifts For example, these architectures include but not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) Bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) bus.
Computer equipment 12a typically comprises a variety of computer system readable media.These media can be it is any can The usable medium accessed by computer equipment 12a, including volatile and non-volatile medium, moveable and immovable Jie Matter.
System storage 28a can include the computer system readable media of form of volatile memory, such as deposit at random Access to memory (RAM) 30a and/or cache memory 32a.Computer equipment 12a may further include it is other it is removable/ Immovable, volatile/non-volatile computer system storage medium.Only as an example, storage system 34a can be used for reading Write immovable, non-volatile magnetic media (Figure 10 do not show, commonly referred to as " hard disk drive ").Although do not show in Figure 10 Go out, can provide for moving the disc driver of non-volatile magnetic disk (such as " floppy disk ") read-write and to removable The CD drive of anonvolatile optical disk (such as CD-ROM, DVD-ROM or other optical mediums) read-write.In these cases, Each driver can be connected by one or more data media interfaces with bus 18a.System storage 28a can include At least one program product, the program product have one group of (for example, at least one) program module, these program modules are configured To perform the function of the above-mentioned each embodiments of Fig. 1-Fig. 8 of the present invention.
Program with one group of (at least one) program module 42a/utility 40a can be stored in such as system and deposit In reservoir 28a, such program module 42a include --- but being not limited to --- operating system, one or more application program, Other program modules and program data may include the reality of network environment in each or certain combination in these examples It is existing.Program module 42a usually performs the function and/or method in above-mentioned each embodiments of Fig. 1-Fig. 8 described in the invention.
Computer equipment 12a can also be with one or more external equipment 14a (such as keyboard, sensing equipment, display 24a etc.) communication, can also be enabled a user to one or more equipment interact with computer equipment 12a communicate and/or (such as network interface card is adjusted with enabling any equipment that computer equipment 12a communicates with one or more of the other computing device Modulator-demodulator etc.) communication.This communication can be carried out by input/output (I/O) interface 22a.Also, computer equipment 12a can also by network adapter 20a and one or more network (such as LAN (LAN), wide area network (WAN) and/or Public network, such as internet) communication.As shown in the figure, network adapter 20a by bus 18a and computer equipment 12a its Its module communicates.It should be understood that although not shown in the drawings, can combine computer equipment 12a uses other hardware and/or software Module, including but not limited to:Microcode, device driver, redundant processor, external disk drive array, RAID system, tape Driver and data backup storage system etc..
Processor 16a is stored in program in system storage 28a by operation, so as to perform various functions application and Data processing, such as realize the time-delay measuring method of the live video shown in above-described embodiment.
The present invention also provides a kind of computer-readable mediums, are stored thereon with computer program, which is held by processor The time-delay measuring method of the live video as shown in above-described embodiment is realized during row.
The computer-readable medium of the present embodiment can be included in the system storage 28a in above-mentioned embodiment illustrated in fig. 10 RAM30a, and/or cache memory 32a, and/or storage system 34a.
With the development of science and technology, the route of transmission of computer program is no longer limited by tangible medium, it can also be directly from net Network is downloaded or is obtained using other modes.Therefore, the computer-readable medium in the present embodiment can not only include tangible Medium can also include invisible medium.
The arbitrary combination of one or more computer-readable media may be used in the computer-readable medium of the present embodiment. Computer-readable medium can be computer-readable signal media or computer readable storage medium.Computer-readable storage medium Matter for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device or The arbitrary above combination of person.The more specific example (non exhaustive list) of computer readable storage medium includes:There are one tools Or the electrical connections of multiple conducting wires, portable computer diskette, hard disk, random access memory (RAM), read-only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light Memory device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer readable storage medium can To be any tangible medium for including or storing program, the program can be commanded execution system, device or device use or Person is in connection.
Computer-readable signal media can include in a base band or as a carrier wave part propagation data-signal, Wherein carry computer-readable program code.Diversified forms may be used in the data-signal of this propagation, including --- but It is not limited to --- electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be Any computer-readable medium other than computer readable storage medium, which can send, propagate or Transmission for by instruction execution system, device either device use or program in connection.
The program code included on computer-readable medium can be transmitted with any appropriate medium, including --- but it is unlimited In --- wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
It can write to perform the computer that operates of the present invention with one or more programming language or combinations Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with It fully performs, partly perform on the user computer on the user computer, the software package independent as one performs, portion Divide and partly perform or perform on a remote computer or server completely on the remote computer on the user computer. Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including LAN (LAN) or Wide area network (WAN)-be connected to subscriber computer or, it may be connected to outer computer (such as is carried using Internet service Pass through Internet connection for quotient).
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of division of logic function can have other dividing mode in actual implementation.
The unit illustrated as separating component may or may not be physically separate, be shown as unit The component shown may or may not be physical unit, you can be located at a place or can also be distributed to multiple In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also That each unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list The form that hardware had both may be used in member is realized, can also be realized in the form of hardware adds SFU software functional unit.
The above-mentioned integrated unit realized in the form of SFU software functional unit, can be stored in one and computer-readable deposit In storage media.Above-mentioned SFU software functional unit is stored in a storage medium, is used including some instructions so that a computer It is each that equipment (can be personal computer, server or the network equipment etc.) or processor (processor) perform the present invention The part steps of embodiment the method.And aforementioned storage medium includes:USB flash disk, mobile hard disk, read-only memory (Read- Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. it is various The medium of program code can be stored.
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 God and any modification, equivalent substitution, improvement and etc. within principle, done, should be included within the scope of protection of the invention.

Claims (23)

1. a kind of time-delay measuring method of live video, which is characterized in that the method includes:
According to the PTS of the PTS of the target video frame after coding and the target video frame pre-established with acquiring the mesh The incidence relation of the acquisition time stamp of video frame is marked, obtains the acquisition time stamp of the target video frame;
Acquisition time stamp is encapsulated in code stream;
To CDN ends, transmission is packaged with the data of the target video frame after encoding and the code of the corresponding acquisition time stamp Stream so that the CDN ends are to while playing end and transmit the data of the target video frame, transmits the institute of the target video frame Acquisition time is stated, by the broadcasting end when playing the target video frame, measures the time delay of live streaming.
2. according to the method described in claim 1, it is characterized in that, acquisition time stamp is encapsulated in code stream, specific packet It includes:
Acquisition time stamp is encapsulated in the SEI of code stream.
3. according to the method described in claim 2, it is characterized in that, the method further includes:
The presence mark of the acquisition time stamp is provided in the SEI of the code stream.
4. according to any methods of claim 1-3, which is characterized in that according to the PTS of the target video frame after coding, with And the incidence relation of acquisition time stamps of the PTS of the target video frame pre-established with acquiring the target video frame, it obtains Before taking the acquisition time stamp of the target video frame, the method further includes:
When acquiring the target video frame, the acquisition time stamp during target video frame is obtained;
Establish the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
5. a kind of time-delay measuring method of live video, which is characterized in that the method includes:
Before the data of target video frame in the code stream transmitted to plug-flow end carry out transcoding, the mesh in the code stream Mark the data of video frame and the acquisition time stamp of the target video frame, establish the PTS of the target video frame with it is corresponding The incidence relation of the acquisition time stamp;
After transcoding is carried out to the data of the target video frame, according to the incidence relation, the acquisition time is stabbed and is added Into the code stream for the data for being packaged with the target video frame after transcoding;
To the data and the corresponding acquisition time stamp for playing the target video frame after end transmission is packaged with transcoding Code stream so that the broadcasting end is when playing the target video frame, measures the time delay of live streaming.
6. the according to the method described in claim 5, it is characterized in that, data of the target video frame in the code stream And the acquisition time stamp of the target video frame, the PTS for establishing the target video frame are stabbed with the corresponding acquisition time Incidence relation, specifically include:
The PTS of the target video frame is obtained from the data of the target video frame in the code stream;
The acquisition time stamp of the target video frame is obtained from the SEI in the code stream;
Establish the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
7. according to the method described in claim 6, it is characterized in that, the target video is obtained from the SEI in the code stream Before the acquisition time stamp of frame, the method further includes:
It is described in the presence of mark in the SEI in the code stream, it determines to carry the acquisition time in the SEI Stamp.
8. a kind of time-delay measuring method of live video, which is characterized in that the method includes:
Before target video frame in the code stream transmitted to CDN ends plays out, the target video in the code stream The acquisition time of the data of frame and the target video frame stabs, and establishes the PTS of the target video frame and described is adopted with corresponding Collect the incidence relation of timestamp;
When the target video frame is played, when establishing the broadcasting of PTS and the target video frame of the target video frame Between the correspondence that stabs;
According to the incidence relation and the correspondence, the live streaming time delay for playing the target video frame is obtained.
9. the according to the method described in claim 8, it is characterized in that, data of the target video frame in the code stream And the acquisition time stamp of the target video frame, the PTS for establishing the target video frame are stabbed with the corresponding acquisition time Incidence relation, specifically include:
The PTS of the target video frame is obtained from the data of the target video frame in the code stream;
The acquisition time stamp of the target video frame is obtained from the SEI in the code stream;
Establish the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
10. according to the method described in claim 9, it is characterized in that, the target video is obtained from the SEI in the code stream Before the acquisition time stamp of frame, the method further includes:
It is described in the presence of mark in the SEI in the code stream, it determines to carry the acquisition time in the SEI Stamp.
11. a kind of plug-flow end equipment, which is characterized in that the equipment includes:
Acquisition module, for the PTS according to the target video frame after coding and the target video frame pre-established The incidence relation of acquisition time stamps of the PTS with acquiring the target video frame, when obtaining the acquisition of the target video frame Between stab;
Package module, for acquisition time stamp to be encapsulated in code stream;
Transmission module, for the data of the target video frame after being packaged with from coding to the transmission of CDN ends and corresponding described The code stream of acquisition time stamp, so that the CDN ends are to while playing end and transmit the data of the target video frame, described in transmission The acquisition time of target video frame by the broadcasting end when playing the target video frame, measures the time delay of live streaming.
12. equipment according to claim 11, which is characterized in that the package module, during specifically for by the acquisition Between stab and be encapsulated in the SEI of code stream.
13. equipment according to claim 12, which is characterized in that the equipment further includes:
Setup module, for being provided with the presence mark of the acquisition time stamp in the SEI of the code stream.
14. according to any equipment of claim 11-13, which is characterized in that the equipment, which further includes, establishes module;
The acquisition module is additionally operable to, when acquiring the target video frame, obtain the acquisition time during target video frame Stamp;
It is described to establish module, for establishing the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
15. a kind of CDN end equipments, which is characterized in that the equipment includes:
Module is established, before the data progress transcoding of the target video frame in the code stream transmitted to plug-flow end, according to described The data of the target video frame in code stream and the acquisition time stamp of the target video frame, establish the target video frame PTS and the incidence relation of corresponding acquisition time stamp;
Add module, for after transcoding is carried out to the data of the target video frame, according to the incidence relation, being adopted described In the code stream of data that collection timestamp is added to the target video frame after being packaged with transcoding;
Transmission module, for being packaged with the data of the target video frame after transcoding and corresponding described to playing end transmission The code stream of acquisition time stamp so that the broadcasting end is when playing the target video frame, measures the time delay of live streaming.
16. equipment according to claim 15, which is characterized in that it is described to establish module, it is specifically used for:
The PTS of the target video frame is obtained from the data of the target video frame in the code stream;
The acquisition time stamp of the target video frame is obtained from the SEI in the code stream;
Establish the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
17. equipment according to claim 16, which is characterized in that the equipment further includes:
Determining module for the presence mark in the SEI in the code stream, determines to carry in the SEI The acquisition time stamp.
18. a kind of broadcasting end equipment, which is characterized in that the equipment includes:
Module is established, before being played out for the target video frame in the code stream transmitted to CDN ends, according in the code stream The acquisition time of the data of the target video frame and the target video frame stabs, establish the PTS of the target video frame with The incidence relation of the corresponding acquisition time stamp;
It is described to establish module, be additionally operable to when the target video frame is played, establish the PTS of the target video frame with it is described The correspondence of the reproduction time stamp of target video frame;
Acquisition module, for according to the incidence relation and the correspondence, obtaining and playing the straight of the target video frame Sowing time prolongs.
19. equipment according to claim 18, which is characterized in that it is described to establish module, it is specifically used for:
The PTS of the target video frame is obtained from the data of the target video frame in the code stream;
The acquisition time stamp of the target video frame is obtained from the SEI in the code stream;
Establish the PTS of the target video frame and the incidence relation of the corresponding acquisition time stamp.
20. equipment according to claim 19, which is characterized in that the equipment further includes:
Determining module for the presence mark in the SEI in the code stream, determines to carry in the SEI The acquisition time stamp.
21. a kind of video living transmission system, which is characterized in that including any plug-flow end equipments of as above claim 11-14, As above any CDN end equipments of claim 15-17 and as above any broadcasting ends of claim 18-20 are set It is standby;The CDN end equipments communicate to connect respectively with the plug-flow end equipment and the broadcasting end equipment.
22. a kind of computer equipment, which is characterized in that the equipment includes:
One or more processors;
Memory, for storing one or more programs;
When one or more of programs are performed by one or more of processors so that one or more of processors are real The now method as described in any in claim 1-4,5-7 and 8-10.
23. a kind of computer-readable medium, is stored thereon with computer program, which is characterized in that the program is executed by processor Methods of the Shi Shixian as described in any in claim 1-4,5-7 and 8-10.
CN201711320836.XA 2017-12-12 2017-12-12 Time-delay measuring method, equipment, system and the computer-readable medium of live video Active CN108234997B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711320836.XA CN108234997B (en) 2017-12-12 2017-12-12 Time-delay measuring method, equipment, system and the computer-readable medium of live video

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711320836.XA CN108234997B (en) 2017-12-12 2017-12-12 Time-delay measuring method, equipment, system and the computer-readable medium of live video

Publications (2)

Publication Number Publication Date
CN108234997A true CN108234997A (en) 2018-06-29
CN108234997B CN108234997B (en) 2019-11-26

Family

ID=62649401

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711320836.XA Active CN108234997B (en) 2017-12-12 2017-12-12 Time-delay measuring method, equipment, system and the computer-readable medium of live video

Country Status (1)

Country Link
CN (1) CN108234997B (en)

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989884A (en) * 2018-08-01 2018-12-11 浙江齐聚科技有限公司 Live video delay performance test method, device, equipment and storage medium
CN109510978A (en) * 2018-11-07 2019-03-22 西安万像电子科技有限公司 A kind of method for testing performance and device of data processing
CN110225416A (en) * 2019-05-31 2019-09-10 杭州涂鸦信息技术有限公司 A kind of transmission method of video, the network terminal, intelligent terminal and storage device
CN110401850A (en) * 2019-07-30 2019-11-01 网宿科技股份有限公司 A kind of method and apparatus of the customized SEI of transparent transmission
CN110708597A (en) * 2019-10-12 2020-01-17 腾讯科技(深圳)有限公司 Live broadcast delay monitoring method and device, electronic equipment and readable storage medium
CN110933449A (en) * 2019-12-20 2020-03-27 北京奇艺世纪科技有限公司 Method, system and device for synchronizing external data and video pictures
CN111654690A (en) * 2020-05-06 2020-09-11 北京百度网讯科技有限公司 Live video delay time determination method and device and electronic equipment
CN112153443A (en) * 2020-09-01 2020-12-29 青岛海信传媒网络技术有限公司 PTS acquisition method and display device
CN112261418A (en) * 2020-09-18 2021-01-22 网宿科技股份有限公司 Method for transmitting live video data and live broadcast acceleration system
CN112601078A (en) * 2020-12-11 2021-04-02 杭州当虹科技股份有限公司 Automatic measuring method for encoder delay based on video
CN113163222A (en) * 2021-03-31 2021-07-23 杭州奥点科技股份有限公司 Video frame synchronization method, system, equipment and readable storage medium
CN113676783A (en) * 2021-08-18 2021-11-19 上海哔哩哔哩科技有限公司 Link node evaluation method and device
CN113923530A (en) * 2021-10-18 2022-01-11 北京字节跳动网络技术有限公司 Interactive information display method and device, electronic equipment and storage medium
CN114257843A (en) * 2020-09-24 2022-03-29 腾讯科技(深圳)有限公司 Multimedia data processing method, device, equipment and readable storage medium
CN114554237A (en) * 2022-02-18 2022-05-27 北京有竹居网络技术有限公司 Information processing method, device and equipment
CN115002526A (en) * 2022-05-23 2022-09-02 阿里巴巴(中国)有限公司 Video frame time delay determining method and device
CN115225542A (en) * 2022-07-20 2022-10-21 北京京东乾石科技有限公司 Video information processing method and device, electronic equipment and storage medium

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004320713A (en) * 2003-03-31 2004-11-11 Nippon Hoso Kyokai <Nhk> Delay time measurement method, delay time measurement system, time information setting apparatus, and delay time measurement apparatus
CN101087400A (en) * 2007-06-26 2007-12-12 中兴通讯股份有限公司 Video frame delay detection method and system
CN101212671A (en) * 2007-12-21 2008-07-02 上海广电(集团)有限公司中央研究院 Low-delay real-time transport stream multiplexing method
CN101888412A (en) * 2010-07-05 2010-11-17 优视科技有限公司 Video push processing method and system serving live broadcast of mobile terminal
CN102316363A (en) * 2011-09-09 2012-01-11 华南理工大学 Method and devices for measuring video end-to-end delay by non-intrusive double-ended collection
CN102655585A (en) * 2012-04-16 2012-09-05 中国联合网络通信集团有限公司 Video conference system and time delay testing method, device and system thereof
CN102811373A (en) * 2011-05-30 2012-12-05 上海圣炅商务咨询有限公司 Method for carrying out video broadcast on Internet and mobile Internet by mobile terminal
US20140010517A1 (en) * 2012-07-09 2014-01-09 Sensr.Net, Inc. Reduced Latency Video Streaming
CN104144312A (en) * 2013-05-09 2014-11-12 腾讯科技(深圳)有限公司 Video processing method and related device
CN105451096A (en) * 2015-12-02 2016-03-30 北京暴风科技股份有限公司 Webcast system and webcast method
CN105791986A (en) * 2014-12-23 2016-07-20 中国移动通信集团公司 Video time delay detection method and device
CN106210708A (en) * 2015-04-30 2016-12-07 杭州海康威视数字技术股份有限公司 The detection method of a kind of picture delay and system
CN106803967A (en) * 2017-02-13 2017-06-06 北京奇虎科技有限公司 A kind for the treatment of method and apparatus of live data

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004320713A (en) * 2003-03-31 2004-11-11 Nippon Hoso Kyokai <Nhk> Delay time measurement method, delay time measurement system, time information setting apparatus, and delay time measurement apparatus
CN101087400A (en) * 2007-06-26 2007-12-12 中兴通讯股份有限公司 Video frame delay detection method and system
CN101212671A (en) * 2007-12-21 2008-07-02 上海广电(集团)有限公司中央研究院 Low-delay real-time transport stream multiplexing method
CN101888412A (en) * 2010-07-05 2010-11-17 优视科技有限公司 Video push processing method and system serving live broadcast of mobile terminal
CN102811373A (en) * 2011-05-30 2012-12-05 上海圣炅商务咨询有限公司 Method for carrying out video broadcast on Internet and mobile Internet by mobile terminal
CN102316363A (en) * 2011-09-09 2012-01-11 华南理工大学 Method and devices for measuring video end-to-end delay by non-intrusive double-ended collection
CN102655585A (en) * 2012-04-16 2012-09-05 中国联合网络通信集团有限公司 Video conference system and time delay testing method, device and system thereof
US20140010517A1 (en) * 2012-07-09 2014-01-09 Sensr.Net, Inc. Reduced Latency Video Streaming
CN104144312A (en) * 2013-05-09 2014-11-12 腾讯科技(深圳)有限公司 Video processing method and related device
CN105791986A (en) * 2014-12-23 2016-07-20 中国移动通信集团公司 Video time delay detection method and device
CN106210708A (en) * 2015-04-30 2016-12-07 杭州海康威视数字技术股份有限公司 The detection method of a kind of picture delay and system
CN105451096A (en) * 2015-12-02 2016-03-30 北京暴风科技股份有限公司 Webcast system and webcast method
CN106803967A (en) * 2017-02-13 2017-06-06 北京奇虎科技有限公司 A kind for the treatment of method and apparatus of live data

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989884A (en) * 2018-08-01 2018-12-11 浙江齐聚科技有限公司 Live video delay performance test method, device, equipment and storage medium
CN109510978A (en) * 2018-11-07 2019-03-22 西安万像电子科技有限公司 A kind of method for testing performance and device of data processing
CN109510978B (en) * 2018-11-07 2020-05-26 西安万像电子科技有限公司 Data processing performance detection method and device
CN110225416A (en) * 2019-05-31 2019-09-10 杭州涂鸦信息技术有限公司 A kind of transmission method of video, the network terminal, intelligent terminal and storage device
CN110401850B (en) * 2019-07-30 2021-10-22 网宿科技股份有限公司 Method and device for transparent transmission of custom SEI
CN110401850A (en) * 2019-07-30 2019-11-01 网宿科技股份有限公司 A kind of method and apparatus of the customized SEI of transparent transmission
CN110708597A (en) * 2019-10-12 2020-01-17 腾讯科技(深圳)有限公司 Live broadcast delay monitoring method and device, electronic equipment and readable storage medium
CN110708597B (en) * 2019-10-12 2022-01-18 腾讯科技(深圳)有限公司 Live broadcast delay monitoring method and device, electronic equipment and readable storage medium
CN110933449A (en) * 2019-12-20 2020-03-27 北京奇艺世纪科技有限公司 Method, system and device for synchronizing external data and video pictures
CN111654690A (en) * 2020-05-06 2020-09-11 北京百度网讯科技有限公司 Live video delay time determination method and device and electronic equipment
CN112153443A (en) * 2020-09-01 2020-12-29 青岛海信传媒网络技术有限公司 PTS acquisition method and display device
CN112153443B (en) * 2020-09-01 2022-02-22 青岛海信传媒网络技术有限公司 PTS acquisition method and display device
CN112261418A (en) * 2020-09-18 2021-01-22 网宿科技股份有限公司 Method for transmitting live video data and live broadcast acceleration system
CN114257843A (en) * 2020-09-24 2022-03-29 腾讯科技(深圳)有限公司 Multimedia data processing method, device, equipment and readable storage medium
CN112601078A (en) * 2020-12-11 2021-04-02 杭州当虹科技股份有限公司 Automatic measuring method for encoder delay based on video
CN112601078B (en) * 2020-12-11 2022-07-26 杭州当虹科技股份有限公司 Automatic encoder delay measuring method based on video
CN113163222A (en) * 2021-03-31 2021-07-23 杭州奥点科技股份有限公司 Video frame synchronization method, system, equipment and readable storage medium
CN113676783A (en) * 2021-08-18 2021-11-19 上海哔哩哔哩科技有限公司 Link node evaluation method and device
CN113923530A (en) * 2021-10-18 2022-01-11 北京字节跳动网络技术有限公司 Interactive information display method and device, electronic equipment and storage medium
CN114554237A (en) * 2022-02-18 2022-05-27 北京有竹居网络技术有限公司 Information processing method, device and equipment
CN114554237B (en) * 2022-02-18 2023-12-26 北京有竹居网络技术有限公司 Information processing method, device and equipment
CN115002526A (en) * 2022-05-23 2022-09-02 阿里巴巴(中国)有限公司 Video frame time delay determining method and device
CN115225542A (en) * 2022-07-20 2022-10-21 北京京东乾石科技有限公司 Video information processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN108234997B (en) 2019-11-26

Similar Documents

Publication Publication Date Title
CN108234997A (en) Time-delay measuring method, equipment, system and the computer-readable medium of live video
CN103297452B (en) A kind of in the Internet issue and the method and system of live broadcast stream media
US10459943B2 (en) System and method for splicing media files
CN104918133B (en) A kind of playing method and device for regarding video flowing in networking
CN107925797B (en) Method and apparatus for acquiring audio data
CN109348252B (en) Video playing method, video transmission method, device, equipment and storage medium
CN103841432B (en) The transmission method and equipment of a kind of composite video data
US9521469B2 (en) Carriage of quality information of content in media formats
KR101959260B1 (en) Media data transmission apparatus and method, and media data reception apparatus and method in mmt system
CN105451096B (en) Network direct broadcasting system and live broadcasting method
CN102291272A (en) Method of remote active testing of a device or network
CN101145933A (en) Transmission method, receiving method and corresponding device for distribution system and media data
CN104243920A (en) Image stitching method and device based on basic stream video data packaging
CN106331733A (en) Desktop cloud terminal&#39;s audio and video data real-time processing method and system
WO2022037386A1 (en) Data processing method and apparatus for point cloud media, and device and storage medium
CN110100460A (en) Based on head position and time there is non-head to track stereosonic ambisonics audio
CN105491397A (en) Real time video pushing method based on combination of UDT protocol and TS slices
CN106034242A (en) Audio/video live broadcast streaming media data transmission method in P2P system
CN108847248A (en) Bluetooth equipment audio-frequency processing method, system, readable storage medium storing program for executing and bluetooth equipment
CN109089129A (en) The steady more video binding live broadcast systems of one kind and its method
CN101159579A (en) Method and terminal of receiving network transport protocol based stream media data
CN102984546A (en) Transcoding service system for distributed video transcoding
US11435977B2 (en) Method for transmitting and receiving audio data related to transition effect and device therefor
CN109413371A (en) Video frame rate calculation method and device
CN109802742A (en) A kind of method, equipment and system for transmitting data

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
GR01 Patent grant
GR01 Patent grant