WO2017080427A1 - 一种媒体播放方法、终端、系统及计算机存储介质 - Google Patents

一种媒体播放方法、终端、系统及计算机存储介质 Download PDF

Info

Publication number
WO2017080427A1
WO2017080427A1 PCT/CN2016/104950 CN2016104950W WO2017080427A1 WO 2017080427 A1 WO2017080427 A1 WO 2017080427A1 CN 2016104950 W CN2016104950 W CN 2016104950W WO 2017080427 A1 WO2017080427 A1 WO 2017080427A1
Authority
WO
WIPO (PCT)
Prior art keywords
media
file
protocol
module
playing
Prior art date
Application number
PCT/CN2016/104950
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 WO2017080427A1 publication Critical patent/WO2017080427A1/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/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • 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
    • H04N21/6437Real-time Transport Protocol [RTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • H04N21/4331Caching operations, e.g. of an advertisement for later insertion during playback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/437Interfacing the upstream path of the transmission network, e.g. for transmitting client requests to a VOD server
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • H04N21/440236Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display by media transcoding, e.g. video is transformed into a slideshow of still pictures, audio is converted into text
    • 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/64Addressing
    • H04N21/6405Multicasting
    • 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

Definitions

  • the present invention relates to the field of communications, and in particular, to a media playing method, a terminal, a system, and a computer storage medium.
  • IPTV Internet Protocol Television
  • IGMP Internet Group Management Protocol
  • Real Time Streaming Protocol Real Time Streaming Protocol
  • RTP Real-time Transport Protocol
  • video systems such as video surveillance and conference TV are also used for real-time transmission of code streams using RTSP or RTP protocols.
  • Media data of RTSP, RTP or IGMP protocols are transmitted in real time in the form of media streams.
  • OTT Over The Top
  • OTT set-top boxes and other video terminals. How to watch.
  • the OTT terminal device supports media playback of Hypertext Transfer Protocol (HLS) or HyperText Transfer Protocol (HTTP), and cannot directly access existing video network systems to enjoy RTP and RTSP. Or IGMP protocol media viewing service.
  • HLS Hypertext Transfer Protocol
  • HTTP HyperText Transfer Protocol
  • IGMP IGMP protocol media viewing service.
  • CDN additional content delivery network
  • the operating cost also needs to provide RTSP/RTP and OTT media data files to be released to the corresponding CDN system, and the release time is also extended.
  • the processing of the CDN system will change. It is very complicated, which is not conducive to the conversion of the format, and the playback after the format conversion.
  • an additional CDN system needs to be set up, and the protocol format of the media file to be played is converted to play by the CDN system.
  • the protocol format supported by the terminal, and then the terminal obtains the converted media file for playback; however, the terminal itself cannot directly obtain the media file that does not match the protocol format supported by itself, and directly implements playback after being processed by the playback terminal.
  • an additional CDN system is installed in the prior art processing method, which increases the operation cost on the one hand, and also releases the media data files of the media to be played to the corresponding CDN system separately when the release is performed, thereby prolonging the release time.
  • the embodiment of the present invention is to provide a media playing method, a terminal, a system, and a computer storage medium, which can solve the problem in the prior art when the playing terminal plays media in the form of a media stream that does not match the format supported by the playing terminal. It is necessary to additionally set up the corresponding CDN system, and it is not possible to directly play the problem after the playback terminal processes.
  • an embodiment of the present invention provides a media playing method, including: after receiving a play request of a media in the form of a media stream, acquiring media stream data of the media; and converting the media stream data into media data of a preset format.
  • File media data file not less than one, at the same time
  • Generating an index file that matches the media data file the index file is used to index the media data file when playing the media data file; and playing the media data file according to the index of the index file.
  • the obtaining the media stream data of the media includes: obtaining the flag information of the media according to the play request; determining the protocol format of the media according to the flag information, and acquiring the media stream data according to the determination result.
  • the obtaining the media stream data according to the judgment result includes: if the protocol format of the media is determined to be a transmission protocol or a streaming protocol, directly requesting to obtain the media stream data; If the protocol format is the network group management protocol, the system first requests to join the multicast group. After joining the multicast group successfully, it requests to obtain the media stream data.
  • the flag information includes a uniform resource locator.
  • the preset format of the media data file includes any one of the following formats: a hypertext transfer protocol format and a hypertext real-time streaming protocol format; the index file is an m3u8 index file.
  • the embodiment of the present invention further provides a media playing terminal, including: a processing module, the processing module is configured to receive a play request of a media in the form of a media stream; and an acquiring module configured to receive according to the processing module The playback request, the media stream data of the media is obtained; the protocol conversion module is configured to convert the media stream data acquired by the acquiring module into a media data file in a preset format, the media The data file is not less than one, and an index file matching the media data file is generated, and the index file is configured to index the media data file when the media data file is played; the playing module, the playing module Configuring to play the media data file according to an index of the index file.
  • the obtaining module includes a processing submodule, a determining submodule, and an obtaining submodule, and the processing submodule is configured to obtain the flag information of the media according to the playing request; and the determining submodule is configured to determine the media according to the flag information.
  • the media protocol format; the obtaining submodule is configured to obtain media stream data according to the judgment result.
  • the determining submodule determines that the protocol format of the media is to implement a transport protocol or implement a streaming protocol
  • the acquiring submodule directly requests to obtain media stream data; if the determining submodule determines the media protocol The format is the network group management protocol, and the obtaining sub-module first requests to join the multicast group, and after joining the multicast group successfully, requesting to acquire the media stream data.
  • the preset format of the media data file supported by the playback terminal includes any one of the following formats: a hypertext transfer protocol format and a hypertext real-time streaming protocol format; the index file is an m3u8 index file. .
  • the embodiment of the present invention further provides a media playing system, including: the media playing terminal, the content distribution network, and the media in the form of a media stream, where the content distribution network is configured to receive the media after receiving the play request sent by the media playing terminal.
  • Stream data is sent to the media playback terminal.
  • the embodiment of the invention provides a computer storage medium, wherein the computer storage medium stores a computer program, and the computer program is used to execute the media playing method described above.
  • the media playing method, the terminal, the system, and the computer storage medium provided by the embodiment of the present invention convert the corresponding media stream data of the media in the form of the media stream to the playback terminal and convert it to the playback terminal.
  • the media data file and the index file in the protocol format, and the media data file is played through the index file to realize the playback of the media stream data; in this way, the playback can be realized without changing the existing CDN server or additionally setting up the CDN system.
  • the terminal plays media in a protocol format different from the protocol supported by the playback terminal itself, which reduces the operation cost, and does not need to additionally release the media content of the protocol format supported by the playback terminal to the CDN, thereby shortening the publishing time of the media content and improving the time. User experience.
  • FIG. 1 is a flowchart of a method for playing media in a media stream format according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic diagram of a media playing terminal in the form of a media stream according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic diagram of an acquiring module of a media playing terminal in the form of a media stream according to Embodiment 2 of the present invention
  • FIG. 4 is a schematic diagram of a media playing system in the form of a media stream according to Embodiment 2 of the present invention.
  • FIG. 5 is a flowchart of a method for playing an IPTV terminal supporting an HLS protocol to play media in a media stream in a protocol format supported by an IPTV according to Embodiment 3 of the present invention
  • FIG. 6 is a flowchart of a method for playing media in the form of a media stream in a protocol format supported by a video surveillance video or a conference television video supported by an HTS protocol-enabled OTT terminal according to Embodiment 4 of the present invention.
  • the media file matching the protocol format supported by the playing terminal when the media data is played by the playing terminal, the media file matching the protocol format supported by the playing terminal, after determining the file format, directly obtains the corresponding media file for playing, for example, the playback terminal supports the HLS or HTTP protocol.
  • the media is also in the HLS or HTTP protocol format. After determining that the protocol format of the playback terminal and the media to be played is matched, the media is directly played.
  • the present invention mainly describes a case where a playback terminal plays a to-be-played media in a protocol format that does not match a protocol format supported by itself.
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • a method for playing media in the form of a media stream including:
  • Step S101 After receiving a play request of the media in the form of a media stream, acquiring media stream data of the media;
  • the media stream data of the media may be further obtained by using the information in the play request; and the media stream data of the media is obtained by receiving the forwarded play request, according to the play request.
  • obtaining the media stream data according to the judgment result specifically includes: if the protocol format of the media is determined to implement the transmission protocol or implementing the streaming protocol, directly requesting to acquire the media stream data; if the protocol format of the media is determined to be a network
  • the group management protocol first requests to join the multicast group. After joining the multicast group successfully, it requests to obtain the media stream data.
  • the foregoing play request includes the identifier information of the media, where the identifier information is used to determine a protocol format of the media.
  • the flag information may be a Uniform Resource Locator (URL). It should be understood that the flag information may also be any other information that can indicate the format of the media file protocol.
  • Step S102 Convert the media stream data into a media data file in a preset format, the media data file is not less than one, and at the same time generate an index file that matches the media data file, and the index file is used for playing. Indexing the media data file when the media data file is;
  • the media stream data is segmented and cached.
  • the media stream is small during the conversion and buffering, It is only cached as a media data file, and then the media data file is played according to the generated index file; usually, the media data stream is not small, so it is segmented and cached at regular intervals.
  • the size of the preset data packet it is segmented and cached, and then the segmented conversion and the cached media data file are played in a certain time sequence through the generated index file, and the index file is also used for Perform other basic processing on media data files.
  • the preset format of the media data file includes the following format Any one of the following: a hypertext transfer protocol format and a hypertext real-time streaming protocol format; when the format is any of the above formats, the corresponding index file is an m3u8 index file.
  • the media stream data corresponding to the media in the form of the media stream can be directly received by the playback terminal, and then converted into a file in a protocol format supported by the terminal to implement playback.
  • Step S103 Play the media data file according to an index of the index file.
  • the media data file when the media data file is played, the media data file is organized according to a certain rule according to the index file, and is played according to a certain timing. It should be understood that the processing of the media data by the index file includes not only the processing thereof. Arranged according to a certain timing, including some other processing.
  • the preset format of the media data file is a hypertext transfer protocol or a hypertext real-time streaming protocol
  • the media file is played according to the m3u8 index file.
  • the media playing method provided by the embodiment after obtaining the corresponding media stream data of the media in the form of the media stream, is converted into a media data file and an index file of a protocol format supported by the playing terminal, and is indexed by the media playing terminal.
  • the file plays the media data file to realize the playback of the media stream data; in this way, the existing CDN server or the additional CDN system does not need to be changed, the operation cost is reduced, and the media of the protocol format supported by the playback terminal is not required to be additionally released.
  • Content to CDN shortens the release time of media content.
  • Embodiment 2 is a diagrammatic representation of Embodiment 1:
  • the media playing terminal 20 in the form of a media stream includes: a processing module 201, an obtaining module 202, a protocol converting module 203, and a playing module 204.
  • the processing module 201 is configured to receive a play request of the media in the form of a media stream.
  • the processing module 201 receives the play request for playing the media, and after receiving the play request, Then, the processing module 201 forwards the play request to the obtaining module 202, and further obtains media stream data of the media, where the play request includes some flag information of the media.
  • the obtaining module 202 is configured to acquire the media according to the play request forwarded by the processing module 201.
  • the media stream data optionally, the obtaining module 202 obtains the media stream data of the media according to the play request after receiving the play request of the media in the form of the media stream forwarded by the processing module 201.
  • the obtaining module 202 further includes a processing submodule 2021, a determining submodule 2022, and an obtaining submodule 2023.
  • the processing submodule 2021 is configured to obtain the flag information of the media according to the playing request, and the determining submodule 2022 is configured to determine according to the flag information.
  • the media protocol format of the media, the obtaining submodule 2023 is configured to obtain media stream data according to the judgment result.
  • the obtaining module 202 obtains the media stream data of the media according to the play request forwarded by the processing module 201. Specifically, the processing sub-module 2021 obtains the flag information of the media according to the play request, and then notifies the determining sub-module 2022 according to the flag information. After determining the media protocol format of the media, and obtaining the judgment result, the notification acquisition sub-module 2023 obtains the media stream data according to the determination result.
  • the obtaining sub-module 2023 obtains the media stream data according to the determination result, specifically: if it is determined that the protocol format of the media is the implementation of the transmission protocol or the implementation of the streaming protocol, the media stream data is directly requested to be obtained; If the protocol format is the network group management protocol, the system first requests to join the multicast group. After joining the multicast group successfully, it requests to obtain the media stream data.
  • the foregoing play request includes the identifier information of the media, where the identifier information is used to determine a protocol format of the media.
  • the protocol format of the media is any one of implementing a transport protocol, implementing a streaming protocol, and a network group management protocol
  • the flag information may specifically be a URL, and it should be understood that the flag information may also be any other information that can indicate the format of the media file protocol.
  • the protocol conversion module 203 is configured to convert the media stream data into a media data file in a preset format, the media data file is not less than one, and at the same time, generate an index file that matches the media data file, and the index file is used to play the media file.
  • the index of the data file is used to play the media file.
  • the protocol conversion module 203 converts the media data stream into the media data in the preset format, the media stream data is segmented and cached. If the media data stream is small during conversion and buffering, Then it can be cached as only one media data file, and then the media data file is played according to the generated index file; usually, the media data stream is not small, so it is divided at regular intervals.
  • the segment is converted and cached, or it is segmented and cached according to the size of the preset data packet, and then the segmented conversion and the cached media data file are played in a certain time sequence through the generated index file.
  • the preset format of the media data file includes any one of the following formats: a hypertext transfer protocol format and a hypertext real-time streaming protocol format; when the format is any of the above formats, the corresponding index file is M3u8 index file.
  • the protocol conversion module 203 is a software development kit or a software program. In this way, the corresponding media stream data of the media in the form of the media stream can be directly received by the playback terminal, and then converted into a file in a protocol format supported by the terminal to implement playback.
  • the playing module 204 is configured to play the media data file according to the index of the index file.
  • the media data file is organized according to a certain rule according to the index file, and is played according to a certain timing.
  • the processing of the media data by the index file includes not only It is arranged according to a certain timing, and also includes some other processing.
  • the preset format of the media data file is a hypertext transfer protocol or a hypertext real-time streaming protocol
  • the media file is played according to the m3u8 index file.
  • the processing module 201, the obtaining module 202, the protocol conversion module 203, the playing module 204, and the submodules included in the obtaining module 202 may all be used by a central processing unit (Central Processing Unit) in the media playing terminal.
  • CPU Central Processing Unit
  • MPU Micro Processor Unit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • the media playing terminal after loading a protocol conversion module in the playing terminal, obtains the corresponding media stream data of the media in the form of the media stream after the media playing terminal, and converts the data to the playing terminal by the protocol conversion module.
  • Media data file in protocol format And index file and play the media data file through the index file to realize the playback of the media stream data; in this way, by directly changing the terminal, there is no need to change the existing CDN server or additionally set up the CDN system, thereby reducing the operation cost.
  • the embodiment also provides a media playing system.
  • the device includes: the media playing terminal 20, the content distribution network 21, and the media 23 in the form of a media stream.
  • the CDN 21 is configured to receive a play request sent by the media playing terminal 20.
  • the media stream data of the media 23 in the form of an eligible media stream is transmitted to the media playing terminal 20.
  • the media playing terminal 20 plays the media in the form of a certain media stream, it will receive a play request for playing the media, and then forward the play request, and further request the CDN 21 to obtain the media stream data of the media.
  • the CDN 21 Upon receiving the request from the media playing terminal 20, the CDN 21 obtains the required media stream data from the media 23 in the form of a media stream, and then transmits the media stream data to the media playing terminal 20. In this way, there is no need to change the existing CDN server or additional CDN system, which reduces the operating cost, and does not need to additionally release the media content of the protocol format supported by the playback terminal to the CDN, thereby shortening the publishing time of the media content.
  • Embodiment 3 is a diagrammatic representation of Embodiment 3
  • the present embodiment describes a method for playing media in the form of a media stream in combination with a specific case.
  • the media in the form of a media stream to be played is a media in a protocol format supported by the IPTV, and the protocol format supported by the IPTV includes RTP, PTSP, or IGMP, and the specific process of playing the IPTV media by the OTT terminal is required.
  • the protocol format supported by the IPTV includes RTP, PTSP, or IGMP, and the specific process of playing the IPTV media by the OTT terminal is required. See Figure 5, including:
  • Step S501 The processing module of the playback terminal receives a play request for playing an interactive network television video
  • a play request for playing the media is received, and in this embodiment, a play request of the IPTV video is received, and the broadcast request is received. After the play request, the play request is forwarded to further obtain the media stream data of the media.
  • Step S502 the processing module forwards the play request to the acquiring module, and notifies the acquiring module to play the interactive network television video;
  • the receiving submodule in the obtaining module receives the forwarded playing request, and obtains the marking information of the media, and then notifies the determining submodule to determine the protocol format of the media according to the flag information, where the flag information is a URL.
  • Step S503 the obtaining module determines, according to the play request, a protocol format of the media
  • the process first jumps to step S510 to request to join the multicast group. After the multicast group is successfully joined, the process proceeds to step S504 to request to obtain media stream data.
  • Step S504 request to acquire media stream data
  • the OTT terminal sends a request to the IPTV CDN server to request to acquire media stream data.
  • Step S505 The content distribution network sends the media stream data of the real-time transport protocol data packet to the play terminal;
  • the IPTV CDN server After receiving the request of the OTT terminal, the IPTV CDN server obtains the media stream data corresponding to the media in the form of the media stream according to the requirement.
  • Step S506 The acquiring module receives the media stream data returned by the content distribution network, and notifies the protocol conversion module to perform conversion;
  • Step S507 The protocol conversion module converts the media stream data encapsulated by the real-time transport protocol packet into the media data of the hypertext real-time streaming protocol or the hypertext transfer protocol, and simultaneously generates the index file when converting the media stream data;
  • Step S508 The protocol conversion module returns the media data and the index file of the converted hypertext real-time streaming protocol or the hypertext transfer protocol to the playing module.
  • Step S509 the playing module plays the media data file converted into the hypertext real-time streaming protocol or the hypertext transfer protocol according to the index of the index file;
  • index files at this time are all m3u8 index files, and the playback here is a hypertext real-time streaming protocol or a hypertext transfer protocol format.
  • Step S510 Request to join the multicast group, and join the multicast group successfully.
  • the method of joining a multicast group is to join a multicast group according to the multicast IP address and port.
  • a protocol conversion module is deployed in the OTT terminal, so that the OTT terminal can play the function of playing the IPTV media content, and the existing OTT terminal needs to set up the OTT CDN system when accessing the IPTV network.
  • the problem saves operating costs; and it does not need to release the media content of the protocol format supported by the OTT terminal to the CDN, which shortens the publishing time of the media content.
  • Embodiment 4 is a diagrammatic representation of Embodiment 4:
  • the present embodiment describes a method for playing media in the form of a media stream in combination with a specific case.
  • the media in the form of a media stream to be played is a media in a protocol format supported by the video surveillance video or the conference television video
  • the protocol format supported by the video surveillance video or the conference television video is specifically RTP or PTSP.
  • the OTT terminal is shown in Figure 6, including:
  • Step S601 The processing module of the playback terminal receives a play request for playing a video surveillance video or a conference television video;
  • receiving a play request for playing the media in this embodiment, a video surveillance video or a conference television view is received.
  • the frequency play request after receiving the play request, then forwards the play request, and further obtains the media stream data of the media.
  • Step S602 The processing module forwards the play request to the acquiring module, and notifies the acquiring module to play the video surveillance video or the conference television video.
  • the receiving submodule in the obtaining module receives the forwarded playing request, and obtains the marking information of the media, and then notifies the determining submodule to determine the protocol format of the media according to the flag information, where the flag information is a URL.
  • Step S603 The obtaining module determines, according to the play request, that the protocol format of the video surveillance video or the conference television video is a real-time streaming protocol or implements a transmission protocol;
  • the process directly jumps to step S604 to obtain corresponding media stream data.
  • Step S604 The obtaining module directly requests the content distribution network of the video surveillance video or the conference television video to obtain the media stream data.
  • the OTT terminal sends a request to the CDN server of the video surveillance video or the conference television video to request to acquire the media stream data.
  • Step S605 After receiving the request, the content distribution network of the video surveillance video or the conference television video returns the media stream data encapsulated into the real-time streaming protocol packet to the playback terminal;
  • the CDN server of the video surveillance video or the conference television video acquires the media stream data corresponding to the media in the form of the media stream according to the requirement.
  • Step S606 The acquiring module receives the media stream data returned by the content distribution network of the monitoring video or the conference television, and notifies the protocol conversion module to perform conversion;
  • Step S607 The protocol conversion module converts the media data encapsulated by the real-time streaming protocol packet into the media data of the hypertext real-time streaming protocol or the hypertext transfer protocol, and simultaneously generates the index file when converting the media data;
  • Step S608 The protocol conversion module converts the converted hypertext real-time streaming protocol or hypertext transmission The media data and index file of the protocol are returned to the play module;
  • Step S609 The playing module plays the media data file converted into the hypertext real-time streaming protocol or the hypertext transfer protocol according to the index of the index file.
  • index files in this embodiment are all m3u8 index files, and the play here is playback in HLS or HTTP protocol format.
  • a protocol conversion module is deployed in the OTT terminal, so that the OTT terminal can play the function of playing the IPTV media content, and the existing OTT terminal needs to be extra when accessing the video surveillance or the conference television network.
  • the problem of setting up the OTT CDN system saves operating costs; and it does not need to additionally release the media content of the protocol format supported by the OTT terminal to the CDN, which shortens the publishing time of the media content.
  • the embodiment of the invention further describes a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are used to execute the media playing method described in the foregoing embodiments.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention 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 and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the media stream data of the media is obtained; and the media stream data is converted into a media data file of a preset format, and the media data file is not less than one, and is generated at the same time.
  • the index file matching the media data file the index file is used to index the media data file when playing the media data file; and playing the media data file according to the index of the index file.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明公开了一种媒体播放方法、终端、系统及计算机存储介质;其中,所述媒体播放方法包括:接收到媒体流形式的媒体的播放请求后,获取媒体的媒体流数据;将媒体流数据转换为预设格式的媒体数据文件,媒体数据文件不少于一个,同时生成与媒体数据文件相匹配的索引文件,所述索引文件用于播放媒体数据文件时对媒体数据文件进行索引;根据索引文件的索引播放媒体数据文件。

Description

一种媒体播放方法、终端、系统及计算机存储介质 技术领域
本发明涉及通信领域,具体涉及一种媒体播放方法、终端、系统、及计算机存储介质。
背景技术
随着移动互联网的迅猛发展,可播放流媒体文件的设备越来越多,但是由于不同的设备支持的协议不同,导致某一设备只能播放自身支持的协议的流媒体文件,而不能直接去播放其他协议形式的流媒体。比如交互式网络电视(Internet Protocol Television,简称为IPTV)发展到现在已经比较成熟了,其主要支持:网络组管理协议(Internet Group Management Protocol,简称为IGMP)、实时流传输协议(Real Time Streaming Protocol,简称为RTSP)和实时传输协议(Real-time Transport Protocol,简称为RTP)等协议;另外现在通用的视频监控、会议电视等视频系统也是采用RTSP或RTP协议进行码流的实时传输,这些基于RTSP、RTP或IGMP协议的媒体数据都是以媒体流的形式进行实时传输的。另外OTT(Over The Top)技术的推广以及各种OTT终端设备的出现,通过手机、平板电脑(portable android device,简称为PAD)、OTT机顶盒等视频终端在线看视频,成为越来越普遍的视频观看方式。OTT终端设备支持超文本实时流协议(HTTP Live Streaming,简称为HLS)或超文本传输协议(HyperText Transfer Protocol,简称为HTTP)的媒体播放,无法直接接入现有的视频网络系统享受RTP、RTSP或IGMP协议的媒体观看服务。如果改造现有的IPTV、视频监控等网络,就需要额外添加与OTT终端匹配的内容分发网络(Content Delivery Network,简称为CDN),架设OTT CDN系统,这种处理方式一方面提高 了运营成本,另一方面发布时也需要提供RTSP/RTP和OTT的媒体数据文件分别发布到对应的CDN系统中,发布时间也延长了。另外的,随着科技的发展,当CDN系统一侧有多个OTT终端,或需要CND获取的IPTV、视频监控等视频网络系统对应的媒体文件的数据量增大时,CDN系统的处理会变得很复杂,不利于格式的转换,及实现格式转换后的播放。
即现有技术中,当某一播放终端需要播放与播放终端支持的协议格式不匹配的媒体文件时,需要额外架设相应的CDN系统,通过CDN系统将待播放的媒体文件的协议格式转换为播放终端支持的协议格式,然后终端才去获取转换后的媒体文件实现播放;但是终端自身却不能直接获取与其自身支持的协议格式不匹配的媒体文件,直接在播放终端处理后实现播放。另外现有技术的处理方式中架设额外的CDN系统,一方面提高了运营成本,另一方面发布时也需要将待播放媒体的媒体数据文件分别发布到对应的CDN系统中,延长了发布时间,使得用户的体验不佳。且随着科技的发展,当CDN系统一侧有多个播放终端,或需要CND获取的待播放媒体的媒体文件的数据量增大时,CDN系统的处理会变得很复杂,不利于待播放媒体的协议格式的转换,及实现格式转换后的播放。
发明内容
有鉴于此,本发明实施例期望提供一种媒体播放方法、终端、系统及计算机存储介质,能解决现有技术中当播放终端播放与播放终端支持的格式不匹配的媒体流形式的媒体时,需要额外架设相应的CDN系统,而不能直接在播放终端处理后实现播放的问题。
为达到上述目的,本发明的技术方案是这样实现的:
为解决上述技术问题,本发明实施例提供一种媒体播放方法,包括:接收到媒体流形式的媒体的播放请求后,获取媒体的媒体流数据;将媒体流数据转换为预设格式的媒体数据文件,媒体数据文件不少于一个,同时 生成与媒体数据文件相匹配的索引文件,所述索引文件用于播放媒体数据文件时对媒体数据文件进行索引;根据索引文件的索引播放媒体数据文件。
在本发明的一种实施例中,获取媒体的媒体流数据,包括:根据播放请求得到媒体的标志信息;根据标志信息判断媒体的协议格式,并根据判断结果去获取媒体流数据。
在本发明的一种实施例中,根据判断结果去获取媒体流数据,包括:若经判断媒体的协议格式为实施传输协议或实施流传输协议,则直接请求获取媒体流数据;若经判断媒体的协议格式为网络组管理协议,则先请求加入组播组中,加入组播组成功后,再请求获取媒体流数据。
在本发明的一种实施例中,标志信息包括统一资源定位符。
在本发明的一种实施例中,媒体数据文件的预设格式包括以下格式中的任一种:超文本传输协议格式和超文本实时流协议格式;索引文件为m3u8索引文件。
本发明实施例还提供一种媒体播放终端,包括:处理模块,所述处理模块配置为接收媒体流形式的媒体的播放请求;获取模块,所述获取模块配置为根据所述处理模块接收到的所述播放请求,获取所述媒体的媒体流数据;协议转换模块,所述协议转换模块配置为将所述获取模块获取的所述媒体流数据转换为预设格式的媒体数据文件,所述媒体数据文件不少于一个,同时生成与所述媒体数据文件相匹配的索引文件,所述索引文件配置为播放所述媒体数据文件时对所述媒体数据文件进行索引;播放模块,所述播放模块配置为根据所述索引文件的索引播放所述媒体数据文件。
在本发明的一种实施例中,获取模块包括处理子模块、判断子模块和获取子模块,处理子模块配置为根据播放请求得到媒体的标志信息;判断子模块配置为根据标志信息判断媒体的媒体协议格式;获取子模块配置为根据判断结果去获取媒体流数据。
在本发明的一种实施例中,若经判断子模块判断媒体的协议格式为实施传输协议或实施流传输协议,则获取子模块直接请求获取媒体流数据;若经判断子模块判断媒体的协议格式为网络组管理协议,则所述获取子模块先请求加入组播组中,加入组播组成功后,再请求获取所述媒体流数据。
在本发明的一种实施例中,播放终端支持播放的媒体数据文件的预设格式包括以下格式中的任一种:超文本传输协议格式和超文本实时流协议格式;索引文件为m3u8索引文件。
本发明实施例还提供一种媒体播放系统,包括:上述的媒体播放终端、内容分发网络和媒体流形式的媒体,内容分发网络配置为接收到媒体播放终端发送的播放请求后,将媒体的媒体流数据发送给媒体播放终端。
本发明实施例提供了一种计算机存储介质,所述计算机存储介质中存储有计算机程序,所述计算机程序用于执行以上所述的媒体播放方法。
本发明实施例提供的媒体播放方法、终端、系统及计算机存储介质,通过在媒体播放终端获取到媒体流形式的媒体的相应的媒体流数据后,直接在播放终端将其转换为播放终端支持的协议格式的媒体数据文件和索引文件,并通过索引文件播放媒体数据文件,实现媒体流数据的播放;通过这种方式,不需要改变现有的CDN服务器或额外架设CDN系统,就能实现在播放终端播放与播放终端自身支持的协议不同的协议格式的媒体,降低了运营成本,并且也无需额外发布播放终端支持的协议格式的媒体内容到CDN,缩短了媒体内容的发布时间,同时也提高了用户的体验。
附图说明
图1为本发明实施例一的媒体流形式的媒体的播放方法流程图;
图2为本发明实施例二的媒体流形式的媒体的播放终端示意图;
图3为本发明实施例二中的媒体流形式的媒体的播放终端的获取模块示意图;
图4为本发明实施例二中的媒体流形式的媒体的播放系统示意图;
图5为本发明实施例三的支持HLS协议的OTT终端播放IPTV支持的协议格式的媒体流形式的媒体的方法流程图;
图6为本发明实施例四的支持HLS协议的OTT终端播放视频监控视频或会议电视视频支持的协议格式的媒体流形式的媒体的方法流程图。
具体实施方式
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分的实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。
在播放终端播放媒体数据时,对与播放终端支持协议格式匹配的媒体文件,在判断确定了其文件格式后,直接去获取对应的媒体文件进行播放,如播放终端支持HLS或HTTP协议,此时的媒体也是HLS或HTTP协议格式的,经判断播放终端与待播放媒体的协议格式是匹配的,则直接播放此媒体。本发明主要对播放终端播放与其自身支持的协议格式不匹配的协议格式的待播放媒体的情况进行详细的说明。
下面通过具体实施方式结合附图对本发明作进一步详细说明。
实施例一:
请参考图1,媒体流形式的媒体的播放方法,包括:
步骤S101:接收到媒体流形式的媒体的播放请求后,获取所述媒体的媒体流数据;
作为一种实施方式,当播放某一媒体流形式的媒体时,会相应的产生 播放此媒体的播放请求,接收到该播放请求后,通过该播放请求中的信息可以进一步去获取媒体的媒体流数据;获取媒体的媒体流数据具体为接收前述转发的播放请求,根据该播放请求得到媒体的标志信息;根据标志信息判断媒体的协议格式,然后根据判断结果去获取媒体流数据。对于播放终端具体的,根据判断结果去获取媒体流数据具体包括若经判断媒体的协议格式为实施传输协议或实施流传输协议,则直接请求获取媒体流数据;若经判断媒体的协议格式为网络组管理协议,则先请求加入组播组中,加入组播组成功后,再请求获取媒体流数据。
上述播放请求中包含媒体的标志信息,该标志信息是用来判断媒体的协议格式的,当媒体的协议格式为实施传输协议、实施流传输协议和网络组管理协议中的任意一种时,该标志信息具体可以是统一资源定位符(Uniform Resource Locator,URL),应当理解的是,该标志信息也可以是其他可以标示媒体文件协议格式的任何信息。
步骤S102:将所述媒体流数据转换为预设格式的媒体数据文件,所述媒体数据文件不少于一个,同时生成与所述媒体数据文件相匹配的索引文件,所述索引文件用于播放所述媒体数据文件时对所述媒体数据文件进行索引;
作为一种实施方式,将媒体数据流转换为预设格式的媒体数据时,是将媒体流数据分段式进行转换和缓存的,在转换和缓存时,若该媒体数据流很小,则可将其只缓存为一个媒体数据文件,然后根据生成的索引文件播放此媒体数据文件;通常情况下,媒体数据流都不会很小,所以每隔一定的时间对其分段式进行转换和缓存,或者按照预设的数据包的大小将其分段式进行转换和缓存,之后通过生成的索引文件将分段式转换和缓存的媒体数据文件按照一定的时间顺序进行播放,索引文件还用于对媒体数据文件进行其他基本处理。可选地,媒体数据文件的预设格式包括以下格式 中的任一种:超文本传输协议格式和超文本实时流协议格式;当其格式为上述格式中的任一种时,相应的索引文件为m3u8索引文件。通过这种方式,就能直接在播放终端接收到媒体流形式的媒体对应的媒体流数据后,将其转换为终端支持的协议格式的文件,实现播放。
步骤S103:根据所述索引文件的索引播放所述媒体数据文件。
作为一种实施方式,播放媒体数据文件时,根据索引文件按一定的规则整理媒体数据文件,将其按照一定的时序播放,应当理解的是,索引文件对媒体数据进行的处理不仅仅包括对其按照一定的时序排列,也包括其他一些处理。当媒体数据文件的预设格式为超文本传输协议或超文本实时流协议时,具体的根据m3u8索引文件实现媒体数据文件的播放。
本实施例提供的媒体播放方法,通过在媒体播放终端获取到媒体流形式的媒体的相应的媒体流数据后,将其转换为播放终端支持的协议格式的媒体数据文件和索引文件,并通过索引文件播放媒体数据文件,实现媒体流数据的播放;通过这种方式,不需要改变现有的CDN服务器或额外架设CDN系统,降低了运营成本,并且也无需额外发布播放终端支持的协议格式的媒体内容到CDN,缩短了媒体内容的发布时间。
实施例二:
请参考图2,媒体流形式的媒体播放终端20,包括:处理模块201、获取模块202、协议转换模块203和播放模块204。
处理模块201,配置为接收媒体流形式的媒体的播放请求;可选地,当播放某一媒体流形式的媒体时,处理模块201会接收到播放此媒体的播放请求,接收到该播放请求后,接下来处理模块201将此播放请求转发给获取模块202,进一步去获取媒体的媒体流数据,该播放请求中包括媒体的一些标志信息。
获取模块202配置为根据处理模块201转发的播放请求,获取媒体的 媒体流数据;可选地,获取模块202接收到处理模块201转发的媒体流形式的媒体的播放请求后,根据该播放请求去获取媒体的媒体流数据。请参见图3,获取模块202还包括处理子模块2021、判断子模块2022和获取子模块2023,处理子模块2021配置为根据播放请求得到媒体的标志信息,判断子模块2022配置为根据标志信息判断媒体的媒体协议格式,获取子模块2023配置为根据判断结果去获取媒体流数据。作为一种实施方式,获取模块202根据处理模块201转发的播放请求,获取媒体的媒体流数据具体为:处理子模块2021根据该播放请求得到媒体的标志信息,然后通知判断子模块2022根据标志信息去判断媒体的媒体协议格式,得到判断结果后,通知获取子模块2023根据判断结果去获取媒体流数据。作为一种实施方式,获取子模块2023根据判断结果去获取媒体流数据具体为:若经判断媒体的协议格式为实施传输协议或实施流传输协议,则直接请求获取媒体流数据;若经判断媒体的协议格式为网络组管理协议,则先请求加入组播组中,加入组播组成功后,再请求获取媒体流数据。
上述播放请求中包含媒体的标志信息,该标志信息是用来判断媒体的协议格式的,当媒体的协议格式为实施传输协议、实施流传输协议和网络组管理协议中的任意一种时,该标志信息具体可以是URL,应当理解的是,该标志信息也可以是其他可以标示媒体文件协议格式的任何信息。
协议转换模块203,配置为将媒体流数据转换为预设格式的媒体数据文件,该媒体数据文件不少于一个,同时生成与媒体数据文件相匹配的索引文件,索引文件用于播放所述媒体数据文件时的索引。可选地,协议转换模块203将媒体数据流转换为预设格式的媒体数据时,是将媒体流数据分段式进行转换和缓存的,在转换和缓存时,若该媒体数据流很小,则可将其只缓存为一个媒体数据文件,然后根据生成的索引文件播放此媒体数据文件;通常情况下,媒体数据流都不会很小,所以每隔一定的时间对其分 段式进行转换和缓存,或者按照预设的数据包的大小将其分段式进行转换和缓存,之后通过生成的索引文件将分段式转换和缓存的媒体数据文件按照一定的时间顺序进行播放。进一步的,媒体数据文件的预设格式包括以下格式中的任一种:超文本传输协议格式和超文本实时流协议格式;当其格式为上述格式中的任一种时,相应的索引文件为m3u8索引文件。示例性地,该协议转换模块203为软件开发工具包或软件程序。通过这种方式,就能直接在播放终端接收到媒体流形式的媒体的对应的媒体流数据后,将其转换为终端支持的协议格式的文件,实现播放。
播放模块204,配置为根据索引文件的索引播放媒体数据文件。可选地,播放模块204播放媒体数据文件时,根据索引文件按一定的规则整理媒体数据文件,将其按照一定的时序播放,应当理解的是,索引文件对媒体数据进行的处理不仅仅包括对其按照一定的时序排列,也包括其他一些处理。当媒体数据文件的预设格式为超文本传输协议或超文本实时流协议时,具体的根据m3u8索引文件实现媒体数据文件的播放。
需要说明的是,第一,处理模块201、获取模块202、协议转换模块203和播放模块204、以及获取模块202包括的各个子模块,均可由媒体播放终端中的中央处理器(Central Processing Unit,CPU)、微处理器(Micro Processor Unit,MPU)、数字信号处理器(Digital Signal Processor,DSP)、或现场可编程门阵列(Field Programmable Gate Array,FPGA)等实现。第二,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的媒体播放终端和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
本实施例提供的媒体播放终端,通过在播放终端加载一个协议转换模块,在媒体播放终端获取到媒体流形式的媒体的相应的媒体流数据后,通过协议转换模块将其转换为上述播放终端支持的协议格式的媒体数据文件 和索引文件,并通过索引文件播放媒体数据文件,实现媒体流数据的播放;这种方式下,通过直接对终端改变,不需要改变现有的CDN服务器或额外架设CDN系统,降低了运营成本,并且也无需额外发布播放终端支持的协议格式的媒体内容到CDN,缩短了媒体内容的发布时间。
本实施例还提供一种媒体播放系统,请参见图4,具体包括:前述媒体播放终端20、内容分发网络21和媒体流形式的媒体23,CDN21用于接收媒体播放终端20发送来的播放请求,将符合条件的媒体流形式的媒体23的媒体流数据发送给媒体播放终端20。具体的,当媒体播放终端20播放某一媒体流形式的媒体时,会接收到播放此媒体的播放请求,接下来转发此播放请求,进一步请求CDN21获取媒体的媒体流数据。CDN21接收到媒体播放终端20的请求时,从媒体流形式的媒体23处获得所需要的媒体流数据,然后将此媒体流数据发送给媒体播放终端20。这种方式下,不需要改变现有的CDN服务器或额外架设CDN系统,降低了运营成本,并且也无需额外发布播放终端支持的协议格式的媒体内容到CDN,缩短了媒体内容的发布时间。
实施例三:
在实施例一和实施例二的基础上,本实施例结合具体的情况阐述媒体流形式的媒体的播放方法。
当播放终端为支持HLS协议的OTT终端,需要播放的媒体流形式的媒体为IPTV支持的协议格式的媒体,IPTV支持的协议格式包括RTP、PTSP或IGMP,该OTT终端播放IPTV媒体的具体过程请参见图5,包括:
步骤S501:播放终端的处理模块接收到播放交互式网络电视视频的播放请求;
作为一种实施方式,当播放某一媒体流形式的媒体时,接收到播放此媒体的播放请求,本实施例中接收到的是IPTV视频的播放请求,接收到该 播放请求后,接下来转发播放请求,进一步去获取媒体的媒体流数据。
步骤S502,处理模块将此播放请求转发给获取模块,通知获取模块要播放交互式网络电视视频;
作为一种实施方式,获取模块中的接收子模块接收转发来的播放请求,并得到媒体的标志信息,然后通知判断子模块根据标志信息去判断媒体的协议格式,此时的标志信息为URL。
步骤S503,获取模块根据播放请求,判断媒体的协议格式;
若经判断此处的IPTV视频媒体的协议格式为RTSP或RTP协议,即此时的URL是RTSP协议头或RTP协议头,则说明此时OTT终端播放的是IPTV的点播内容,则跳转到步骤S504,请求获取媒体流数据;若经判断所述媒体的协议格式为IGMP协议,即此时OTT终端播放的是IPTV的组播内容,则先跳转到步骤S510,请求加入组播组中,且加入组播组成功后,再跳转到步骤S504,请求获取媒体流数据。
步骤S504:请求获取媒体流数据;
作为一种实施方式,OTT终端向IPTV CDN服务器发送请求,请求获取媒体流数据。
步骤S505:内容分发网络发送实时传输协议数据包的媒体流数据至播放终端;
作为一种实施方式,IPTV CDN服务器收到OTT终端的请求后,根据其需要获取媒体流形式的媒体对应的媒体流数据。
步骤S506:获取模块接收内容分发网络返回的媒体流数据,并通知协议转换模块进行转换;
步骤S507:协议转换模块将实时传输协议包封装的媒体流数据转换为超文本实时流协议或超文本传输协议的媒体数据,在转换媒体流数据时,同时生成索引文件;
步骤S508:协议转换模块将转换后的超文本实时流协议或超文本传输协议的媒体数据和索引文件返回给播放模块;
步骤S509:播放模块根据索引文件的索引播放转换为超文本实时流协议或超文本传输协议的媒体数据文件;
需要理解的是,此时的索引文件都为m3u8索引文件,此处的播放为超文本实时流协议或超文本传输协议格式的播放。
步骤S510:请求加入组播组中,且加入组播组成功。
作为一种实施方式,加入组播组的方式为根据组播IP和端口,加入组播组。
通过上述方式,在OTT终端中部署一个协议转换模块,就可以实现OTT终端播放IPTV媒体内容播放的功能的技术方案,解决了现有的OTT终端在接入IPTV网络时,需要额外架设OTT CDN系统的问题,节约了运营成本;并且也无需额外发布OTT终端支持的协议格式的媒体内容到CDN,缩短了媒体内容的发布时间。
实施例四:
在实施例一和实施例二的基础上,本实施例结合具体的情况阐述媒体流形式的媒体的播放方法。
当终端为支持HLS协议的OTT终端,需要播放的媒体流形式的媒体为视频监控视频或会议电视视频支持的协议格式的媒体,视频监控视频或会议电视视频支持的协议格式具体为RTP或PTSP,该OTT终端播放视频监控视频或会议电视视频媒体的具体过程请参见图6,包括:
步骤S601:播放终端的处理模块接收到播放某个视频监控视频或会议电视视频的播放请求;
作为一种实施方式,当播放某一媒体流形式的媒体时,接收到播放此媒体的播放请求,本实施例中接收到的是某个视频监控视频或会议电视视 频的播放请求,接收到该播放请求后,接下来转发播放请求,进一步去获取媒体的媒体流数据。
步骤S602:处理模块将此播放请求转发给获取模块,通知获取模块要播放视频监控视频或会议电视视频;
作为一种实施方式,获取模块中的接收子模块接收转发来的播放请求,并得到媒体的标志信息,然后通知判断子模块根据标志信息去判断媒体的协议格式,此时的标志信息为URL。
步骤S603:获取模块根据播放请求,判断得知视频监控视频或会议电视视频的协议格式为实时流传输协议或实施传输协议;
作为一种实施方式,此处的判断结果为媒体的协议格式为RTSP或RTP协议,则直接跳转到步骤S604,获取相应的媒体流数据。
步骤S604:获取模块直接请求视频监控视频或会议电视视频的内容分发网络获取媒体流数据;
作为一种实施方式,OTT终端向视频监控视频或会议电视视频的CDN服务器发送请求,请求获取媒体流数据。
步骤S605:视频监控视频或会议电视视频的内容分发网络收到请求后,会返回封装为实时流传输协议包的媒体流数据至播放终端;
作为一种实施方式,视频监控视频或会议电视视频的CDN服务器收到OTT终端的请求后,根据其需要获取媒体流形式的媒体对应的媒体流数据。
步骤S606:获取模块接收监控视频或会议电视的内容分发网络返回的媒体流数据,并通知协议转换模块进行转换;
步骤S607:协议转换模块将实时流传输协议包封装的媒体数据转换为超文本实时流协议或超文本传输协议的媒体数据,在转换媒体数据时,同时生成索引文件;
步骤S608:协议转换模块将转换后的超文本实时流协议或超文本传输 协议的媒体数据和索引文件返回给播放模块;
步骤S609:播放模块根据索引文件的索引播放转换为超文本实时流协议或超文本传输协议的媒体数据文件。
需要理解的是,本实施例中的索引文件皆为m3u8索引文件,此处的播放为HLS或HTTP协议格式的播放。
通过上述方式,在OTT终端中部署一个协议转换模块,就可以实现OTT终端播放IPTV媒体内容播放的功能的技术方案,解决了现有的OTT终端在接入视频监控或会议电视网络时,需要额外架设OTT CDN系统的问题,节约了运营成本;并且也无需额外发布OTT终端支持的协议格式的媒体内容到CDN,缩短了媒体内容的发布时间。
本发明实施例还记载了一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行前述各个实施例所述的媒体播放方法。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功 能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上内容是结合具体的实施方式对本发明所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。
工业实用性
本发明实施例中,接收到媒体流形式的媒体的播放请求后,获取媒体的媒体流数据;将媒体流数据转换为预设格式的媒体数据文件,媒体数据文件不少于一个,同时生成与媒体数据文件相匹配的索引文件,所述索引文件用于播放媒体数据文件时对媒体数据文件进行索引;根据索引文件的索引播放媒体数据文件。通过这种方式,不需要改变现有的CDN服务器或额外架设CDN系统,媒体播放终端就能实现媒体流数据的播放,降低了运营成本,并且也无需额外发布终端支持的协议格式的媒体内容到CDN,缩短了媒体内容的发布时间。

Claims (11)

  1. 一种媒体播放方法,所述媒体播放方法包括:
    接收到媒体流形式的媒体的播放请求后,获取所述媒体的媒体流数据;
    将所述媒体流数据转换为预设格式的媒体数据文件,所述媒体数据文件不少于一个,同时生成与所述媒体数据文件相匹配的索引文件,所述索引文件用于播放所述媒体数据文件时对所述媒体数据文件进行索引;
    根据所述索引文件的索引播放所述媒体数据文件。
  2. 如权利要求1所述的媒体播放方法,其中,所述获取所述媒体的媒体流数据,包括:
    根据所述播放请求得到所述媒体的标志信息;
    根据所述标志信息判断所述媒体的协议格式,并根据判断结果去获取所述媒体流数据。
  3. 如权利要求2所述的媒体播放方法,其中,所述根据判断结果去获取所述媒体流数据,包括:
    若经判断所述媒体的协议格式为实施传输协议或实施流传输协议,则直接请求获取所述媒体流数据;
    若经判断所述媒体的协议格式为网络组管理协议,则先请求加入组播组中,加入组播组成功后,再请求获取所述媒体流数据。
  4. 如权利要求2或3所述的媒体播放方法,其中,所述标志信息包括统一资源定位符。
  5. 如权利要求1至3任一项所述的媒体播放方法,其中,所述媒体数据文件的所述预设格式包括以下格式中的任一种:超文本传输协议格式和超文本实时流协议格式;所述索引文件为m3u8索引文件。
  6. 一种媒体播放终端,所述媒体播放终端包括:
    处理模块,配置为接收媒体流形式的媒体的播放请求;
    获取模块,配置为根据所述处理模块接收到的所述播放请求,获取所述媒体的媒体流数据;
    协议转换模块,配置为将所述获取模块获取的所述媒体流数据转换为预设格式的媒体数据文件,所述媒体数据文件不少于一个,同时生成与所述媒体数据文件相匹配的索引文件,所述索引文件用于播放所述媒体数据文件时对所述媒体数据文件进行索引;
    播放模块,配置为根据所述索引文件的索引播放所述媒体数据文件。
  7. 如权利要求6所述的媒体播放终端,其中,所述获取模块包括处理子模块、判断子模块和获取子模块,所述处理子模块配置为根据所述播放请求得到所述媒体的标志信息;所述判断子模块配置为根据所述标志信息判断所述媒体的媒体协议格式;所述获取子模块配置为根据判断结果去获取所述媒体流数据。
  8. 如权利要求7所述的媒体播放终端,其中,所述获取子模块,还配置为:
    若经判断子模块判断所述媒体的协议格式为实施传输协议或实施流传输协议,则所述获取子模块直接请求获取所述媒体流数据;
    若经判断子模块判断所述媒体的协议格式为网络组管理协议,则所述获取子模块先请求加入组播组中,加入组播组成功后,再请求获取所述媒体流数据。
  9. 如权利要求6至8任一项所述的媒体播放终端,其中,所述播放终端支持播放的所述媒体数据文件的预设格式包括以下格式中的任一种:超文本传输协议格式和超文本实时流协议格式;所述索引文件为m3u8索引文件。
  10. 一种媒体播放系统,包括:权利要求6至9任一项所述的媒体播放终端、内容分发网络和媒体流形式的媒体,其中,所述内容分发网络配 置为接收到所述媒体播放终端发送的播放请求后,将所述媒体的媒体流数据发送给所述媒体播放终端。
  11. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1至5任一项所述的方法。
PCT/CN2016/104950 2015-11-10 2016-11-07 一种媒体播放方法、终端、系统及计算机存储介质 WO2017080427A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510762776.1 2015-11-10
CN201510762776.1A CN106686443A (zh) 2015-11-10 2015-11-10 一种媒体播放方法、终端及系统

Publications (1)

Publication Number Publication Date
WO2017080427A1 true WO2017080427A1 (zh) 2017-05-18

Family

ID=58694472

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/104950 WO2017080427A1 (zh) 2015-11-10 2016-11-07 一种媒体播放方法、终端、系统及计算机存储介质

Country Status (2)

Country Link
CN (1) CN106686443A (zh)
WO (1) WO2017080427A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112714335A (zh) * 2019-10-24 2021-04-27 中兴通讯股份有限公司 直播媒体流录制方法、系统及计算机可读存储介质
CN113382278A (zh) * 2021-06-11 2021-09-10 中国电信股份有限公司 视频推送方法、装置、电子设备和可读存储介质
CN114245216A (zh) * 2021-12-16 2022-03-25 北京数码视讯技术有限公司 多媒体流的回放装置和方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107451301B (zh) * 2017-09-12 2021-01-08 彩讯科技股份有限公司 实时投递账单邮件的处理方法、装置、设备和存储介质
CN107896336A (zh) * 2017-12-14 2018-04-10 玲珑视界科技(北京)有限公司 一种根据直播类型进行drm播放代理的系统及方法
CN108449613B (zh) * 2018-03-09 2020-10-16 北京数码视讯软件技术发展有限公司 一种融合多业务的cdn系统、融合方法和装置
CN112243158B (zh) * 2019-07-18 2023-07-14 腾讯科技(深圳)有限公司 媒体文件处理方法、装置、计算机可读介质及电子设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042909A (zh) * 2006-03-21 2007-09-26 凌阳科技股份有限公司 用于光储存媒体的播放多媒体文件的方法
CN102131106A (zh) * 2010-12-22 2011-07-20 华为技术有限公司 流媒体内容的播放方法、装置及系统
CN102387177A (zh) * 2010-09-01 2012-03-21 腾讯科技(深圳)有限公司 影音文件的下载方法及装置
CN102547444A (zh) * 2012-01-16 2012-07-04 广西骋天信息科技有限公司 优化播放实时视频监控录像的方法
CN104243430A (zh) * 2013-06-20 2014-12-24 腾讯科技(深圳)有限公司 一种流媒体播放方法及装置
CN105611395A (zh) * 2015-09-22 2016-05-25 北京暴风科技股份有限公司 一种mp4格式视频在线播放的方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110059429A (ko) * 2009-11-27 2011-06-02 주식회사 아이티컨트롤 아이폰을 위한 분산 미디어 스트리밍 방법과 장치 및 그 시스템
CN102630059B (zh) * 2012-03-23 2015-09-30 深圳创维数字技术有限公司 一种实现flv视频播放的方法及装置
CN103036888B (zh) * 2012-12-19 2016-04-13 南京视海网络科技有限公司 自适应的流媒体播放方法及其自适应播放单元
CN103826139A (zh) * 2014-02-27 2014-05-28 北京六间房科技有限公司 Cdn系统、观看服务器以及流媒体数据传输方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101042909A (zh) * 2006-03-21 2007-09-26 凌阳科技股份有限公司 用于光储存媒体的播放多媒体文件的方法
CN102387177A (zh) * 2010-09-01 2012-03-21 腾讯科技(深圳)有限公司 影音文件的下载方法及装置
CN102131106A (zh) * 2010-12-22 2011-07-20 华为技术有限公司 流媒体内容的播放方法、装置及系统
CN102547444A (zh) * 2012-01-16 2012-07-04 广西骋天信息科技有限公司 优化播放实时视频监控录像的方法
CN104243430A (zh) * 2013-06-20 2014-12-24 腾讯科技(深圳)有限公司 一种流媒体播放方法及装置
CN105611395A (zh) * 2015-09-22 2016-05-25 北京暴风科技股份有限公司 一种mp4格式视频在线播放的方法及系统

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112714335A (zh) * 2019-10-24 2021-04-27 中兴通讯股份有限公司 直播媒体流录制方法、系统及计算机可读存储介质
CN113382278A (zh) * 2021-06-11 2021-09-10 中国电信股份有限公司 视频推送方法、装置、电子设备和可读存储介质
CN113382278B (zh) * 2021-06-11 2022-09-09 天翼云科技有限公司 视频推送方法、装置、电子设备和可读存储介质
CN114245216A (zh) * 2021-12-16 2022-03-25 北京数码视讯技术有限公司 多媒体流的回放装置和方法

Also Published As

Publication number Publication date
CN106686443A (zh) 2017-05-17

Similar Documents

Publication Publication Date Title
WO2017080427A1 (zh) 一种媒体播放方法、终端、系统及计算机存储介质
US10250949B2 (en) Broadcast content to HTTP client conversion
WO2016058411A1 (zh) 一种http实时流媒体分片的拼接方法及拼接系统
TW201021573A (en) Proxy functionality
US10225319B2 (en) System and method of a link surfed http live streaming broadcasting system
JP2014532323A (ja) モバイルマルチメディアリアルタイムトランスコーディングシステム、装置、記憶媒体、および方法
US10440427B2 (en) Content supply device, content supply method, program, terminal device, and content supply system
WO2015064383A1 (ja) 送信装置、送信方法、受信装置、及び、受信方法
WO2015109847A1 (zh) 一种分段节目快速分发的方法、服务器及客户端
JPWO2015001986A1 (ja) コンテンツ供給装置、コンテンツ供給方法、プログラム、端末装置、およびコンテンツ供給システム
JP6597604B2 (ja) 受信装置、送信装置、データ通信方法、およびデータ処理方法
US9843615B2 (en) Signaling and handling of forensic marking for adaptive streaming
WO2019193991A1 (ja) 配信装置、配信方法、およびプログラム
KR102123208B1 (ko) 콘텐츠 공급 장치, 콘텐츠 공급 방법, 프로그램, 단말 장치, 및 콘텐츠 공급 시스템
JP2015061307A (ja) コンテンツ供給装置、コンテンツ供給方法、プログラム、端末装置、およびコンテンツ供給システム
US20180270546A1 (en) Content supply device, content supply method, program, terminal device, and content supply system
WO2017212931A1 (ja) 受信装置および受信方法、再生装置および再生方法、供給装置および供給方法、並びにプログラム
JP6653575B2 (ja) コンテンツ供給装置、コンテンツ供給方法、プログラム、端末装置、端末装置の動作方法、およびコンテンツ供給システム
WO2016101626A1 (zh) 一种频道码流处理方法、装置、终端及系统
WO2015012140A1 (ja) コンテンツ供給装置、コンテンツ供給方法、プログラム、端末装置、およびコンテンツ供給システム
US10750216B1 (en) Method and apparatus for providing peer-to-peer content delivery
KR101568317B1 (ko) Ip 카메라에서 hls 프로토콜을 지원하는 시스템 및 그 방법

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

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

Country of ref document: EP

Kind code of ref document: A1