WO2012167558A1 - 播放媒体文件的方法、终端、服务器和系统 - Google Patents

播放媒体文件的方法、终端、服务器和系统 Download PDF

Info

Publication number
WO2012167558A1
WO2012167558A1 PCT/CN2011/082295 CN2011082295W WO2012167558A1 WO 2012167558 A1 WO2012167558 A1 WO 2012167558A1 CN 2011082295 W CN2011082295 W CN 2011082295W WO 2012167558 A1 WO2012167558 A1 WO 2012167558A1
Authority
WO
WIPO (PCT)
Prior art keywords
intra
terminal
coded frame
request message
fast
Prior art date
Application number
PCT/CN2011/082295
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 华为技术有限公司
Priority to CN2011800032219A priority Critical patent/CN102550038A/zh
Priority to PCT/CN2011/082295 priority patent/WO2012167558A1/zh
Publication of WO2012167558A1 publication Critical patent/WO2012167558A1/zh
Priority to US14/136,244 priority patent/US20140109156A1/en

Links

Classifications

    • 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/65Transmission of management data between client and server
    • H04N21/658Transmission by the client directed to the server
    • H04N21/6587Control parameters, e.g. trick play commands, viewpoint selection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/238Interfacing the downstream path of the transmission network, e.g. adapting the transmission rate of a video stream to network bandwidth; Processing of multiplex streams
    • H04N21/2387Stream processing in response to a playback request from an end-user, e.g. for trick-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/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/64322IP
    • 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 information technology, and in particular, to a method, a terminal, a server and a system for playing media files in the field of information technology. Background technique
  • HTTP Hyper Text Transfer Protocol
  • each video content corresponds to only one code rate video file.
  • the player's playback process will be temporarily stagnant, which will reduce the user's viewing experience.
  • the player can obtain different bitrates from the server according to its available bandwidth, the load of the central processing unit (CPU) and the screen size. Audio and video fragments. As a result, the entire video playback process will be smoother.
  • CPU central processing unit
  • HTTP Live Streaming is the most widely used one.
  • HLS protocol does not support fast forward or fast reverse playback, so that all HLS-enabled terminals on the market cannot provide fast forward and rewind. Function, which seriously affects the quality of user experience.
  • the embodiments of the present invention provide a method, a terminal, a server, and a system for playing a media file, which enable a terminal that supports HLS to implement a fast forward or fast reverse play function, and improve user experience quality.
  • an embodiment of the present invention provides a method for playing a media file, the method comprising: acquiring a fast play state of a media file based on a hypertext transfer protocol real-time streaming HLS protocol; determining an intraframe encoding corresponding to the fast play state. Frame information; sending a request message to the server, the request message including the intra-framed frame information; receiving a response sent by the server according to the request message And the response message includes intra-coded frame data corresponding to the intra-coded frame information; and the intra-coded frame data is played according to the response message.
  • an embodiment of the present invention provides a method for playing a media file, the method comprising: receiving a request message that includes intra-frame encoded frame information sent by a terminal, the intra-frame encoded frame information and the hypertext based on the terminal acquired by the terminal Transmitting protocol real-time streaming HLS protocol media file fast playing state corresponding; acquiring, according to the request message, intra-coded frame data corresponding to the intra-frame encoded frame information; transmitting a response message including the intra-coded frame data to the terminal , so that the terminal plays the intra-coded frame data.
  • the embodiment of the present invention provides a terminal, where the terminal includes: an acquiring module, configured to acquire a fast playing state of a media file based on a hypertext transfer protocol real-time streaming HLS protocol; and a determining module, configured to determine and obtain the And the sending module is configured to send the request message to the server, where the request message includes the intra-framed frame information determined by the determining module, and the receiving module is configured to receive the server. a response message sent according to the request message sent by the sending module, the response message includes intra-frame encoded frame data corresponding to the intra-frame encoded frame information, and a playing module, configured to play according to the response message received by the receiving module The intraframe encodes frame data.
  • an embodiment of the present invention provides a server, where the server includes: a receiving module, configured to receive a request message that includes intra-frame encoded frame information sent by a terminal, where the intra-frame encoded frame information and the terminal acquire the super-based a text transmission protocol real-time streaming HLS protocol media file fast playing state corresponding; an obtaining module, configured to acquire, according to the request message received by the receiving module, intra-coded frame data corresponding to the intra-frame encoded frame information; And transmitting, to the terminal, a response message including the intra-coded frame data acquired by the acquiring module, so that the terminal plays the intra-coded frame data.
  • an embodiment of the present invention provides a system for playing a media file, the system including a terminal and a server according to an embodiment of the present invention.
  • the method, the terminal, the server, and the system in the embodiment of the present invention interact with the server to obtain intra-coded frame data in the fragment of the media file, so that the terminal supporting the HLS can acquire the media file.
  • the framed frame data of the corresponding frame is played in the fast play state, and the fast forward or fast reverse play function of the media file can be realized, and the quality of the user experience can be improved.
  • FIG. 1 is a schematic flowchart of a method for playing a media file according to an embodiment of the present invention.
  • 2 is a schematic flowchart of a method of playing a media file according to another embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a method for playing a media file according to still another embodiment of the present invention.
  • 4 is a schematic block diagram of a terminal according to an embodiment of the present invention.
  • FIG. 5 is a schematic block diagram of a server according to an embodiment of the present invention.
  • FIG. 6 is a schematic block diagram of a system for playing a media file in accordance with an embodiment of the present invention. detailed description
  • FIG. 1 shows a schematic flow diagram of a method 100 of playing a media file in accordance with an embodiment of the present invention. As shown in FIG. 1, the method 100 includes:
  • S130 Send a request message to the server, where the request message includes the intra-coded frame information.
  • S140 Receive a response message sent by the server according to the request message, where the response message includes an intra-coded frame corresponding to the intra-frame encoded frame information.
  • the terminal supporting the HLS may determine the intra-coded frame information corresponding to the fast play status according to the fast play status of the obtained media file, and send a request message including the intra-framed frame information to the server, so that the terminal can receive
  • the response message sent by the server according to the request message, the response message includes intra-coded frame data corresponding to the intra-frame encoded frame information, and thus, the terminal supporting the HLS can play the intra-coded frame data according to the response message. Therefore, the method of the embodiment of the present invention interacts with the server to obtain intra-coded frame data in the fragment of the media file, so that the terminal supporting the HLS can acquire the intra-coded frame corresponding to the fast playing state of the media file. The data is played and played, thereby enabling fast forward or fast playback of the media file and improving the quality of the user experience.
  • the terminal acquires a fast play status of the media file based on the HLS protocol.
  • the fast play status includes a fast forward play status or a fast reverse play status.
  • the terminal may determine, according to the fast forward or rewind operation information selected by the user, that the fast play status of the media file based on the HLS protocol is a fast forward play status or a fast reverse play status.
  • the fast forward play status or the fast reverse play status may be used to indicate a specific multiple of fast forward or fast reverse play.
  • the fast forward play status includes a first fast forward play status, a second fast forward play status, and a third fast forward play status, wherein the first fast forward play status indicates 2 times of fast forward play, and the second fast forward play status is used.
  • the third fast forward play status is used to indicate 8 times of fast forward play.
  • the terminal determines intra-coded frame information, and the intra-coded frame information is used to indicate the position of the intra-coded frame corresponding to the fast play state.
  • the determining, by the terminal, the intra-coded frame information corresponding to the fast play status the method includes: determining, by the terminal, the intra-coded frame information according to the fast play status.
  • the intra-coded frame information includes first information indicating a slice to which the intra-coded frame data belongs, and second information indicating a byte offset of the intra-coded frame data on the slice.
  • the first information is a name or an identifier of the fragment
  • the second information is a specific location of the intra-frame encoded frame data on the fragment.
  • B corresponding to A means that B is associated with A, and B can be determined based on A.
  • determining B according to A does not mean that B is determined only on the basis of A, and B can be determined based on A and/or other information.
  • the intra-coded frame is a frame that is encoded by full-frame compression, and the generation or decoding of the intra-coded frame may be independent of other types of frames.
  • an intra-coded frame may be an I-frame (I Frame), ie an internal picture.
  • the media file based on the HLS protocol usually consists of multiple fragments, each of which can have multiple code rates, and each of the code rate fragments can form a separate transport stream (Transport Stream, simply referred to as "TS") file. And each time the terminal downloads the fragment, it can determine which code rate fragment to download according to the current network bandwidth, the load of the central processing unit (CPU), and the like, thereby achieving self-adaptation. Should be streamed to play.
  • a video file may include multiple TS files, and each TS file may include one or more picture groups (Group Of Pictures, referred to as "GOP").
  • a GOP usually includes three types of frames, namely, I frame, B frame, and P frame.
  • the P frame can be predicted based on the I frame, and the B frame can be predicted by the I frame and the P frame.
  • the P frame can also be called “forward”.
  • Predictive coded frame which may be referred to as "bidirectionally predictively interpolated coded frame”.
  • the terminal determines, according to the description file for describing the media file corresponding to the media file, the intra-framed frame information, where the description file includes the media byte offset indication The specific location of the intra-coded frame on the corresponding slice. That is, the terminal may determine the intra-coded frame information according to the fast play status and the description file.
  • the embodiment of the present invention extends the description file corresponding to the media file, so that in the description file, all the intra-coded frames included in each slice are included before the description of each slice of the media file.
  • the byte offset information on the slice so that the terminal obtains the byte offset information of the desired intra-coded frame according to the description file, thereby obtaining corresponding intra-coded frame data.
  • the description file corresponding to the media file based on the HLS protocol is an M3U8 file.
  • the M3U8 file of the media file can be described as:
  • Rangebytes 0- 100,500-600, 1200- 1400
  • the above M3U8 file describes a media file including three TS files.
  • the names of the TS files are "fileSequence2680", “fileSequence2681” and “fileSequence2682", and the playback time of each TS file is 8 seconds.
  • the M3U8 file also describes the byte offset corresponding to the intra-coded frame in each TS file, and the uniform resource locator of each TS file (Uniform) Resoure Locator, referred to as "URL").
  • the byte offset corresponding to the frame is 0 ⁇ 120 bytes (Byte)
  • the byte offset corresponding to the encoded frame in the second frame is 510 ⁇ 600Byte
  • the byte offset corresponding to the encoded frame in the third frame is 1220.
  • ⁇ 1400Byte and the URL of the TS file is "http: ⁇ priv.example.com/fileSequence2682.ts".
  • the terminal can obtain the fast play state of the media file A in the second fast forward play state according to the fast forward operation information selected by the user.
  • the second fast forward play status indication is fast forward playback in 2x.
  • the terminal can determine that the first and the first of the TS files whose name is "fileSequence2680" need to be played.
  • the three intra-coded frames that is, the first information included in the intra-coded frame information corresponding to the fast play state, are fileSequence 2680, and the second information included in the intra-coded frame information is Range: 0-100 and 1200-1400.
  • the terminal needs to determine the number of intervals of intra-coded frames to be played according to the fast forward or fast reverse playback state.
  • the user selects fast forward.
  • the larger the multiple of the fast-rewind playback the larger the number of intervals of the intra-coded frames that the terminal needs to play, so that the terminal can determine the intra-coded frame information.
  • the intra-coded frame information may include related information for acquiring an intra-coded frame data, and may also include related information for acquiring a plurality of intra-coded frame data. Embodiments of the invention are not limited thereto.
  • the terminal transmits a request message including the intra-framed frame information to the server.
  • the terminal sends a hypertext transfer protocol byte range (HTTP Byterange) request message to the server, where the HTTP Byterange request message carries the first information indicating the fragment to which the intraframe encoded frame data that the terminal wishes to acquire, and indicates the The second information of the byte offset of the intra-coded frame data on the slice, that is, the HTTP Byterange request message includes intra-coded frame information corresponding to the fast play state of the media file.
  • HTTP Byterange hypertext transfer protocol byte range
  • the terminal receives a response message sent by the server according to the request message, and the response message includes intra-coded frame data corresponding to the intra-frame encoded frame information.
  • the response message may be an HTTP 200 Ok response message. It should be understood that the intra-coded frame data may be determined based on the intra-coded frame information.
  • the terminal plays the intra-coded frame data according to the response message.
  • the terminal acquires and plays the intra-coded frame data of the interval corresponding to the fast playback state by one or more interactions with the server, the fast forward or fast reverse playback function of the media file having the HLS is realized.
  • the method of the embodiment of the present invention interacts with the server to obtain intra-coded frame data in the fragment of the media file, so that the terminal supporting the HLS can acquire the intra-coded frame corresponding to the fast playing state of the media file.
  • the data is played and played, thereby enabling fast forward or fast playback of the media file and improving the quality of the user experience.
  • the method 200 for playing a media file includes: S210.
  • a server receives a request message that includes intra-frame encoded frame information sent by a terminal, where the intra-frame encoded frame information is acquired by the terminal.
  • the text playback protocol real-time streaming HLS protocol media file playback state corresponding;
  • the server acquires, according to the request message, intra-coded frame data corresponding to the intra-frame encoded frame information.
  • the server sends a response message including the intra-framed frame data to the terminal, so that the terminal plays the intra-coded frame data.
  • the intra-coded frame information corresponds to the fast play state, meaning that the intra-coded frame information is associated with the fast play state, and the intra-coded frame information can be determined according to the fast play state.
  • the intra-coded frame information is determined by the terminal according to a description file corresponding to the media file, where the description file includes words of all intra-coded frames of each slice of the media file on corresponding fragments. Section offset. That is, the terminal can determine the intra-coded frame information according to the fast play state and the description file.
  • the fast play status includes a fast forward play status or a fast reverse play status.
  • the intra-coded frame information includes first information indicating a slice to which the intra-coded frame data belongs, and second information indicating a byte offset of the intra-coded frame data on the slice.
  • the request message is a hypertext transfer protocol byte range (HTTP Byterange) request message.
  • the intra-coded frame is an I frame.
  • the media is the M3U8 file.
  • the fast forward playback state or the fast reverse playback state can be used to indicate a specific multiple of fast forward or fast reverse playback.
  • the method of the embodiment of the present invention interacts with the server to obtain intra-coded frame data in the fragment of the media file, so that the terminal supporting the HLS can acquire the intra-coded frame corresponding to the fast playing state of the media file.
  • the data is played and played, thereby enabling fast forward or fast playback of the media file and improving the quality of the user experience.
  • a method 300 of playing a media file includes:
  • the terminal acquires a fast play status of the media file based on the HLS protocol, where the fast play status is, for example, a fast forward play status or a fast reverse play status.
  • the terminal sends an HTTP Byte Range request message to the server, where the request message includes the intra-frame encoded frame information.
  • the server acquires, according to the request message, intra-coded frame data corresponding to the intra-coded frame information, that is, data of the first and third intra-coded frames in the slice named “fileSequence2681”;
  • the server sends an HTTP 200 OK response message to the terminal, where the response message includes intra-coded frame data corresponding to the intra-frame encoded frame information.
  • the terminal plays the data of the first and third intra-coded frames in the slice named "fileSequence2681" according to the response message, thereby enabling the fast forward or fast reverse play function.
  • the terminal may also separately acquire data of the first and the third intra-coded frames.
  • the size of the sequence numbers of the above processes does not imply a sequence of execution orders, and the order of execution of each process should be determined by its function and internal logic, and should not be implemented by the present invention.
  • the implementation of the examples constitutes any limitation.
  • a method for playing a media file according to an embodiment of the present invention is described in detail above with reference to FIG. 1 to FIG. 3, and an apparatus according to an embodiment of the present invention, which includes a terminal, a server, and system.
  • FIG. 4 shows a schematic block diagram of a terminal 500 in accordance with an embodiment of the present invention.
  • the terminal 500 includes:
  • the obtaining module 510 is configured to obtain a fast playing state of the media file based on the Hypertext Transfer Protocol real-time streaming HLS protocol;
  • a determining module 520 configured to determine intra-coded frame information corresponding to the fast play state acquired by the acquiring module 510;
  • the sending module 530 is configured to send a request message to the server, where the request message includes the intra-framed frame information determined by the determining module 520.
  • the receiving module 540 is configured to receive a response message sent by the server according to the request message sent by the sending module 530, where the response message includes intra-coded frame data corresponding to the intra-frame encoded frame information;
  • the playing module 550 is configured to play the intra-coded frame data according to the response message received by the receiving module 540.
  • the terminal in the embodiment of the present invention interacts with the server to obtain intra-coded frame data in the fragment of the media file, so that the terminal supporting the HLS can acquire the intra-coded frame corresponding to the fast play state of the media file.
  • the data is played and played, thereby enabling fast forward or fast playback of the media file and improving the quality of the user experience.
  • the intra-framed frame information determined by the determining module 520 includes first information indicating a fragment to which the intra-frame encoded frame data belongs, and indicating that the intra-frame encoded frame data is in the The second information of the byte offset on the slice.
  • the determining module 520 is further configured to determine the intra-coded frame information according to the description file corresponding to the media file, where the description file includes all intra-coded frames of each slice of the media file. The byte offset on the slice.
  • the fast play status acquired by the acquiring module 510 includes a fast forward play status or a fast reverse play status.
  • the request message sent by the sending module 530 is a hypertext transfer protocol byte range (HTTP Byterange) request message.
  • the response message received by the receiving module 540 is an HTTP 200 OK response message.
  • the terminal 500 according to the embodiment of the present invention may correspond to the terminal in the method for playing the media file in the embodiment of the present invention, and the operations and/or functions of the respective modules in the terminal 500 are respectively implemented to implement FIG. 1 to FIG. 3 .
  • the corresponding processes of the respective methods 100 to 300 are not described herein for the sake of brevity.
  • the terminal in the embodiment of the present invention interacts with the server to obtain intra-coded frame data in the fragment of the media file, so that the terminal supporting the HLS can acquire the intra-coded frame corresponding to the fast play state of the media file.
  • the data is played and played, thereby enabling fast forward or fast playback of the media file and improving the quality of the user experience.
  • the server 600 includes:
  • the receiving module 610 is configured to receive, by the terminal, a request message that includes intra-frame encoded frame information, where the intra-coded frame information corresponds to a fast play state of the media file that is acquired by the terminal and is based on a hypertext transfer protocol real-time streaming HLS protocol;
  • the obtaining module 620 is configured to obtain, according to the request message received by the receiving module 610, intra-coded frame data corresponding to the intra-frame encoded frame information;
  • the sending module 630 is configured to send, to the terminal, a response message including the intra-coded frame data acquired by the acquiring module 620, so that the terminal plays the intra-coded frame data.
  • the intra-framed frame information received by the receiving module 610 is determined by the terminal according to a description file corresponding to the media file, where the description file includes all intra-coded frames of each slice of the media file. The byte offset on the corresponding slice.
  • the intra-framed frame information received by the receiving module 610 includes first information indicating a fragment to which the intra-frame encoded frame data belongs, and a byte offset indicating that the intra-frame encoded frame data is on the fragment.
  • the second message includes first information indicating a fragment to which the intra-frame encoded frame data belongs, and a byte offset indicating that the intra-frame encoded frame data is on the fragment.
  • the request message received by the receiving module 610 is a hypertext transfer protocol byte range (HTTP Byterange) request message; the response message sent by the sending module 630 is an HTTP 200 OK response message.
  • HTTP Byterange hypertext transfer protocol byte range
  • server 600 may correspond to the server in the method for playing the media file in the embodiment of the present invention, and the operations and/or functions of the respective modules in the server 600 are respectively implemented in FIG. 1 to FIG.
  • the corresponding processes of the respective methods 100 to 300 are not described herein for the sake of brevity.
  • the server of the embodiment of the present invention interacts with the server through the terminal to obtain a media file.
  • the intra-frame coded frame data in the slice enables the HLS-capable terminal to acquire and play the intra-coded frame data corresponding to the fast play state of the media file, thereby enabling fast forward or fast playback of the media file.
  • Figure 6 shows a schematic block diagram of a system 900 for playing media files in accordance with an embodiment of the present invention.
  • the system 900 includes:
  • Terminal 910 according to an embodiment of the present invention.
  • the terminal 910 includes:
  • An obtaining module configured to acquire a fast playing state of a media file based on a hypertext transfer protocol real-time streaming HLS protocol;
  • a determining module configured to determine intraframe coding frame information corresponding to the fast play state acquired by the acquiring module
  • a sending module configured to send a request message to the server, where the request message includes the intra-framed frame information determined by the determining module;
  • a receiving module configured to receive a response message sent by the server according to the request message sent by the sending module, where the response message includes intra-coded frame data corresponding to the intra-frame encoded frame information
  • a playing module configured to receive, according to the The response message received by the module plays the intra-frame encoded frame data
  • the server 920 includes:
  • a receiving module configured to receive a request message that includes intra-frame encoded frame information sent by the terminal, where the intra-coded frame information corresponds to a fast play state of the media file that is acquired by the terminal and is based on a hypertext transfer protocol real-time streaming HLS protocol;
  • An obtaining module configured to acquire, according to the request message received by the receiving module, intra-coded frame data corresponding to the intra-frame encoded frame information;
  • a sending module configured to send, to the terminal, a response message including the intra-coded frame data acquired by the acquiring module, so that the terminal plays the intra-coded frame data.
  • terminal 910 and the server 920 may respectively correspond to the terminal 500 and the server 600 in the embodiment of the present invention, and the operations and/or functions of the respective modules in the terminal 910 and the server 920, In order to implement the corresponding processes of the respective methods 100 to 300 in FIG. 1 to FIG. 3, respectively, for the sake of cleaning, no further details are provided herein.
  • the system of the embodiment of the present invention interacts with the server through the terminal to obtain the media file.
  • the intra-frame coding frame data in the fragment enables the HLS-capable terminal to acquire and play the intra-coded frame data corresponding to the fast playback state of the media file, thereby enabling fast forward or fast playback of the media file. And can improve the quality of user experience.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
  • the units described as separate components may or may not be physically separate, or may be distributed over multiple network elements. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute All or part of the steps of the method described in various embodiments of the invention.
  • the foregoing storage medium includes: a USB flash drive, a removable hard disk, a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like. The medium of the code.

Landscapes

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

Abstract

本发明公开了一种播放媒体文件的方法、终端、服务器和系统。该方法包括:获取基于HLS协议的媒体文件的快速播放状态;确定与该快速播放状态相应的帧内编码帧信息;向服务器发送请求消息,该请求消息包括该帧内编码帧信息;接收该服务器根据该请求消息发送的应答消息,该应答消息包括与该帧内编码帧信息相应的帧内编码帧数据;根据该应答消息,播放该帧内编码帧数据。本发明实施例的方法、终端、服务器和系统,通过终端与服务器交互以获取媒体文件的分片中的帧内编码帧数据,从而使得支持HLS的终端能够获取与媒体文件的快速播放状态相应的帧内编码帧数据并进行播放,由此能够实现媒体文件的快进或快退播放功能,并能够提高用户体验质量。

Description

播放媒体文件的方法、 终端、 服务器和系统 技术领域
本发明涉及信息技术领域, 尤其涉及信息技术领域中播放媒体文件的方 法、 终端、 服务器和系统。 背景技术
对于传统的基于超文本传输协议 ( Hyper Text Transfer Protocol, 简称为 "HTTP" )的视频播放技术,最典型的为 HTTP渐进式下载技术。在该 HTTP 渐进式下载技术中, 每个视频内容只对应一种码率的视频文件。 当客户端带 宽较低, 或带宽变化频率较高时, 播放器的播放过程就会出现短暂的停滞, 由此会降低用户的观看体验。
当使用自适应流( Adaptive Streaming )技术时, 播放器可以根据自身的 可用带宽、 中央处理器( Central Processing Unit, 筒称为 "CPU" ) 的负载和 屏幕大小等因素, 向服务器获取不同码率的音视频分片。 由此, 整个视频播 放的流程会更加流畅。
在目前存在的多种自适应流技术中, 苹果 (Apple )公司提出的超文本 传输协议实时流( HTTP Live Streaming, 筒称为 "HLS" )协议是应用最广泛 的一种。 然而, 该 HLS协议与其它协议在功能上相比, 却有明显的缺点, 即 HLS协议不支持快进或快退播放, 使得目前市面上的所有支持 HLS的终 端都不能提供快进快退的功能, 从而严重影响用户体验质量。
因此, 需要一种技术方案使得支持 HLS 的终端能够实现快进或快退播 放功能。 发明内容
本发明实施例提供了一种播放媒体文件的方法、 终端、 服务器和系统, 能够使得支持 HLS的终端实现快进或快退播放功能, 并提高用户体验质量。
一方面, 本发明实施例提供了一种播放媒体文件的方法, 该方法包括: 获取基于超文本传输协议实时流 HLS 协议的媒体文件的快速播放状态; 确 定与该快速播放状态相应的帧内编码帧信息; 向服务器发送请求消息, 该请 求消息包括该帧内编码帧信息; 接收该服务器根据该请求消息发送的应答消 息, 该应答消息包括与该帧内编码帧信息相应的帧内编码帧数据; 根据该应 答消息, 播放该帧内编码帧数据。
另一方面,本发明实施例提供了一种播放媒体文件的方法,该方法包括: 接收终端发送的包括帧内编码帧信息的请求消息, 该帧内编码帧信息与该终 端获取的基于超文本传输协议实时流 HLS协议的媒体文件的快速播放状态 相应; 根据该请求消息, 获取与该帧内编码帧信息相应的帧内编码帧数据; 向该终端发送包括该帧内编码帧数据的应答消息, 以便于该终端播放该帧内 编码帧数据。
再一方面, 本发明实施例提供了一种终端, 该终端包括: 获取模块, 用 于获取基于超文本传输协议实时流 HLS协议的媒体文件的快速播放状态; 确定模块, 用于确定与该获取模块获取的该快速播放状态相应的帧内编码帧 信息; 发送模块, 用于向服务器发送请求消息, 该请求消息包括该确定模块 确定的该帧内编码帧信息; 接收模块, 用于接收该服务器根据该发送模块发 送的该请求消息而发送的应答消息, 该应答消息包括与该帧内编码帧信息相 应的帧内编码帧数据; 播放模块, 用于根据该接收模块接收的该应答消息, 播放该帧内编码帧数据。
再一方面,本发明实施例提供了一种服务器, 该服务器包括:接收模块, 用于接收终端发送的包括帧内编码帧信息的请求消息, 该帧内编码帧信息与 该终端获取的基于超文本传输协议实时流 HLS协议的媒体文件的快速播放 状态相应; 获取模块, 用于根据该接收模块接收的该请求消息, 获取与该帧 内编码帧信息相应的帧内编码帧数据; 发送模块, 用于向该终端发送包括该 获取模块获取的该帧内编码帧数据的应答消息, 以便于该终端播放该帧内编 码帧数据。
再一方面, 本发明实施例提供了一种播放媒体文件的系统, 该系统包括 根据本发明实施例的终端和服务器。
基于上述技术方案, 本发明实施例的方法、 终端、 服务器和系统, 通过 终端与服务器交互以获取媒体文件的分片中的帧内编码帧数据,从而使得支 持 HLS 的终端能够获取与媒体文件的快速播放状态相应的帧内编码帧数据 并进行播放, 由此能够实现媒体文件的快进或快退播放功能, 并能够提高用 户体验质量。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对本发明实施例中 所需要使用的附图作简单地介绍, 显而易见地, 下面所描述的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动的 前提下, 还可以根据这些附图获得其他的附图。
图 1是根据本发明实施例的播放媒体文件的方法的示意性流程图。 图 2是根据本发明另一实施例的播放媒体文件的方法的示意性流程图。 图 3是根据本发明再一实施例的播放媒体文件的方法的示意性流程图。 图 4是才艮据本发明实施例的终端的示意性框图;
图 5是根据本发明实施例的服务器的示意性框图;
图 6是根据本发明实施例的播放媒体文件的系统的示意性框图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行 清楚、 完整地描述, 显然, 所描述的实施例是本发明的一部分实施例, 而不 是全部实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创 造性劳动的前提下所获得的所有其他实施例, 都应属于本发明保护的范围。
图 1示出了根据本发明实施例的播放媒体文件的方法 100的示意性流程 图。 如图 1所示, 该方法 100包括:
S110, 获取基于超文本传输协议实时流 HLS协议的媒体文件的快速播 放状态;
S120, 确定与该快速播放状态相应的帧内编码帧信息;
S130, 向服务器发送请求消息, 该请求消息包括该帧内编码帧信息; S140, 接收该服务器根据该请求消息发送的应答消息, 该应答消息包括 与该帧内编码帧信息相应的帧内编码帧数据;
S150, 根据该应答消息, 播放该帧内编码帧数据。
支持 HLS 的终端可以根据获取的媒体文件的快速播放状态, 确定与该 快速播放状态相应的帧内编码帧信息, 并向服务器发送包括该帧内编码帧信 息的请求消息, 由此该终端可以接收该服务器根据该请求消息发送的应答消 息, 该应答消息包括与该帧内编码帧信息相应的帧内编码帧数据, 因而, 支 持 HLS的终端可以根据该应答消息播放该帧内编码帧数据。 因此, 本发明实施例的方法, 通过终端与服务器交互以获取媒体文件的 分片中的帧内编码帧数据, 从而使得支持 HLS 的终端能够获取与媒体文件 的快速播放状态相应的帧内编码帧数据并进行播放, 由此能够实现媒体文件 的快进或快退播放功能, 并能够提高用户体验质量。
在 S110中, 终端获取基于 HLS协议的媒体文件的快速播放状态。 可选 地, 该快速播放状态包括快进播放状态或快退播放状态。 例如, 终端可以根 据用户选择的快进或快退操作信息, 确定基于 HLS协议的媒体文件的快速 播放状态为快进播放状态或快退播放状态。
应理解, 该快进播放状态或快退播放状态可以用于指示快进或快退播放 的具体倍数。 例如, 快进播放状态包括第一快进播放状态、 第二快进播放状 态和第三快进播放状态, 其中第一快进播放状态指示 2倍数的快进播放, 第 二快进播放状态用于指示 4倍数的快进播放, 第三快进播放状态用于指示 8 倍数的快进播放。
在 S120 中, 终端确定帧内编码帧信息, 该帧内编码帧信息用于指示与 该快速播放状态相应的帧内编码帧的位置。 可选地, 终端确定与该快速播放 状态相应的帧内编码帧信息, 包括: 终端根据该快速播放状态, 确定该帧内 编码帧信息。
可选地, 该帧内编码帧信息包括指示帧内编码帧数据所属的分片的第一 信息,以及指示该帧内编码帧数据在该分片上的字节偏移的第二信息。例如, 该第一信息为分片的名称或标识, 该第二信息为该帧内编码帧数据在该分片 上的具体位置。
应理解, 在本发明实施例中, "与 A相应的 B" 表示 B与 A相关联, 根 据 A可以确定 B。 但还应理解, 根据 A确定 B并不意味着仅仅根据 A确定 B , 还可以根据 A和 /或其它信息确定 B。
应理解, 在本发明实施例中, 帧内编码帧是采用全帧压缩编码的帧, 该 帧内编码帧的生成或解码可以独立于其它类型的帧。 例如, 帧内编码帧可以 为 I帧 (I Frame ), 即内部画面。 还应理解, 基于 HLS协议的媒体文件通常 由多个分片組成, 每个分片可以具有多种码率, 每种码率的分片可以形成一 个独立的传输流(Transport Stream, 简称为 "TS" ) 文件。 并且终端每次下 载分片时, 可以根据当前的网络带宽、 中央处理器(Central Processing Unit, 简称为 "CPU" ) 的负载等因素, 确定下载哪种码率的分片, 从而实现自适 应流媒体播放。
以动态图像专家组(Moving Pictures Experts Grou, 筒称为 "MPEG" ) 视频压缩技术为例进行说明, 一段视频文件可以包括多个 TS文件, 每个 TS 文件可以包括一个或多个图片组( Group of Pictures , 简称为 "GOP" )。 一个 GOP通常包括三类帧, 即 I帧、 B帧和 P帧, 以 I帧为基础可以预测 P帧, 再以 I帧和 P帧可以预测 B帧, 该 P帧又可以称为 "前向预测编码帧 ", 该 B帧又可以称为 "双向预测内插编码帧"。
在本发明实施例中, 可选地, 终端根据与该媒体文件相应的用于描述该 媒体文件的描述文件, 确定该帧内编码帧信息, 其中该描述文件包括该媒体 字节偏移指示了帧内编码帧在相应的分片上的具体位置。 即, 终端可以根据 该快速播放状态以及该描述文件, 确定该帧内编码帧信息。
即, 本发明实施例对与媒体文件相应的描述文件进行了扩展, 使得在描 述文件中, 在媒体文件的每个分片的描述前, 都包括每个分片所包含的所有 帧内编码帧在该分片上的字节偏移信息, 从而使得终端根据描述文件, 获取 期望的帧内编码帧的字节偏移信息, 进而获得相应的帧内编码帧数据。
在本发明实施例中, 可选地, 与基于 HLS协议的媒体文件相应的描述 文件为 M3U8文件。 具体而言, 媒体文件的 M3U8文件例如可以描述为:
#EXTM3U
#EXT-X-TARGETDURATION: 8
#EXT-X-MEDIA-SEQUENCE:2680
#EXTINF:8, Rangebytes=0- 100,500-600, 1200- 1400
http://priv.example.com/fileSequence2680.ts
#EXTINF: 8, Rangebytes=0- 130,520-600,1240-1400
http://priv.example.com/fileSequence2681.ts
#EXTINF:8, Rangeby tes=0- 120,510- 600, 1220- 1400
http:〃 priv.example.com/fileSequence2682.ts。
上述 M3U8文件描述了一个媒体文件包括三个 TS文件, 各 TS文件的 名称分别为 "fileSequence2680"、 "fileSequence2681"和 "fileSequence2682" , 每个 TS文件的播放时间为 8秒。 该 M3U8文件还描述了每个 TS文件中的 帧内编码帧对应的字节偏移, 以及每个 TS文件的统一资源定位符( Uniform Resoure Locator, 简称为 "URL" )。
以名称为 " fileSequence2682,, 的 TS 文件为例进行说明, 其中, "Rangebytes=0- 120,510-600, 1220- 1400" 表示该 TS文件包含 3个帧内编码 帧, 其中, 第一个帧内编码帧对应的字节偏移是 0~120字节 (Byte ), 第二 个帧内编码帧对应的字节偏移是 510~600Byte, 第三个帧内编码帧对应的字 节 偏 移 是 1220~1400Byte , 并 且 该 TS 文 件 的 URL 为 "http:〃 priv.example.com/fileSequence2682.ts"。
例如, 在上述例子中, 假设用户希望快速播放基于 HLS 协议的媒体文 件 A, 于是终端可以根据用户选择的快进操作信息, 获取该媒体文件 A的为 第二快进播放状态的快速播放状态, 该第二快进播放状态指示以 2倍数快进 播放。 终端根据用于描述该媒体文件 A的 M3U8文件以及该第二快进播放 状态, 例如通过计算或查找相应的映射表, 可以确定需要播放名称为 "fileSequence2680" 的 TS文件中的第一个和第三个帧内编码帧, 即确定与 快速播放状态相应的帧内编码帧信息包括的第一信息为 fileSequence2680, 该帧内编码帧信息包括的第二信息为 Range: 0-100和 1200-1400。
应理解, 在本发明实施例中, 终端需要根据快进或快退播放状态, 确定 需要播放的帧内编码帧的间隔数量, 通常而言, 在 GOP长度一定的情况下, 用户选择的快进或快退播放的倍数越大, 终端需要播放的帧内编码帧的间隔 数量越大, 由此终端可以确定该帧内编码帧信息。 该帧内编码帧信息可以包 括用于获取一个帧内编码帧数据的相关信息, 也可以包括用于获取多个帧内 编码帧数据的相关信息。 本发明实施例并不限于此。
在 S130 中, 终端向服务器发送包括该帧内编码帧信息的请求消息。 可 选地, 终端向服务器发送超文本传输协议字节范围 (HTTP Byterange )请求 消息, 该 HTTP Byterange请求消息携带指示终端希望获取的帧内编码帧数 据所属的分片的第一信息, 以及指示该帧内编码帧数据在该分片上的字节偏 移的第二信息, 即该 HTTP Byterange请求消息包括与媒体文件的快速播放 状态相应的帧内编码帧信息。
在 S140 中, 终端接收服务器根据该请求消息发送的应答消息, 该应答 消息包括与该帧内编码帧信息相应的帧内编码帧数据。 可选地, 该应答消息 可以是 HTTP 200 Ok响应消息。应理解, 该帧内编码帧数据可以根据该帧内 编码帧信息确定。 在 S150中, 终端根据该应答消息播放该帧内编码帧数据。
应理解, 当终端通过与服务器的一次或多次交互, 获得并播放与快速播 放状态相应的间隔的帧内编码帧数据时, 就实现了具有 HLS 的媒体文件的 快进或快退播放功能。
因此, 本发明实施例的方法, 通过终端与服务器交互以获取媒体文件的 分片中的帧内编码帧数据, 从而使得支持 HLS 的终端能够获取与媒体文件 的快速播放状态相应的帧内编码帧数据并进行播放, 由此能够实现媒体文件 的快进或快退播放功能, 并能够提高用户体验质量。
上文中结合图 1, 从终端的角度详细描述了根据本发明实施例的播放媒 体文件的方法, 下面将结合图 2, 从服务器的角度描述根据本发明实施例的 方法。
如图 2所示, 根据本发明实施例的播放媒体文件的方法 200包括: S210, 服务器接收终端发送的包括帧内编码帧信息的请求消息, 该帧内 编码帧信息与该终端获取的基于超文本传输协议实时流 HLS 协议的媒体文 件的快速播放状态相应;
S220, 服务器根据该请求消息, 获取与该帧内编码帧信息相应的帧内编 码帧数据;
S230, 服务器向该终端发送包括该帧内编码帧数据的应答消息, 以便于 该终端播放该帧内编码帧数据。
应理解, 在 S210中, 帧内编码帧信息与快速播放状态相应, 意味着帧 内编码帧信息与快速播放状态相关联, 并且根据快速播放状态可以确定帧内 编码帧信息。
可选地, 该帧内编码帧信息由该终端根据与该媒体文件相应的描述文件 而确定, 该描述文件包括该媒体文件的每个分片的所有帧内编码帧在相应的 分片上的字节偏移。 即, 终端可以根据该快速播放状态以及该描述文件, 确 定该帧内编码帧信息。
可选地, 该快速播放状态包括快进播放状态或快退播放状态。 可选地, 该帧内编码帧信息包括指示该帧内编码帧数据所属的分片的第一信息, 以及 指示该帧内编码帧数据在该分片上的字节偏移的第二信息。 可选地, 该请求 消息为超文本传输协议字节范围 ( HTTP Byterange )请求消息。
在本发明实施例中, 可选地, 该帧内编码帧为 I帧。 可选地, 与媒体文 件相应的描述文件为 M3U8文件。 还应理解, 该快进播放状态或快退播放状 态可以用于指示快进或快退播放的具体倍数。
因此, 本发明实施例的方法, 通过终端与服务器交互以获取媒体文件的 分片中的帧内编码帧数据, 从而使得支持 HLS 的终端能够获取与媒体文件 的快速播放状态相应的帧内编码帧数据并进行播放, 由此能够实现媒体文件 的快进或快退播放功能, 并能够提高用户体验质量。
下面将结合图 3, 以终端确定需要播放名称为 "fileSequence2681" 的分 片中的第一个和第三个帧内编码帧数据, 从而实现快进或快退播放功能为 例, 详细说明根据本发明实施例的播放媒体文件的方法。 如图 3所示, 播放 媒体文件的方法 300包括:
S310, 终端获取基于 HLS协议的媒体文件的快速播放状态, 该快速播 放状态例如是快进播放状态或快退播放状态;
S320, 终端可以根据与该媒体文件相应的描述文件, 确定与该快速播放 状态相应的帧内编码帧信息, 该帧内编码帧信息包括的第一信息为 fileSequence2681 ,该帧内编码帧信息包括的第二信息为 Range: bytes=0-130, 1240-1400; 即终端可以根据该描述文件及该快速播放状态, 确定该帧内编 码帧信息;
S330, 终端向 务器发送 HTTP Byterange请求消息, 该请求消息包括 该帧内编码帧信息;
S340, 服务器根据该请求消息, 获取与该帧内编码帧信息相应的帧内编 码帧数据, 即名称为 "fileSequence2681" 的分片中的第一个和第三个帧内编 码帧的数据;
S350, 服务器向终端发送 HTTP 200 OK应答消息, 该应答消息包括与 该帧内编码帧信息相应的帧内编码帧数据;
S360, 终端根据该应答消息, 播放名称为 "fileSequence2681" 的分片中 的第一个和第三个帧内编码帧的数据, 从而能够实现快进或快退播放功能。
应理解,本发明实施例仅以此为例进行说明,本发明实施例并不限于此, 例如, 终端也可以分别获取该第一个和该第三个帧内编码帧的数据。
还应理解, 在本发明的各种实施例中, 上述各过程的序号的大小并不意 味着执行顺序的先后, 各过程的执行顺序应以其功能和内在逻辑确定, 而不 应对本发明实施例的实施过程构成任何限定。 上文中结合图 1至图 3, 详细描述了根据本发明实施例的播放媒体文件 的方法, 下面将结合图 4至图 6, 详细描述根据本发明实施例的装置, 该装 置包括终端、 服务器和系统。
图 4示出了根据本发明实施例的终端 500的示意性框图。 如图 4所示, 该终端 500包括:
获取模块 510,用于获取基于超文本传输协议实时流 HLS协议的媒体文 件的快速播放状态;
确定模块 520, 用于确定与该获取模块 510获取的该快速播放状态相应 的帧内编码帧信息;
发送模块 530, 用于向服务器发送请求消息, 该请求消息包括该确定模 块 520确定的该帧内编码帧信息;
接收模块 540, 用于接收该服务器根据该发送模块 530发送的该请求消 息而发送的应答消息, 该应答消息包括与该帧内编码帧信息相应的帧内编码 帧数据;
播放模块 550, 用于根据该接收模块 540接收的该应答消息, 播放该帧 内编码帧数据。
因此, 本发明实施例的终端, 通过终端与服务器交互以获取媒体文件的 分片中的帧内编码帧数据, 从而使得支持 HLS 的终端能够获取与媒体文件 的快速播放状态相应的帧内编码帧数据并进行播放, 由此能够实现媒体文件 的快进或快退播放功能, 并能够提高用户体验质量。
在本发明实施例中, 可选地, 该确定模块 520确定的该帧内编码帧信息 包括指示该帧内编码帧数据所属的分片的第一信息, 以及指示该帧内编码帧 数据在该分片上的字节偏移的第二信息。
可选地, 该确定模块 520还用于根据与该媒体文件相应的描述文件, 确 定该帧内编码帧信息, 其中该描述文件包括该媒体文件的每个分片的所有帧 内编码帧在相应的分片上的字节偏移。
可选地, 该获取模块 510获取的该快速播放状态包括快进播放状态或快 退播放状态。
可选地, 该发送模块 530发送的该请求消息为超文本传输协议字节范围 ( HTTP Byterange )请求消息。 可选地, 该接收模块 540接收的应答消息为 HTTP 200 OK应答消息。 应理解,根据本发明实施例的终端 500可对应于本发明实施例播^媒体 文件的方法中的终端,并且终端 500中的各个模块的操作和 /或功能,分别为 了实现图 1至图 3中的各个方法 100至 300的相应流程, 为了简洁, 在此不 再赘述。
因此, 本发明实施例的终端, 通过终端与服务器交互以获取媒体文件的 分片中的帧内编码帧数据, 从而使得支持 HLS 的终端能够获取与媒体文件 的快速播放状态相应的帧内编码帧数据并进行播放, 由此能够实现媒体文件 的快进或快退播放功能, 并能够提高用户体验质量。
在本发明实施例中, 还提供了一种服务器, 如图 5所示, 该服务器 600 包括:
接收模块 610, 用于接收终端发送的包括帧内编码帧信息的请求消息, 该帧内编码帧信息与该终端获取的基于超文本传输协议实时流 HLS 协议的 媒体文件的快速播放状态相应;
获取模块 620, 用于根据该接收模块 610接收的该请求消息, 获取与该 帧内编码帧信息相应的帧内编码帧数据;
发送模块 630, 用于向该终端发送包括该获取模块 620获取的该帧内编 码帧数据的应答消息, 以便于该终端播放该帧内编码帧数据。
可选地, 该接收模块 610接收的该帧内编码帧信息由该终端根据与该媒 体文件相应的描述文件而确定, 该描述文件包括该媒体文件的每个分片的所 有帧内编码帧在相应的分片上的字节偏移。
可选地, 该接收模块 610接收的该帧内编码帧信息包括指示该帧内编码 帧数据所属的分片的第一信息, 以及指示该帧内编码帧数据在该分片上的字 节偏移的第二信息。
可选地, 该接收模块 610接收的该请求消息为超文本传输协议字节范围 ( HTTP Byterange )请求消息; 该发送模块 630发送的应答消息为 HTTP 200 OK应答消息。
应理解,根据本发明实施例的服务器 600可对应于本发明实施例播放媒 体文件的方法中的服务器, 并且服务器 600中的各个模块的操作和 /或功能, 分别为了实现图 1至图 3中的各个方法 100至 300的相应流程, 为了简洁, 在此不再赘述。
因此, 本发明实施例的服务器, 通过终端与服务器交互以获取媒体文件 的分片中的帧内编码帧数据, 从而使得支持 HLS 的终端能够获取与媒体文 件的快速播放状态相应的帧内编码帧数据并进行播放, 由此能够实现媒体文 件的快进或快退播放功能, 并能够提高用户体验质量。
图 6 示出了根据本发明实施例的播放媒体文件的系统 900 的示意性框 图。 如图 6所示, 该系统 900包括:
根据本发明实施例的终端 910; 和
根据本发明实施例的服务器 920,
其中, 该终端 910包括:
获取模块, 用于获取基于超文本传输协议实时流 HLS协议的媒体文件 的快速播放状态;
确定模块, 用于确定与该获取模块获取的该快速播放状态相应的帧内编 码帧信息;
发送模块, 用于向服务器发送奇求消息, 该请求消息包括该确定模块确 定的该帧内编码帧信息;
接收模块, 用于接收该服务器根据该发送模块发送的该请求消息而发送 的应答消息, 该应答消息包括与该帧内编码帧信息相应的帧内编码帧数据; 播放模块, 用于根据该接收模块接收的该应答消息, 播放该帧内编码帧 数据;
该服务器 920包括:
接收模块, 用于接收终端发送的包括帧内编码帧信息的请求消息, 该帧 内编码帧信息与该终端获取的基于超文本传输协议实时流 HLS 协议的媒体 文件的快速播放状态相应;
获取模块, 用于根据该接收模块接收的该请求消息, 获取与该帧内编码 帧信息相应的帧内编码帧数据;
发送模块, 用于向该终端发送包括该获取模块获取的该帧内编码帧数据 的应答消息, 以便于该终端播放该帧内编码帧数据。
应理解, 才 据本发明实施例的终端 910和 务器 920, 可以分别对应于 本发明实施例中的终端 500和服务器 600, 并且终端 910和服务器 920中的 各个模块的操作和 /或功能, 分别为了实现图 1至图 3 中的各个方法 100至 300的相应流程, 为了筒洁, 在此不再赘述。
因此, 本发明实施例的系统, 通过终端与服务器交互以获取媒体文件的 分片中的帧内编码帧数据, 从而使得支持 HLS 的终端能够获取与媒体文件 的快速播放状态相应的帧内编码帧数据并进行播放, 由此能够实现媒体文件 的快进或快退播放功能, 并能够提高用户体验质量。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 计算机软件或者二者的结合来实 现, 为了清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能一 般性地描述了各示例的组成及步骤。 这些功能究竟以硬件还是软件方式来执 行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每个 特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超 出本发明的范围。
所属领域的技术人员可以清楚地了解到, 为了描述的方便和筒洁, 上述 描述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对 应过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和 方法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示 意性的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个 系统, 或一些特征可以忽略, 或不执行。 另外, 所显示或讨论的相互之间的 耦合或直接耦合或通信连接可以是通过一些接口、装置或单元的间接耦合或 通信连接, 也可以是电的, 机械的或其它的形式连接。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或 者全部单元来实现本发明实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元 中, 也可以是各个单元单独物理存在, 也可以是两个或两个以上单元集成在 一个单元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用软件 功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销 售或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发明的技术方案本质上或者说对现有技术做出贡献的部分, 或者该技术方 案的全部或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在 一个存储介盾中, 包括若干指令用以使得一台计算机设备(可以是个人计算 机, 服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部 分步骤。 而前述的存储介质包括: U盘、 移动硬盘、 只读存储器 (ROM, Read- Only Memory ), 随机存取存 ^"器 ( RAM, Random Access Memory )、 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到各种等效的修改或替换, 这些修改或替换都应涵盖在本发明的保护范围 之内。 因此, 本发明的保护范围应以权利要求的保护范围为准。

Claims

权利要求
1、 一种播放媒体文件的方法, 其特征在于, 包括:
获取基于超文本传输协议实时流 HLS协议的媒体文件的快速播放状态; 确定与所述快速播放状态相应的帧内编码帧信息;
向服务器发送请求消息, 所述请求消息包括所述帧内编码帧信息; 接收所述服务器根据所述请求消息发送的应答消息, 所述应答消息包括 与所述帧内编码帧信息相应的帧内编码帧数据;
根据所述应答消息, 播放所述帧内编码帧数据。
2、 根据权利要求 1 所述的方法, 其特征在于, 所述确定与所述快速播 放状态相应的帧内编码帧信息, 包括:
根据与所述媒体文件相应的描述文件, 确定所述帧内编码帧信息, 其中 所述描述文件包括所述媒体文件的每个分片的所有帧内编码帧在相应的分 片上的字节偏移。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述帧内编码帧信 息包括指示所述帧内编码帧数据所属的分片的第一信息, 以及指示所述帧内 编码帧数据在所述分片上的字节偏移的第二信息。
4、 根据权利要求 1至 3中任一项所述的方法, 其特征在于, 所述快速 播放状态包括快进播放状态或快退播放状态。
5、 根据权利要求 1至 4中任一项所述的方法, 其特征在于, 所述请求 消息为超文本传输协议字节范围 ( HTTP Byterange )请求消息。
6、 一种播放媒体文件的方法, 其特征在于, 包括:
接收终端发送的包括帧内编码帧信息的请求消息, 所述帧内编码帧信息 与所述终端获取的基于超文本传输协议实时流 HLS协议的媒体文件的快速 播放状态相应;
根据所述请求消息, 获取与所述帧内编码帧信息相应的帧内编码帧数 据;
向所述终端发送包括所述帧内编码帧数据的应答消息, 以便于所述终端 播放所述帧内编码帧数据。
7、 根据权利要求 6所述的方法, 其特征在于, 所述帧内编码帧信息由 所述终端根据与所述媒体文件相应的描述文件而确定, 所述描述文件包括所 帧内编码帧在相应的分片上的字节偏移。
8、 根据权利要求 6或 7所述的方法, 其特征在于, 所述帧内编码帧信 息包括指示所述帧内编码帧数据所属的分片的第一信息, 以及指示所述帧内 编码帧数据在所述分片上的字节偏移的第二信息。
9、 根据权利要求 6至 8中任一项所述的方法, 其特征在于, 所述请求 消息为超文本传输协议字节范围 ( HTTP Byterange )请求消息。
10、 一种终端, 其特征在于, 包括:
获取模块, 用于获取基于超文本传输协议实时流 HLS协议的媒体文件 的快速播放状态;
确定模块, 用于确定与所述获取模块获取的所述快速播放状态相应的帧 内编码帧信息;
发送模块, 用于向服务器发送请求消息, 所述请求消息包括所述确定模 块确定的所述帧内编码帧信息;
接收模块, 用于接收所述服务器根据所述发送模块发送的所述请求消息 而发送的应答消息, 所述应答消息包括与所述帧内编码帧信息相应的帧内编 码帧数据;
播放模块, 用于根据所述接收模块接收的所述应答消息, 播放所述帧内 编码帧数据。
11、 根据权利要求 10所述的终端, 其特征在于, 所述确定模块还用于 根据与所述媒体文件相应的描述文件, 确定所述帧内编码帧信息, 其中所述 描述文件包括所述媒体文件的每个分片的所有帧内编码帧在相应的分片上 的字节偏移。
12、 根据权利要求 10或 11所述的终端, 其特征在于, 所述确定模块确 定的所述帧内编码帧信息包括指示所述帧内编码帧数据所属的分片的第一 信息, 以及指示所述帧内编码帧数据在所述分片上的字节偏移的第二信息。
13、 根据权利要求 10至 12中任一项所述的终端, 其特征在于, 所述获 取模块获取的所述快速播放状态包括快进播放状态或快退播放状态。
14、 根据权利要求 10至 13中任一项所述的终端, 其特征在于, 所述发 送模块发送的所述请求消息为超文本传输协议字节范围 ( HTTP Byterange ) 请求消息。
15、 一种服务器, 其特征在于, 包括:
接收模块, 用于接收终端发送的包括帧内编码帧信息的请求消息, 所述 帧内编码帧信息与所述终端获取的基于超文本传输协议实时流 HLS 协议的 媒体文件的快速播放状态相应;
获取模块, 用于根据所述接收模块接收的所述请求消息, 获取与所述帧 内编码帧信息相应的帧内编码帧数据;
发送模块, 用于向所述终端发送包括所述获取模块获取的所述帧内编码 帧数据的应答消息, 以便于所述终端播放所述帧内编码帧数据。
16、 根据权利要求 15所述的服务器, 其特征在于, 所述接收模块接收 的所述帧内编码帧信息由所述终端根据与所述媒体文件相应的描述文件而 的分片上的字节偏移。
17、 根据权利要求 15或 16所述的服务器, 其特征在于, 所述接收模块 接收的所述帧内编码帧信息包括指示所述帧内编码帧数据所属的分片的第 一信息, 以及指示所述帧内编码帧数据在所述分片上的字节偏移的第二信 息。
18、 根据权利要求 15至 17中任一项所述的服务器, 其特征在于, 所述 接收模块接收的所述请求消息为超文本传输协议字节范围 ( HTTP Byterange )请求消息。
19、 一种播放媒体文件的系统, 其特征在于, 包括:
根据权利要求 10至 14中任一项所述的终端; 和
根据权利要求 15至 18中任一项所述的服务器。
PCT/CN2011/082295 2011-11-16 2011-11-16 播放媒体文件的方法、终端、服务器和系统 WO2012167558A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN2011800032219A CN102550038A (zh) 2011-11-16 2011-11-16 播放媒体文件的方法、终端、服务器和系统
PCT/CN2011/082295 WO2012167558A1 (zh) 2011-11-16 2011-11-16 播放媒体文件的方法、终端、服务器和系统
US14/136,244 US20140109156A1 (en) 2011-11-16 2013-12-20 Method, terminal, server and system for playing media file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2011/082295 WO2012167558A1 (zh) 2011-11-16 2011-11-16 播放媒体文件的方法、终端、服务器和系统

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/136,244 Continuation US20140109156A1 (en) 2011-11-16 2013-12-20 Method, terminal, server and system for playing media file

Publications (1)

Publication Number Publication Date
WO2012167558A1 true WO2012167558A1 (zh) 2012-12-13

Family

ID=46353971

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/082295 WO2012167558A1 (zh) 2011-11-16 2011-11-16 播放媒体文件的方法、终端、服务器和系统

Country Status (3)

Country Link
US (1) US20140109156A1 (zh)
CN (1) CN102550038A (zh)
WO (1) WO2012167558A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113038170A (zh) * 2021-03-01 2021-06-25 北京四达时代软件技术股份有限公司 直播hls数据生成方法及装置、处理方法及装置和控制系统

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9270991B2 (en) * 2013-01-07 2016-02-23 Qualcomm Incorporated Inter-layer reference picture generation for HLS-only scalable video coding
CN103051976B (zh) * 2013-01-22 2016-02-10 中兴通讯股份有限公司 一种cdn分发hls内容方法、系统及设备
CN103986978A (zh) * 2014-04-14 2014-08-13 曦威胜科技开发(深圳)有限公司 在HLS协议中扩展实现快进快退及精确Seek的方法
US20150350622A1 (en) 2014-05-30 2015-12-03 Apple Inc. Packed i-frames
CN105187918A (zh) * 2015-07-21 2015-12-23 浪潮软件集团有限公司 一种基于hls协议点播系统中使用缩略图实现快进的方法
CN106612462B (zh) * 2015-10-26 2021-02-19 中兴通讯股份有限公司 快进快退的处理方法及终端
CN107087214A (zh) * 2016-02-16 2017-08-22 中国电信股份有限公司 实现流媒体内容倍速播放的方法、客户端及系统
CN105847941B (zh) * 2016-03-17 2019-02-19 央广视讯传媒股份有限公司 一种基于hls协议的音视频流直播方法
CN107426629B (zh) * 2017-06-19 2020-06-23 网宿科技股份有限公司 一种流媒体文件处理方法及直播系统
CN110149560B (zh) * 2019-06-05 2021-11-16 亦非云互联网技术(上海)有限公司 基于hls协议的播放器优化方法及系统、存储介质及终端
CN114640711B (zh) * 2020-12-15 2023-08-01 深圳Tcl新技术有限公司 一种tlv数据包的推送方法、智能终端及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873820A (zh) * 2006-05-18 2006-12-06 北京中星微电子有限公司 视频文件处理方法、视频索引方法和视频索引装置
CN101018323A (zh) * 2007-02-08 2007-08-15 华为技术有限公司 一种快进快退播放视频数据的方法和流媒体服务器
CN101980533A (zh) * 2010-11-12 2011-02-23 中国华录集团有限公司 一种基于索引文件实现传输流文件特技模式功能的方法
CN102055717A (zh) * 2009-11-09 2011-05-11 华为技术有限公司 快速播放的方法、终端及服务器

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060037057A1 (en) * 2004-05-24 2006-02-16 Sharp Laboratories Of America, Inc. Method and system of enabling trick play modes using HTTP GET
US8856283B2 (en) * 2011-06-03 2014-10-07 Apple Inc. Playlists for real-time or near real-time streaming

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1873820A (zh) * 2006-05-18 2006-12-06 北京中星微电子有限公司 视频文件处理方法、视频索引方法和视频索引装置
CN101018323A (zh) * 2007-02-08 2007-08-15 华为技术有限公司 一种快进快退播放视频数据的方法和流媒体服务器
CN102055717A (zh) * 2009-11-09 2011-05-11 华为技术有限公司 快速播放的方法、终端及服务器
CN101980533A (zh) * 2010-11-12 2011-02-23 中国华录集团有限公司 一种基于索引文件实现传输流文件特技模式功能的方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113038170A (zh) * 2021-03-01 2021-06-25 北京四达时代软件技术股份有限公司 直播hls数据生成方法及装置、处理方法及装置和控制系统
CN113038170B (zh) * 2021-03-01 2022-05-13 北京四达时代软件技术股份有限公司 直播hls数据生成方法及装置、处理方法及装置和控制系统

Also Published As

Publication number Publication date
US20140109156A1 (en) 2014-04-17
CN102550038A (zh) 2012-07-04

Similar Documents

Publication Publication Date Title
WO2012167558A1 (zh) 播放媒体文件的方法、终端、服务器和系统
US10368075B2 (en) Clip generation based on multiple encodings of a media stream
JP6027291B1 (ja) メディアストリーミング中の適応セット間の切替え
CA2965484C (en) Adaptive bitrate streaming latency reduction
JP5899334B2 (ja) 適応性のあるトリックプレイストリーミング
KR101737325B1 (ko) 멀티미디어 시스템에서 멀티미디어 서비스의 경험 품질 감소를 줄이는 방법 및 장치
US20160240205A1 (en) Audio splitting with codec-enforced frame sizes
WO2015051755A1 (zh) 多媒体文件播放方法、系统、云转码服务设备及存储介质
TW201138471A (en) Streaming encoded video data
WO2016182844A1 (en) Transferring media data using a websocket subprotocol
TW201230743A (en) Manifest file updates for network streaming of coded video data
US10958972B2 (en) Channel change method and apparatus
JP2015136060A (ja) 通信装置、通信データ生成方法、および通信データ処理方法
WO2011000253A1 (zh) 一种媒体流处理方法及通讯系统以及相关设备
US11128897B2 (en) Method for initiating a transmission of a streaming content delivered to a client device and access point for implementing this method
KR20200109359A (ko) 비디오 스트리밍
WO2011120204A1 (en) Methods, apparatuses and computer program products for pausing video streaming content
WO2007005194A1 (en) Apparatuses and methods for delivering data stream content to consumer devices
JP2016059037A (ja) 少なくとも2つの連続するセグメントに分離されたマルチメディアコンテンツを受信するための方法およびクライアント端末、ならびに対応するコンピュータプログラム製品およびコンピュータ可読媒体
WO2016077072A1 (en) Delivering partially received segments of streamed media data
WO2024109872A1 (zh) 一种视频监控播放方法和系统
CN106464738B (zh) 用于操作网络设备的方法及相应的网络设备
JP2014090419A (ja) 通信パラメータに従ってコンテンツをダウンロードするための方法、および、関連するコンテンツ受信機
US8811478B2 (en) Data transmission method and apparatus
WO2012079428A1 (zh) 快速接入组播组的同步方法、同步装置和终端

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180003221.9

Country of ref document: CN

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

Ref document number: 11867118

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

Country of ref document: EP

Kind code of ref document: A1