WO2019056929A1 - 基于hls协议的时移优化方法及系统 - Google Patents

基于hls协议的时移优化方法及系统 Download PDF

Info

Publication number
WO2019056929A1
WO2019056929A1 PCT/CN2018/102617 CN2018102617W WO2019056929A1 WO 2019056929 A1 WO2019056929 A1 WO 2019056929A1 CN 2018102617 W CN2018102617 W CN 2018102617W WO 2019056929 A1 WO2019056929 A1 WO 2019056929A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
index file
time shift
streaming media
client
Prior art date
Application number
PCT/CN2018/102617
Other languages
English (en)
French (fr)
Inventor
徐佳蓉
Original Assignee
烽火通信科技股份有限公司
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 烽火通信科技股份有限公司 filed Critical 烽火通信科技股份有限公司
Publication of WO2019056929A1 publication Critical patent/WO2019056929A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26258Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols

Definitions

  • the present invention relates to the field of Internet multimedia, and in particular to a time shift optimization method and system based on the HLS protocol.
  • HLS HTTP Live Streaming
  • Apple's dynamic rate adaptation technology Mainly used for audio and video services of PC and Apple terminals. Includes an m3u8 index file, TS media slice file and key encryption string file.
  • the HLS time-shift service is a service form that allows users to view live content in the past period of time based on the HLS live broadcast.
  • the simpler method is to cache all the streaming media segments in the time shifting period in the same playlist.
  • the server only needs to maintain an index file and update it in real time.
  • the client refreshes the index file with a frequency equal to the duration of a single media stream.
  • this method has the problem that the index file is continuously refreshed, resulting in a large bandwidth usage and a insufficient playback response. Therefore, we need to do some optimization for HLS time-shift playback.
  • an object of the present invention is to provide an HLS protocol-based time shift optimization method capable of reducing the bandwidth occupied by the time-shift index file at the time of the broadcast.
  • a time shift optimization method based on the HLS protocol comprising the following steps:
  • All the streaming media fragments in the time shift range are saved and grouped, and each consecutive N pieces of streaming media segments are grouped into one group, and each group of streaming media segments forms a time shift index file;
  • the client selects the HLS live program to play, and requests the live index file;
  • the client makes the HLS live program enter the time shift state through the broadcast control operation
  • the client adds time-shifting additional information based on the address of the live index file, and requests the HTTP streaming server by the fragment sequence ID and the playback magnification information of the currently playing streaming media segment in the time-shifted additional information.
  • the HTTP streaming server receives the time shift index file request, and parses the time shift additional information, and sends the corresponding time shift index file to the client according to the parsing result;
  • the client requests and plays the streaming media fragment in the received time-shift index file.
  • steps S5 to S7 are repeatedly performed, and the client periodically requests the next time shift index file and plays the next time shift index file. Stream media fragmentation until playback ends.
  • the client adds the fragment sequence ID and the playback magnification information of the currently played streaming media segment based on the address of the live index file, and generates a URL to request a time shift index from the HTTP streaming server. file.
  • the HTTP streaming server parses the time-shifted additional information. If the playback magnification is negative in the analysis result, the HTTP streaming server reduces the streaming sequence ID of the currently-running streaming media fragment by one. The time-shifted index file of the fragment is sent to the client; if the playback ratio is positive in the parsing result, the HTTP streaming server shifts the time-sharing of the streaming fragment with the fragment sequence ID of the currently playing streaming media fragment by one. The index file is sent to the client.
  • the client obtains the time-shift total time information according to the time-shift index file, calculates the time shift start time with reference to the current time, and then requests the streaming media index in the time-shift index file sent by the HTTP streaming server.
  • the slice is played and the time-shifted index file is also cached to form a local time-shifted slice list.
  • the client After the client finishes playing a streaming media fragment in the index file, it determines whether the next streaming media fragment is cached locally, and if so, continues to play the next streaming media fragment. If no, it is judged whether the left boundary or the time shift right boundary is reached. If the left boundary is moved, the normal double speed time shift playback is resumed, and if the right border is moved, the live broadcast state is switched.
  • the client enters the time shift state by fast forward, rewind or pause.
  • the object of the present invention is to provide an HLS protocol-based time shift optimization system capable of reducing the bandwidth occupied by the time-shift index file at the time of the broadcast.
  • a time shift optimization system based on HLS protocol including:
  • An HLS streaming media service subsystem includes an encoding server, a slicing server, and an HTTP streaming server for encoding audio data and video data, the slicing server for storing the media stream output by the encoding server as Multiple streaming media segments, the HTTP streaming server for responding to time-shifted index file requests and playing streaming media slice requests;
  • a client configured to send a time shift index file request to the HTTP streaming server, where the client obtains the time shift index file, and is further configured to request and play the slice file in the time shift index file to the HTTP streaming server.
  • the time shift optimization method based on the HLS protocol in the present invention after grouping the streaming media fragments, forming a plurality of time shift index files, and reducing the time shift transmission compared with the conventional one only time shift index file.
  • the granularity reduces the bandwidth and time taken by the transmission time-shifted index file, which is beneficial to increase the starting speed.
  • the time shift optimization method based on the HLS protocol in the present invention in the process of playing, the pressure caused by the frequent refresh of the traditional time-shift index file to the streaming media server and the network bandwidth, and the same refresh frequency, the present invention uses Time-shifted index files with fewer fragments take up much less bandwidth.
  • the conventional time shift index file reduces the refresh frequency in order to reduce the bandwidth, the information of the time shift index file with less fragmentation in the present invention is more effective, and the fragmentation is less likely to occur over the time shift boundary. The condition of the information expired.
  • the time shift optimization method based on the HLS protocol in the present invention enhances the flexibility of the HLS protocol interaction, and the client does not need to pre-calculate the fragmentation time and the fragment sequence ID to be played next.
  • Information can be adapted to the direction control of the broadcast control.
  • the upgrade of the HLS solution does not depend entirely on the terminal software solution, and the optimization of the broadcast control can be achieved by upgrading the streaming media server.
  • FIG. 1 is a flow chart of a time shift optimization method based on an HLS protocol in the present invention
  • FIG. 2 is a structural block diagram of a time shift optimization system based on the HLS protocol in the present invention.
  • the present invention provides a time shift optimization method based on an HLS protocol, which method includes the following steps:
  • EXT-X-TARGETDURATION indicates the maximum media segment length specified.
  • the fragment sequence ID of each streaming media segment is counted from 0, so that the client passes the currently played fragment sequence ID.
  • the current playback time can be sensed.
  • All the streaming media fragments in the time shift range are saved and grouped, and each consecutive N pieces of streaming media segments are grouped into one group, and each group of streaming media segments forms a time shift index file;
  • a plurality of time-shifted index files are formed, which reduces the time-shifting transmission granularity and reduces the bandwidth and time taken by the transmission time-shifting index file compared with the conventional one-time shift index file. And it is beneficial to increase the speed of starting and broadcasting.
  • the traditional time-shift index file is 360 stream media slices.
  • the time-shift index file is 10 stream media slices, and the transmission efficiency will be 36 times that of the conventional one. This speeds up the broadcast and the user experience is good.
  • the pressure caused by the streaming server and the network bandwidth is refreshed frequently, and the frequency is also refreshed.
  • the bandwidth occupied by the time-shift index file with less fragmentation is much smaller.
  • the conventional time shift index file reduces the refresh frequency in order to reduce the bandwidth, the information of the time shift index file with less fragmentation in the present invention is more effective, and the fragmentation is less likely to occur over the time shift boundary. The condition of the information expired.
  • the client selects the HLS live program to play, and requests the live index file;
  • the client makes the HLS live program enter the time shift state through the broadcast control operation
  • the client can enter the time-shifted state of the HLS live program by fast forward, rewind or pause.
  • the client adds time-shifting additional information based on the address of the live index file, and requests the HTTP streaming server by the fragment sequence ID and the playback magnification information of the currently playing streaming media segment in the time-shifted additional information.
  • the client adds the fragment sequence ID and the playback magnification information of the currently played streaming media segment based on the address of the live index file, and generates a URL to request the time shift index file from the HTTP streaming server.
  • the HTTP URL passing method enhances the flexibility of the HLS protocol interaction.
  • the client does not need to pre-calculate the fragmentation time and the fragment sequence ID information to be played next, and can adapt to the direction control of the broadcast control.
  • the upgrade of the HLS solution does not depend entirely on the terminal software solution, and the optimization of the broadcast control can be achieved by upgrading the streaming media server. And based on this method, other information feedback mechanisms can be extended to further improve the service capability of the streaming media server to the terminal.
  • the HTTP streaming server receives the time shift index file request, and parses the time shift additional information, and sends the corresponding time shift index file to the client according to the parsing result;
  • the HTTP streaming server parses the time-shifted additional information. If the playback magnification is negative in the parsing result, the HTTP streaming server shifts the time-division of the streaming media fragment including the currently-distributed streaming media fragment by one. The index file is sent to the client. If the playback ratio is a positive number in the analysis result, the HTTP streaming server sends the time-shift index file of the streaming media slice including the slice sequence ID of the currently played streaming media slice to the client.
  • the client plays the streaming media fragment in the received time shift index file.
  • the client obtains the total time-lapse information according to the time-shift index file, calculates the time-lapse start time with reference to the current time, and then requests the streaming media slice in the time-shift index file sent by the HTTP streaming server to play and play the same. Time shifts the index file to form a local time-shifted slice list.
  • steps S5 to S7 are repeatedly performed, and the client periodically requests the next time shift index file and plays the streaming media fragment in the next time shift index file until the playback ends. .
  • the client After the client finishes playing a streaming media slice in the index file, it determines whether the next streaming media slice is cached locally, and if so, continues to play the next streaming media slice. If not, it needs to be explained. It is necessary to judge whether the left boundary or the time shift right boundary is reached. If the left boundary is moved, the normal double speed shift playback is resumed, and if the right boundary is moved, the live broadcast state is switched.
  • the present invention also provides a time shift optimization system based on the HLS protocol, which includes an HLS streaming service subsystem and a client.
  • the HLS streaming service subsystem includes an encoding server, a slicing server, and an HTTP streaming server.
  • the encoding server is used to encode the audio data and the video data. After the media data is collected, the original audio data and the video data need to be encoded to generate a compressed media stream suitable for network transmission and terminal playback.
  • the slicing server is configured to store the media stream output by the encoding server as a plurality of streaming media segments.
  • the slice storage is in accordance with the slicing strategy of the media server, and the slicing server stores the media stream output by the encoding server as a continuous, fixed-length, short media file.
  • the m3u8 list is saved in two types.
  • the live index file generally retains the latest three slice addresses and is updated in the form of a "sliding window".
  • the time-shifted index file is buffered in units of appropriate N slices.
  • the HTTP streaming server is configured to respond to time-shifted index file requests and play streaming media slice requests.
  • the HTTP protocol bears the main task of responding to time-shifted index file requests and fragment file requests.
  • the HTTP streaming server recognizes the time shift request information in the request parameter of the time shift index file request, the request is redirected to the cache time shift index file by the mapping rule.
  • a client configured to send a time shift index file request to the HTTP streaming server, where the client obtains the time shift index file, and is further configured to request and play the slice file in the time shift index file to the HTTP streaming server.

Landscapes

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

Abstract

本发明公开了一种基于HLS协议的时移优化方法及系统,涉及互联网多媒体领域,该方法包括以下步骤:从预设时间点开始,以定长的媒体段时间长度作为分片长度,计数每个流媒体分片的分片序列ID。保存时移范围内的所有流媒体分片并分组,将每连续的N片流媒体分片分成一组,每一组流媒体分片均形成一个时移索引文件。客户端通过播控操作使HLS直播节目进入时移状态,在直播索引文件的地址的基础上附加时移附加信息,向HTTP流媒体服务器请求时移索引文件。HTTP流媒体服务器解析时移附加信息,将对应的时移索引文件发送给客户端。客户端请求并播放接收到的流媒体分片。本发明能减少传输时移索引文件所占带宽和所耗时间,有利于提高起播速度。

Description

基于HLS协议的时移优化方法及系统 技术领域
本发明涉及互联网多媒体领域,具体涉及一种基于HLS协议的时移优化方法及系统。
背景技术
HLS(HTTP Live Streaming),Apple的动态码率自适应技术。主要用于PC和Apple终端的音视频服务。包括一个m3u8的索引文件,TS媒体分片文件和key加密串文件。
HLS时移业务,是基于HLS直播的基础上,通过终端操作,可以让用户观看到过去一段时间的直播内容的一种业务形式。比较简单的方法是,把时移时间段内所有的流媒体分片都缓存在同一个播放列表中,服务端只用维护一个索引文件,并实时更新。客户端以相当于单个媒体流时长为频率,刷新索引文件。但此方法存在“索引文件不断刷新导致带宽占用多以及播放响应不够及时”的问题。由此,我们需要针对HLS时移播放做一些优化。
发明内容
针对现有技术中存在的缺陷,本发明的目的在于提供一种能够减少起播时传输时移索引文件所占带宽和所耗时间的基于HLS协议的时移优化方法。
为达到以上目的,本发明采取的技术方案是:
一种基于HLS协议的时移优化方法,该方法包括以下步骤:
S1.从预设时间点开始,以定长的媒体段时间长度作为分片长度, 计数每个流媒体分片的分片序列ID;
S2.保存时移范围内的所有流媒体分片并分组,将每连续的N片流媒体分片分成一组,每一组流媒体分片均形成一个时移索引文件;
S3.客户端选择HLS直播节目进行播放,请求直播索引文件;
S4.客户端通过播控操作使HLS直播节目进入时移状态;
S5.客户端在直播索引文件的地址的基础上附加时移附加信息,通过时移附加信息中的当前播放的流媒体分片的分片序列ID和播放倍率信息,向HTTP流媒体服务器请求时移索引文件;
S6.HTTP流媒体服务器接收时移索引文件请求,并解析时移附加信息,根据解析结果将对应的时移索引文件发送给客户端;
S7.客户端请求并播放接收到的时移索引文件中的流媒体分片。
在上述技术方案的基础上,当播放中的流媒体分片剩余时间到预设值时,重复执行步骤S5至S7,客户端周期性请求下一时移索引文件并播放下一时移索引文件中的流媒体分片,直至播放终止。
在上述技术方案的基础上,所述客户端在直播索引文件的地址的基础上附加当前播放的流媒体分片的分片序列ID和播放倍率信息,生成URL向HTTP流媒体服务器请求时移索引文件。
在上述技术方案的基础上,HTTP流媒体服务器解析时移附加信息,若解析结果中播放倍率为负数,HTTP流媒体服务器把包含当前播放的流媒体分片的分片序列ID减1的流媒体分片的时移索引文件发送给客户端;若解析结果中播放倍率为正数,HTTP流媒体服务器把包含当前播放的流媒体分片的分片序列ID加1的流媒体分片的时移索引文件发送给客户端。
在上述技术方案的基础上,客户端根据时移索引文件得到时移总 时长信息,参照当前时间计算出时移开始时间,然后请求HTTP流媒体服务器所发送的时移索引文件中的流媒体分片并播放,同时还缓存该时移索引文件,形成本地时移切片列表。
在上述技术方案的基础上,客户端播放完时移索引文件中的一个流媒体分片后,判断本地是否缓存有下一个流媒体分片,若是,则继续播放下一个流媒体分片,若否,则判断是到了时移左边界还是时移右边界,若到了时移左边界,则恢复为普通一倍速时移播放,若到了时移右边界,则切换为直播状态。
在上述技术方案的基础上,客户端通过快进、快退或暂停使HLS直播节目进入时移状态。
与此同时,本发明的目的还在于提供一种能够减少起播时传输时移索引文件所占带宽和所耗时间的基于HLS协议的时移优化系统。
为达到以上目的,本发明采取的技术方案是:
一种基于HLS协议的时移优化系统,包括:
HLS流媒体服务子系统,其包括编码服务器、切片服务器和HTTP流媒体服务器,所述编码服务器用于将音频数据和视频数据进行编码,所述切片服务器用于将编码服务器输出的媒体流存储为多个流媒体分片,所述HTTP流媒体服务器用于响应时移索引文件请求和播放流媒体分片请求;以及
客户端,其用于向HTTP流媒体服务器发送时移索引文件请求,所述客户端得到时移索引文件后,还用于向HTTP流媒体服务器请求并播放所述时移索引文件里面的切片文件。
与现有技术相比,本发明的优点在于:
(1)本发明中的基于HLS协议的时移优化方法,对流媒体分片进行分组后,形成了多个时移索引文件,和传统的只有一个时移索引 文件相比,缩小了时移传送粒度,减少传输时移索引文件所占带宽和所耗时间,有利于提高起播速度。
(2)本发明中的基于HLS协议的时移优化方法,在播放的过程中,相比传统的时移索引文件频繁刷新给流媒体服务器和网络带宽造成的压力,同样刷新频率,本发明使用分片较少的时移索引文件所占带宽要小得多。而如果传统的时移索引文件为了减少带宽而降低刷新频率,则本发明中使用分片较少的时移索引文件的信息有效性会更高,会较少出现分片超过时移边界而导致的信息过期的情况。
(3)本发明中的基于HLS协议的时移优化方法,HTTP的URL传参方式增强了HLS协议交互的灵活度,客户端不用自己预先计算接下来要播放的分片时间与分片序列ID信息,即可适应播控的方向控制。实现HLS方案的升级不完全依赖于终端软件方案、在流媒体服务器升级就能达到优化播控的效果。
附图说明
图1为本发明中基于HLS协议的时移优化方法的流程图,
图2为本发明中基于HLS协议的时移优化系统的结构框图。
具体实施方式
以下结合附图对本发明作进一步详细说明。
参见图1所示,本发明提供一种基于HLS协议的时移优化方法,该方法包括以下步骤:
S1.从预设时间点开始,以定长的媒体段时间长度作为分片长度,计数每个流媒体分片的分片序列ID;
在每个m3u8文件中,EXT-X-TARGETDURATION表示指定最大的媒体段时间长度。本发明中,每天从零时开始,以恒定的媒体段 时间长度作为分片长度,从0开始计数每个流媒体分片的分片序列ID,这样客户端通过当前播放的分片序列ID即可感知当前播放时间。
S2.保存时移范围内的所有流媒体分片并分组,将每连续的N片流媒体分片分成一组,每一组流媒体分片均形成一个时移索引文件;
对流媒体分片进行分组后,形成了多个时移索引文件,和传统的只有一个时移索引文件相比,缩小了时移传送粒度,减少传输时移索引文件所占带宽和所耗时间,且有利于提高起播速度。比如传统的时移索引文件是360个流媒体分片,本发明中分组后时移索引文件是10个流媒体分片,则传输效率是将会是传统的36倍。这样起播速度快,用户体验好。
在播放的过程中,相比传统的时移索引文件频繁刷新给流媒体服务器和网络带宽造成的压力,同样刷新频率,本发明使用分片较少的时移索引文件所占带宽要小得多。而如果传统的时移索引文件为了减少带宽而降低刷新频率,则本发明中使用分片较少的时移索引文件的信息有效性会更高,会较少出现分片超过时移边界而导致的信息过期的情况。
S3.客户端选择HLS直播节目进行播放,请求直播索引文件;
S4.客户端通过播控操作使HLS直播节目进入时移状态;
通常客户端可以通过快进、快退或暂停使HLS直播节目进入时移状态。
S5.客户端在直播索引文件的地址的基础上附加时移附加信息,通过时移附加信息中的当前播放的流媒体分片的分片序列ID和播放倍率信息,向HTTP流媒体服务器请求时移索引文件;
本发明中客户端在直播索引文件的地址的基础上附加当前播放 的流媒体分片的分片序列ID和播放倍率信息,生成URL向HTTP流媒体服务器请求时移索引文件。
HTTP的URL传参方式增强了HLS协议交互的灵活度,客户端不用自己预先计算接下来要播放的分片时间与分片序列ID信息,即可适应播控的方向控制。实现HLS方案的升级不完全依赖于终端软件方案、在流媒体服务器升级就能达到优化播控的效果。且基于此方法,还可扩展其它信息反馈机制,进一步提高流媒体服务器对终端的服务能力。
S6.HTTP流媒体服务器接收时移索引文件请求,并解析时移附加信息,根据解析结果将对应的时移索引文件发送给客户端;
具体的,HTTP流媒体服务器解析时移附加信息,若解析结果中播放倍率为负数,HTTP流媒体服务器把包含当前播放的流媒体分片的分片序列ID减1的流媒体分片的时移索引文件发送给客户端。若解析结果中播放倍率为正数,HTTP流媒体服务器把包含当前播放的流媒体分片的分片序列ID加1的流媒体分片的时移索引文件发送给客户端。
S7.客户端播放接收到的时移索引文件中的流媒体分片。
客户端根据时移索引文件得到时移总时长信息,参照当前时间计算出时移开始时间,然后请求HTTP流媒体服务器所发送的时移索引文件中的流媒体分片并播放,同时还缓存该时移索引文件,形成本地时移切片列表。
当播放中的流媒体分片剩余时间到预设值时,重复执行步骤S5至S7,客户端周期性请求下一时移索引文件并播放下一时移索引文件中的流媒体分片,直至播放终止。
客户端播放完时移索引文件中的一个流媒体分片后,判断本地是 否缓存有下一个流媒体分片,若是,则继续播放下一个流媒体分片,若否,需要说明的是,则需要判断是到了时移左边界还是时移右边界,若到了时移左边界,则恢复为普通一倍速时移播放,若到了时移右边界,则切换为直播状态。
参见图2所示,本发明还提供一种基于HLS协议的时移优化系统,其包括HLS流媒体服务子系统和客户端。
HLS流媒体服务子系统包括编码服务器、切片服务器和HTTP流媒体服务器。
编码服务器用于将音频数据和视频数据进行编码,媒体数据采集后,需要把原始的音频数据和视频数据进行编码,以产生压缩的、适合网络传输和终端播放的媒体流。
切片服务器用于将编码服务器输出的媒体流存储为多个流媒体分片。其中切片保存是按照媒体服务端的切片策略,切片服务器把编码服务器输出的媒体流存储为连续的、定长的、较短的媒体文件。m3u8列表保存分为两种,直播索引文件中一般保留最新的三个分片地址,以类似“滑动窗口”的形式,进行更新。时移索引文件以合适的N片为单位,分组缓存。
HTTP流媒体服务器用于响应时移索引文件请求和播放流媒体分片请求。HTTP协议作为HLS的基础协议,承担着响应时移索引文件请求和分片文件请求的主要任务。当HTTP流媒体服务器识别到时移索引文件请求的请求参数里面的时移请求信息时,通过映射规则,把请求重定向到缓存的时移索引文件。
客户端,其用于向HTTP流媒体服务器发送时移索引文件请求,所述客户端得到时移索引文件后,还用于向HTTP流媒体服务器请求并播放所述时移索引文件里面的切片文件。
本发明不局限于上述实施方式,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围之内。本说明书中未作详细描述的内容属于本领域专业技术人员公知的现有技术。

Claims (8)

  1. 一种基于HLS协议的时移优化方法,其特征在于,该方法包括以下步骤:
    S1.从预设时间点开始,以定长的媒体段时间长度作为分片长度,计数每个流媒体分片的分片序列ID;
    S2.保存时移范围内的所有流媒体分片并分组,将每连续的N片流媒体分片分成一组,每一组流媒体分片均形成一个时移索引文件;
    S3.客户端选择HLS直播节目进行播放,请求直播索引文件;
    S4.客户端通过播控操作使HLS直播节目进入时移状态;
    S5.客户端在直播索引文件的地址的基础上附加时移附加信息,通过时移附加信息中的当前播放的流媒体分片的分片序列ID和播放倍率信息,向HTTP流媒体服务器请求时移索引文件;
    S6.HTTP流媒体服务器接收时移索引文件请求,并解析时移附加信息,根据解析结果将对应的时移索引文件发送给客户端;
    S7.客户端请求并播放接收到的时移索引文件中的流媒体分片。
  2. 如权利要求1所述的基于HLS协议的时移优化方法,其特征在于:当播放中的流媒体分片剩余时间到预设值时,重复执行步骤S5至S7,客户端周期性请求下一时移索引文件并播放下一时移索引文件中的流媒体分片,直至播放终止。
  3. 如权利要求2所述的基于HLS协议的时移优化方法,其特征在于:所述客户端在直播索引文件的地址的基础上附加当前播放的流媒体分片的分片序列ID和播放倍率信息,生成URL向HTTP流媒体服务器请求时移索引文件。
  4. 如权利要求3所述的基于HLS协议的时移优化方法,其特征 在于:HTTP流媒体服务器解析时移附加信息,若解析结果中播放倍率为负数,HTTP流媒体服务器把包含当前播放的流媒体分片的分片序列ID减1的流媒体分片的时移索引文件发送给客户端;若解析结果中播放倍率为正数,HTTP流媒体服务器把包含当前播放的流媒体分片的分片序列ID加1的流媒体分片的时移索引文件发送给客户端。
  5. 如权利要求1所述的基于HLS协议的时移优化方法,其特征在于:客户端根据时移索引文件得到时移总时长信息,参照当前时间计算出时移开始时间,然后请求HTTP流媒体服务器所发送的时移索引文件中的流媒体分片并播放,同时还缓存该时移索引文件,形成本地时移切片列表。
  6. 如权利要求5所述的基于HLS协议的时移优化方法,其特征在于:客户端播放完时移索引文件中的一个流媒体分片后,判断本地是否缓存有下一个流媒体分片,若是,则继续播放下一个流媒体分片,若否,则判断是到了时移左边界还是时移右边界,若到了时移左边界,则恢复为普通一倍速时移播放,若到了时移右边界,则切换为直播状态。
  7. 如权利要求1所述的基于HLS协议的时移优化方法,其特征在于:客户端通过快进、快退或暂停使HLS直播节目进入时移状态。
  8. 一种基于HLS协议的时移优化系统,其特征在于,包括:
    HLS流媒体服务子系统,其包括编码服务器、切片服务器和HTTP流媒体服务器,所述编码服务器用于将音频数据和视频数据进行编码,所述切片服务器用于将编码服务器输出的媒体流存储为多个流媒体分片,所述HTTP流媒体服务器用于响应时移索引文件请求和播放流媒体分片请求;以及
    客户端,其用于向HTTP流媒体服务器发送时移索引文件请求, 所述客户端得到时移索引文件后,还用于向HTTP流媒体服务器请求并播放所述时移索引文件里面的切片文件。
PCT/CN2018/102617 2017-09-22 2018-08-28 基于hls协议的时移优化方法及系统 WO2019056929A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710863047.4A CN107707937A (zh) 2017-09-22 2017-09-22 基于hls协议的时移优化方法及系统
CN201710863047.4 2017-09-22

Publications (1)

Publication Number Publication Date
WO2019056929A1 true WO2019056929A1 (zh) 2019-03-28

Family

ID=61173213

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102617 WO2019056929A1 (zh) 2017-09-22 2018-08-28 基于hls协议的时移优化方法及系统

Country Status (2)

Country Link
CN (1) CN107707937A (zh)
WO (1) WO2019056929A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110740342A (zh) * 2019-09-06 2020-01-31 浙江大华技术股份有限公司 存储介质、流媒体传输及播放方法、分片方法和装置
US11622164B2 (en) 2019-07-12 2023-04-04 Carrier Corporation System and method for streaming video/s

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707937A (zh) * 2017-09-22 2018-02-16 烽火通信科技股份有限公司 基于hls协议的时移优化方法及系统
CN110300339B (zh) * 2018-03-22 2022-03-29 贵州白山云科技股份有限公司 一种直播多媒体回播方法、装置及系统
CN111193942B (zh) * 2018-03-22 2022-08-02 贵州白山云科技股份有限公司 一种流媒体回播方法及装置
CN109729386B (zh) * 2019-01-03 2021-06-15 深圳市网心科技有限公司 一种视频文件启播方法、系统及电子设备和存储介质
CN110022295B (zh) * 2019-02-28 2021-09-28 视联动力信息技术股份有限公司 一种数据传输的方法和视联网系统
CN111654725B (zh) * 2019-03-04 2021-12-21 北京开广信息技术有限公司 媒体流的实时接收方法及客户端
CN110784737A (zh) * 2019-10-21 2020-02-11 北京东方广视科技股份有限公司 基于hls协议的播放时移电视的方法、终端及服务器
CN110809179A (zh) * 2019-10-30 2020-02-18 烽火通信科技股份有限公司 Hls协议下切换直播时移时间轴的方法及系统
KR20210065604A (ko) * 2019-11-27 2021-06-04 한국전자통신연구원 분산 네트워크 기반 멀티미디어 스트리밍 서비스에서 스트림을 선택하여 수신하는 방법 및 장치
CN111031354B (zh) * 2019-12-09 2020-12-01 腾讯科技(深圳)有限公司 一种多媒体播放方法、装置及存储介质
CN111356028A (zh) * 2020-03-16 2020-06-30 南京巨鲨显示科技有限公司 流媒体服务实现文件序列点播的方法和装置
CN113542820B (zh) * 2021-06-30 2023-12-22 北京中科模识科技有限公司 一种视频编目方法、系统、电子设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103581693A (zh) * 2013-11-12 2014-02-12 北京清源新创科技有限公司 面向互联网的基于分片传输的大尺度直播时移方法及系统
CN103607639A (zh) * 2013-11-26 2014-02-26 乐视网信息技术(北京)股份有限公司 一种直播时移方法及服务器
CN103618912A (zh) * 2013-11-26 2014-03-05 乐视网信息技术(北京)股份有限公司 一种直播时移方法及服务器
US20140380376A1 (en) * 2013-03-15 2014-12-25 General Instrument Corporation Method and apparatus for streaming video
CN107707937A (zh) * 2017-09-22 2018-02-16 烽火通信科技股份有限公司 基于hls协议的时移优化方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140380376A1 (en) * 2013-03-15 2014-12-25 General Instrument Corporation Method and apparatus for streaming video
CN103581693A (zh) * 2013-11-12 2014-02-12 北京清源新创科技有限公司 面向互联网的基于分片传输的大尺度直播时移方法及系统
CN103607639A (zh) * 2013-11-26 2014-02-26 乐视网信息技术(北京)股份有限公司 一种直播时移方法及服务器
CN103618912A (zh) * 2013-11-26 2014-03-05 乐视网信息技术(北京)股份有限公司 一种直播时移方法及服务器
CN107707937A (zh) * 2017-09-22 2018-02-16 烽火通信科技股份有限公司 基于hls协议的时移优化方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LUO, SHUZHEN ET AL.: "Research and Improvement of Streaming Media Live System Based on HLS Protocol", JOURNAL OF ZHENGZHOU UNIVERSITY, vol. 35, no. 5, 16 September 2014 (2014-09-16), pages 36 - 39, ISSN: 1671-6833 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11622164B2 (en) 2019-07-12 2023-04-04 Carrier Corporation System and method for streaming video/s
CN110740342A (zh) * 2019-09-06 2020-01-31 浙江大华技术股份有限公司 存储介质、流媒体传输及播放方法、分片方法和装置

Also Published As

Publication number Publication date
CN107707937A (zh) 2018-02-16

Similar Documents

Publication Publication Date Title
WO2019056929A1 (zh) 基于hls协议的时移优化方法及系统
US10735800B2 (en) Rendering content and time-shifted playback operations for personal over-the-top network video recorder
US10880620B2 (en) Playback synchronization across playback devices
US10469885B2 (en) Playback synchronization among adaptive bitrate streaming clients
US10116971B2 (en) Method and system for fetching a portion of a live media stream before a first ad finishes playing to detect the subsequent ad indicator for live consecutive ad replacement
JP5728736B2 (ja) コーデック適用フレーム・サイズでの音声スプリッティング
US9015779B2 (en) Streaming video server with segment length control and methods for use therewith
US10015222B2 (en) Systems and methods for selective retrieval of adaptive bitrate streaming media
WO2016058411A1 (zh) 一种http实时流媒体分片的拼接方法及拼接系统
EP3391652B1 (en) Controlling retrieval in adaptive streaming
US11778013B2 (en) Segment ladder transitioning in adaptive streaming
TW201234194A (en) Data stream management system for accessing mass data
CN105578201B (zh) 一种实现hls直播码率个数动态调整的系统及方法
Bacega et al. Study about the applicability of low latency in HAS transmission systems
KR101397183B1 (ko) 스트리밍 서비스에서의 재생 목록 파일 관리 방법 및 그 장치
CN115336283B (zh) 客户机装置和向客户机装置流传送媒体内容的方法
Wang et al. Probabilistic seeking prediction in p2p vod systems

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18858824

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18858824

Country of ref document: EP

Kind code of ref document: A1