CN108124192A - The playback method and system of HLS Streaming Medias - Google Patents

The playback method and system of HLS Streaming Medias Download PDF

Info

Publication number
CN108124192A
CN108124192A CN201611080380.XA CN201611080380A CN108124192A CN 108124192 A CN108124192 A CN 108124192A CN 201611080380 A CN201611080380 A CN 201611080380A CN 108124192 A CN108124192 A CN 108124192A
Authority
CN
China
Prior art keywords
bursts
code check
hls streaming
mrow
streaming medias
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
CN201611080380.XA
Other languages
Chinese (zh)
Other versions
CN108124192B (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.)
Non Cloud Internet Technology (shanghai) Co Ltd
Original Assignee
Non Cloud Internet Technology (shanghai) 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 Non Cloud Internet Technology (shanghai) Co Ltd filed Critical Non Cloud Internet Technology (shanghai) Co Ltd
Priority to CN201611080380.XA priority Critical patent/CN108124192B/en
Publication of CN108124192A publication Critical patent/CN108124192A/en
Application granted granted Critical
Publication of CN108124192B publication Critical patent/CN108124192B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/44004Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving video buffer management, e.g. video decoder buffer or video display buffer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • H04N21/44209Monitoring of downstream path of the transmission network originating from a server, e.g. bandwidth variations of a wireless network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/482End-user interface for program selection
    • H04N21/4825End-user interface for program selection using a list of items to be played back in a given order, e.g. playlists

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides the playback method and system of HLS Streaming Medias, obtains the M3U8 index files of HLS Streaming Medias, according to the index information in M3U8 index files, selects using the corresponding index information of the minimum replacement stream of code check as the first current play list;According to the address information of TS bursts pending in the first current play list, the audio and video primary flow of pending TS bursts is obtained, and is stored in buffer queue;According to the download time of audio and video primary flow and data volume size, the real-time bandwidth of calculating network;According to the index information of M3U8 index files, the replacement stream that selection code check is larger in the replacement stream of real-time bandwidth is less than from code check, using the index information corresponding to it as the second current play list, to replace the first current play list.The present invention still ensures that the continuity of HLS streaming media playings when network environment is very poor, reduces the situation for playing interim card.

Description

The playback method and system of HLS Streaming Medias
Technical field
Field is played the present invention relates to network flow-medium more particularly in unstable networks at the broadcasting of HLS Streaming Medias Manage method and system.
Background technology
The transmission of digital video experienced cable TV network, IPTV, enter the internet television epoch at present.Tradition has Line TV and IPTV pass through designated lane transmitting multimedia data, it is ensured that it is data smoothing, punctual reachable, and based on internet or The multi-medium data of mobile Internet does not have dedicated transmission channel, and data are transmitted on public network, peak period network congestion Probability is big, it is impossible to ensure the stability of transmission channel bandwidth, particularly in the case of mobile, network stabilization is poor, It is high to there is shake probability, causes the change dramatically of network bandwidth.For video playing, delaying to reach for data packet can cause to play Interim card, greatly injured viewing experience.
In order to enable video is suitble to transmit on the internet, people have invented many network flow-medium agreements, HTTP Live Streaming (HLS) is current most popular one kind.HLS is a kind of Streaming transfer protocol based on HTTP, Ke Yishi The program request of existing Streaming Media and direct broadcast service.The basic principle of HLS protocol is:Server cuts audio/video flow (TS) into pieces, and Establish index (M3U8) file;Terminal user first downloads index file, then is downloaded successively by the index address in index file TS bursts corresponding with broadcasting, form the broadcasting of Streaming Media.When same signal source includes the HLS streams of multiple and different code checks, its energy Enough self-adaption code rate stream is broadcast, and according to the variation of terminal network bandwidth, automatically switches to the stream of different code checks, is user unstable Network on smooth broadcasting experience is provided.
However, when HLS stream of the real-time network bandwidth continuously less than the lowest bit rate in signal source, player still can be caused During interim card, particularly HLS live streamings, since burst duration is shorter, cause the probability higher for playing interim card, seriously during reduction live streaming User experience.As it can be seen that how to improve the fluency in network congestion and jitter conditions lower network streaming media playing, ability is still Domain urgent problem to be solved.
The content of the invention
In view of the foregoing deficiencies of prior art, it is an object of the invention to provide HLS Streaming Medias playback method and System, network flow-medium plays slack during for solving the problems, such as that network environment is severe in the prior art.
In order to achieve the above objects and other related objects, the present invention provides a kind of playback method of HLS Streaming Medias, described HLS Streaming Medias include the replacement stream of multiple and different code checks, the described method includes:Obtain the M3U8 indexes text of the HLS Streaming Medias Part according to the index information in the M3U8 index files, selects to make the corresponding index information of the minimum replacement stream of code check For the first current play list;According to the address information of TS bursts pending in first current play list, institute is obtained The audio and video primary flow of pending TS bursts is stated, and is stored in buffer queue;During according to the download of the audio and video primary flow Between and data volume size, the real-time bandwidth of calculating network;According to the index information of the M3U8 index files, it is less than institute from code check It states in the replacement stream of real-time bandwidth and selects code check maximum or the replacement stream more than predetermined threshold value, the index information corresponding to it is made For the second current play list, to replace first current play list.
In one embodiment of the invention, in the replacement stream from code check less than the real-time bandwidth code check is selected to be more than pre- If the replacement stream of threshold value, including:The replacement stream that code check is more than to the predetermined threshold value sorts according to code check size, and ascending It is stepped up.
In one embodiment of the invention, the method further includes:If in the index information of the M3U8 index files, do not have Code check is less than the replacement stream of the real-time bandwidth, then keeps the code check corresponding to first current play list constant.
In one embodiment of the invention, the method further includes:Whenever described in the audio and video primary flow deposit for having TS bursts During buffer queue, the number for the TS bursts that the buffer queue has is counted and updated.
In one embodiment of the invention, the method further includes:Judge for the TS bursts having in the buffer queue Whether number reaches the upper limit value of amount of storage, if so, waiting the audio and video primary flow of these TS bursts to be played.
In one embodiment of the invention, the method further includes:Sequentially play the medium TS to be played of the buffer queue The audio and video primary flow of burst;Wherein, the playback rate of the TS bursts of first broadcasting is default playback rate, then, Mei Gebo The playback rate p for the TS bursts putvIt is calculated by the following formula:
qnFor the number of remaining TS bursts to be played in the buffer queue, T is the TS bursts of nearest one broadcasting Playing duration, t is the playing duration of audio and video primary flow that the TS fragment requests of a nearest broadcasting arrive.
In one embodiment of the invention, the method further includes:If the p being calculatedvLess than preset value, then the p is madev Equal to the preset value.
In one embodiment of the invention, the method further includes:Judge for the TS bursts having in the buffer queue Whether number reaches the upper limit value of amount of storage, if it is not, then continuing to obtain the audio and video primary flow of next pending TS bursts, directly It is disposed to the corresponding HLS Streaming Medias of the M3U8 index files.
It is described after the corresponding HLS Streaming Medias of the M3U8 index files are disposed in one embodiment of the invention Method further includes:Obtain newer M3U8 index files.
In order to achieve the above objects and other related objects, the present invention provides a kind of play system of HLS Streaming Medias, described HLS Streaming Medias include the replacement stream of multiple and different code checks, the system comprises:Sorting module, for obtaining the HLS Streaming Medias M3U8 index files, according to the index information in the M3U8 index files, selecting will be corresponding to the minimum replacement stream of code check Index information as the first current play list;Memory module, for according to pending in first current play list TS bursts address information, obtain the audio and video primary flow of the pending TS bursts, and be stored in buffer queue;It calculates Module, for the download time according to the audio and video primary flow and data volume size, the real-time bandwidth of calculating network;Replace mould Block for the index information according to the M3U8 index files, is less than option code in the replacement stream of the real-time bandwidth from code check Rate maximum or the replacement stream more than predetermined threshold value, using the index information corresponding to it as the second current play list, to replace First current play list.
As described above, the playback method and system of the HLS Streaming Medias of the present invention, pass through the adaptation mechanism of HLS multi code Rate of Chinese character With the mechanism of adaptive adjustment playback rate, it is ensured that network environment deteriorate into it is very poor in the case of, remain able to smoothly broadcast Network flow-medium is put, improves the user experience that HLS players bring user.
Description of the drawings
Fig. 1 is shown as ES data request process flow chart in one embodiment of the invention.
Fig. 2 is shown as ES data playbacks process flow diagram flow chart in one embodiment of the invention.
Fig. 3 is shown as the play system module map of HLS Streaming Medias in one embodiment of the invention.
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification Disclosed content understands other advantages and effect of the present invention easily.The present invention can also pass through in addition different specific realities The mode of applying is embodied or practiced, the various details in this specification can also be based on different viewpoints with application, without departing from Various modifications or alterations are carried out under the spirit of the present invention.It should be noted that in the case where there is no conflict, following embodiment and implementation Feature in example can be mutually combined.
It should be noted that the diagram provided in following embodiment only illustrates the basic structure of the present invention in a schematic way Think, then only the display component related with the present invention rather than component count, shape and size during according to actual implementation in schema It draws, kenel, quantity and the ratio of each component can be a kind of random change during actual implementation, and its assembly layout kenel It is likely more complexity.
The present invention will by taking HLS stream media protocols as an example, elaborate proposed according to network condition adjust automatically play The method and system of device audio and video playing rate, still, which is not limited with HLS stream media protocols, side proposed by the present invention Method and system are equally applicable to other network flow-medium agreements, such as:Rtp (Real-time Transport Protocol, it is real When transport protocol), rtcp (Real-time Transport Control Protocol, RTP Control Protocol), rtsp (Real Time Streaming Protocol, real time streaming transport protocol), rtmp (Real Time Messaging Protocol, it is real When message transmission protocol), mms (Microsoft Media Server Protocol, Microsoft Media Server agreement) etc..
In HLS playing process, since network change causes the time of downloading slicing more than the broadcasting for having cached audio and video Duration, it is impossible to keep the continuity of audio and video playing, so as to cause interim card is played, substantially reduce user experience.It considers:In net Network bandwidth is continuous worsening, when required already below HLS lowest bit rates, and code check adaptation mechanism existing HLS cannot It works again, the present invention proposes:Extend and cached the playing duration of audio, video data, to avoid going out when waiting fragment data Existing broadcasting interim card problem.Broadcasting speed reduce ratio and caching in audio, video data number it is closely coupled, in caching Audio, video data is more, and for the ratio that playback rate reduces with regard to smaller, the reduction of speed influence that user can perceive is just smaller.Energy of the present invention The probability for playing interim card is enough substantially reduced, improves the user experience of HLS live streamings.
The present invention proposes a kind of method according to network condition adjust automatically player audio and video playing rate, first, leads to The download time of burst is spent to assess network condition;Secondly, playback rate is calculated according to network evaluation situation;Finally, according to meter The playback rate of calculation plays the audio, video data in caching.In the present invention, the HLS streams of each code check are exactly a played column Table.
Entire HLS players in the present invention include two parallel process flows, are ES (audio and video primary flow) respectively Request of data and ES data playbacks synchronize processing between two flows by the buffer queue of ES data.
Assuming that:Queue is Q, can cache the ES data of M TS burst;The HLS that HLS sources include N kinds (such as 4 kinds) code check flows, The serial number i of current play list, the code check B (i) of corresponding lists;The time of TS bursts is downloaded in ES data request process every time For td, burst size is md, which is T, and a length of t during the ES data playbacks which has requested that downloads TS The network bandwidth calculated after burst is bd;ES data buffer storage queues Q at most caches the ES data of M (such as 5) TS bursts, queue In TS bursts (the TS bursts for including whole ES data) quantity be qn, the playing duration of video ES data is q in queuevt;ES Playback rate is p during data playbackv, normal play rate can be:pv=1.
In ES data request process, mainly downloaded comprising TS bursts, the parsing of TS bursts and code check switch three parts.Fig. 1 The flow chart of ES data request process in one embodiment of the invention is shown as, including following detailed rate-determining steps:
Step S101:Update and parsing index information., it is necessary to download and parse M3U8 indexes when entering the step for the first time The HLS of multiple code checks is flowed and is ranked up (from small to large) according to code check size, so as to obtain played column by the index information of file Table, and the HLS that current play list is switched to lowest bit rate flows, and is numbered from 0, i.e. i=0, and i < N.Afterwards, enter , it is necessary to update the M3U8 index files of all code checks in HLS live streamings during the step.After having performed, step S102 is transferred to. It should be noted that after the HLS stream sequences of N kind code checks in the playlist that is formed, the corresponding playlist of each code check It is to be made of equal number of TS bursts, the playing duration of the corresponding TS bursts of each playlist is equal, but each played column The download address of the TS bursts of table is different.
Step S102:The ES data of a TS burst are asked.According to the ground of TS bursts to be asked in current play list The ES data of TS bursts are downloaded and parsed to location information, and obtained ES data are stored in buffer queue Q, and update video length qvt。 After all ES data of burst have been asked, burst download time t is updateddWith burst size md, the TS burst counters of queue Q qnIncrease by 1.After having performed, step S103 is transferred to.
Step S103:Judge whether all bursts are all disposed, i.e., whether entire HLS flow datas request is completed.If item Part is set up, then terminates entire ES request of data flow;Otherwise, it is transferred to step S104.
Step S104:HLS code checks are switched according to network bandwidth.After downloading and having parsed a TS burst ES data, use Adaptive (ABR) mechanism switching playlist of code check.A burst is often downloaded all according to the download time of fragment data and burst The real-time bandwidth b of the size calculating network of datad=md/td, the matched playlist of code check is switched to further according to real-time bandwidth (code check convergence is maximum and less than bandwidth), to ensure the fluency played.Assuming that:The new serial number i ' of playlist, is meeting B (i ') < bdUnder conditions of so that i ' is maximum, and works as bdDuring < B (0), i '=0.As i ' > i, i increases by 1 are broadcast as next Table is emplaced, otherwise, i=i ' keeps current play list.After having performed, step S105 is transferred to.
Since the recovery of network bandwidth is usually slow, in one embodiment, the big palpulus of code check after switching is gradually Increase into formula, such as:Existing 1M bits/s, 2M bits/s, 4M bits/s, 8M bits/s 4 kinds of code checks playlist, N=4, it is assumed that current i=1 is playing the playlist of 1M bytes/s code checks, and calculated according to current TS burst is downloaded Bandwidth out is 10M bits/s, meet condition and maximum should select i'=3, i.e. 8M bits/s, it is contemplated that network Stability takes i'=2, i.e. 4M bits/s here, to ensure the continuity and code check quality of follow-up TS bursts download.It is if follow-up The network bandwidth that the TS of download is drawn is also to be more than or equal to 8M bits/s, then will slowly play code check again increases to 8M bits/S.Similarly, usually dropped suddenly due to the decline of network bandwidth, in one embodiment, it is necessary to great-jump-forward reduce Code check, example in undertaking if the i' calculated is less than i, drop to i=0, such as i=suddenly<i'<I+1, then i'=i, i.e. played column Table code check is constant.
Step S105:Judge whether the queue of ES data buffer storages has expired.Specifically, work as qnDuring equal to M, queue Q cachings have been expired, ES data playbacks are needed to wait for, until queue is discontented with, i.e. qnLess than M, then it is transferred to step S101;Otherwise, directly it is transferred to step S101.
During ES data playbacks, mainly played comprising the decoding of ES data, decoding data and playback rate calculates three Part.Fig. 2 is shown as the flow chart of the ES data playback processes of one embodiment of the invention, including following detailed control step Suddenly:
Step S201:Playback rate is initialized as normal play rate.Assumed condition is accepted, playback rate p is setv= After 1, step S102 is transferred to.
Step S202:First TS burst ES request of data is completed.Wait complete first TS of ES request of data flow processings After burst, step S203 is transferred to.
Step S203:A frame ES data are decoded, i.e., a frame ES data are read from buffer queue Q and are decoded.If queue Q For sky, then pending datas are waited, after reading frame ES data success, then be decoded.Update qvtAfterwards, it is transferred to step S204.
Step S204:A frame decoding data are played by playback rate.By the decoding data of step S203 according to playback rate pvAfter=1 plays out, step S205 is transferred to.
Step S205:Judge whether to play a TS burst, that is, judge whether a currently playing frame data are TS points The last frame data of piece.If condition is set up, the TS burst counters q of queue Qn1 is reduced, then is transferred to step S206;Otherwise, It is transferred to step S203.
Step S206:Judge whether HLS streams finish, i.e., whether entire HLS streams finish.If condition is set up, Terminate entire ES data playbacks flow;Otherwise, it is transferred to step S207.
Step S207:The playback rate of next TS bursts how much is calculated according to caching ES data.Work as qnMore than or equal to M- 1, it is believed that network normal table, player keep normal play rate pv=1;Work as qnDuring less than M-1, it is necessary to reduce and play speed Rate, the calculation formula of rate are:
After the ES data for often having handled a TS burst, a playback rate p is updatedv, next TS bursts are using new Playback rate play.Work as qnDuring equal to 0, pv=t/T;Work as qnDuring more than 0, pv=t/ (t+T/ (qn+1)).If updated pv During less than preset value (may be configured as 0.25), then v is forced to be equal to preset value, sound is caused to avoid because playback rate is too low Sensory effects are poor.After being disposed, step S203 is transferred to.
Referring to Fig. 3, with above method embodiment principle similarly, the present invention provides a kind of broadcasting of HLS Streaming Medias System 300, mainly includes:Sorting module 301, memory module 302, computing module 303, replacement module 304.Due to foregoing implementation Technical characteristic in example can be applied to the system embodiment, thus it is no longer repeated.
Sorting module 301 obtains the M3U8 index files of the HLS Streaming Medias, according to the rope in the M3U8 index files Fuse ceases, and selects using the corresponding index information of the minimum replacement stream of code check as the first current play list;
Memory module 302 obtains institute according to the address information of TS bursts pending in first current play list The audio and video primary flow of pending TS bursts is stated, and is stored in buffer queue;
Computing module 303 according to the download time of the audio and video primary flow and data volume size, calculating network it is real-time Bandwidth;
Replacement module 304 is less than replacing for the real-time bandwidth according to the index information of the M3U8 index files from code check Code check maximum or the replacement stream more than predetermined threshold value are selected in the change of current, the index information corresponding to it is currently playing as second List, to replace first current play list.Wherein, selected in the replacement stream from code check less than the real-time bandwidth Code check is more than the replacement stream of predetermined threshold value, can include:Code check is more than the replacement stream of the predetermined threshold value according to code check size Sequence, and ascending be stepped up.If in addition, in the index information of the M3U8 index files, it is less than without code check described The replacement stream of real-time bandwidth can then keep the code check corresponding to first current play list constant.
In one embodiment, system 300 further includes:Statistical module, whenever the audio and video primary flow for having TS bursts is stored in institute When stating buffer queue, the number for the TS bursts that the buffer queue has is counted and updated.The statistical module also gather around in:Judge Whether the number for the TS bursts having in the buffer queue reaches the upper limit value of amount of storage, if so, waiting these TS to be played The audio and video primary flow of burst;If it is not, then continue to obtain the audio and video primary flow of next pending TS bursts, until described The corresponding HLS Streaming Medias of M3U8 index files are disposed, then obtain newer M3U8 index files.
In one embodiment, system 300 further includes:It is medium to be played sequentially to play the buffer queue for playing module The audio and video primary flow of TS bursts;Wherein, the playback rate of the TS bursts of first broadcasting is default playback rate, then, each The playback rate p of the TS bursts of broadcastingvIt is calculated by the following formula:
qnFor the number of remaining TS bursts to be played in the buffer queue, T is the TS bursts of nearest one broadcasting Playing duration, t is the playing duration of audio and video primary flow that the TS fragment requests of a nearest broadcasting arrive.If it calculates The p arrivedvLess than preset value, the p can be madevEqual to the preset value.
In conclusion the HLS flow media playing methods and system of the present invention, when being deteriorated to a certain extent by reducing network The playback rate of player, the TS bursts not complete ES request of data strive for more download times, ensure to play continuous Property, the interim card situation that plays is reduced, various shortcoming of the prior art is effectively overcome and has high industrial utilization.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe Know the personage of this technology all can carry out modifications and changes under the spirit and scope without prejudice to the present invention to above-described embodiment.Cause This, those of ordinary skill in the art is complete without departing from disclosed spirit and institute under technological thought such as Into all equivalent modifications or change, should by the present invention claim be covered.

Claims (10)

1. a kind of playback method of HLS Streaming Medias, which is characterized in that the HLS Streaming Medias include the replacement of multiple and different code checks Stream, the described method includes:
The M3U8 index files of the HLS Streaming Medias are obtained, according to the index information in the M3U8 index files, are selected code The corresponding index information of the minimum replacement stream of rate is as the first current play list;
According to the address information of TS bursts pending in first current play list, the pending TS bursts are obtained Audio and video primary flow, and be stored in buffer queue;
According to the download time of the audio and video primary flow and data volume size, the real-time bandwidth of calculating network;
According to the index information of the M3U8 index files, it is less than from code check in the replacement stream of the real-time bandwidth and selects code check most The big or replacement stream more than predetermined threshold value, using the index information corresponding to it as the second current play list, with described in replacement First current play list.
2. the playback method of HLS Streaming Medias according to claim 1, which is characterized in that described to be less than the reality from code check Code check is selected to be more than the replacement stream of predetermined threshold value in the replacement stream of Time Bandwidth, including:Code check is more than replacing for the predetermined threshold value The change of current is sorted according to code check size, and ascending is stepped up.
3. the playback method of HLS Streaming Medias according to claim 1, which is characterized in that further include:If the M3U8 indexes In the index information of file, the replacement stream of the real-time bandwidth is less than without code check, then keeps first current play list Corresponding code check is constant.
4. the playback method of HLS Streaming Medias according to claim 1, which is characterized in that further include:Whenever there is TS bursts When audio and video primary flow is stored in the buffer queue, the number for the TS bursts that the buffer queue has is counted and updated.
5. the playback method of HLS Streaming Medias according to claim 4, which is characterized in that further include:Judge the caching team Whether the number for the TS bursts having in row reaches the upper limit value of amount of storage, if so, the sound of these TS bursts to be played is waited to regard Frequency primary flow.
6. the playback method of HLS Streaming Medias according to claim 5, which is characterized in that further include:
Sequentially play the audio and video primary flow of the medium TS bursts to be played of the buffer queue;
Wherein, the playback rate of the TS bursts of first broadcasting is default playback rate, then, the broadcasting of the TS bursts each played Rate pvIt is calculated by the following formula:
<mrow> <msub> <mi>p</mi> <mi>v</mi> </msub> <mo>=</mo> <mfenced open = "{" close = ""> <mtable> <mtr> <mtd> <mrow> <mi>t</mi> <mo>/</mo> <mi>T</mi> </mrow> </mtd> <mtd> <mrow> <msub> <mi>q</mi> <mi>n</mi> </msub> <mo>=</mo> <mn>0</mn> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mi>t</mi> <mo>/</mo> <mrow> <mo>(</mo> <mi>t</mi> <mo>+</mo> <mi>T</mi> <mo>/</mo> <mo>(</mo> <mrow> <msub> <mi>q</mi> <mi>n</mi> </msub> <mo>+</mo> <mn>1</mn> </mrow> <mo>)</mo> <mo>)</mo> </mrow> </mrow> </mtd> <mtd> <mrow> <msub> <mi>q</mi> <mi>n</mi> </msub> <mo>&gt;</mo> <mn>0</mn> </mrow> </mtd> </mtr> </mtable> </mfenced> </mrow>
qnFor the number of remaining TS bursts to be played in the buffer queue, T is the broadcasting of the TS bursts of nearest one broadcasting Duration, t are the playing duration for the audio and video primary flow that the TS fragment requests of a nearest broadcasting arrive.
7. the playback method of HLS Streaming Medias according to claim 6, which is characterized in that further include:If the p being calculatedv Less than preset value, then the p is madevEqual to the preset value.
8. the playback method of HLS Streaming Medias according to claim 4, which is characterized in that further include:Judge the caching team Whether the number for the TS bursts having in row reaches the upper limit value of amount of storage, if it is not, then continuing to obtain next pending TS The audio and video primary flow of burst, until the corresponding HLS Streaming Medias of the M3U8 index files are disposed.
9. the playback method of HLS Streaming Medias according to claim 8, which is characterized in that in the M3U8 index files pair After the HLS Streaming Medias answered are disposed, further include:Obtain newer M3U8 index files.
10. a kind of play system of HLS Streaming Medias, which is characterized in that the HLS Streaming Medias include the replacement of multiple and different code checks Stream, the system comprises:
Sorting module, for obtaining the M3U8 index files of the HLS Streaming Medias, according to the index in the M3U8 index files Information is selected using the corresponding index information of the minimum replacement stream of code check as the first current play list;
Memory module, for the address information according to TS bursts pending in first current play list, described in acquisition The audio and video primary flow of pending TS bursts, and be stored in buffer queue;
Computing module, for the download time according to the audio and video primary flow and data volume size, the real-time band of calculating network It is wide;
For the index information according to the M3U8 index files, the replacement of the real-time bandwidth is less than from code check for replacement module Code check maximum or the replacement stream more than predetermined threshold value are selected in stream, using the index information corresponding to it as the second currently playing row Table, to replace first current play list.
CN201611080380.XA 2016-11-30 2016-11-30 HLS streaming media playing method and system Active CN108124192B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611080380.XA CN108124192B (en) 2016-11-30 2016-11-30 HLS streaming media playing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611080380.XA CN108124192B (en) 2016-11-30 2016-11-30 HLS streaming media playing method and system

Publications (2)

Publication Number Publication Date
CN108124192A true CN108124192A (en) 2018-06-05
CN108124192B CN108124192B (en) 2020-06-19

Family

ID=62226095

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611080380.XA Active CN108124192B (en) 2016-11-30 2016-11-30 HLS streaming media playing method and system

Country Status (1)

Country Link
CN (1) CN108124192B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712684A (en) * 2018-06-07 2018-10-26 深圳市茁壮网络股份有限公司 A kind of local TS stream files playback method, third party's player and terminal
CN111417031A (en) * 2020-04-28 2020-07-14 北京金山云网络技术有限公司 File transmission method and device and electronic equipment
CN112565833A (en) * 2020-11-26 2021-03-26 的卢技术有限公司 HLS-based multimedia adaptive play control method
CN114157643A (en) * 2021-12-20 2022-03-08 海看网络科技(山东)股份有限公司 Method for fixing code rate parameters based on transcoder HLS protocol

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088620A (en) * 2010-12-01 2011-06-08 中兴通讯股份有限公司 Method for downloading media file in content distribution network and client
US20150052259A1 (en) * 2012-05-02 2015-02-19 Huawei Technologies Co., Ltd. Method For Generating Media Information, Terminal, Server, and AHS System
CN105451075A (en) * 2014-08-27 2016-03-30 北京大学 Video quality control method and video quality control device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102088620A (en) * 2010-12-01 2011-06-08 中兴通讯股份有限公司 Method for downloading media file in content distribution network and client
US20150052259A1 (en) * 2012-05-02 2015-02-19 Huawei Technologies Co., Ltd. Method For Generating Media Information, Terminal, Server, and AHS System
CN105451075A (en) * 2014-08-27 2016-03-30 北京大学 Video quality control method and video quality control device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108712684A (en) * 2018-06-07 2018-10-26 深圳市茁壮网络股份有限公司 A kind of local TS stream files playback method, third party's player and terminal
CN108712684B (en) * 2018-06-07 2021-04-06 深圳市茁壮网络股份有限公司 Local TS (transport stream) file playing method, third-party player and terminal
CN111417031A (en) * 2020-04-28 2020-07-14 北京金山云网络技术有限公司 File transmission method and device and electronic equipment
CN111417031B (en) * 2020-04-28 2022-05-31 北京金山云网络技术有限公司 File transmission method and device and electronic equipment
CN112565833A (en) * 2020-11-26 2021-03-26 的卢技术有限公司 HLS-based multimedia adaptive play control method
CN114157643A (en) * 2021-12-20 2022-03-08 海看网络科技(山东)股份有限公司 Method for fixing code rate parameters based on transcoder HLS protocol
CN114157643B (en) * 2021-12-20 2023-01-13 海看网络科技(山东)股份有限公司 Method for fixing code rate parameters based on transcoder HLS protocol

Also Published As

Publication number Publication date
CN108124192B (en) 2020-06-19

Similar Documents

Publication Publication Date Title
US11792296B2 (en) Edge cache segment prefetching
US10623785B2 (en) Streaming manifest quality control
EP2649792B1 (en) Pre-buffering audio/video stream pairs
US9083640B2 (en) Adaptive bit rate switching
CN108124192A (en) The playback method and system of HLS Streaming Medias
CN106686409B (en) Streaming media code rate self-adaption method and device, server and terminal
US20170171578A1 (en) Media content delivery using an obfuscated manifest
US11743535B2 (en) Video fragment file processing
US11647242B2 (en) Methods and systems for low latency streaming
US20180351868A1 (en) Multicast abr flow prioritization using error detection thresholds in the receiver
CN110149560B (en) Player optimization method and system based on HLS protocol, storage medium and terminal
CN108933764A (en) It is a kind of to realize the method and apparatus for quickly rising and broadcasting
CN110809167A (en) Video playing method and device, electronic equipment and storage medium
CN105578201A (en) System and method for implementing dynamic adjustment of HLS live bit rate number
KR20210042051A (en) Multipath-based block transmission system and streaming method for adaptive streaming service
CN112203105A (en) New media mobile live broadcasting method and system
Kim et al. Context-aware prefetching scheme for interactive multimedia services based on HTTP adaptive streaming
US20230275977A1 (en) Methods, systems, and apparatuses for signaling server-associated delays in content delivery
KR102511949B1 (en) Method of Efficient Video Pacing Considering User&#39;s Random Watching Point and Apparatus therefor
ZHAO et al. Reducing Start-up Delay and Traffic Consumption with Dynamic Threshold in VoD Systems

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