CN106790005B - Realize the system and method for low delay HLS live streaming - Google Patents

Realize the system and method for low delay HLS live streaming Download PDF

Info

Publication number
CN106790005B
CN106790005B CN201611143468.1A CN201611143468A CN106790005B CN 106790005 B CN106790005 B CN 106790005B CN 201611143468 A CN201611143468 A CN 201611143468A CN 106790005 B CN106790005 B CN 106790005B
Authority
CN
China
Prior art keywords
file
live
media
media slicing
local
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611143468.1A
Other languages
Chinese (zh)
Other versions
CN106790005A (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.)
WUHAN FONSVIEW TECHNOLOGY Co Ltd
Original Assignee
WUHAN FONSVIEW 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 WUHAN FONSVIEW TECHNOLOGY Co Ltd filed Critical WUHAN FONSVIEW TECHNOLOGY Co Ltd
Priority to CN201611143468.1A priority Critical patent/CN106790005B/en
Publication of CN106790005A publication Critical patent/CN106790005A/en
Application granted granted Critical
Publication of CN106790005B publication Critical patent/CN106790005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/762Media network packet handling at the source 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol

Abstract

The invention discloses a kind of system and methods for realizing low delay HLS live streaming, are related to field of Internet multimedia.The system includes head end encoder, server and client side, and head end encoder is used to provide the original live source that dynamic updates;For head-end encoder acquisition original live source, dynamic real-time update index file and several media slicing files of dynamic generation, updated index file and since being broadcast live point, forward at least three media slicings file output is HLS unicast live source to server;Index file and media slicing file are sent in real time, and away from live streaming point, a nearest media slicing file is sent by the way of chunked coding;Client selects any position of one of media slicing file to start to play for parsing the index file received and media slicing file.The present invention can overcome the disadvantages that the high delay defect of traditional HLS live broadcast system, reduces time delay to greatest extent, makes HLS live streaming closer to live streaming point.

Description

Realize the system and method for low delay HLS live streaming
Technical field
The present invention relates to field of Internet multimedia, and in particular to a kind of system and method for realizing low delay HLS live streaming.
Background technique
HLS (Http Live Streaming) agreement has many advantages such as simple, adaptive, is that global use is most wide General the Internet transport protocol, HLS direct seeding technique are even more the every field for being widely used in mobile Internet Streaming Media.But it is opposite In common live streaming media agreement, such as RTMP agreement, RTSP agreement, mobile agent server protocol etc., traditional HLS protocol live broadcast system It is not real real time flow medium live broadcast system.In traditional HLS live broadcast system, server will be got from head end encoder Media information cutting for several are short and the media slicing file of continuous ts format, constantly update corresponding m3u8 format Then newest multiple media slicing files are continuously sent to client by index file and newest media slicing file End, these media slicing files of client downloads simultaneously play media data.This technical characterstic of HLS, determines its delay It generally can be more than a media slicing file duration, therefore, the delay of HLS live streaming can always be higher than common live streaming media and assist View.
Summary of the invention
The purpose of the invention is to overcome the shortcomings of that traditional HLS protocol live broadcast system has high delay, a kind of reality is provided The system and method for existing low delay HLS live streaming, the system and method can make up for it the high delay defect of traditional HLS live broadcast system, Time delay is reduced to greatest extent, makes HLS live streaming closer to live streaming point.
The present invention provides a kind of system for realizing low delay HLS live streaming, which includes head end encoder, server and visitor Family end,
The head end encoder is used for: providing the original live source that dynamic updates;
The server is used for: head-end encoder obtains original live source, according to original live source dynamic real-time update Index file and several media slicing files of dynamic generation, by updated index file and since being broadcast live point it is forward at least Three media slicing file outputs are HLS unicast live source;Updated index file and at least three media point are sent in real time Piece file, away from live streaming point, a nearest media slicing file is sent by the way of block transmission coding;
The client is used for: being parsed the index file received and media slicing file, and is selected as needed wherein Any position of one media slicing file starts to play.
Based on the above technical solution, the original live source is User Datagram Protocol UDP multicast live source;Institute Stating server includes the first conversion network element, and the first conversion network element is used for:
Head-end encoder obtains UDP multicast live source, simultaneously according to UDP multicast live source dynamic real-time update index file Several media slicing files of dynamic generation, by updated index file and forward at least three media minute since being broadcast live point The output of piece file is HLS unicast live source;When client request plays live streaming, opened by updated index file and from live streaming point The forward at least three media slicings file that begins is sent to client in real time, forward at least three media minute since being broadcast live point In piece file, away from live streaming point, a nearest media slicing file is sent by the way of block transmission coding.
Based on the above technical solution, the original live source is HLS unicast live source;The server includes the One storage network element, the first storage network element are used for:
Head-end encoder obtains HLS unicast live source, simultaneously according to HLS unicast live source dynamic real-time update index file Several media slicing files of dynamic generation, by updated index file and forward at least three media minute since being broadcast live point Local index file and local media slicing files are recorded and be stored as to piece file, by local index file and local media Slicing files output is local HLS unicast live source, and total number >=described put from live streaming of the local media slicing files is opened Begin the total number of forward at least three media slicings file;When client request plays live streaming, by local index file and this Ground media slicing file is sent to client in real time, in local media slicing files, a nearest media slicing away from live streaming point File is sent by the way of block transmission coding.
Based on the above technical solution, the original live source is UDP multicast live source;The server includes the Two conversion network elements and the second storage network element, wherein
The second conversion network element is used for: head-end encoder obtains UDP multicast live source, according to UDP multicast live source Dynamic real-time update index file and several media slicing files of dynamic generation are opened by updated index file and from live streaming point Forward at least three media slicings file output of beginning is HLS unicast live source;Live streaming is recorded in the second storage network element request When, forward at least three media slicings file is sent to the second storage net by updated index file and since being broadcast live point Member, away from live streaming point, a nearest media slicing file is sent by the way of block transmission coding;
The second storage network element is used for: recording live streaming to the second conversion network element request, the second conversion network element is sent Local index file and local media slicing files, the local are recorded and are stored as to index file and media slicing file The total number of media slicing file >=forward at least three media slicings file since being broadcast live point total number;It incite somebody to action this Ground index file and local media slicing files are sent to client in real time, nearest away from live streaming point in local media slicing files A media slicing file using block transmission coding by the way of send.
Based on the above technical solution, a media slicing file nearest away from live streaming point is generating One media slicing file, in addition to away from a nearest media slicing file of live streaming point, remaining media slicing of server transmission File is the media slicing file generated;The server is also used to: the media slicing file generated is adopted It is sent with the mode that non-block transmission encodes.
The present invention provides a kind of method for realizing low delay HLS live streaming applied to above system, comprising the following steps:
The head end encoder provides the original live source that dynamic updates;
The server head-end encoder obtains original live source, indexes text according to original live source dynamic real-time update Part and several media slicing files of dynamic generation, by updated index file and forward at least three matchmaker since being broadcast live point The output of body slicing files is HLS unicast live source;Updated index file and at least three media slicing files are sent in real time, Away from live streaming point, a nearest media slicing file is sent by the way of block transmission coding;
The client parses the index file and media slicing file received, and selects one of matchmaker as needed Any position of body slicing files starts to play.
Based on the above technical solution, the original live source is User Datagram Protocol UDP multicast live source;Institute It states server and sends updated index file and forward at least three media slicing since being broadcast live point in real time to client File, since being broadcast live point in forward at least three media slicings file, a nearest media slicing file away from live streaming point It is sent by the way of block transmission coding.
Based on the above technical solution, the original live source is HLS unicast live source;The server head-end Encoder obtains HLS unicast live source, according to HLS unicast live source dynamic real-time update index file and several matchmakers of dynamic generation Body slicing files, forward at least three media slicings file is recorded by updated index file and since being broadcast live point And it is stored as local index file and local media slicing files, it is by local index file and the output of local media slicing files Local HLS unicast live source, the total number of the local media slicing files >=described forward at least three since being broadcast live point The total number of a media slicing file;Send local index file and local media slicing files, local matchmaker in real time to client In body slicing files, away from live streaming point, a nearest media slicing file is sent by the way of block transmission coding.
Based on the above technical solution, the original live source is UDP multicast live source;The server includes the Two conversion network elements and the second storage network element, the second conversion network element head-end encoder obtain UDP multicast live source, according to UDP multicast live source dynamic real-time update index file and several media slicing files of dynamic generation, by updated index text Part and to start the output of forward at least three media slicings file since live streaming point be HLS unicast live source;The second storage net When live streaming is recorded in member request, second converts network element for updated index file and forward at least three matchmaker since being broadcast live point Body slicing files are sent to the second storage network element, away from a nearest media slicing file of live streaming point using block transmission coding Mode is sent;
The second storage network element records live streaming to the second conversion network element request, the index text that the second conversion network element is sent Local index file and local media slicing files, the local media point are recorded and are stored as to part and media slicing file The total number of piece file >=forward at least three media slicings file since being broadcast live point total number;Give client reality When send local index file and local media slicing files, in local media slicing files, a nearest matchmaker away from live streaming point Body slicing files are sent by the way of block transmission coding.
Based on the above technical solution, a media slicing file nearest away from live streaming point is generating One media slicing file, in addition to away from a nearest media slicing file of live streaming point, remaining media slicing of server transmission File is the media slicing file generated;The media slicing file generated is using non-block transmission coding Mode is sent.
Compared with prior art, advantages of the present invention is as follows:
(1) server in the present invention encodes a media slicing file nearest away from live streaming point using block transmission The mode of (Chunked transfer encoding, chunked coding) is sent to client, away from one of live streaming point recently Media slicing file is the media slicing file generated in server.The media slicing file generated is subjected to piecemeal The mode of transmission coding is sent, rather than is just sent after waiting media slicing file all to generate, and can be added to greatest extent The timeliness that newest media slicing file reaches client is broadcast live fastly, most multipotency reduces by the delay of 2~5s.
(2) present invention can take non-chunked to encode to away from the farther away media slicing file generated of live streaming point Mode send, thus reduce coding and decoding the time.The present invention can make up for it the high delay defect of traditional HLS live broadcast system, Time delay is reduced to greatest extent, makes HLS live streaming closer to live streaming point.
Detailed description of the invention
Fig. 1 is the topology diagram that low delay HLS live broadcast system is realized in the embodiment of the present invention 3;
Fig. 2 is the flow chart that low delay HLS live broadcasting method is realized in the embodiment of the present invention 3;
Fig. 3 is the schematic diagram that UDP multicast switchs to HLS unicast live streaming in the embodiment of the present invention 3;
Fig. 4 is the schematic diagram that server is recorded in the embodiment of the present invention 3 and storage HLS is broadcast live;
Fig. 5 is the schematic diagram of client terminal playing HLS unicast live streaming in the embodiment of the present invention 3.
Specific embodiment
With reference to the accompanying drawing and specific embodiment the present invention is described in further detail.In order to describe simplicity, this hair In bright embodiment, the index file of m3u8 format is referred to as m3u8 file, based on the main m3u8 file abbreviation of m3u8 format M3u8 file, the subindex file of m3u8 format are referred to as sub- m3u8 file;The media slicing file of ts format is referred to as Ts fragment;Block transmission coding is referred to as chunked coding.So-called live streaming point refers to currently in the embodiment of the present invention Time point corresponding to picture is broadcast live.
Embodiment 1:
The present embodiment provides it is a kind of realize low delay HLS live streaming system, the system include head end encoder, server and Client, server include the first conversion network element;
Head end encoder is used for: providing the User Datagram Protocol UDP multicast live source that dynamic updates;
First conversion network element is used to UDP multicast live source being converted to HLS unicast live source, detailed process are as follows: head-end Encoder obtains UDP multicast live source, according to UDP multicast live source dynamic real-time update m3u8 file and several ts of dynamic generation Fragment, retain since live streaming point start forward at least three ts fragment, by updated m3u8 file and since live streaming to Preceding at least three ts fragments output is output HLS unicast live source;Client is broadcast live to the first conversion network element request HLS unicast When source, forward at least three ts fragment is sent to client in real time by m3u8 file and since being broadcast live point, wherein away from live streaming A nearest ts fragment generated of point is sent by the way of chunked coding;Remaining generated at least two A ts fragment can be sent using chunked coding or non-chunked coding mode;
Client is used for: being requested HLS unicast live source to the first conversion network element, is parsed m3u8 file and since being broadcast live point Forward at least three ts fragment, and any position of one of ts fragment is selected to start to play as needed.
The present embodiment provides a kind of methods for realizing low delay HLS live streaming applied to above system, comprising the following steps:
Head end encoder provides the UDP multicast live source that dynamic updates, and the first conversion network element head-end encoder obtains UDP Multicast live source retains according to UDP multicast live source dynamic real-time update m3u8 file and several ts fragments of dynamic generation from straight The forward at least three ts fragment of beginning is broadcast, by updated m3u8 file and forward at least three ts since being broadcast live point Fragment output is output HLS unicast live source;
Client requests HLS unicast live source to the first conversion network element, and the first conversion network element is by m3u8 file and from live streaming Point starts forward at least three ts fragment and is sent to client in real time, wherein is generating away from one of live streaming point recently Ts fragment is sent by the way of chunked coding;Remaining at least two ts fragment generated can use chunked Coding or non-chunked coding mode are sent;
Since client parse m3u8 file and the forward at least three ts fragment point is broadcast live, and selects it as needed In any position of a ts fragment start to play.
Embodiment 2:
The system for realizing low delay HLS live streaming the present embodiment provides second, which includes head end encoder, server And client, server include the first storage network element;
Head end encoder is used for: providing the HLS unicast live source that dynamic updates;
First storage network element is used for: head-end encoder obtains HLS unicast live source, is generated according to HLS unicast live source Dynamic update m3u8 file and several ts fragments of dynamic generation, by updated index file and since be broadcast live point it is forward Local m3u8 file and local ts fragment are recorded and be stored as at least three media slicing files, by local m3u8 file and Local ts fragment output is local HLS unicast live source;Client requests local HLS unicast live source to the first storage network element When, local m3u8 file and local ts fragment are sent to client in real time, the local ts fragment number of transmission >=from point is broadcast live Start forward at least three ts fragment number;In local ts fragment, a nearest ts fragment generated away from live streaming point It is sent by the way of chunked coding;Remaining local ts fragment generated can use chunked coding or non- Chunked coding mode is sent;
Client is used for: being requested local HLS unicast live source to the first storage network element, is parsed local m3u8 file and local Ts fragment, and any position of one of ts fragment is selected to start to play as needed.
The present embodiment provides a kind of methods for realizing low delay HLS live streaming applied to above-mentioned second of system, including with Lower step:
Head end encoder provides the HLS unicast live source that dynamic updates;
First storage network element head-end encoder obtains HLS unicast live source, generates dynamic more according to HLS unicast live source New m3u8 file and several ts fragments of dynamic generation, by updated index file and forward at least three since being broadcast live point Local m3u8 file and local ts fragment are recorded and be stored as to a media slicing file, by local m3u8 file and local ts Fragment output is local HLS unicast live source;When client requests local HLS unicast live source to the first storage network element, it incite somebody to action this Ground m3u8 file and local ts fragment are sent to client in real time, and the local ts fragment number of transmission >=since being put live streaming is forward At least three ts fragment numbers;In local ts fragment, away from live streaming point, a nearest ts fragment generated is used The mode of chunked coding is sent;Remaining local ts fragment generated can use chunked coding or non- Chunked coding mode is sent;
Client parses local m3u8 file and local ts fragment, and selects any of one of ts fragment as needed Position starts to play.
Embodiment 3:
Shown in Figure 1, the present embodiment provides the systems that the third realizes low delay HLS live streaming, which includes head end Encoder, server and client side, server include the second conversion network element and the second storage network element, the second conversion network element and second Storage network element is provided with chunked encoding function, and client has chunked decoding function;
Second conversion network element is used for: head-end encoder obtains UDP multicast live source, real-time according to UDP multicast live source Dynamic updates m3u8 file and several ts fragments of dynamic generation, by updated m3u8 file and since being broadcast live point it is forward to Few three ts fragments output is HLS unicast live source;When live streaming is recorded in second storage network element request, by updated m3u8 file With since live streaming point start forward at least three ts fragment be sent to the second storage network element, away from live streaming point recently one giving birth to At ts fragment using chunked coding by the way of send;Remaining ts fragment generated can be encoded using chunked Or non-chunked coding mode is sent;
Second storage network element is used for: recording live streaming to the second conversion network element request, the m3u8 that the second conversion network element is sent Local m3u8 file and local ts fragment are recorded and are stored as to file and ts fragment, and the total number of local ts fragment >=from straight Broadcast the total number for starting forward at least three ts fragment;Local m3u8 file and local ts fragment are sent to client in real time It holds, in local ts fragment, is sent by the way of chunked coding away from a nearest ts fragment generated of live streaming point; Remaining local ts fragment generated can be sent using chunked coding or non-chunked coding mode;
Client is used for: being requested local HLS unicast live source to the first storage network element, is parsed local m3u8 file and local Ts fragment, and any position of one of ts fragment is selected to start to play as needed.
Second conversion network element, the second storage network element and client include a main m3u8 file and several ts fragments;It is main Include when m3u8 file includes multiple code rates, in each main m3u8 file the m3u8 file equal with code rate number unification it is fixed Bit identifier url includes the url of multiple ts fragments in every sub- m3u8 file.
It is shown in Figure 2, realize what low delay HLS was broadcast live applied to the third above-mentioned system the present embodiment provides a kind of Method, comprising the following steps:
S1, head end encoder provide the UDP multicast live source that dynamic updates;By taking two kinds of code rates as an example, head end encoder is mentioned The multicast address of the UDP multicast live source of confession is respectively as follows: udp: // 224.11.11.10:12306 and udp: // 224.11.11.11:12306;The former is the first code rate multicast address, and the latter is the second code rate multicast address;
S2, server include the second conversion network element and the second storage network element, and the second conversion network element head-end encoder obtains UDP multicast live source will more according to UDP multicast live source dynamic real-time update m3u8 file and several ts fragments of dynamic generation M3u8 file after new and to start forward at least three ts fragment output since live streaming point be HLS unicast live source, to realize Conversion of the UDP multicast live source to HLS unicast live source;Updated m3u8 file includes main m3u8 file and two sub- m3u8 File;
The detailed process that UDP multicast live source is transformed into HLS unicast live source is shown in Figure 3, and server 10:00 is added Two UDP multicast live streamings and receiving multicast data, generate a main m3u8 file main.m3u8 and corresponding sub- m3u8 file 1.m3u8 and 2.m3u8;Then multicast packet is sliced as unit of 10s, the second conversion network element memory only retains comprising working as Newest three ts fragments 1_1.ts, 1_2.ts, 1_3.ts and 2_1.ts, 2_2.ts, 2_3.ts of preceding ts fragment, wherein 1_3.ts It is the ts fragment being currently generating with 2_3.ts, that is, the ts fragment that distance live streaming point is nearest;Sub- m3u8 file Include the url of tri- ts fragments of 1_1.ts, 1_2.ts, 1_3.ts in 1.m3u8, in sub- m3u8 file 2.m3u8 comprising 2_1.ts, The url of tri- ts fragments of 2_2.ts, 2_3.ts.
Server second converts network element for the main m3u8 file url that the live streaming of UDP multicast is converted to after HLS unicast live streaming Http: // 172.16.0.129:9001/main.m3u8, corresponding two sub- m3u8 file url are respectively as follows: http: // 172.16.0.191:9001/1.m3u8;And http: // 172.16.0.191:9002/2.m3u8, specific example are as follows:
Main m3u8 file example is as follows:
GET/main.m3u8HTTP/1.1
Range:bytes=0-
User-Agent:CDN/1.0
Via:172.16.0.161
Host:172.16.0.129:9001
Connection:close
HTTP/1.1 200OK
Content-Type:application/vnd.apple.mpegurl
Content-Length:174
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=706428
http://172.16.0.129:9001/1.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=2166662
http://172.16.0.129:9001/2.m3u8
The example of the sub- m3u8 file of entitled 1.m3u8 is as follows:
GET/1.m3u8HTTP/1.1
Range:bytes=0-
User-Agent:CDN/1.0
Via:172.16.0.161
Host:172.16.0.129:9001
Connection:Keep-Alive
HTTP/1.1 200OK
Content-Type:application/vnd.apple.mpegurl
Content-Length:381
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:5507313
#EXT-X-PROGRAM-DATE-TIME:2016-09-29T02:06:15Z
#EXTINF:10,
http://172.16.0.130:9001/1_5507313.ts
#EXT-X-PROGRAM-DATE-TIME:2016-09-29T02:06:25Z
#EXTINF:10,
http://172.16.0.129:9001/1_5507314.ts
#EXT-X-PROGRAM-DATE-TIME:2016-09-29T02:06:35Z
#EXTINF:10,
http://172.16.0.130:9001/1_5507315.ts
The example of the sub- m3u8 file of entitled 2.m3u8 is as follows:
GET/2.m3u8HTTP/1.1
Range:bytes=0-
User-Agent:CDN/1.0
Via:172.16.0.161
Host:172.16.0.129:9001
Connection:Keep-Alive
HTTP/1.1 200OK
Content-Type:application/vnd.apple.mpegurl
Content-Length:381
#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:5507315
#EXT-X-PROGRAM-DATE-TIME:2016-09-29T02:06:25Z
#EXTINF:10,
http://172.16.0.130:9001/2_5507315.ts
#EXT-X-PROGRAM-DATE-TIME:2016-09-29T02:06:35Z
#EXTINF:10,
http://172.16.0.129:9001/2_5507316.ts
#EXT-X-PROGRAM-DATE-TIME:2016-09-29T02:06:45Z
#EXTINF:10,
http://172.16.0.130:9001/2_5507317.ts
When live streaming is recorded in second storage network element request, the second conversion network element is opened by updated m3u8 file and from live streaming point The forward at least three ts fragment that begins is sent to the second storage network element, and away from live streaming point, a nearest ts fragment uses chunked The mode of coding is sent;
This is recorded and are stored as to the m3u8 file and ts fragment that second conversion network element is sent by S3, the second storage network element Ground m3u8 file and local ts fragment, the forward at least three ts fragment of the total number of local ts fragment >=since being put live streaming Total number;
Shown in Figure 4, server second stores the mistake that network element receives and stores m3u8 file and ts fragment after conversion Journey are as follows: the second storage network element generates itself corresponding m3u8 file after receiving the data of the second conversion network element and is stored in local, Data are decoded according to the coding mode of the second conversion network element and are stored as local m3u8 file and local ts fragment;It is local M3u8 file includes main m3u8 file and two sub- m3u8 files;
Server second stores the main m3u8 file that network element stores and sub- m3u8 file example is as follows:
Main m3u8 file example is as follows:
GET/fonsview_hls/hls_001? FvSeid=54e014f36b515f46&Fsv_filetype=0& Fsv_ctype=LIVES&Fsv_cid=1003
&Fsv_chan_hls_se_idx=0&Fsv_TBt=2874144&Fsv_ShiftEnable=1 &Fsv_ ShiftTsp=1&Fsv_SV_PARAM1=0&Fsv_otype=0
&Provider_id=fonsview_hls&Pcontent_id=hls_001HTTP/1.1
Host:172.16.0.161:8114
User-Agent:VLC/2.2.4LibVLC/2.2.4
Range:bytes=0-
Connection:close
Icy-MetaData:1
HTTP/1.1 200OK
Server:FonsView SS/1.0
Date:Thu,29Sep 2016 02:07:53GMT
Content-Type:application/vnd.apple.mpegurl
Cache-Control:no-cache
Pragma:no-cache
Accept-Ranges:bytes
Content-Length:628
Content-Range:bytes 0-627/628
Connection:close
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1003, BANDWIDTH=2167715
Http: // 172.16.0.161:8114/fonsview_hls/hls_001? FvSeid= 54e014f36b515f46&Fsv_filetype=1&Fsv_ctype=LIVES
&Fsv_cid=1003&Fsv_chan_hls_se_idx=0&Fsv_rate_id=0&Fsv_SV _ PARAM1= 0&Fsv_ShiftEnable=1&Fsv_ShiftTsp=1&
Provider_id=fonsview_hls&Pcontent_id=hls_001&Fsv_otype=0
#EXT-X-STREAM-INF:PROGRAM-ID=1003, BANDWIDTH=706428
Http: // 172.16.0.161:8114/fonsview_hls/hls_001? FvSeid= 54e014f36b515f46&Fsv_filetype=1&Fsv_ctype=LIVES
&Fsv_cid=1003&Fsv_chan_hls_se_idx=0&Fsv_rate_id=1&Fsv_SV _ PARAM1= 0&Fsv_ShiftEnable=1&Fsv_ShiftTsp=1
&Provider_id=fonsview_hls&Pcontent_id=hls_001&Fsv_otype=0
Wherein the corresponding sub- m3u8 file example comprising last three ts fragments url of the first code rate is as follows:
GET/fonsview_hls/hls_001? FvSeid=54e014f36b515f46&Fsv_filetype=1& Fsv_ctype=LIVES&Fsv_cid=1003
&Fsv_chan_hls_se_idx=0&Fsv_rate_id=0&Fsv_SV_PARAM1=0&Fsv _ ShiftEnable=1&Fsv_ShiftTsp=1
&Provider_id=fonsview_hls&Pcontent_id=hls_001&Fsv_otype=0HTTP/1.1
Host:172.16.0.161:8114
User-Agent:VLC/2.2.4LibVLC/2.2.4
Range:bytes=0-
Connection:close
Icy-MetaData:1
HTTP/1.1 200 OK
Server:FonsView SS/1.0
Date:Thu,29 Sep 2016 02:07:53 GMT
Content-Type:application/vnd.apple.mpegurl
Cache-Control:no-cache
Pragma:no-cache
Accept-Ranges:bytes
Content-Length:2976
Content-Range:bytes 0-2975/2976
Connection:close
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:10
#EXT-X-MEDIA-SEQUENCE:5507304
#EXT-X-PROGRAM-DATE-TIME:2016-09-29T02:06:15Z
#EXTINF:10,883036
Http: // 172.16.0.161:8114/LIVES/1475114775_0010000028_0000000005 .ts? FvSeid=54e014f36b515f46
&Fsv_filetype=2&Provider_id=fonsview_hls&Pcontent_id=hls _ 001&Fsv_ Sd=10&Fsv_otype=0
#EXT-X-PROGRAM-DATE-TIME:2016-09-29T02:06:25Z
#EXTINF:10,883036
Http: // 172.16.0.161:8114/LIVES/1475114785_0010000028_0000000006 .ts? FvSeid=54e014f36b515f46
&Fsv_filetype=2&Provider_id=fonsview_hls&Pcontent_id=hls _ 001&Fsv_ Sd=10&Fsv_otype=0
#EXT-X-PROGRAM-DATE-TIME:2016-09-29T02:06:35Z
#EXTINF:10,881720
Http: // 172.16.0.161:8114/LIVES/1475114795_0010000028_0000000007 .ts? FvSeid=54e014f36b515f46
&Fsv_filetype=2&Provider_id=fonsview_hls&Pcontent_id=hls _ 001&Fsv_ Sd=10&Fsv_otype=0
Second storage network element sends local m3u8 file and local ts fragment to client in real time, in local ts fragment, away from A nearest ts fragment of live streaming point is sent by the way of chunked coding;
S4, client parsing local m3u8 file and local ts fragment, and one of ts fragment is selected as needed Any position starts to play, and detailed process is as follows:
As shown in figure 5, user end to server hair live streaming request, newest several ts that the second storage network element will be recorded currently Fragment is sent to client, and the number of newest several ts fragments can be 12 herein;
Second storage network element selects different coding modes to send media information to visitor according to the recording situation of current slice Family end: chunked volume is carried out for the ts fragment 1475114785_0000000028_0000000007.ts data recorded Code simultaneously sends data to client, other ts fragments can be sent using chunked coding or non-chunked coding mode; Client parses local m3u8 file and local ts fragment, and any position of one of ts fragment is selected according to Network status Start to play.
Those skilled in the art can carry out various modifications to the embodiment of the present invention and modification, if these modifications and change For type within the scope of the claims in the present invention and its equivalent technologies, then these modifications and variations are also in protection scope of the present invention Within.
The prior art that the content being not described in detail in specification is known to the skilled person.

Claims (8)

1. a kind of system for realizing low delay HLS live streaming, which includes head end encoder, server and client side, feature It is:
The head end encoder is used for: providing the original live source that dynamic updates;
The server is used for: head-end encoder obtains original live source, is indexed according to original live source dynamic real-time update File and several media slicing files of dynamic generation, by updated index file and forward at least three since being broadcast live point The output of media slicing file is HLS unicast live source;Updated index file and at least three media slicings text are sent in real time Part, away from live streaming point, a nearest media slicing file is sent by the way of block transmission coding;
The client is used for: being parsed the index file received and media slicing file, and is selected one of them as needed Any position of media slicing file starts to play;
A media slicing file nearest away from live streaming point is the media slicing file generated, except away from live streaming point Outside a nearest media slicing file, remaining media slicing file that server is sent is the media slicing text generated Part;The server is also used to: the media slicing file generated is sent by the way of non-block transmission coding.
2. realizing the system of low delay HLS live streaming as described in claim 1, it is characterised in that: the original live source is to use User data datagram protocol UDP multicast live source;The server includes the first conversion network element, and the first conversion network element is used for:
Head-end encoder obtains UDP multicast live source, according to UDP multicast live source dynamic real-time update index file and dynamic Several media slicing files are generated, by updated index file and the forward at least three media slicings text since being broadcast live point Part output is HLS unicast live source;Client request play live streaming when, by updated index file and since be broadcast live point to At least three preceding media slicing files are sent to client in real time, the forward at least three media slicings text since being broadcast live point In part, away from live streaming point, a nearest media slicing file is sent by the way of block transmission coding.
3. realizing the system of low delay HLS live streaming as described in claim 1, it is characterised in that: the original live source is HLS Unicast live source;The server includes the first storage network element, and the first storage network element is used for:
Head-end encoder obtains HLS unicast live source, according to HLS unicast live source dynamic real-time update index file and dynamic Several media slicing files are generated, by updated index file and the forward at least three media slicings text since being broadcast live point Local index file and local media slicing files are recorded and be stored as to part, by local index file and local media fragment File output is local HLS unicast live source, the total number of the local media slicing files >=described since being put live streaming to The total number of at least three preceding media slicing files;When client request plays live streaming, by local index file and local matchmaker Body slicing files are sent to client in real time, in local media slicing files, a nearest media slicing file away from live streaming point It is sent by the way of block transmission coding.
4. realizing the system of low delay HLS live streaming as described in claim 1, it is characterised in that: the original live source is UDP Multicast live source;The server includes the second conversion network element and the second storage network element, wherein
The second conversion network element is used for: head-end encoder obtains UDP multicast live source, real-time according to UDP multicast live source Dynamic updates index file and several media slicing files of dynamic generation, by updated index file and since being broadcast live point to Preceding at least three media slicing files output is HLS unicast live source;It, will when live streaming is recorded in the second storage network element request Updated index file and since be broadcast live point forward at least three media slicings file be sent to the second storage network element, away from A nearest media slicing file of live streaming point is sent by the way of block transmission coding;
The second storage network element is used for: recording live streaming to the second conversion network element request, the index that the second conversion network element is sent Local index file and local media slicing files, the local media are recorded and are stored as to file and media slicing file The total number of slicing files >=forward at least three media slicings file since being broadcast live point total number;By local rope Quotation part and local media slicing files are sent to client in real time, in local media slicing files, away from live streaming point it is nearest one A media slicing file is sent by the way of block transmission coding.
5. a kind of method for realizing low delay HLS live streaming applied to system as described in claim 1, which is characterized in that including Following steps:
The head end encoder provides the original live source that dynamic updates;
The server head-end encoder obtains original live source, simultaneously according to original live source dynamic real-time update index file Several media slicing files of dynamic generation, by updated index file and forward at least three media minute since being broadcast live point The output of piece file is HLS unicast live source;Updated index file and at least three media slicing files are sent in real time, away from straight An a little nearest media slicing file is broadcast to send by the way of block transmission coding;
The client parses the index file and media slicing file received, and selects one of media point as needed Any position of piece file starts to play;
A media slicing file nearest away from live streaming point is the media slicing file generated, except away from live streaming point Outside a nearest media slicing file, remaining media slicing file that server is sent is the media slicing text generated Part;The media slicing file generated is sent by the way of non-block transmission coding.
6. realizing the method for low delay HLS live streaming as claimed in claim 5, it is characterised in that: the original live source is to use User data datagram protocol UDP multicast live source;The server sends updated index file to client and in real time from live streaming Point starts forward at least three media slicings file, since being broadcast live point in forward at least three media slicings file, away from A nearest media slicing file of live streaming point is sent by the way of block transmission coding.
7. realizing the method for low delay HLS live streaming as claimed in claim 5, it is characterised in that: the original live source is HLS Unicast live source;The server head-end encoder obtains HLS unicast live source, according to the real-time dynamic of HLS unicast live source Update index file and several media slicing files of dynamic generation, by updated index file and since being broadcast live point it is forward Local index file and local media slicing files are recorded and be stored as at least three media slicing files, by local index File and the output of local media slicing files are local HLS unicast live source, the total numbers of the local media slicing files >= The total number of the forward at least three media slicings file since being broadcast live point;Send local index text in real time to client Part and local media slicing files, in local media slicing files, away from a nearest media slicing file of live streaming point using minute The mode of block transmission coding is sent.
8. realizing the method for low delay HLS live streaming as claimed in claim 5, it is characterised in that: the original live source is UDP Multicast live source;The server includes the second conversion network element and the second storage network element, and the second conversion network element head-end is compiled Code device obtains UDP multicast live source, according to UDP multicast live source dynamic real-time update index file and several media of dynamic generation Slicing files, forward at least three media slicings file exports as HLS by updated index file and since being broadcast live point Unicast live source;It is described second storage network element request record live streaming when, second conversion network element by updated index file and from Live streaming point starts forward at least three media slicings file and is sent to the second storage network element, a nearest media away from live streaming point Slicing files are sent by the way of block transmission coding;
It is described second storage network element to second conversion network element request record live streaming, by second conversion network element send index file and Local index file and local media slicing files, the local media fragment text are recorded and be stored as to media slicing file The total number of part >=forward at least three media slicings file since being broadcast live point total number;It is sent out in real time to client Send local index file and local media slicing files, in local media slicing files, a nearest media minute away from live streaming point Piece file is sent by the way of block transmission coding.
CN201611143468.1A 2016-12-13 2016-12-13 Realize the system and method for low delay HLS live streaming Active CN106790005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611143468.1A CN106790005B (en) 2016-12-13 2016-12-13 Realize the system and method for low delay HLS live streaming

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611143468.1A CN106790005B (en) 2016-12-13 2016-12-13 Realize the system and method for low delay HLS live streaming

Publications (2)

Publication Number Publication Date
CN106790005A CN106790005A (en) 2017-05-31
CN106790005B true CN106790005B (en) 2019-09-17

Family

ID=58880579

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611143468.1A Active CN106790005B (en) 2016-12-13 2016-12-13 Realize the system and method for low delay HLS live streaming

Country Status (1)

Country Link
CN (1) CN106790005B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107135400A (en) * 2017-06-12 2017-09-05 上海高顿教育培训有限公司 A kind of method for reducing network direct broadcasting delay
CN109151614B (en) * 2017-06-19 2023-05-16 中兴通讯股份有限公司 Method and device for reducing HLS live broadcast delay
CN108540868B (en) * 2018-05-16 2019-04-16 北京百度网讯科技有限公司 Processing method, device, server, terminal and the storage medium of HLS live streaming
EP3997888A1 (en) 2019-07-12 2022-05-18 Carrier Corporation A system and a method for streaming videos by creating object urls at client
CN110324727A (en) * 2019-07-16 2019-10-11 浙江大华技术股份有限公司 Computer readable storage medium, server and its method for responding playing request
CN111131862A (en) * 2020-01-02 2020-05-08 山东云缦智能科技有限公司 Method for realizing automatic main-standby switching of CMAF live broadcast source

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102232298A (en) * 2011-04-07 2011-11-02 华为技术有限公司 Method, device and system for transmitting and processing media content
CN102801690A (en) * 2011-05-25 2012-11-28 华为技术有限公司 Stream media processing method, distribution server, client and system
CN103686202A (en) * 2012-09-18 2014-03-26 中兴通讯股份有限公司 Real-time transcoding transmitting method and system based on HTTP (Hyper Text Transport Protocol) under DLNA (Digital Living Network Alliance)

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102232298A (en) * 2011-04-07 2011-11-02 华为技术有限公司 Method, device and system for transmitting and processing media content
CN102801690A (en) * 2011-05-25 2012-11-28 华为技术有限公司 Stream media processing method, distribution server, client and system
CN103686202A (en) * 2012-09-18 2014-03-26 中兴通讯股份有限公司 Real-time transcoding transmitting method and system based on HTTP (Hyper Text Transport Protocol) under DLNA (Digital Living Network Alliance)

Also Published As

Publication number Publication date
CN106790005A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106790005B (en) Realize the system and method for low delay HLS live streaming
US11805286B2 (en) Apparatus and method for transmitting/receiving processes of a broadcast signal
CN107743703B (en) Method, apparatus and computer-readable storage medium for media data transmission
CN106233735B (en) Method for managing multicast video transmission
US20160337424A1 (en) Transferring media data using a websocket subprotocol
CN100568966C (en) A kind of network transfer method of audio/video data
TW201703541A (en) Signaling cached segments for broadcast
KR20160106618A (en) Content delivery
US10499094B2 (en) Transmission apparatus, transmitting method, reception apparatus, and receiving method
CN102131106A (en) Method, device and system for playing streaming media contents
US20190110091A1 (en) Method and device for synchronously performing an operation on contents
US20180176278A1 (en) Detecting and signaling new initialization segments during manifest-file-free media streaming
US11765444B2 (en) Streaming media data including an addressable resource index track
CN105049873A (en) Method, device and system for streaming media transmission
KR20160138044A (en) Targeted advertisement insertion for streaming media data
CN105900437B (en) Communication apparatus, communication data generating method, and communication data processing method
WO2016209727A1 (en) Reporting media consumption based on service area
CN115643426B (en) Universal video playing method and system for space application field
US8811478B2 (en) Data transmission method and apparatus
US20210306703A1 (en) Determination of availability of chunks of data for network streaming media data
WO2015109842A1 (en) Method for processing segmented programs, server and client device
WO2016090912A1 (en) Method, device, terminal and system for generating and playing live video
US11582125B2 (en) Repair mechanism for adaptive bit rate multicast

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