WO2016015419A1 - Streaming media playing method and playing device - Google Patents

Streaming media playing method and playing device Download PDF

Info

Publication number
WO2016015419A1
WO2016015419A1 PCT/CN2014/092291 CN2014092291W WO2016015419A1 WO 2016015419 A1 WO2016015419 A1 WO 2016015419A1 CN 2014092291 W CN2014092291 W CN 2014092291W WO 2016015419 A1 WO2016015419 A1 WO 2016015419A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
request
media
player
streaming media
Prior art date
Application number
PCT/CN2014/092291
Other languages
French (fr)
Chinese (zh)
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 WO2016015419A1 publication Critical patent/WO2016015419A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present application relates to the field of Internet media playback technologies, and in particular, to a streaming media playing method and a playback device.
  • the HTTP Live Streaming protocol is a streaming media playback protocol. Apple's iPhone, iPad, Mac and other products are based on the protocol to achieve streaming media playback.
  • the biggest feature of the HTTP Live Streaming protocol is that the stream segmentation technology is used to cut the streaming media file into multiple TS fragment files, and then an m3u8 index file corresponding to the plurality of TS fragment files is created. This design enables fragmented transmission of network traffic conforming to HTTP Live Streaming, which is beneficial to make full use of the performance of the network.
  • the present application provides a streaming media playing method and a playback device to solve the above problems.
  • an m3u8 file corresponding to the streaming media from a streaming media server, where the m3u8 file includes URL information of the media file;
  • the optimizing processing on the m3u8 file comprises: deleting a DISCONTINUITY flag in the m3u8 file and/or adjusting a duration in the m3u8 file.
  • the first request is sent by the corresponding local address.
  • the data transceiver module further transmits the corresponding m3u8 file/optimized processed m3u8 file and the media file/optimized processed media file to the player.
  • the streaming media playing method and the playing device described in the present application achieve the following effects:
  • FIG. 1 is a schematic diagram of an action sequence of a streaming media playing process in the prior art.
  • FIG. 1 is a schematic diagram of an action sequence of a streaming media playing process in the prior art, and the above playback process should be Used for mobile devices under Android.
  • the above streaming media playback process includes the following actions:
  • the player sends a second request for the media file (for example, TS fragment) (also the request, the request parameter may be optimized according to the configuration of the server, for example, adding a parameter such as “User-Agent”) To the local server.
  • the second request is sent by using the corresponding local address information;

Abstract

Disclosed in the present invention is a streaming media playing method. The method includes: acquiring a first request for a player to play streaming media; acquiring an m3u8 file corresponding to the streaming media obtained from a streaming media server according to the first request, wherein the m3u8 file includes the URL information of a media file; parsing the m3u8 file and subjecting the parsed m3u8 file to optimizing processing; transmitting the m3u8 file subjected to optimizing processing to the player; acquiring from the player a second request regarding a media file; acquiring the corresponding media file from the streaming media sever according to the second request; transmitting the corresponding media file to the player. The present invention has the advantages that the problem that the player is not supportive to floating point time length can be solved by means of optimizing processing; the problems of unsmooth picture playing and time progress error of the player are solved by means of optimizing the m3u8 file/media file (for instance: TS fragments); playing smoothness can be improved by the selection of more proper addresses according to the CDN scheduling policy.

Description

流媒体的播放方法与播放装置Streaming media playing method and playing device 技术领域Technical field
本申请涉及互联网媒体播放技术领域,更具体地,涉及一种流媒体的播放方法与播放装置。The present application relates to the field of Internet media playback technologies, and in particular, to a streaming media playing method and a playback device.
背景技术Background technique
随着互联网技术的快速发展,人们获取信息的方式已经发生改变:从传统的书籍、报纸、电视、广播等方式,继而变成通过互联网获取。尤其是互联网将影视节目、新闻、广告、聊天视频、游戏视频和监控视频等等丰富的综合性网络视频资源进行共享,从而网络视频已经成为人们学习、社交以及休闲娱乐而不可替代的重要方式。对于拥有大量视频资源的视频网站而言,用户可以通过移动终端(例如智能手机、平板电脑、笔记本电脑、台式电脑、个人数字助理、数字电视机等等)上的浏览器进行访问视频网站的视频播放页面,观看用户想要观看的各类视频文件。With the rapid development of Internet technology, the way people access information has changed: from traditional books, newspapers, television, radio, etc., and then through the Internet. In particular, the Internet shares rich and comprehensive online video resources such as movies, news, advertisements, chat videos, game videos and surveillance videos, so that online video has become an irreplaceable and important way for people to learn, socialize and entertain. For video sites with a lot of video resources, users can access video from video sites via a browser on a mobile device such as a smartphone, tablet, laptop, desktop, personal digital assistant, digital TV, etc. Play the page and watch the various video files that the user wants to watch.
HTTP Live Streaming协议是一种流媒体的播放协议,苹果公司的iPhone、iPad、Mac等产品抖基于该协议实现流媒体的播放。HTTP Live Streaming协议最大的特点是使用了流分割技术,将流媒体文件切割成多个TS碎片文件,然后建立一个与所述多个TS碎片文件相对应的m3u8索引文件。这样的设计使符合HTTP Live Streaming的网络传输可以实现碎片化传输,有利于充分利用网络的性能。The HTTP Live Streaming protocol is a streaming media playback protocol. Apple's iPhone, iPad, Mac and other products are based on the protocol to achieve streaming media playback. The biggest feature of the HTTP Live Streaming protocol is that the stream segmentation technology is used to cut the streaming media file into multiple TS fragment files, and then an m3u8 index file corresponding to the plurality of TS fragment files is created. This design enables fragmented transmission of network traffic conforming to HTTP Live Streaming, which is beneficial to make full use of the performance of the network.
然而,并不是所有的音频/视频播放器都能够很好地支持HTTP Live Streaming协议。举例来说,对于安卓系统下的播放器来说,播放符合上述协议的媒体文件时,部分播放器在播放过程中会出现画面卡顿、播放进度出错等问题,影响用户体验。因此,需要一种新的流媒体播放方法和播放装置来提升用户体验。 However, not all audio/video players support the HTTP Live Streaming protocol very well. For example, for a player under the Android system, when playing a media file conforming to the above protocol, some players may have problems such as a picture jam and a playback progress error during playback, which affects the user experience. Therefore, a new streaming media playing method and playback device are needed to enhance the user experience.
发明内容Summary of the invention
有鉴于此,本申请提供一种流媒体的播放方法与播放装置以解决上述问题。In view of this, the present application provides a streaming media playing method and a playback device to solve the above problems.
本申请公开了一种流媒体的播放方法,其特征在于,包含:The present application discloses a method for playing a streaming media, which includes:
获取播放器用于播放流媒体的第一请求;Obtaining a first request that the player uses to play streaming media;
依据所述第一请求从流媒体服务器获取与所述流媒体对应的m3u8文件,其中所述m3u8文件包含媒体文件的URL信息;Obtaining, according to the first request, an m3u8 file corresponding to the streaming media from a streaming media server, where the m3u8 file includes URL information of the media file;
解析所述m3u8文件,并对所述m3u8文件进行优化处理;Parsing the m3u8 file and optimizing the m3u8 file;
将优化处理后的所述m3u8文件传送至所述播放器;Transmitting the optimized m3u8 file to the player;
获取所述播放器关于所述媒体文件的第二请求;Obtaining a second request by the player about the media file;
依据所述第二请求从所述流媒体服务器获取对应的媒体文件;以及Acquiring a corresponding media file from the streaming server according to the second request;
将所述对应的媒体文件传送至所述播放器。Transmitting the corresponding media file to the player.
优选地,其中,将所述对应的媒体文件传送至所述播放器的步骤包含:Preferably, the step of transmitting the corresponding media file to the player comprises:
对所述对应的媒体文件进行优化处理;以及Optimizing the corresponding media file; and
将优化处理后的所述对应的媒体文件传送至所述播放器。Transmitting the corresponding processed media file to the player.
优选地,其中,对所述对应的媒体文件进行的所述优化处理包含:删除所述对应的媒体文件中的DISCONTINUITY标志及/或修改所述对应的媒体文件的时间戳。Preferably, the optimizing process performed on the corresponding media file includes: deleting a DISCONTINUITY flag in the corresponding media file and/or modifying a timestamp of the corresponding media file.
优选地,其中,所述第二请求是所述播放器根据优化处理后的所述m3u8文件中包含的所述URL信息产生的。Preferably, wherein the second request is generated by the player according to the URL information included in the m3u8 file after the optimization process.
优选地,其中,对所述m3u8文件进行的所述优化处理包含:删除所述m3u8文件中的DISCONTINUITY标志及/或调整所述m3u8文件中的时长。Preferably, wherein the optimizing processing on the m3u8 file comprises: deleting a DISCONTINUITY flag in the m3u8 file and/or adjusting a duration in the m3u8 file.
优选地,其中,更包含:Preferably, wherein, further comprising:
获取所述流媒体的原始地址,并将所述原始地址转换成对应的本地地址;以及Obtaining an original address of the streaming media, and converting the original address into a corresponding local address;
将所述对应的本地地址传送至所述播放器,Transmitting the corresponding local address to the player,
其中,所述第一请求是以所述对应的本地地址发出的。The first request is sent by the corresponding local address.
优选地,其中,更包含:Preferably, wherein, further comprising:
将所述m3u8文件中的URL信息转换成对应的本地地址信息,Converting the URL information in the m3u8 file into corresponding local address information,
其中,所述第二请求是以所述对应的本地地址信息发出的。 The second request is sent by the corresponding local address information.
优选地,其中,依据所述第二请求从所述流媒体服务器获取对应的媒体文件的步骤包含:Preferably, the step of obtaining a corresponding media file from the streaming server according to the second request comprises:
利用CDN调度策略选择与所述第二请求对应的、更加合适的优化地址;以及Using a CDN scheduling policy to select a more appropriate optimized address corresponding to the second request;
依据所述优化地址从所述流媒体服务器获取所述对应的媒体文件。Obtaining the corresponding media file from the streaming media server according to the optimized address.
本申请还公开了一种流媒体的播放装置,其特征在于,包含:The present application also discloses a streaming media playing device, which comprises:
请求处理模块,用于接收来自播放器的用于播放流媒体的第一请求和关于媒体文件的第二请求;a request processing module, configured to receive a first request for playing a streaming media from a player and a second request for a media file;
数据收发模块,用于依据所述第一请求获取对应的m3u8文件,以及依据所述第二请求获取所述媒体文件,其中所述对应的m3u8文件包含所述媒体文件的URL信息;以及a data transceiver module, configured to acquire a corresponding m3u8 file according to the first request, and obtain the media file according to the second request, where the corresponding m3u8 file includes URL information of the media file;
优化处理模块,用于对请求参数优化,对所述对应的m3u8文件及/或所述媒体文件进行优化处理;An optimization processing module, configured to optimize a request parameter, and perform optimization processing on the corresponding m3u8 file and/or the media file;
其中,所述数据收发模块更将所述对应的m3u8文件/优化处理后的所述对应的m3u8文件以及所述媒体文件/优化处理后的所述媒体文件传送至所述播放器。The data transceiver module further transmits the corresponding m3u8 file/optimized processed m3u8 file and the media file/optimized processed media file to the player.
优选地,其中,所述请求处理模块更获取所述流媒体的原始地址,通过所述优化处理模块将所述原始地址转换成对应的本地地址,以及将所述对应的本地地址通过所述数据收发模块传送至所述播放器,且所述第一请求是以所述对应的本地地址发出的。Preferably, the request processing module further acquires an original address of the streaming media, converts the original address into a corresponding local address by using the optimization processing module, and passes the corresponding local address through the data. The transceiver module transmits to the player, and the first request is sent at the corresponding local address.
优选地,其中,所述优化处理模块更将所述m3u8文件中的URL信息转换成对应的本地地址信息,且所述第二请求是以所述对应的本地地址信息发出的。Preferably, the optimization processing module further converts the URL information in the m3u8 file into corresponding local address information, and the second request is sent by the corresponding local address information.
与现有技术相比,本申请所述的流媒体的播放方法与播放装置,达到了如下效果:Compared with the prior art, the streaming media playing method and the playing device described in the present application achieve the following effects:
1)本申请的技术方案可以通过优化处理解决播放器不支持m3u8浮点时长的问题;1) The technical solution of the present application can solve the problem that the player does not support the floating time of the m3u8 floating point by optimizing the processing;
2)本申请的技术方案可以通过优化m3u8文件/媒体文件(例如TS碎片)解决播放器画面卡顿及时间进度错误的问题; 2) The technical solution of the present application can solve the problem that the player picture is stuck and the time progress is wrong by optimizing the m3u8 file/media file (for example, TS fragment);
3)本申请技术方案还可以通过CDN调度策略选择更加合适的地址以提升播放的流畅度。3) The technical solution of the present application can also select a more suitable address through the CDN scheduling policy to improve the smoothness of playing.
当然,实施本申请的任一产品并不一定需要同时达到以上所述的所有技术效果。Of course, implementing any of the products of the present application does not necessarily require achieving all of the technical effects described above at the same time.
附图说明DRAWINGS
此处所说明的附图用来提供对本申请的进一步理解,构成本申请的一部分,本申请的示意性实施例及其说明用于解释本申请,并不构成对本申请的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the present application, and are intended to be a part of this application. In the drawing:
图1为现有技术中流媒体播放过程的动作序列示意图。FIG. 1 is a schematic diagram of an action sequence of a streaming media playing process in the prior art.
图2为依据本申请一实施例的流媒体播放过程的动作序列示意图。FIG. 2 is a schematic diagram of an action sequence of a streaming media playing process according to an embodiment of the present application.
图3为依据本申请一实施例的流媒体的播放装置的方块示意图。FIG. 3 is a block diagram of a streaming media playback device according to an embodiment of the present application.
具体实施方式detailed description
如在说明书及权利要求当中使用了某些词汇来指称特定组件。本领域技术人员应可理解,硬件制造商可能会用不同名词来称呼同一个组件。本说明书及权利要求并不以名称的差异来作为区分组件的方式,而是以组件在功能上的差异来作为区分的准则。如在通篇说明书及权利要求当中所提及的“包含”为一开放式用语,故应解释成“包含但不限定于”。“大致”是指在可接收的误差范围内,本领域技术人员能够在一定误差范围内解决所述技术问题,基本达到所述技术效果。此外,“耦接”一词在此包含任何直接及间接的电性耦接手段。因此,若文中描述一第一装置耦接于一第二装置,则代表所述第一装置可直接电性耦接于所述第二装置,或通过其他装置或耦接手段间接地电性耦接至所述第二装置。说明书后续描述为实施本申请的较佳实施方式,然所述描述乃以说明本申请的一般原则为目的,并非用以限定本申请的范围。本申请的保护范围当视所附权利要求所界定者为准。Certain terms are used throughout the description and claims to refer to particular components. Those skilled in the art will appreciate that hardware manufacturers may refer to the same component by different nouns. The present specification and the claims do not use the difference in the name as the means for distinguishing the components, but the difference in function of the components as the criterion for distinguishing. The word "comprising" as used throughout the specification and claims is an open term and should be interpreted as "including but not limited to". "Substantially" means that within the range of acceptable errors, those skilled in the art will be able to solve the technical problems within a certain error range, substantially achieving the technical effects. In addition, the term "coupled" is used herein to include any direct and indirect electrical coupling means. Therefore, if a first device is coupled to a second device, the first device can be directly electrically coupled to the second device, or electrically coupled indirectly through other devices or coupling means. Connected to the second device. The description of the specification is intended to be illustrative of the preferred embodiments of the invention. The scope of protection of the application is subject to the definition of the appended claims.
图1为现有技术中流媒体播放过程的动作序列示意图,上述播放过程应 用于安卓系统下的移动装置。如图1所示,上述流媒体播放过程包含以下动作:1 is a schematic diagram of an action sequence of a streaming media playing process in the prior art, and the above playback process should be Used for mobile devices under Android. As shown in FIG. 1, the above streaming media playback process includes the following actions:
101:播放器首先向流媒体服务器发送播放流媒体的请求(该请求可依据服务器的配置对请求参数进行优化,例如添加”User-Agent”等参数)。上述流媒体服务器可以是远程网络服务器,其可以存储m3u8文件和对应的媒体文件(TS碎片);101: The player first sends a request for playing the streaming media to the streaming server (the request may optimize the request parameter according to the configuration of the server, for example, adding a parameter such as “User-Agent”). The streaming media server may be a remote network server, which can store m3u8 files and corresponding media files (TS fragments);
102:在接收到所述请求后,远程网络服务器将所述请求中地址对应的m3u8文件传送回播放器,而m3u8文件中包含TS碎片对应的URL地址;102: After receiving the request, the remote network server transmits the m3u8 file corresponding to the address in the request back to the player, and the m3u8 file includes the URL address corresponding to the TS fragment;
103:在接收到m3u8文件之后,播放器根据m3u8文件携带的URL信息请求欲播放的TS碎片;103: After receiving the m3u8 file, the player requests the TS fragment to be played according to the URL information carried in the m3u8 file;
104:随后,远程网络服务器根据请求中的URL信息将对应的TS碎片传回播放器,以由播放器进行播放,之后播放器会继续请求下一TS,按照此过程继续处理。104: Subsequently, the remote network server returns the corresponding TS fragment to the player according to the URL information in the request for playing by the player, and then the player continues to request the next TS, and continues processing according to this process.
在上述过程中,m3u8文件和媒体文件(TS碎片)的请求与处理全部由播放器来负责,在目前的播放器架构下,无法控制请求参数以及对获取的m3u8文件和媒体文件进行优化处理。In the above process, the request and processing of the m3u8 file and the media file (TS fragment) are all handled by the player. Under the current player architecture, the request parameters cannot be controlled and the obtained m3u8 file and the media file are optimized.
图2为依据本申请一实施例的流媒体播放过程的动作序列示意图。在上述流媒体的播放过程中,除了原本的播放器和流媒体服务器(例如远程网络服务器)之外,本申请的实施例额外提供了一个流媒体的播放装置,其能够控制请求参数及/或在播放器接收到m3u8文件和媒体文件之前对m3u8文件和媒体文件进行优化处理。在此实施例中,上述流媒体的播放装置可以是本地HTTP代理服务器。下文将以本地HTTP代理服务器(以下简称为本地服务器)为例来说明此实施例中流媒体播放过程的动作序列:FIG. 2 is a schematic diagram of an action sequence of a streaming media playing process according to an embodiment of the present application. In the above playback process of the streaming media, in addition to the original player and the streaming media server (for example, a remote network server), the embodiment of the present application additionally provides a streaming media playback device capable of controlling request parameters and/or The m3u8 file and the media file are optimized before the player receives the m3u8 file and the media file. In this embodiment, the streaming media playback device may be a local HTTP proxy server. The following is a description of the action sequence of the streaming media playing process in this embodiment by taking a local HTTP proxy server (hereinafter referred to as a local server) as an example:
201:播放器将请求的流媒体的原始地址发送至本地服务器。上述原始地址是对应于远程网络服务器的地址,也就是依据现有技术的方案向远程网络服务器请求流媒体时的地址;201: The player sends the original address of the requested streaming media to the local server. The foregoing original address is an address corresponding to the remote network server, that is, an address when the streaming media is requested from the remote network server according to the prior art solution;
202:本地服务器将接收到的原始地址转换成本地地址,并将对应的本地地址传送回播放器。在一个实施例中,本地服务器可以在转换完成后建立 原始地址与本地地址的映射表,以更方便地完成两者的匹配;202: The local server converts the received original address to a local address, and transmits the corresponding local address back to the player. In one embodiment, the local server can be established after the conversion is complete A mapping table of the original address and the local address to more easily complete the matching between the two;
本领域技术人员应可理解,在本实施例的流媒体播放中,上述动作201和202并非是必要的动作。播放器也可以直接以原始地址通过本地服务器向远程网络服务器请求流媒体文件,此亦在本申请所包含的范围之内。Those skilled in the art should understand that in the streaming media playback of the embodiment, the above actions 201 and 202 are not necessary actions. The player may also request streaming media files from the local server directly to the remote web server at the original address, which is also within the scope of this application.
203:依据接收到的本地地址,播放器向本地服务器发送用于播放流媒体的第一请求。在另一实施例中,上述第一请求是以对应的本地地址发出的;203: The player sends a first request for playing the streaming media to the local server according to the received local address. In another embodiment, the first request is sent by a corresponding local address;
204:依据接收到的第一请求,本地服务器向远程网络服务器(流媒体服务器)发送流媒体请求,以获取对应的流媒体。在另一实施例中,若第一请求是以本地地址发出,则本地服务器可将第一请求中的本地地址替换为原始地址,其替换关系可以依据前文所述的映射表进行;204: According to the received first request, the local server sends a streaming media request to the remote network server (streaming server) to obtain the corresponding streaming media. In another embodiment, if the first request is sent by the local address, the local server may replace the local address in the first request with the original address, and the replacement relationship may be performed according to the mapping table described above;
205:远程网络服务器依据本地服务器的请求,将对应的m3u8文件发送给本地服务器,上述m3u8文件中包含媒体文件(例如TS碎片)的URL地址;205: The remote network server sends the corresponding m3u8 file to the local server according to the request of the local server, where the m3u8 file includes a URL address of the media file (for example, TS fragment);
206:本地服务器解析接收到的m3u8文件,并对所述m3u8文件进行优化处理。举例来说,某些播放器可能不支持浮点数时长,则本地服务器可在此处根据需要将时长取整重新写入到m3u8文件中;或者,某些播放器对DISCONTINUITY标志支持不力,本地服务器可在此处将其删去。在另一实施例中,本地服务器还可以对m3u8文件中包含的媒体文件(例如TS碎片)的URL信息进行处理,将其转换成本地地址信息,并将本地地址信息加回至m3u8文件中。之后,本地服务器将优化处理后的m3u8文件传送给播放器;206: The local server parses the received m3u8 file, and optimizes the m3u8 file. For example, some players may not support floating-point duration, so the local server can rewrite the duration to the m3u8 file as needed; or some players do not support the DISCONTINUITY flag, the local server It can be deleted here. In another embodiment, the local server may also process the URL information of the media file (eg, TS fragment) contained in the m3u8 file, convert it to the local address information, and add the local address information back to the m3u8 file. After that, the local server transmits the optimized m3u8 file to the player;
207:依据接收到的m3u8文件,播放器发送关于媒体文件(例如TS碎片)的第二请求(同样该请求,可依据服务器的配置对请求参数进行优化,例如添加”User-Agent”等参数)至本地服务器。在另一实施例中,若接收到的m3u8文件中包含的是与媒体文件的URL信息对应的本地地址信息,则上述第二请求是以对应的本地地址信息发出的;207: According to the received m3u8 file, the player sends a second request for the media file (for example, TS fragment) (also the request, the request parameter may be optimized according to the configuration of the server, for example, adding a parameter such as “User-Agent”) To the local server. In another embodiment, if the received m3u8 file includes local address information corresponding to the URL information of the media file, the second request is sent by using the corresponding local address information;
208:依据接收到的第二请求,本地服务器向远程网络服务器发送媒体文件请求,以获取对应的媒体文件。在另一实施例中,若上述第二请求包含本地地址信息,则本地服务器会将此本地地址信息依据前文的转换规则转换成对应的URL信息并整合至发送给远程网络服务器的媒体文件请求中。此 外,在另一实施例中,本地服务器也可以依据具体的CDN调度策略选择一个更加合适的、对应于上述媒体文件的优化地址,并以所述优化地址请求对应的媒体文件;208: According to the received second request, the local server sends a media file request to the remote network server to obtain a corresponding media file. In another embodiment, if the second request includes the local address information, the local server converts the local address information into the corresponding URL information according to the foregoing conversion rule and integrates into the media file request sent to the remote network server. . This In addition, in another embodiment, the local server may also select a more suitable optimized address corresponding to the media file according to a specific CDN scheduling policy, and request a corresponding media file by using the optimized address;
209:远程网络服务器依据本地服务器的请求,将对应的媒体文件(例如TS碎片)发送回本地服务器;209: The remote network server sends the corresponding media file (such as TS fragment) back to the local server according to the request of the local server;
210:本地服务器对接收到的媒体文件进行优化处理。举例来说,本地服务器可以删除媒体文件中的DISCONTINUITY标志及/或修改媒体文件的时间戳。之后,本地服务器将优化处理后的媒体文件传送给播放器,以用于播放。210: The local server optimizes the received media file. For example, the local server can delete the DISCONTINUITY flag in the media file and/or modify the timestamp of the media file. The local server then transfers the optimized media file to the player for playback.
在现有技术中,如果某一媒体文件(例如TS碎片)的请求出错,有些播放器的会一直持续请求,导致无法继续播放,画面会一直显示加载状态。针对上述状况,在本申请的另一实施例中,可以在本地服务器中预先配置最大请求次数,如果超过这个次数,则认为对此媒体文件的请求失败,可跳过此媒体文件并继续请求下一媒体文件。这样,播放器会跳过此媒体文件而继续播放下一个媒体文件,从而提升了用户体验。In the prior art, if a request for a certain media file (for example, TS fragment) is in error, some players will continue to request, and the playback cannot be continued, and the screen will always display the loading state. For the above situation, in another embodiment of the present application, the maximum number of requests may be pre-configured in the local server. If the number of times exceeds the number of times, the request for the media file is considered to be unsuccessful, and the media file may be skipped and the request may be continued. A media file. In this way, the player will skip this media file and continue playing the next media file, thus improving the user experience.
在上述201-210的动作中,某些步骤可以省略或者重新组合。例如,步骤201和210可以被省略,而播放器以原始地址通过本地服务器来向远程网络服务器请求流媒体。又例如,本地服务器对m3u8文件和媒体文件的优化处理可以同时或择一的方式进行,即,可以对m3u8文件和媒体文件两者抖进行优化处理,或只对m3u8文件和媒体文件两者之一进行优化处理。若能达到本申请技术方案的基本目的,本申请并不限定上述技术方案的动作数量、顺序以及组合。在遵循本申请的基本精神的前提下,对上述动作所做出的合理调整、删除以及增加都应包含在本申请的范围内。In the above actions 201-210, some steps may be omitted or recombined. For example, steps 201 and 210 can be omitted, and the player requests streaming from the remote web server through the local server at the original address. For another example, the optimization process of the m3u8 file and the media file by the local server may be performed simultaneously or alternatively, that is, the m3u8 file and the media file may be optimized for processing, or only for the m3u8 file and the media file. An optimization process is performed. If the basic purpose of the technical solution of the present application can be achieved, the present application does not limit the number, order, and combination of actions of the above technical solutions. Reasonable adjustments, deletions, and additions to the above-described actions are intended to be included within the scope of the present application.
图3是为依据本申请一实施例的流媒体的播放装置300的方块示意图。如上文所述,本申请实施例中的流媒体的播放装置可以是本地HTTP代理服务器。如图3所示,播放装置300包含以下模块:FIG. 3 is a block diagram of a streaming media playback device 300 according to an embodiment of the present application. As described above, the streaming media playback device in the embodiment of the present application may be a local HTTP proxy server. As shown in FIG. 3, the playback device 300 includes the following modules:
请求处理模块301:用于接收来自播放器的用于播放流媒体的第一请求和关于媒体文件的第二请求;a request processing module 301: configured to receive a first request for playing a streaming media from a player and a second request for a media file;
数据收发模块302:用于依据第一请求获取对应的m3u8文件,以及依 据第二请求获取媒体文件,其中对应的m3u8文件包含媒体文件的URL信息;以及The data transceiver module 302 is configured to obtain a corresponding m3u8 file according to the first request, and Obtaining a media file according to the second request, wherein the corresponding m3u8 file includes URL information of the media file;
优化处理模块303:用于对请求参数优化,尤其是对对应的m3u8文件及/或媒体文件进行优化处理,The optimization processing module 303 is configured to optimize the request parameters, and in particular, optimize the corresponding m3u8 file and/or the media file,
在依据本申请的一个实施例中,所述数据收发模块302更将对应的m3u8文件/优化处理后的对应的m3u8文件以及媒体文件/优化处理后的媒体文件传送至播放器。In an embodiment of the present application, the data transceiver module 302 further transmits the corresponding m3u8 file/optimized corresponding m3u8 file and the media file/optimized processed media file to the player.
与上文所述播放方法类似,在本申请的另一实施例中,请求处理模块301更获取所述流媒体的原始地址,通过优化处理模块303将所述原始地址转换成对应的本地地址,以及将对应的本地地址通过数据收发模块302传送至播放器,且第一请求是以对应的本地地址发出的。在本申请的又一实施例中,优化处理模块303更将m3u8文件中的URL信息转换成对应的本地地址信息,且第二请求是以对应的本地地址信息发出的。Similar to the playback method described above, in another embodiment of the present application, the request processing module 301 further acquires the original address of the streaming media, and converts the original address into a corresponding local address through the optimization processing module 303. And transmitting the corresponding local address to the player through the data transceiver module 302, and the first request is sent by the corresponding local address. In still another embodiment of the present application, the optimization processing module 303 further converts the URL information in the m3u8 file into corresponding local address information, and the second request is sent in the corresponding local address information.
由于方法部分已经对本申请实施例进行了详细描述,为简单起见,这里对实施例中涉及的装置与方法对应的部分的不再赘述。对于装置中组件的具体功能描述可参考方法实施例的内容,这里不再具体限定。Since the method part has been described in detail in the method section, for the sake of simplicity, the parts corresponding to the apparatus and method involved in the embodiment are not described herein again. For the specific function description of the components in the device, reference may be made to the content of the method embodiment, which is not specifically limited herein.
虽然本申请的实施例是以安卓系统下移动装置的流媒体播放进行说明,但本发明并不仅限于此。本领域的技术人员应该理解,现有技术中其他系统及/或其他装置的流媒体播放也可能具有与安卓系统下移动装置的流媒体播放类似的问题,从而上述流媒体的播放方法及播放装置也可以应用与非安卓系统下移动装置的流媒体播放,或者安卓与非安卓系统下非移动装置的流媒体播放。Although the embodiment of the present application is described as streaming media playback of a mobile device under the Android system, the present invention is not limited thereto. Those skilled in the art should understand that the streaming media playback of other systems and/or other devices in the prior art may also have similar problems to the streaming media playback of the mobile device under the Android system, so that the streaming media playing method and the playing device It is also possible to apply streaming media playback with mobile devices under non-Android systems, or streaming media playback for non-mobile devices under Android and non-Android systems.
与现有技术相比,本申请所述的流媒体的播放方法与播放装置,达到了如下效果:Compared with the prior art, the streaming media playing method and the playing device described in the present application achieve the following effects:
1)本申请的技术方案可以通过优化处理解决播放器不支持m3u8浮点时长的问题;1) The technical solution of the present application can solve the problem that the player does not support the floating time of the m3u8 floating point by optimizing the processing;
2)本申请的技术方案可以通过优化m3u8文件/媒体文件(例如TS碎片)解决播放器画面卡顿及时间进度错误的问题; 2) The technical solution of the present application can solve the problem that the player picture is stuck and the time progress is wrong by optimizing the m3u8 file/media file (for example, TS fragment);
3)本申请技术方案还可以通过CDN调度策略选择更加合适的地址以提升播放的流畅度。3) The technical solution of the present application can also select a more suitable address through the CDN scheduling policy to improve the smoothness of playing.
还需要说明的是,术语“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包含一系列要素的过程、方法、商品或者系统不仅包含那些要素,而且还包含没有明确列出的其他要素,或者是还包含为这种过程、方法、商品或者系统所固有的要素。在没有更多限制的情况下,由语句“包含一个……”限定的要素,并不排除在包含所述要素的过程、方法、商品或者系统中还存在另外的相同要素。It should also be noted that the term "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also Other elements, or elements that are inherent to such a process, method, commodity, or system. An element defined by the phrase "comprising a ..." does not exclude the presence of additional equivalent elements in a process, method, article, or system that comprises the element, without further limitation.
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包含但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system, or computer program product. Thus, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment in combination of software and hardware. Moreover, the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
以上所述仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。 The above description is only an embodiment of the present application and is not intended to limit the application. Various changes and modifications can be made to the present application by those skilled in the art. Any modifications, equivalents, improvements, etc. made within the spirit and scope of the present application are intended to be included within the scope of the appended claims.

Claims (11)

  1. 一种流媒体的播放方法,其特征在于,包含:A streaming media playing method, comprising:
    获取播放器用于播放流媒体的第一请求;Obtaining a first request that the player uses to play streaming media;
    依据所述第一请求从流媒体服务器获取与所述流媒体对应的m3u8文件,其中所述m3u8文件包含媒体文件的URL信息;Obtaining, according to the first request, an m3u8 file corresponding to the streaming media from a streaming media server, where the m3u8 file includes URL information of the media file;
    解析所述m3u8文件,并对所述m3u8文件进行优化处理;Parsing the m3u8 file and optimizing the m3u8 file;
    将优化处理后的所述m3u8文件传送至所述播放器;Transmitting the optimized m3u8 file to the player;
    获取所述播放器关于所述媒体文件的第二请求;Obtaining a second request by the player about the media file;
    依据所述第二请求从所述流媒体服务器获取对应的媒体文件;以及Acquiring a corresponding media file from the streaming server according to the second request;
    将所述对应的媒体文件传送至所述播放器。Transmitting the corresponding media file to the player.
  2. 如权利要求1所述的流媒体的播放方法,其特征在于,将所述对应的媒体文件传送至所述播放器的步骤包含:The method for playing a streaming media according to claim 1, wherein the step of transmitting the corresponding media file to the player comprises:
    对所述对应的媒体文件进行优化处理;以及Optimizing the corresponding media file; and
    将优化处理后的所述对应的媒体文件传送至所述播放器。Transmitting the corresponding processed media file to the player.
  3. 如权利要求2所述的流媒体的播放方法,其特征在于,对所述对应的媒体文件进行的所述优化处理包含:删除所述对应的媒体文件中的DISCONTINUITY标志及/或修改所述对应的媒体文件的时间戳。The method for playing a streaming media according to claim 2, wherein the optimizing processing performed on the corresponding media file comprises: deleting a DISCONTINUITY flag in the corresponding media file and/or modifying the corresponding The timestamp of the media file.
  4. 如权利要求3所述的流媒体的播放方法,其特征在于,所述第二请求是所述播放器根据优化处理后的所述m3u8文件中包含的所述URL信息产生的。The method for playing a streaming media according to claim 3, wherein the second request is generated by the player according to the URL information included in the m3u8 file after the optimization process.
  5. 如权利要求1所述的流媒体的播放方法,其特征在于,对所述m3u8文件进行的所述优化处理包含:删除所述m3u8文件中的DISCONTINUITY标志及/或调整所述m3u8文件中的时长。The method for playing a streaming media according to claim 1, wherein the optimizing processing on the m3u8 file comprises: deleting a DISCONTINUITY flag in the m3u8 file and/or adjusting a duration in the m3u8 file .
  6. 如权利要求1-5中任一项所述的流媒体播放方法,其特征在于,更包 含:The streaming media playing method according to any one of claims 1 to 5, characterized in that Contains:
    获取所述流媒体的原始地址,并将所述原始地址转换成对应的本地地址;以及Obtaining an original address of the streaming media, and converting the original address into a corresponding local address;
    将所述对应的本地地址传送至所述播放器,Transmitting the corresponding local address to the player,
    其中,所述第一请求是以所述对应的本地地址发出的。The first request is sent by the corresponding local address.
  7. 如权利要求1-5中任一项所述的流媒体播放方法,其特征在于,更包含:The streaming media playing method according to any one of claims 1 to 5, further comprising:
    将所述m3u8文件中的URL信息转换成对应的本地地址信息,Converting the URL information in the m3u8 file into corresponding local address information,
    其中,所述第二请求是以所述对应的本地地址信息发出的。The second request is sent by the corresponding local address information.
  8. 如权利要求1-5中任一项所述的流媒体播放方法,其特征在于,依据所述第二请求从所述流媒体服务器获取对应的媒体文件的步骤包含:The streaming media playing method according to any one of claims 1 to 5, wherein the step of acquiring a corresponding media file from the streaming server according to the second request comprises:
    利用CDN调度策略选择与所述第二请求对应的、更加合适的优化地址;以及Using a CDN scheduling policy to select a more appropriate optimized address corresponding to the second request;
    依据所述优化地址从所述流媒体服务器获取所述对应的媒体文件。Obtaining the corresponding media file from the streaming media server according to the optimized address.
  9. 一种流媒体的播放装置,其特征在于,包含:A streaming media playing device, comprising:
    请求处理模块,用于接收来自播放器的用于播放流媒体的第一请求和关于媒体文件的第二请求;a request processing module, configured to receive a first request for playing a streaming media from a player and a second request for a media file;
    数据收发模块,用于依据所述第一请求获取对应的m3u8文件,以及依据所述第二请求获取所述媒体文件,其中所述对应的m3u8文件包含所述媒体文件的URL信息;以及a data transceiver module, configured to acquire a corresponding m3u8 file according to the first request, and obtain the media file according to the second request, where the corresponding m3u8 file includes URL information of the media file;
    优化处理模块,用于对请求参数优化,对所述对应的m3u8文件及/或所述媒体文件进行优化处理;An optimization processing module, configured to optimize a request parameter, and perform optimization processing on the corresponding m3u8 file and/or the media file;
    其中,所述数据收发模块更将所述对应的m3u8文件/优化处理后的所述对应的m3u8文件以及所述媒体文件/优化处理后的所述媒体文件传送至所述播放器。The data transceiver module further transmits the corresponding m3u8 file/optimized processed m3u8 file and the media file/optimized processed media file to the player.
  10. 如权利要求9所述的流媒体的播放装置,其特征在于,所述请求处 理模块更获取所述流媒体的原始地址,通过所述优化处理模块将所述原始地址转换成对应的本地地址,以及将所述对应的本地地址通过所述数据收发模块传送至所述播放器,且所述第一请求是以所述对应的本地地址发出的。A streaming media playback device according to claim 9, wherein said requesting location The processing module further acquires the original address of the streaming media, converts the original address into a corresponding local address by using the optimization processing module, and transmits the corresponding local address to the player through the data transceiver module And the first request is sent by the corresponding local address.
  11. 如权利要求9所述的流媒体的播放装置,其特征在于,所述优化处理模块更将所述m3u8文件中的URL信息转换成对应的本地地址信息,且所述第二请求是以所述对应的本地地址信息发出的。 The streaming media playback device of claim 9, wherein the optimization processing module further converts URL information in the m3u8 file into corresponding local address information, and the second request is Corresponding local address information is sent.
PCT/CN2014/092291 2014-07-31 2014-11-26 Streaming media playing method and playing device WO2016015419A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410372544.0A CN104125229B (en) 2014-07-31 2014-07-31 The player method of Streaming Media and playing device
CN201410372544.0 2014-07-31

Publications (1)

Publication Number Publication Date
WO2016015419A1 true WO2016015419A1 (en) 2016-02-04

Family

ID=51770493

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/092291 WO2016015419A1 (en) 2014-07-31 2014-11-26 Streaming media playing method and playing device

Country Status (2)

Country Link
CN (1) CN104125229B (en)
WO (1) WO2016015419A1 (en)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125229B (en) * 2014-07-31 2016-09-21 合一网络技术(北京)有限公司 The player method of Streaming Media and playing device
CN104410902B (en) * 2014-12-04 2017-12-15 华为技术有限公司 The player method and terminal of a kind of programme televised live, the generation method and equipment of index file
CN105635753B (en) * 2015-06-08 2019-03-29 广州市动景计算机科技有限公司 The method for down loading and device of media data
CN106303577B (en) * 2015-06-08 2019-10-08 广州市动景计算机科技有限公司 Download the method and device of Streaming Media
CN105897850A (en) * 2015-12-22 2016-08-24 乐视云计算有限公司 Response processing method and system and scheduling proxy server for CDN platform
KR101743228B1 (en) * 2016-01-22 2017-06-05 네이버 주식회사 Streaming apparatus and method thereof, streaming service system using the streaming apparatus and computer readable recording medium
CN105872856A (en) * 2016-03-21 2016-08-17 乐视云计算有限公司 Method and system for distributing stream media files
CN106303754A (en) * 2016-08-04 2017-01-04 天脉聚源(北京)传媒科技有限公司 A kind of audio data play method and device
CN106375834B (en) * 2016-08-31 2019-08-02 广州易方信息科技股份有限公司 A kind of offline playback method of online encrypted slice video and device based on iOS operating system
CN109963171B (en) * 2017-12-14 2021-01-05 腾讯科技(深圳)有限公司 Multimedia information transmission method, transmission device and storage medium
CN109788357B (en) 2018-11-07 2022-04-15 合肥杰发科技有限公司 Method and device for playing media file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110246616A1 (en) * 2010-04-02 2011-10-06 Ronca David R Dynamic Virtual Chunking of Streaming Media Content
CN102685088A (en) * 2011-09-06 2012-09-19 天脉聚源(北京)传媒科技有限公司 Method for playing M3U8 stream media
CN102843614A (en) * 2012-07-27 2012-12-26 优视科技有限公司 Streaming media display method and equipment and system
CN104125229A (en) * 2014-07-31 2014-10-29 合一网络技术(北京)有限公司 Streaming media playing method and streaming media playing device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102118428B (en) * 2010-12-29 2012-12-26 天脉聚源(北京)传媒科技有限公司 Method and system for playing streaming media
CN103024604B (en) * 2012-12-28 2015-06-17 合一网络技术(北京)有限公司 Device and method used for realizing seamless connection of ts files
CN103686455A (en) * 2013-11-22 2014-03-26 乐视致新电子科技(天津)有限公司 Video playing method and device based on HLS protocol
CN103686245B (en) * 2013-11-22 2017-03-15 乐视致新电子科技(天津)有限公司 A kind of program request based on HLS protocol and live switching method and apparatus

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110246616A1 (en) * 2010-04-02 2011-10-06 Ronca David R Dynamic Virtual Chunking of Streaming Media Content
CN102685088A (en) * 2011-09-06 2012-09-19 天脉聚源(北京)传媒科技有限公司 Method for playing M3U8 stream media
CN102843614A (en) * 2012-07-27 2012-12-26 优视科技有限公司 Streaming media display method and equipment and system
CN104125229A (en) * 2014-07-31 2014-10-29 合一网络技术(北京)有限公司 Streaming media playing method and streaming media playing device

Also Published As

Publication number Publication date
CN104125229A (en) 2014-10-29
CN104125229B (en) 2016-09-21

Similar Documents

Publication Publication Date Title
WO2016015419A1 (en) Streaming media playing method and playing device
US11570234B2 (en) Connected-media end user experience using an overlay network
US8843596B2 (en) Conversion between streaming media communication protocols
US8516144B2 (en) Startup bitrate in adaptive bitrate streaming
JP6014870B2 (en) Method and system for real-time transmax conversion of streaming media content
US10397289B2 (en) HTTP live streaming (HLS) video client synchronization
US20150089076A1 (en) Method of streaming media to heterogeneous client devices
WO2016058411A1 (en) Splicing method and splicing system for http live streaming media fragmentation
US9356985B2 (en) Streaming video to cellular phones
JP2016538754A (en) Method and apparatus for content distribution
WO2011110065A1 (en) Method and apparatus for cross-platform replay from pause point, method and apparatus for replay from pause point
US10972581B2 (en) Media processing method and device
US20210021655A1 (en) System and method for streaming music on mobile devices
WO2021143360A1 (en) Resource transmission method and computer device
WO2017185601A1 (en) Method and device for providing and downloading video
CN105228001A (en) The method and system that a kind of FLV format video is play online
JPWO2016174960A1 (en) Reception device, transmission device, and data processing method
CN105049931A (en) Method and system for converting video with non-supporting format in mobile terminal
WO2017166477A1 (en) Method and device for obtaining video information
JP6597604B2 (en) Reception device, transmission device, data communication method, and data processing method
KR102209782B1 (en) Method for providing of streamming service and apparatus for the same

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 27/06/2017

122 Ep: pct application non-entry in european phase

Ref document number: 14898797

Country of ref document: EP

Kind code of ref document: A1