WO2016090912A1 - 一种直播视频的生成及播放方法、装置、终端及系统 - Google Patents

一种直播视频的生成及播放方法、装置、终端及系统 Download PDF

Info

Publication number
WO2016090912A1
WO2016090912A1 PCT/CN2015/083649 CN2015083649W WO2016090912A1 WO 2016090912 A1 WO2016090912 A1 WO 2016090912A1 CN 2015083649 W CN2015083649 W CN 2015083649W WO 2016090912 A1 WO2016090912 A1 WO 2016090912A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
live
hls
video
carousel
Prior art date
Application number
PCT/CN2015/083649
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 WO2016090912A1 publication Critical patent/WO2016090912A1/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/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
    • 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 video technologies, and in particular, to a method, device, terminal and system for generating and playing live video.
  • HTTP Live Streaming is a streaming media transfer protocol based on Hypertext Transfer Protocol (HTTP) implemented by Apple Inc., which enables streaming and on-demand streaming media, mainly used in Apple's mobile operations.
  • System iOS iPhone Operating System
  • iOS devices such as iPhone, iPad.
  • RTMP protocol Real Time Streaming Protocol
  • RTSP Real Time Streaming Protocol
  • MMS Microsoft Media Server Protocol
  • the embodiment of the invention provides a method, a device, a terminal and a system for generating and playing a live video, which can transmit a video file through the HTTP protocol based on the HLS protocol, which satisfies the requirements of the OTT service, can pass through a firewall, and implements Use a proxy to watch the video.
  • a method for generating a live video including:
  • the video-on-demand VOD file of the HLS type is generated according to the HLS protocol to generate a live file required for the HLS live broadcast.
  • the step of generating the HDS-type video-on-demand VOD file according to the HLS protocol to generate a live file required for the HLS live broadcast includes:
  • the HLS-type video-on-demand VOD file is generated according to the HLS protocol to generate a live file required for the HLS live broadcast.
  • the step of generating the HDS-type video-on-demand VOD file according to the HLS protocol to generate a live file required for the HLS live broadcast further includes:
  • the modified default play program is posted to the HLS type video on demand VOD file.
  • the live file required for the HLS live broadcast includes:
  • the live file required for the HLS live broadcast is sent to the terminal for live broadcast.
  • the step of sending the live file required for the HLS live broadcast to the terminal for live broadcast according to the request includes:
  • the live file required for the HLS live broadcast is sent to the terminal for playing according to the carousel plan.
  • the carousel plan includes: a start time, an end time of the play, and a code page CP and a content URL ID corresponding to the video on demand VOD file.
  • the method further includes:
  • the live file includes:
  • the m3u8 file and the ts media file content used to record the list of ts media files for live broadcast.
  • a live video generating apparatus including:
  • Obtaining a module configured to obtain a video-on-demand VOD file of an HTTP-based streaming media transfer protocol HLS type;
  • the generating module is set to generate a live video file required for the HLS live broadcast according to the HLS protocol in the carousel channel of the HLS type video on demand VOD file.
  • a method for playing a live video including:
  • the video-on-demand VOD file of the HLS type is obtained, and the live file required for the HLS live broadcast is generated according to the HLS protocol;
  • the live file includes:
  • the m3u8 file and the ts media file content used to record the list of ts media files for live broadcast.
  • the step of parsing the live file and playing the video includes:
  • the parsing result includes: the name of any ts media file and the playing duration of any ts media file;
  • the ts media file content is played in the order of the names of the ts media files.
  • a terminal including:
  • Obtaining a module configured to obtain a HDS-type video-on-demand VOD file in a carousel channel, and generate a live file required for an HLS live broadcast according to the HLS protocol;
  • the parsing module is configured to parse the live file and play it.
  • a live video playback system including the foregoing terminal, where the terminal is configured to obtain a HLS-type video-on-demand VOD file according to the HLS after transmitting a request for playing a carousel video.
  • the protocol generates a live file required for the HLS live broadcast, and parses the live file for playback.
  • the playing system of the live video further includes: a server, the server is configured to receive a request for playing a carousel video sent by the terminal, and obtain a video file according to the request for playing the carousel video, and send and send the video file to the terminal.
  • a server the server is configured to receive a request for playing a carousel video sent by the terminal, and obtain a video file according to the request for playing the carousel video, and send and send the video file to the terminal.
  • the live video generation method in the solution of the present invention firstly obtains a video-on-demand VOD file of an HTTP-based streaming media transmission protocol HLS type, and then generates an HLS-type video-on-demand VOD file according to an HLS protocol in the created carousel channel. Live files required for HLS live broadcast.
  • the solution in the invention realizes converting the HLS on-demand file into the HLS live file, and the HLS protocol is very suitable for the Internet, and the video file is transmitted through the HTTP protocol, which can well support the provision of the carousel service on the Internet and can traverse the firewall. Play in HTTP proxy mode.
  • FIG. 1 is a flowchart of a method for generating a live video in an embodiment of the present invention
  • FIG. 2 is a flow chart showing the creation of a carousel channel in an embodiment of the present invention
  • FIG. 3 is a flowchart of content aging processing in the embodiment of the present invention.
  • FIG. 4 is a structural block diagram of a device for generating a live video in an embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for playing a live video in an embodiment of the present invention.
  • FIG. 6 is a flowchart showing the parsing of the m3u8 file in the embodiment of the present invention.
  • FIG. 7 is a structural block diagram of a terminal in an embodiment of the present invention.
  • FIG. 8 is a flowchart showing live video playback in an embodiment of the present invention.
  • the embodiment of the invention discloses a method for generating a live video. As shown in FIG. 1 , the method 100 includes the following steps:
  • Step S101 Obtain a video-on-demand VOD file of an HTTP-based streaming media transmission protocol HLS type
  • Step S103 In the carousel channel, generate a live video file required for the HLS live broadcast according to the HLS protocol according to the HLS type video on demand VOD file.
  • the on-demand video VOD file of the HLS type based on the HTTP-based streaming media transmission protocol is obtained, and the live video file required for the HLS live broadcast is generated according to the HLS protocol in the carousel channel.
  • the HLS live file is played on the carousel channel and provided to the user for viewing.
  • the solution in the present invention also implements data transmission through the HTTP protocol.
  • the HDS-type video-on-demand VOD file is generated according to the HLS protocol and the live file required for the HLS live broadcast (step S103) includes the following steps:
  • the process of creating a carousel channel is as shown in FIG. 2.
  • the service management system obtains a message for creating a carousel channel, and then determines whether the specified default program exists according to the creation message. If it does not exist, it will return a failure to the business system. If it exists, the default broadcast program information will be saved in the database. After the database is successfully saved, it will return to the business system successfully, and according to the default broadcast program information, according to the HLS protocol, the HLS type will be The video on demand VOD file generates live media files required for HLS live broadcast, waiting to be played. Therefore, when the carousel channel is created, the live media file generated by the specified default broadcast program can be played.
  • the specified default play program may also be modified, and when the modification is performed, the following steps are included:
  • the modified default play program is posted to the HLS type video on demand VOD file.
  • the played media file can be aged, and the played live file can be deleted periodically to prevent a large amount of garbage data from being generated.
  • the specific process of aging the played media file is as shown in FIG. 3, first querying and obtaining the aging information of the played media file in the database, and then deleting the media file on the storage device according to the aging information, and finally deleting the database.
  • the data record in the file eases the memory pressure and makes the video play more smooth.
  • the live file required for the HLS live broadcast includes the following steps:
  • the live file required for the HLS live broadcast is sent to the terminal for live broadcast.
  • the solution in the present invention adopts the method of passively transmitting the played media file. Therefore, when the user does not access the viewing, the network bandwidth is not generated, and the network traffic consumption is reduced compared with the conventional playback mode.
  • the step of sending the live file required for the live broadcast of the HLS to the terminal for live broadcast includes:
  • the live file required for the HLS live broadcast is sent to the terminal for broadcast according to the carousel plan.
  • the foregoing carousel plan includes: a start time and an end time of the play, and a code page CP and a content URL ID corresponding to the video on demand VOD file.
  • the live file includes: an m3u8 file and a ts media file content for recording a list of ts media files for live broadcast. Therefore, when playing video data, the terminal can play according to the playback order of the ts media files recorded in the m3u8 file.
  • the embodiment of the invention discloses a device for generating a live video.
  • the device 400 includes:
  • the obtaining module 401 is configured to obtain a video-on-demand VOD file of an HTTP-based streaming media transmission protocol HLS type;
  • the generating module 103 is configured to generate, in the carousel channel, a HDS-type video-on-demand VOD file according to the HLS protocol to generate a live file required for the HLS live broadcast.
  • the embodiment of the invention discloses a method for playing live video. As shown in FIG. 5, the method 500 includes the following steps:
  • Step S501 Acquire, in the carousel channel, a live video file required for HLS live broadcast according to the HLS protocol by acquiring a video on demand VOD file of the HLS type;
  • the live file includes: an m3u8 file and a ts media file content for recording a list of ts media files used for live broadcast.
  • Step S503 parsing the live file, and playing.
  • the step of parsing the live file and performing the playing specifically includes:
  • the parsing result includes: the name of any ts media file and the playing duration of any ts media file;
  • the contents of the ts media file are played in the order of the names of the ts media files.
  • the specific process for parsing the m3u8 file is as shown in FIG. 6.
  • the user initiates a play request to the carousel server through the terminal, and the carousel server acquires the m3u8 file to be played to the storage device, and then Feedback to the terminal; the terminal then parses the obtained m3u8 file, obtains the name of the ts media file and the playing duration in the m3u8 file; finally, obtains the ts media file from the carousel server to the storage device, and feeds back to the terminal, according to the ts media obtained by the parsing The file names are played in order.
  • the embodiment of the invention discloses a terminal. As shown in FIG. 7, the terminal 700 includes:
  • the obtaining module 701 is configured to: obtain, in the carousel channel, a live video file required for the HLS live broadcast according to the HLS protocol by acquiring the video on demand VOD file of the HLS type;
  • the parsing module 703 is configured to parse the live file and play it.
  • the workflow is as shown in FIG. 8.
  • the carousel channel is created according to the carousel channel creation message sent by the service management system, and the carousel channel is created.
  • a default play program that needs to be given. If there is no default play program, it can be added through the service management system. If there is a default play program, the default play program is stored, and a media file is generated, waiting to be played. Before playing the generated media file, the request for playing the carousel video sent by the terminal is obtained, and then the generated media file is sent to the terminal for playing.
  • the play plan is also acquired in the database, and the play plan includes: a start time and an end time of the play, and a code page CP and a content URL ID corresponding to the video on demand VOD file. If the play plan is not stored in the database, the user can formulate according to his own needs through the business management system. If the prepared play plan is stored in the database, the generated media file is played according to the play plan. Further, when the play time in the play plan is reached, the play is performed according to the play plan, and if the play time in the play plan is not reached, the default play program in the carousel channel is continuously and continuously played.
  • the played video file can be deleted periodically.
  • the played media files can be aging processed at regular intervals to prevent a large amount of data garbage from being generated, affecting the storage of newly generated media files, and retaining a certain running space to make the playback smoother.
  • the carousel server when the terminal rotates the live video file according to the play plan, in the prior art, the carousel server is required to first request the media code stream from the media server during the play, and then the media server uses the media and the media.
  • the code stream is sent to the carousel server, and then the car stream server forwards the received media code stream to the live broadcast server.
  • the solution in the present invention is reduced.
  • An embodiment of the present invention provides a video playing system, including the foregoing terminal, where the terminal is configured to acquire a HDS-type video-on-demand VOD file after requesting to play a request for playing a carousel video, and generate a live file required for the HLS live broadcast according to the HLS protocol. And parsing the live file for playback.
  • the video playing system further includes a server, configured to receive a request sent by the terminal to request to play the carousel video, obtain a video file according to the request to play the carousel video, and send the feedback to the terminal.
  • the method, device, terminal, and system for generating and playing a live video provided by the embodiments of the present invention have the following beneficial effects: converting an HLS on-demand file into an HLS live file, and the HLS protocol is very suitable for the Internet.
  • the video file is transmitted through the HTTP protocol, which can well support the provision of a carousel service on the Internet, and can traverse the firewall to play using the HTTP proxy mode.

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)

Abstract

本发明提供了一种直播视频的生成及播放方法、装置、终端及系统。该直播视频的生成方法包括:获取基于HTTP的流媒体传输协议HLS类型的视频点播VOD文件;在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件。本发明的方案能够将HLS内容通过轮播频道的方式提供给用户观看,且使用HTTP协议来传输视频文件,能很好的支持在互联网上提供轮播服务,不仅能够穿越防火墙,而且还能够使用代理的方式来观看视频。

Description

一种直播视频的生成及播放方法、装置、终端及系统 技术领域
本发明涉及互联网视频技术领域,尤其涉及一种直播视频的生成及播放方法、装置、终端及系统。
背景技术
HTTP Live Streaming(HLS)是苹果公司(Apple Inc.)实现的基于超文本传送协议HTTP(Hypertext transfer protocol)的流媒体传输协议,可实现流媒体的直播和点播,主要应用在苹果公司的移动操作系统iOS(iPhone Operating System)系统,为iOS设备(如iPhone、iPad)提供音视频直播和点播方案。
然而,常见的流媒体直播协议,例如RTMP协议(Routing Table Maintenance Protocol路由选择表维护协议)、RTSP协议(Real Time Streaming Protocol实时流传输协议)、MMS协议(Microsoft Media Server Protocol微软媒体服务器协议)等,不但不适合于互联网,而且也不能穿过防火墙、使用代理。不能满足基于开放互联网的视频服务OTT(Over The Top)的需求。
发明内容
本发明实施例提供了一种直播视频的生成及播放方法、装置、终端及系统,能够基于HLS协议通过HTTP协议来传输视频文件,很好的满足OTT业务的需求,能够穿越防火墙,并且实现了使用代理的方式来观看视频。
为了解决上述技术问题,本发明采用如下技术方案:
依据本发明实施例的一个方面,提供了一种直播视频的生成方法,包括:
获取基于HTTP的流媒体传输协议HLS类型的视频点播VOD文件;
在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件。
可选地,在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件的步骤包括:
创建轮播频道,并指定一个默认播放节目;
根据指定的默认播放节目,按照HLS协议,将HLS类型的视频点播VOD文件生成HLS直播需要的直播文件。
可选地,在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件的步骤还包括:
修改轮播频道的默认播放节目;
将修改后的默认播放节目发布到HLS类型的视频点播VOD文件中。
可选地,在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件后还包括:
接收终端发送的请求播放轮播视频的请求;
根据所述请求,将所述HLS直播需要的直播文件发送给终端进行直播。
可选地,根据所述请求,将所述HLS直播需要的直播文件发送给终端进行直播的步骤包括:
获取已制订的轮播计划;
根据所述请求,按照所述轮播计划将所述HLS直播需要的直播文件发送给终端进行播放。
可选地,所述轮播计划包括:播放的开始时间、结束时间以及视频点播VOD文件对应的代码页CP和内容网址ID。
可选地,根据所述请求,将所述HLS直播需要的直播文件发送给终端进行直播后还包括:
定时删除已播放的直播文件。
可选地,所述直播文件包括:
用于记录直播用的ts媒体文件列表的m3u8文件和ts媒体文件内容。
依据本发明实施例的另一个方面,提供了一种直播视频的生成装置,包括:
获取模块,设置为获取基于HTTP的流媒体传输协议HLS类型的视频点播VOD文件;
生成模块,设置为在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件。
依据本发明实施例的另一个方面,还提供了一种直播视频的播放方法,包括:
在轮播频道中,获取HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件;
解析所述直播文件,并进行播放。
可选地,所述直播文件包括:
用于记录直播用的ts媒体文件列表的m3u8文件和ts媒体文件内容。
可选地,解析所述直播文件,并进行播放的步骤包括:
获取记录直播用的ts媒体文件列表的m3u8文件,并对其进行解析,并获取解析结果,其中,所述解析结果包括:任一个ts媒体文件的名称及任一个ts媒体文件的播放时长;
根据所述解析结果,按ts媒体文件的名称顺序播放ts媒体文件内容。
依据本发明实施例的另一个方面,还提供了一种终端,包括:
获取模块,设置为在轮播频道中,获取HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件;
解析模块,设置为解析所述直播文件,并进行播放。
依据本发明实施例的另一个方面,还提供了一种直播视频的播放系统,包括上述的终端,所述终端设置为发送请求播放轮播视频的请求后获取HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件,并解析所述直播文件进行播放。
可选地,所述直播视频的播放系统还包括:服务器,所述服务器设置为接收终端发送的请求播放轮播视频的请求,根据请求播放轮播视频的请求获取视频文件并反馈发送给终端。
本发明的有益效果是:
本发明方案中的直播视频生成方法,首先要先获取基于HTTP的流媒体传输协议HLS类型的视频点播VOD文件,然后在创建的轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件。本发明中的方案实现了将HLS点播文件转换成HLS直播文件,并且HLS协议非常适合于互联网,通过HTTP协议来传输视频文件,能很好的支持在互联网上提供轮播服务,能够穿越防火墙,以使用HTTP代理方式进行播放。
附图说明
图1表示本发明实施例中直播视频的生成方法的流程图;
图2表示本发明实施例中轮播频道创建的流程图;
图3表示本发明实施例中内容老化处理的流程图;
图4表示本发明实施例中直播视频的生成装置的结构框图;
图5表示本发明实施例中直播视频的播放方法的流程图;
图6表示本发明实施例中m3u8文件解析的流程图;
图7表示本发明实施例中终端的结构框图;
图8表示本发明实施例中直播视频播放的流程图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图及具体实施例对本发明进行详细描述。
实施例一
本发明实施例公开了一种直播视频的生成方法,如图1所示,该方法100包括以下步骤:
步骤S101、获取基于HTTP的流媒体传输协议HLS类型的视频点播VOD文件;
步骤S103、在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件。
在本发明实施例中,通过获取基于HTTP的流媒体传输协议HLS类型的点播视频VOD文件,并在轮播频道中将获取的点播视频VOD文件按照HLS协议生成HLS直播需要的直播文件,实现了将HLS直播文件在轮播频道中进行播放,提供给用户观看。且本发明中的方案还实现了通过HTTP协议进行数据传输。
其中,在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件(步骤S103)包括以下步骤:
创建轮播频道,并指定一个默认播放节目;
具体地,在本发明实施例中,创建轮播频道的过程如图2所示,首先,获取业务管理系统下发轮播频道的创建消息,然后根据创建消息判断指定的默认节目是否存在,如果不存在,则向业务系统返回失败,如果存在,则将默认播放节目信息保存在数据库中,保存数据库成功之后,向业务系统返回成功,并根据默认播放节目信息,按照HLS协议,将HLS类型的视频点播VOD文件生成HLS直播需要的直播媒体文件,等待播放。因此,当轮播频道创建完成后,即可播放指定的默认播放节目生成的直播媒体文件。
进一步地,在本发明实施例中,还可以对指定的默认播放节目进行修改,进行修改时,包括以下步骤:
修改轮播频道的默认播放节目;
将修改后的默认播放节目发布到HLS类型的视频点播VOD文件中。
因此,当创建的轮播频道没有播放计划时,可通过修改轮播频道中的默认节目,以增加播放节目内容的多样性。另外,在本发明实施例中,还能够将已播放媒体文件进行老化处理,并定时删除已播放的直播文件,防止造成大量垃圾数据。其中,对已播放媒体文件进行老化处理的具体过程如图3所示,首先在数据库中查询并获取已播放媒体文件的老化信息,然后根据老化信息删除存储设备上的媒体文件,最后进一步删除数据库中的数据记录,缓解了内存压力,使得视频播放更加流畅。
进一步地,在本发明实施例中,在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件后还包括以下步骤:
接收终端发送的请求播放轮播视频的请求;
根据请求,将HLS直播需要的直播文件发送给终端进行直播。
本发明中的方案采用的是被动发送播放的媒体文件方式,因此,当用户不访问观看时不会产生网络带宽,与传统的播放方式相比,降低了网络流量消耗。
其中,在本发明实施例中,将HLS直播需要的直播文件发送给终端进行直播的步骤具体包括:
获取已制订的轮播计划;
根据请求,按照轮播计划将HLS直播需要的直播文件发送给终端进行播放。
其中,上述轮播计划包括:播放的开始时间、结束时间以及视频点播VOD文件对应的代码页CP和内容网址ID。上述直播文件包括:用于记录直播用的ts媒体文件列表的m3u8文件和ts媒体文件内容。因此,终端在播放视频数据时,能够根据m3u8文件中记录的ts媒体文件的播放顺序进行播放。
实施例二
本发明实施例公开了一种直播视频的生成装置,如图4所示,该装置400包括:
获取模块401,设置为获取基于HTTP的流媒体传输协议HLS类型的视频点播VOD文件;
生成模块103,设置为在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件。
实施例三
本发明实施例公开了一种直播视频的播放方法,如图5所示,该方法500包括以下步骤:
步骤S501、在轮播频道中,获取HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件;
其中,上述直播文件包括:用于记录直播用的ts媒体文件列表的m3u8文件和ts媒体文件内容。
步骤S503、解析直播文件,并进行播放。
具体地,解析直播文件,并进行播放的步骤具体包括:
获取记录直播用的ts媒体文件列表的m3u8文件,并对其进行解析,并获取解析结果,其中,解析结果包括:任一个ts媒体文件的名称及任一个ts媒体文件的播放时长;
根据解析结果,按ts媒体文件的名称顺序播放ts媒体文件内容。
其中,在请求播放时,对m3u8文件进行解析的具体流程如图6所示,首先,用户通过终端向轮播服务器发起播放请求,并由轮播服务器向存储设备获取将要播放的m3u8文件,然后反馈给终端;然后终端对获取的m3u8文件进行解析,获取m3u8文件中包含ts媒体文件名称和播放时长;最后通过轮播服务器向存储设备获取ts媒体文件,反馈到终端,根据解析得到的ts媒体文件名称顺序进行播放。
实施例四
本发明实施例公开了一种终端,如图7所示,该终端700包括:
获取模块701,设置为在轮播频道中,获取HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件;
解析模块703,设置为解析直播文件,并进行播放。
具体地,在本发明实施例中,该终端在播放直播文件时,工作流程如图8所示,首先,根据业务管理系统下发的轮播频道创建消息创建轮播频道,在轮播频道创建的时候需要给的一个默认播放节目,若不存在默认播放节目,则可通过业务管理系统进行添加,若存在默认播放节目,则将该默认播放节目进行存储,并生成媒体文件,等待播放。在播放生成的媒体文件之前,要获取终端发送的请求播放轮播视频的请求,然后将生成的媒体文件发送到终端进行播放。
其中,在进行播放时,还要获取存储于数据库中播放计划,该播放计划包括:播放的开始时间、结束时间以及视频点播VOD文件对应的代码页CP和内容网址ID。若数据库中未存储播放计划,则用户可根据自身需求通过业务管理系统进行制订,若数据库中已存储制订好的播放计划,则根据播放计划进行播放已生成的媒体文件。进一步地,当到达播放计划中的播放时间时,则根据播放计划进行播放,若未到达播放计划中的播放时间,则连续不断循环播放轮播频道中的默认播放节目。
进一步地,当视频文件播放完成后,能够对已播放的视频文件定时删除。另外,还能够已播放的媒体文件定时进行老化处理,防止造成大量的数据垃圾,影响新生成媒体文件的存储,保留一定的运行空间,使播放更加流畅。
其中,在本发明实施例中,当终端根据播放计划轮播直播视频文件时,与现有技术中,在播放时需要轮播服务器先向媒体服务器请求媒体码流,然后媒体服务器将媒体,媒体码流发送给轮播服务器,再由轮播服务器将收到的媒体码流转发给直播服务器,最后,由直播服务器将媒体码流发送给客户端的播放方式相比,本发明中的方案减小了网络开销,并且避免了现有技术中的某一环节发生的丢包或者其他错误造成的连接服务器失败,大大减少了错误率。
实施例五
本发明实施例提供了一种视频播放系统,包括上述的终端,其中,终端设置为发送请求播放轮播视频的请求后获取HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件,并解析直播文件进行播放。
进一步地,该视频播放系统还包括服务器,设置为接收终端发送的请求播放轮播视频的请求,根据请求播放轮播视频的请求获取视频文件并反馈发送给终端。
以上所述的是本发明的优选实施方式,应当指出对于本技术领域的普通人员来说,在不脱离本发明所述的原理前提下还可以作出若干改进和润饰,这些改进和润饰也在本发明的保护范围内。
工业实用性
如上所述,本发明实施例提供的一种直播视频的生成及播放方法、装置、终端及系统具有以下有益效果:实现了将HLS点播文件转换成HLS直播文件,并且HLS协议非常适合于互联网,通过HTTP协议来传输视频文件,能很好的支持在互联网上提供轮播服务,能够穿越防火墙,以使用HTTP代理方式进行播放。

Claims (15)

  1. 一种直播视频的生成方法,包括:
    获取基于HTTP的流媒体传输协议HLS类型的视频点播VOD文件;
    在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件。
  2. 如权利要求1所述的方法,其中,在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件的步骤包括:
    创建轮播频道,并指定一个默认播放节目;
    根据指定的默认播放节目,按照HLS协议,将HLS类型的视频点播VOD文件生成HLS直播需要的直播文件。
  3. 如权利要求2所述的方法,其中,还包括:
    修改轮播频道的默认播放节目;
    将修改后的默认播放节目发布到HLS类型的视频点播VOD文件中。
  4. 如权利要求1所述的方法,其中,在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件后还包括:
    接收终端发送的请求播放轮播视频的请求;
    根据所述请求,将所述HLS直播需要的直播文件发送给终端进行直播。
  5. 如权利要求4所述的方法,其中,根据所述请求,将所述HLS直播需要的直播文件发送给终端进行直播的步骤包括:
    获取已制订的轮播计划;
    根据所述请求,按照所述轮播计划将所述HLS直播需要的直播文件发送给终端进行播放。
  6. 如权利要求5所述的方法,其中,所述轮播计划包括:播放的开始时间、结束时间以及视频点播VOD文件对应的代码页CP和内容网址ID。
  7. 如权利要求4所述的方法,其中,根据所述请求,将所述HLS直播需要的直播文件发送给终端进行直播后还包括:
    定时删除已播放的直播文件。
  8. 如权利要求1至7中任一项所述的方法,其中,所述直播文件包括:
    用于记录直播用的ts媒体文件列表的m3u8文件和ts媒体文件内容。
  9. 一种直播视频的生成装置,包括:
    获取模块,设置为获取基于HTTP的流媒体传输协议HLS类型的视频点播VOD文件;
    生成模块,设置为在轮播频道中,将HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件。
  10. 一种直播视频的播放方法,包括:
    在轮播频道中,获取HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件;
    解析所述直播文件,并进行播放。
  11. 如权利要求10所述直播视频的播放方法,其中,所述直播文件包括:
    用于记录直播用的ts媒体文件列表的m3u8文件和ts媒体文件内容。
  12. 如权利要求11所述的直播视频的播放方法,其中,解析所述直播文件,并进行播放的步骤包括:
    获取记录直播用的ts媒体文件列表的m3u8文件,并对其进行解析,并获取解析结果,其中,所述解析结果包括:任一个ts媒体文件的名称及任一个ts媒体文件的播放时长;
    根据所述解析结果,按ts媒体文件的名称顺序播放ts媒体文件内容。
  13. 一种终端,包括:
    获取模块,设置为在轮播频道中,获取HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件;
    解析模块,设置为解析所述直播文件,并进行播放。
  14. 一种直播视频的播放系统,包括如权利要求13所述的终端,所述终端设置为发送请求播放轮播视频的请求后获取HLS类型的视频点播VOD文件按照HLS协议生成HLS直播需要的直播文件,并解析所述直播文件进行播放。
  15. 如权利要求14所述的直播视频播放系统,其中,还包括:服务器,所述服务器设置为接收终端发送的请求播放轮播视频的请求,根据请求播放轮播视频的请求获取视频文件并反馈发送给终端。
PCT/CN2015/083649 2014-12-12 2015-07-09 一种直播视频的生成及播放方法、装置、终端及系统 WO2016090912A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410767040.9 2014-12-12
CN201410767040.9A CN105744309A (zh) 2014-12-12 2014-12-12 一种直播视频的生成及播放方法、装置、终端及系统

Publications (1)

Publication Number Publication Date
WO2016090912A1 true WO2016090912A1 (zh) 2016-06-16

Family

ID=56106588

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/083649 WO2016090912A1 (zh) 2014-12-12 2015-07-09 一种直播视频的生成及播放方法、装置、终端及系统

Country Status (2)

Country Link
CN (1) CN105744309A (zh)
WO (1) WO2016090912A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878815B (zh) * 2017-03-09 2020-01-31 青岛海信电器股份有限公司 视频的播放方法和装置
CN114125487A (zh) * 2021-12-02 2022-03-01 北京思特奇信息技术股份有限公司 一种基于hls接口的视频直播录制方法及系统

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103533395A (zh) * 2013-09-27 2014-01-22 武汉市烽视威科技有限公司 实现hls频道回看播放的方法及系统
US20140229976A1 (en) * 2013-02-12 2014-08-14 Azuki Systems, Inc. Rendering content for personal over-the-top network video recorder

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103685263A (zh) * 2013-12-06 2014-03-26 乐视致新电子科技(天津)有限公司 轮播媒体资源的方法、服务器及系统
CN103685264A (zh) * 2013-12-06 2014-03-26 乐视致新电子科技(天津)有限公司 轮播媒体分片的方法、客户端及系统
CN104079983B (zh) * 2014-06-26 2017-05-17 江苏省邮电规划设计院有限责任公司 一种hls节目录制和服务的系统和方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140229976A1 (en) * 2013-02-12 2014-08-14 Azuki Systems, Inc. Rendering content for personal over-the-top network video recorder
CN103533395A (zh) * 2013-09-27 2014-01-22 武汉市烽视威科技有限公司 实现hls频道回看播放的方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
YANGM G. ET AL.: "Implementation of HTTP Live Streaming for an IP Camera Using an Open Source Multimedia Converter", INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND ITS APPLICATIONS, vol. 8, no. 6, 30 June 2014 (2014-06-30), pages 41 - 43, ISSN: 1738-9984 *

Also Published As

Publication number Publication date
CN105744309A (zh) 2016-07-06

Similar Documents

Publication Publication Date Title
EP2391086B1 (en) Method and apparatus for playing live content
US9882951B2 (en) Method and device for playing streaming media, and non-transitory storage medium
US8843596B2 (en) Conversion between streaming media communication protocols
US20150372927A1 (en) Method, Device, and System for Acquiring Streaming Media Data
EP2587757A1 (en) Method, system and apparatus for supporting advertising contents in hypertext transfer protocol streaming play mode
US20050223107A1 (en) Media delivery apparatus
EP2779658A2 (en) Segmented content delivery
CN107948762B (zh) 直播视频的传输方法、装置和系统
CN105228001B (zh) 一种flv格式视频在线播放的方法及系统
WO2013053326A1 (zh) 回看节目录制、播放方法、服务器、客户端及系统
WO2013178010A1 (zh) 一种多媒体内容分发方法、设备及系统
CN106790005B (zh) 实现低延时hls直播的系统及方法
KR20120114016A (ko) 사용자 컨텐츠를 외부 단말기에서 네트워크 적응적으로 스트리밍하는 방법 및 장치
CN104604245B (zh) 呈现时间控制
WO2015109847A1 (zh) 一种分段节目快速分发的方法、服务器及客户端
WO2017080427A1 (zh) 一种媒体播放方法、终端、系统及计算机存储介质
KR101705898B1 (ko) 디지털 방송 시스템에서 타임시프트 서비스 제공 방법 및 시스템
CN109151614B (zh) 一种降低hls直播播放延迟的方法及装置
WO2016090912A1 (zh) 一种直播视频的生成及播放方法、装置、终端及系统
WO2015109842A1 (zh) 一种处理分段节目的方法、服务器及客户端设备
KR102123208B1 (ko) 콘텐츠 공급 장치, 콘텐츠 공급 방법, 프로그램, 단말 장치, 및 콘텐츠 공급 시스템
WO2021178559A1 (en) Smart notification for over-the-top (ott) streaming among multiple devices
US20180270546A1 (en) Content supply device, content supply method, program, terminal device, and content supply system
WO2016101626A1 (zh) 一种频道码流处理方法、装置、终端及系统
KR101383910B1 (ko) 비연결형 스트리밍 서비스에서의 세션 유지 방법 및 그 장치

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: 15867360

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: 15867360

Country of ref document: EP

Kind code of ref document: A1