WO2017092330A1 - 一种基于播放器的播放方法及装置 - Google Patents

一种基于播放器的播放方法及装置 Download PDF

Info

Publication number
WO2017092330A1
WO2017092330A1 PCT/CN2016/089258 CN2016089258W WO2017092330A1 WO 2017092330 A1 WO2017092330 A1 WO 2017092330A1 CN 2016089258 W CN2016089258 W CN 2016089258W WO 2017092330 A1 WO2017092330 A1 WO 2017092330A1
Authority
WO
WIPO (PCT)
Prior art keywords
player
target slice
slice
buffer
event
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2016/089258
Other languages
English (en)
French (fr)
Inventor
崔建勇
郑吉剑
曹虹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Le Holdings Beijing Co Ltd
Leshi Zhixin Electronic Technology Tianjin Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
Leshi Zhixin Electronic Technology Tianjin Co Ltd
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 Le Holdings Beijing Co Ltd, Leshi Zhixin Electronic Technology Tianjin Co Ltd filed Critical Le Holdings Beijing Co Ltd
Priority to US15/245,938 priority Critical patent/US20170163703A1/en
Publication of WO2017092330A1 publication Critical patent/WO2017092330A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/231Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion
    • H04N21/23106Content storage operation, e.g. caching movies for short term storage, replicating data over plural servers, prioritizing data for deletion involving caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/10Architectures or entities
    • H04L65/1059End-user terminal functionalities specially adapted for real-time communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/70Admission control; Resource allocation
    • H04L47/72Admission control; Resource allocation using reservation actions during connection setup
    • H04L47/722Admission control; Resource allocation using reservation actions during connection setup at the destination endpoint, e.g. reservation of terminal resources or buffer space
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/612Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/613Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for the control of the source by the destination
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/70Media network packetisation
    • 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/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays
    • 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/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content
    • H04N21/47217End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content for controlling playback functions for recorded or on-demand content, e.g. using progress bars, mode or play-point indicators or bookmarks
    • 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/84Generation or processing of descriptive data, e.g. content descriptors
    • 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 streaming media technologies, and in particular, to a player-based playback method and a player device.
  • the seek function is a basic function of the player. Through the seek function, you can adjust the playback progress of the player, that is, you can adjust the playback position of the streaming media. For example, by fast forward or rewind, you can skip content that the user is not currently interested in.
  • streaming media such as video and audio are transmitted by using streaming media technology (ie, streaming media technology), that is, data packets are transmitted through a transport stream (Transfer Stream, TS).
  • TS Transport Stream
  • the TS packet is usually called TS segment or TS slice.
  • streaming media source data exists in the form of TS slices, and multiple TS slices constitute one streaming media source data.
  • the player can adjust the playback progress and change the playback position for playing the streaming media. Since the player needs to start from the first frame of the TS slice, it searches for the key frame closest to the time point determined by the seek event, and it takes time to find the key frame, which causes the player to not start quickly. Therefore, in the process of adjusting the playback progress, the player has a problem that the broadcasting efficiency is low.
  • the technical problem to be solved by the embodiments of the present invention is to provide a player-based playing method.
  • the problem of low efficiency of the player due to the search for key frames is avoided, and the playback efficiency of the player is improved.
  • the embodiment of the invention further provides a player device for ensuring implementation and application of the above method.
  • the embodiment of the present invention discloses a player-based playing method, including:
  • the player is monitored to generate a search event of the player
  • the streaming media is played from the buffered data of the target slice.
  • an embodiment of the present invention further discloses a player device, including:
  • the event generation module is configured to monitor the player during the process of playing the streaming media to generate a search event of the player
  • a target slice determining module configured to determine a target slice of the streaming media according to the search event, and obtain buffered data of the target slice;
  • a playing module configured to start playing the streaming media from the buffered data of the target slice.
  • Embodiments of the present invention provide a computer program comprising computer readable code that, when executed on an electronic device, causes the electronic device to perform the player-based playback method described above.
  • Embodiments of the present invention provide a computer readable medium in which the above computer program is stored.
  • An embodiment of the present invention provides an electronic device, including:
  • One or more processors are One or more processors;
  • a memory for storing processor executable instructions
  • processor is configured to:
  • the player is monitored to generate a search event of the player
  • the streaming media is played from the buffered data of the target slice.
  • the embodiments of the invention include the following advantages:
  • the player listens to the player, generates a search event of the player, and determines the target slice according to the search event, and starts to buffer data of the target slice by jumping to the buffer data of the target slice.
  • the streaming media is played, so that the player does not need to find key frames when adjusting the playing progress, thereby avoiding the problem of wasting time due to finding key frames, improving the launching efficiency of the player and saving time.
  • FIG. 1 is a flow chart showing the steps of an embodiment of a player-based playing method according to the present invention
  • FIG. 2 is a flow chart showing the steps of a preferred embodiment of a player-based playback method of the present invention
  • 3A is a structural block diagram of an embodiment of a player device of the present invention.
  • 3B is a structural block diagram of a preferred embodiment of a player device of the present invention.
  • Figure 4 schematically shows a block diagram of an electronic device for performing the method according to the invention
  • Fig. 5 schematically shows a storage unit for holding or carrying program code implementing the method according to the invention.
  • the player plays the video, and needs to obtain the data of the video, such as a playlist (Playlist), TS slice, and the like of the video.
  • the playlist organizes the sequence of the TS slices of the video.
  • the player requests the address of the network video source by sending a data request to the server, that is, requesting the source data.
  • the server responds to the data request, and feeds back related data of the network video to the player, so that the player can play the network video.
  • the server is a Hyper Text Transfer Protocol (HTTP) server
  • HTTP Hyper Text Transfer Protocol
  • the client's player and server can transfer data.
  • the transmitted data is the TS slice. After the player gets the data, it plays.
  • the user does not have too high a requirement for the accuracy of the player after adjusting the playback progress.
  • the user has higher requirements on the launching efficiency of the player. Therefore, after adjusting the play position, the player needs to start up quickly, that is, it is necessary to improve the launching efficiency of the player.
  • One of the core concepts of the embodiment of the present invention is that the player determines the target slice by searching for the event, and starts playing the streaming media from the buffered data of the target slice, that is, jumps to the target slice, directly from the The buffered data of the target slice starts to play, and it is not necessary to find the key frame closest to the time point determined by the search event, thereby avoiding the problem of wasted time due to finding the key frame, and improving the launching efficiency of the player.
  • FIG. 1 a flow chart of a step of an embodiment of a player-based playing method of the present invention is shown.
  • the figure may specifically include the following steps:
  • step 101 during playback of the streaming media, the player is monitored to generate a search event of the player.
  • Streaming media that is, streaming media
  • streaming media may specifically refer to continuous time-based media, such as audio, video or multimedia files, using streaming technology in the Internet or an intranet.
  • the player can play the streaming media, such as playing the video through the video player, playing the music through the audio player, playing the network video through the web player, etc., which is not limited in this embodiment of the present invention.
  • the embodiments of the present invention are described in detail below by taking video as an example, but should not be construed as limiting the embodiments of the present invention.
  • a system such as an Android system can detect a user's operation command on the player, that is, can monitor the running player. .
  • the user wants the player to skip playing the video content that is not currently of interest to him, he can adjust the playback position of the player by fast-forward operation and/or fast-rewind operation, such as fast-forwarding to its designated playback position, and the player responds.
  • the user's fast forward operation generates a fast forward operation command.
  • the captured player event may be analyzed to determine the playback time point corresponding to the player event, and the determined play time point is used as the start time after adjusting the playback progress. Point, generate a search event for the player, such as the generator function seek().
  • Step 103 Determine, according to the search event, a target slice of the streaming media, and acquire buffered data of the target slice.
  • the player may search for a playlist corresponding to the currently played video according to the search event, determine a TS slice corresponding to the search event, and use the TS slice corresponding to the search event as the target slice of the video.
  • the video being played contains multiple TS slices (such as 20), which can be labeled as slice 1, slice 2, slice 3, etc. in the playlist, and so on, and mark the playback order and playback of each slice.
  • the time, such as the length of the video playback time is 30 minutes, wherein the playback time of the slice 1 of the video is 1 to 10 seconds, the playback time of the slice 2 is 11 to 22, and the playback time of the slice 2 is ⁇ And so on, until all TS slices are marked, that is, the playlist is a complete video playlist.
  • the playback time of slice 1 is 1 to 10 seconds, and the playback time of slice 2 is 11 to 22. It can indicate that the player plays slice 1 in the first 10 seconds after the start of playback, and finishes slice 1 at the 10th second. Then play slice 2, that is, at the 11th second, start playing. Slice 2.
  • the search event seekto (00:10:30) is monitored, where "00:10:30" indicates that the search time of the search event seekto() is 10 minutes and 30 seconds, that is, 630 seconds.
  • the playback time of slice 9 is 626 to 640 seconds, that is, the playback time of the ninth slice of the video is from 626 seconds to 640 seconds.
  • the slice to which the search event seekto (00:10:30) starts to play for 630 seconds is slice 9, that is, the TS slice corresponding to the search event seekto (00:10:30) is slice 9, and the slice is sliced. 9 as a target slice.
  • the buffer data of the target slice can be obtained, the playback progress of the player is adjusted, and the video is continuously played.
  • the acquiring, by the player, the buffered data of the target video may include: determining whether the buffer of the target slice exists in the buffer of the player; and when the buffer data of the target slice does not exist in the buffer, performing the target slice Downloading, generating buffer data of the target slice, and saving the buffer data; when the buffer has buffer data of the target slice, acquiring buffer data of the target slice from the buffer.
  • Step 105 Play the streaming media from the buffered data of the target slice.
  • the player can obtain buffered data from the head of the target slice to play the video.
  • the TS slice contains multiple frames, and the first frame of the TS slice is a key frame.
  • the player can start from the first frame of the target slice, that is, jump to the position corresponding to the first frame, and directly acquire buffered data from the position corresponding to the first frame to play the video.
  • the ninth slice is acquired, and the player plays the video from the first frame of the slice 9, that is, the video is played directly from the position of 626 seconds.
  • the playback duration of each slice corresponding to the streaming media is usually relatively short, so starting from the slice does not have much impact on the user, that is, the player can directly jump to the first frame of the target slice when adjusting the playback progress.
  • the video is played from the first frame, and it is not necessary to find the key frame closest to 630 seconds, that is, it is not necessary to find a key frame closest to the time point determined by the search event, thereby avoiding the problem of wasting time due to finding the key frame. Improve the efficiency of starting and broadcasting.
  • the embodiment of the present invention In the process of playing the streaming media, the embodiment of the present invention generates a search event of the player by monitoring the player, and determines a target slice according to the search event, and starts buffer data of the target slice by jumping to the buffer data of the target slice.
  • the streaming media is played, so that the player does not need to find key frames when adjusting the playing progress, thereby avoiding the problem of wasting time due to finding key frames, improving the launching efficiency of the player, saving time, thereby improving the user.
  • the embodiment of the present invention generates a search event of the player by monitoring the player, and determines a target slice according to the search event, and starts buffer data of the target slice by jumping to the buffer data of the target slice.
  • the streaming media is played, so that the player does not need to find key frames when adjusting the playing progress, thereby avoiding the problem of wasting time due to finding key frames, improving the launching efficiency of the player, saving time, thereby improving the user.
  • FIG. 2 a flow chart of steps of a preferred embodiment of a player-based playback method of the present invention is shown. Specifically, the method may include the following steps:
  • Step 201 During the process of playing the streaming media, the player is monitored to generate a search event of the player.
  • the user can change the playback position of the player by dragging the cursor on the progress bar of the player.
  • the user can also adjust the playback progress of the player through controls such as fast forward control, fast rewind control, etc., for example, by rewinding the control, the player is quickly retracted to the playback position of the video content of interest.
  • the player is monitored to generate a search event of the player, which may include: capturing a sliding cursor event of the player and analyzing when the fast forward or fast reverse operation command is monitored, Determining the play time point pointed by the cursor on the play progress bar; or capturing the player's control trigger event and analyzing, determining the play time point corresponding to the control trigger event; using the play time point as the start broadcast At the point in time, a search event is generated.
  • the user can change the playback position of the player by performing operations on the player such as a fast forward operation and a fast reverse operation.
  • the system automatically generates an operation command in response to the user's operation, such as generating a fast forward operation command in response to the fast forward operation and a fast reverse operation command in response to the fast reverse operation.
  • the fast forward or operation command it can be determined whether the user's operation is a drag and drop progress bar, such as dragging the cursor on the progress bar of the player. If yes, capture the slider cursor event of the player, analyze the sliding cursor event, and obtain the position information of the cursor staying on the playback progress bar after sliding. Based on the position information and the length of the progress bar, it is possible to determine the play time point that the cursor points to on the play progress bar after sliding.
  • the sliding cursor event can be generated according to the operation of the user dragging the progress bar. For example, suppose the progress of the player is usually 10 (cm), and it takes 30 minutes to play the currently played video.
  • the user slides the cursor to the position 1 from the start position of the progress bar, that is, the position information acquired by the system is 1 ( Cm), generates a sliding cursor event.
  • the playing time point pointed by the cursor staying on the playing progress bar is the 180th second, so that the playing time point, that is, the 180th second, can be used as the starting time point after adjusting the playing progress to generate a search event. Seekto (00:03:00).
  • the player's operation is to trigger the operation of the player control such as clicking the fast forward play control. If yes, capture the player's control trigger event, analyze the captured control trigger event, and determine the broadcast corresponding to the control trigger event. At the time point, the playing time point is used as a starting time point after adjusting the playing progress, and a search event is generated. Among them, the player's control trigger event is automatically generated according to the user's operation on the control.
  • Step 203 Determine, according to the searching event, a target slice of the streaming media.
  • the above step 203 may include the following sub-steps:
  • Sub-step 2031 searching for a playlist corresponding to the streaming media, and determining a slice corresponding to the starting time point in the search event.
  • the player may determine the TS slice to which the broadcast time point belongs in the search event by searching the playlist corresponding to the currently played video.
  • the TS slice to which the starting time point belongs is equivalent to the slice corresponding to the starting time point in the search event.
  • Sub-step 2032 the slice is taken as the target slice.
  • the TS slice corresponding to the starting time point can be used as the target slice, thereby adjusting the playback position of the player.
  • the specific adjustment process will be described later.
  • Step 205 Determine whether the buffer of the target slice exists in the buffer of the player.
  • the player acquires buffered data of the TS slice from the buffer to play the video.
  • the target slice needs to be downloaded, and the buffer data of the target slice is generated, that is, step 207 is performed.
  • the buffer data of the target slice already exists in the player, the buffer data of the target slice can be directly obtained from the buffer, that is, the process proceeds to step 209, and step 209 is directly executed.
  • Step 207 Download the target slice, generate buffer data of the target slice, and save the buffer in the buffer.
  • the player may generate a network request for downloading the target slice according to the playlist, and send a network request to the server. After the server responds to the network request, the player can obtain the target slice from the server, that is, download the target slice.
  • downloading the target slice may include the following sub-steps:
  • Sub-step 2071 based on the playlist, determining offset information corresponding to the target slice.
  • the playlist of the video can save the offset information of the TS slice of the video, such as the sort information range.
  • the offset information corresponding to the target slice such as the offset address, the offset duration, and the like, can be extracted in the play column.
  • the offset address refers to the TS slice of the video relative to the The offset position corresponding to the start address of the video
  • the offset duration refers to the offset bit time corresponding to the start playback time point of the video at the TS slice start playback time point of the video.
  • Sub-step 2073 using the offset information, generates a network request.
  • Sub-step 2075 downloading a target slice from the server based on the network request.
  • the player generates the network request by using the offset information, that is, the generated network request includes the offset information corresponding to the target slice.
  • the target slice can be found from the server to obtain the target slice.
  • the player generates a network request such as a seek request using the offset location of the target slice.
  • the offset position contained in the seek request can ensure that the location of the target slice can be requested when requesting data, that is, according to the offset position included in the seek request, the position corresponding to the target slice can be found, and the location of the target slice is obtained.
  • TS slice of the video In this way, the player can download the TS slice to the video, ie download the target slice from the server.
  • the target slice After downloading the target slice, the target slice is parsed by the parser, and the buffered data of the target slice can be generated.
  • the player can cache the buffered data, saving the generated buffered data in a buffer.
  • Step 209 Acquire buffer data of the target slice from the buffer.
  • the player can extract the buffered data of the target slice from the buffer, and then perform playback on the video.
  • Step 211 Play the streaming media from the buffered data of the target slice.
  • step 211 may include the following sub-steps:
  • Sub-step 2111 finding a buffer of the player, and determining a position corresponding to the first frame of the target slice.
  • the buffer of the player is searched, and when the buffered data of the target slice is found, that is, when the buffered data corresponding to the first frame of the target slice is found, the position of the first frame of the target slice in the buffer may be determined. That is, the position corresponding to the first frame of the target slice is determined.
  • Sub-step 2113 jump to the position corresponding to the first frame, start acquiring buffered data from the location, and play the streaming media.
  • the player jumps to the position corresponding to the first frame of the target slice, directly obtains the buffered data from the position corresponding to the first frame, and plays the video, thereby avoiding searching for the time determined by the search event.
  • Pointing on the most recent key frame causes the player to have a long broadcast time, which improves the player's launching efficiency, saves time, and improves the user experience.
  • FIG. 3A a structural block diagram of an embodiment of a player device according to the present invention is shown, which may specifically include the following modules:
  • the search event generating module 301 is configured to monitor the player during the playing of the streaming media to generate a search event of the player.
  • the target slice determining module 303 is configured to determine a target slice of the streaming media according to the search event, and acquire buffered data of the target slice.
  • the playing module 305 is configured to start playing the streaming media from the buffered data of the target slice.
  • the search event generation module 301 can include an event capture sub-module 3011 and a lookup event generation sub-module 3013, see FIG. 3B.
  • the event capture sub-module 3011 can be configured to capture a slide cursor event of the player and analyze the cursor when the fast forward or fast reverse operation command is monitored, and determine a play time point that the cursor points to on the play progress bar after sliding; or The capture player's control triggers the event and analyzes it to determine the playback time point corresponding to the control's trigger event.
  • the search event generation sub-module 3013 can be configured to generate the search event by using the play time point as the start time point.
  • the target slice determining module 303 may include a slice lookup submodule 3031 and a target slice determining submodule 3033.
  • the slice search sub-module 3031 may be configured to search for a playlist corresponding to the streaming media, and determine a slice corresponding to a start time point in the search event.
  • a target slice determination sub-module 3033 can be used to use the slice as the target slice.
  • the target slice determining module 303 may further include the following submodules:
  • the buffer data judging sub-module 3035 is configured to determine whether the buffer of the target slice exists in the buffer of the player.
  • the target slice downloading sub-module 3037 is configured to download the target slice when the buffered data of the target slice does not exist in the buffer, generate buffered data of the target slice, and save the buffered data in the buffer.
  • the target slice downloading submodule 3037 may include: an offset information determining unit 30371, a network request generating unit 30373, and a target slice downloading unit 30375.
  • the offset information determining unit 30371 is configured to determine offset information corresponding to the target slice based on the playlist.
  • the network request generating unit 30373 is configured to generate a network request by using the offset information.
  • the target slice download unit 30375 is configured to download the target slice from the server based on the network request.
  • the buffered data acquisition sub-module 3039 is configured to acquire buffered data of the target slice from the buffer when the buffer has the buffered data of the target slice.
  • the play module 305 can include the following sub-modules:
  • the location determining sub-module 3051 is configured to find a buffer of the player, and determine a location corresponding to the first frame of the target slice.
  • the jump sub-module 3053 is configured to jump to a location corresponding to the first frame, obtain buffer data from the location, and play the streaming media.
  • the embodiment of the present invention In the process of playing the streaming media, the embodiment of the present invention generates a search event of the player by monitoring the player, and determines a target slice according to the search event, and starts buffer data of the target slice by jumping to the buffer data of the target slice.
  • the streaming media is played, so that the player does not need to find key frames when adjusting the playing progress, thereby avoiding the problem of wasting time due to finding key frames, improving the launching efficiency of the player, saving time, thereby improving the user.
  • the embodiment of the present invention generates a search event of the player by monitoring the player, and determines a target slice according to the search event, and starts buffer data of the target slice by jumping to the buffer data of the target slice.
  • the streaming media is played, so that the player does not need to find key frames when adjusting the playing progress, thereby avoiding the problem of wasting time due to finding key frames, improving the launching efficiency of the player, saving time, thereby improving the user.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • embodiments of the embodiments of the invention may be provided as a method, apparatus, or computer program product.
  • embodiments of the invention may be in the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
  • embodiments of the invention may take the form of a computer program product embodied on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • Figure 4 illustrates an electronic device in accordance with the present invention.
  • the electronic device conventionally includes a processor 410 and a computer program product or computer readable medium in the form of a memory 420.
  • the memory 420 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, a hard disk, or a ROM.
  • Memory 420 has a memory space 430 for program code 431 for performing any of the method steps described above.
  • storage space 430 for program code may include various program code 431 for implementing various steps in the above methods, respectively.
  • the program code can be read from or written to one or more computer program products.
  • These computer program products include program code carriers such as hard disks, compact disks (CDs), memory cards or floppy disks.
  • Such computer program products are typically portable or fixed storage units as described with reference to FIG.
  • the storage unit may have a storage section, a storage space, and the like arranged similarly to the memory 420 in the electronic device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes computer readable code 431', ie, code readable by a processor, such as 410, that when executed by an electronic device causes the electronic device to perform each of the methods described above step.
  • Embodiments of the invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor or other programmable data processing terminal device to produce a machine such that instructions are executed by a processor of a computer or other programmable data processing terminal device
  • Means are provided for implementing the functions specified in one or more of the flow or in one or more blocks of the flow chart.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal 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 instruction device implements the functions specified in one or more blocks of the flowchart or in a flow or block of the flowchart.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

本发明实施例提供了一种基于播放器的播放方法和一种播放器装置,该方法包括:在播放流媒体的过程中,对播放器进行监听,生成播放器的查寻事件;依据所述查寻事件,确定所述流媒体的目标切片,以及获取所述目标切片的缓冲数据;从所述目标切片的缓冲数据开始对所述流媒体进行播放。本发明实施例通过跳转至目标切片的缓冲数据,直接从该目标切片的缓冲数据开始,对所述流媒体进行播放,使得播放器在调整播放进度时无需查找关键帧,避免由于查找关键帧而导致时间浪费的问题,提高了播放器的起播效率,节省时间。

Description

一种基于播放器的播放方法及装置
本申请要求在2015年12月3日提交中国专利局、申请号为201510885362.8、发明名称为“一种基于播放器的播放方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及流媒体技术领域,特别是涉及一种基于播放器的播放方法和一种播放器装置。
背景技术
随着网络技术的快速发展,播放器的普及越来越快,其功能也越来越丰富。其中,查寻(seek)功能是播放器的一种基本功能。通过seek功能,可以调整播放器的播放进度,即是可以调整对流媒体进行播放的播放位置,如通过行快进或快退操作,可以越过用户当前不感兴趣的内容。
发明人在实现本发明的过程中发现,目前,流媒体如视频、音频等采用流式媒体技术(即流媒体技术)进行传输,即是通过传输流(Transfer Stream,TS)的数据包进行传输。其中,TS的数据包通常被称为TS段或者TS切片。简单而言,流媒体源数据是以TS切片的形式存在,多个TS切片组成一个流媒体源数据。在播放过程中,当检测到seek事件时,播放器需要seek到离seek事件的时间点最近的一个关键帧。具体来说,播放器需要在seek事件所确定的时间点所属的TS切片中,查寻离该时间点最近的一个关键帧。在找到关键帧后,播放器才可以调整播放进度,改变对流媒体进行播放的播放位置。由于播放器需要从TS切片的第一帧开始,查找离seek事件所确定的时间点最近的关键帧,且查找关键帧比较耗时,导致播放器不能快速起播。因此,在调整播放进度的过程中,播放器存在起播效率低的问题。
发明内容
本发明实施例所要解决的技术问题是提供一种基于播放器的播放方法, 避免由于查找关键帧而导致播放器的起播效率低的问题,提高了播放器的起播效率。
相应的,本发明实施例还提供了一种播放器装置,用以保证上述方法的实现及应用。
为了解决上述问题,本发明实施例公开了一种基于播放器的播放方法,包括:
在播放流媒体的过程中,对播放器进行监听,生成播放器的查寻事件;
依据所述查寻事件,确定所述流媒体的目标切片,以及获取所述目标切片的缓冲数据;
从所述目标切片的缓冲数据开始对所述流媒体进行播放。
相应的,本发明实施例还公开了一种播放器装置,包括:
查寻事件生成模块,用于在播放流媒体的过程中,对播放器进行监听,生成播放器的查寻事件;
目标切片确定模块,用于依据所述查寻事件,确定所述流媒体的目标切片,以及获取所述目标切片的缓冲数据;
播放模块,用于从所述目标切片的缓冲数据开始对所述流媒体进行播放。
本发明实施例提供一种计算机程序,其包括计算机可读代码,当所述计算机可读代码在电子装置上运行时,导致所述电子装置执行上述的基于播放器的播放方法。
本发明实施例提供一种计算机可读介质,其中存储了上述的计算机程序。
本发明实施例提供一种电子装置,包括:
一个或多个处理器;
用于存储处理器可执行指令的存储器;
其中,所述处理器被配置为:
在播放流媒体的过程中,对播放器进行监听,生成播放器的查寻事件;
依据所述查寻事件,确定所述流媒体的目标切片,以及获取所述目标切片的缓冲数据;
从所述目标切片的缓冲数据开始对所述流媒体进行播放。
与现有技术相比,本发明实施例包括以下优点:
本发明实施例在播放流媒体的过程中,通过监听播放器,生成播放器的查寻事件,以及依据查寻事件确定目标切片,通过跳转至目标切片的缓冲数据,从该目标切片的缓冲数据开始,对所述流媒体进行播放,使得播放器在调整播放进度时无需查找关键帧,避免由于查找关键帧而导致时间浪费的问题,提高了播放器的起播效率,节省时间。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明的一种基于播放器的播放方法实施例的步骤流程图;
图2是是本发明的一种基于播放器的播放方法优选实施例的步骤流程图;
图3A是本发明的一种播放器装置实施例的结构框图;
图3B是本发明的一种播放器装置优选实施例的结构框图;
图4示意性地示出了用于执行根据本发明的方法的电子装置的框图;以及
图5示意性地示出了用于保持或者携带实现根据本发明的方法的程序代码的存储单元。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于 本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
播放器对视频进行播放,需要获取到该视频的数据,如该视频的播放列表(Playlist)、TS切片等。其中,该播放列表组织了该视频的各TS切片的先后顺序。以播放网络视频为例,播放器通过向服务器发送数据请求,请求该网络视频源的地址,即请求源数据。服务器响应该数据请求,将该网络视频的有关数据反馈给播放器,使得播放器可以对该网络视频进行播放。通常,服务器是一个超文本传输协议(HTTP,Hyper Text Transfer Protocol)服务器时,请求过程需要遵循HTTP握手的三个环节。
第一次握手:客户端的播放器发送SYN(synchronous)包(syn=j)到服务器,并进入SYN_SEND状态,等待服务器确认。
第二次握手:服务器收到SYN包,需要确认客户端的SYN(ack=j+1),同时自己也发送一个SYN包(syn=k),即SYN+ACK(Acknowledgement)包,此时服务器进入SYN_RECV状态。
在第三次握手:客户端收到服务器的SYN+ACK包,向服务器发送确认包ACK(ack=k+1),此包发送完毕,客户端和服务器进入ESTABLISHED状态,完成三次握手。
握手完成之后,客户端的播放器和服务器就可以进行数据传输。其中,传输的数据就是TS切片。播放器得到数据后,进行播放。
实际上,在播放过程中,用户对调整播放进度后的播放器播放的精确度并没有太高的要求。与播放精确度的要求相比,用户对播放器的起播效率的要求更高。因此,在调整播放位置后,播放器需要快速起播,即需要提高播放器的起播效率。
针对上述问题,本发明实施例的核心构思之一在于,播放器通过查寻事件确定目标切片,从目标切片的缓冲数据开始对所述流媒体进行播放,即跳转至该目标切片,直接从该目标切片的缓冲数据开始播放,无需查找离查寻事件所确定的时间点最近的关键帧,从而避免由于查找关键帧而导致时间浪费的问题,提高了播放器的起播效率。
参照图1,示出了本发明的一种基于播放器的播放方法实施例的步骤流程 图,具体可以包括如下步骤:
步骤101,在播放流媒体的过程中,对播放器进行监听,生成播放器的查寻事件。
流媒体,即是流式媒体,具体可以指在因特网(Internet)或者内联网(Intranet)中使用流式传输技术的连续时基媒体,如音频、视频或多媒体文件。通常,采用播放器就可以对流媒体进行播放,如通过视频播放器播放视频、通过音频播放器播放音乐、通过网页播放器播放网络视频等,本发明实施例对此不作限制。为了描述方便,后文以视频为例,对本发明实施例进行详细介绍,但不应将此作为对本发明实施例的限制。
作为本发明实施例的一个具体示例,在播放器播放视频的过程中,系统如安卓(Android)系统可以通过检测,检测到用户对播放器的操作命令,即可以对正在运行的播放器进行监听。通常,若用户想播放器跳过播放其当前不感兴趣的视频内容,可以通过快进操作和/或快退操作,调整播放器的播放位置,如快进到其指定的播放位置,播放器响应用户的快进操作,生成快进操作命令。当监听到快进操作命令或者快退操作命令时,可以通过分析捕获到的播放器事件,确定播放器事件对应的播放时间点,将所确定的播放时间点作为调整播放进度后的起播时间点,生成该播放器的查寻事件,如生成函数seek()。
步骤103,依据所述查寻事件,确定所述流媒体的目标切片,以及获取所述目标切片的缓冲数据。
播放器可以根据查寻事件,查找当前播放的视频所对应的播放列表,确定该查寻事件对应的TS切片,将查寻事件对应的TS切片作为该视频的目标切片。正在播放的视频包含有多个TS切片(如20个),在播放列表中可以分别标注为切片1、切片2、切片3······如此类推,并标注各切片的播放顺序以及播放时间,如视频的播放时间长度为30分钟,其中,该视频的切片1的播放时间为1~10秒,切片2的播放时间为11~22,切片2的播放时间为······如此类推,直到将所有TS切片标注完,即该播放列表是一个完整的视频播放列表。切片1的播放时间为1~10秒,切片2的播放时间为11~22,可以表示播放器在开始播放的前10秒内对切片1进行播放,在第10秒时完成切片1的播放,然后对切片2进行播放,即在第11秒时,开始播放 切片2。例如,在监听到查寻事件seekto(00:10:30),其中“00:10:30”表示该查寻事件seekto()的起播时间是10分钟30秒,即是630秒。假设切片9的播放时间为626~640秒,即该视频的第9个切片的播放时间是从626秒到640秒。那么,可以确定该查寻事件seekto(00:10:30)的起播时间630秒所属的切片为切片9,即该查寻事件seekto(00:10:30)对应的TS切片为切片9,将切片9作为目标切片。确定目标切片后,可以获取该目标切片的缓冲数据,调整播放器的播放进度,继续对该视频进行播放。
可选的,播放器获取目标视频的缓冲数据,可以包括:判断播放器的缓冲区是否存在所述目标切片的缓冲数据;当所述缓冲区不存在目标切片的缓冲数据时,对目标切片进行下载,生成所述目标切片的缓冲数据,并保存在缓冲区;当所述缓冲区存在目标切片的缓冲数据时,从所述缓冲区获取所述目标切片的缓冲数据。
步骤105,从所述目标切片的缓冲数据开始对所述流媒体进行播放。
播放器在获取到目标切片后,可以从该目标切片的头开始,获取缓冲数据,对视频进行播放。具体而言,TS切片包含有多个帧,TS切片的第一帧是一个关键帧。播放器可以从该目标切片的第一帧开始,即跳转到第一帧对应的位置,直接从第一帧对应的位置开始获取缓冲数据,对视频进行播放。
如上例中获取第9个切片,则播放器从切片9的第一帧开始播放视频,即直接从626秒的位置开始播放视频。实际上每个切片对应流媒体的播放时长通常比较短,因此从切片开始播放并不会对用户造成太大影响,即播放器在调整播放进度时,可以直接跳转到目标切片的第一帧,从第一帧开始播放视频,并不需要查找离630秒最近的关键帧,即无需查找离查寻事件所确定的时间点最近的一个关键帧,避免由于查找关键帧而导致时间浪费的问题,提高起播效率。
在播放流媒体的过程中,本发明实施例通过监听播放器,生成播放器的查寻事件,以及依据查寻事件确定目标切片,通过跳转至目标切片的缓冲数据,从该目标切片的缓冲数据开始,对所述流媒体进行播放,使得播放器在调整播放进度时无需查找关键帧,避免由于查找关键帧而导致时间浪费的问题,提高了播放器的起播效率,节省时间,从而提高了用户体验。
以下结合本发明的优选实施例,继续对本发明实施进行介绍。
参照图2,示出了本发明的一种基于播放器的播放方法优选实施例的步骤流程图,具体可以包括如下步骤:
步骤201,在播放流媒体的过程中,对播放器进行监听,生成播放器的查寻事件。
实际上,在播放器播放视频的过程中,用户通过拖动在播放器的进度条上的游标,可以改变播放器的播放位置。当然,用户还可以通过如快进控件、快退控件等控件,调整播放器的播放进度,例如通过快退控件,使播放器快退到其感兴趣的视频内容的播放位置。
在本发明的一种优选实施例中,对播放器进行监听,生成播放器的查寻事件,可以包括:当监听到快进或快退操作命令时,捕获播放器的滑动游标事件并进行分析,确定游标滑动后停留在播放进度条上所指向的播放时间点;或者,捕获播放器的控件触发事件并进行分析,确定控件触发事件所对应的播放时间点;将所述播放时间点作为起播时间点,生成查寻事件。
具体的,用户可以通过对播放器的操作如快进操作、快退操作,改变播放器的播放位置。系统响应用户的操作,自动生成操作命令,如响应快进操作生成快进操作命令、响应快退操作生成快退操作命令。
当监听到快进或者操作命令时,可以判断用户的操作是否是拖拽进度条,如拖动播放器的进度条上的游标。如果是,则捕获播放器的滑动游标事件,对滑动游标事件进行分析,获取游标滑动后停留在播放进度条上的位置信息。根据该基于该位置信息以及进度条的长度,可以确定游标滑动后停留在播放进度条上所指向的播放时间点。其中,滑动游标事件可以根据用户拖拽进度条的操作产生。例如,假设播放器的进度常为10(厘米),播放完当前播放的视频需要30分钟,用户将游标滑动到离进度条起始位置的1的位置,即系统获取到的位置信息为1(厘米),生成滑动游标事件。通过计算,可以确定游标滑动后停留在播放进度条上所指向的播放时间点为第180秒,从而可以将该播放时间点即第180秒作为调整播放进度后的起播时间点,生成查寻事件seekto(00:03:00)。
当然,在监听到快进或者操作命令时,也可以判断用户的操作是否是触发播放器控件的操作如点击快进播放控件。如果是,则捕获播放器的控件触发事件,对捕获到的控件触发事件进行分析,确定控件触发事件所对应的播 放时间点,将所述播放时间点作为调整播放进度后的起播时间点,生成查寻事件。其中,播放器的控件触发事件是根据用户对控件的操作自动生成的。
步骤203,依据所述查寻事件,确定所述流媒体的目标切片。
在本发明的一种优选实施例中,上述步骤203可以包括如下子步骤:
子步骤2031,查找所述流媒体对应的播放列表,确定所述查寻事件中起播时间点对应的切片。
在具体实现中,播放器可以通过查找当前播放视频所对应的播放列表,确定该查寻事件中起播时间点所属的TS切片。起播时间点所属的TS切片相当于查寻事件中起播时间点对应的切片。
子步骤2032,将所述切片作为所述目标切片。
在确定起播时间点对应的TS切片后,就可以将该起播时间点所对应的TS切片作为目标切片,进而调整播放器的播放位置。具体的调整过程,将在后文进行描述。
步骤205,判断播放器的缓冲区是否存在所述目标切片的缓冲数据。
通常,播放器从缓冲区获取TS切片的缓冲数据,对视频进行播放。当播放器的缓冲区不存在目标切片的缓冲数据时,需要下载目标切片,生成该目标切片的缓冲数据,即执行步骤207。当播放器已存在目标切片的缓冲数据时,可以直接从所述缓冲区获取所述目标切片的缓冲数据,即跳转到步骤209,直接执行步骤209。
步骤207,对目标切片进行下载,生成所述目标切片的缓冲数据,并保存在缓冲区。
当所述缓冲区不存在目标切片的缓冲数据时,播放器可以依据播放列表,生成下载该目标切片的网络请求,向服务器发送网络请求。在服务器响应该网络请求后,播放器就可以从服务器获取目标切片,即下载目标切片。
在本发明的一个优选实施中,对目标切片进行下载,可以包括如下子步骤:
子步骤2071,基于所述播放列表,确定目标切片对应的偏移信息。
实际上,视频的播放列表可以保存该视频格TS切片的偏移信息,如排序信息range。通过查找播列表,可以在播放列中提取该目标切片对应的偏移信息,如偏移地址、偏移时长等。其中,偏移地址是指视频的TS切片相对于该 视频的起始地址对应的偏移位置;偏移时长是指视频的TS切片开始播放时间点相对于该视频的起始播放时间点对应的偏移位时间。
子步骤2073,采用所述偏移信息,生成网络请求。
子步骤2075,基于所述网络请求,从服务器下载目标切片。
具体的,播放器采用该偏移信息生成网络请求,即生成的网络请求包含了目标切片对应的偏移信息。根据这个网络请求中包含的偏移信息,可以从服务器找到该目标切片,从而获取到该目标切片。例如,播放器采用目标切片的偏移位置生成网络请求如seek请求。seek请求包含的偏移位置,可以保证请求数据时,可以请求到目标切片的位置,即根据seek请求中包含的偏移位置,就可以找到该目标切片对应的位置,从目标切片的位置开始获取视频的TS切片。这样,播放器就可以下载到视频的TS切片,即从服务器下载目标切片
下载目标切片后,通过解析器对目标切片进行解析,可以生成该目标切片的缓冲数据。播放器可以对缓冲数据进行缓存,即将生成的缓冲数据保存在缓冲区。
步骤209,从所述缓冲区获取所述目标切片的缓冲数据。
当所述缓冲区存在目标切片的缓冲数据时,播放器就可以从缓冲区提取目标切片的缓冲数据,然后执行对视频进行播放。
步骤211,从所述目标切片的缓冲数据开始对所述流媒体进行播放。
可选的,上述步骤211可以包括如下子步骤:
子步骤2111,查找播放器的缓冲区,确定目标切片的第一帧对应的位置。
具体而言,对播放器的缓冲区进行查找,当找到目标切片的缓冲数据时,即在找到目标切片的第一帧对应的缓冲数据时,可以确定目标切片的第一帧在缓冲区的位置,即确定目标切片的第一帧对应的位置。
子步骤2113,跳转到所述第一帧对应的位置,从所述位置开始获取缓冲数据,对所述流媒体进行播放。
在找到目标切片的第一帧对应的位置后,跳转到该第一帧对应的位置,直接从该位置开始获取缓冲区的缓冲数据,对视频进行播放。这样播放器可以调整了播放位置,跳过当前用户不感兴趣的视频内容的播放,提高用户体验。
在本发明实施例中,播放器跳转到目标切片的第一帧对应的位置,直接从第一帧对应的位置获取缓冲数据,对视频进行播放,从而可以避免查找离查寻事件所确定的时间点最近的关键帧而导致播放器的起播时间长的问题,提高了播放器的起播效率,以及节省时间,提高用户体验。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本发明实施例并不受所描述的动作顺序的限制,因为依据本发明实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作并不一定是本发明实施例所必须的。
参照图3A,示出了本发明一种播放器装置实施例的结构框图,具体可以包括如下模块:
查寻事件生成模块301,用于在播放流媒体的过程中,对播放器进行监听,生成播放器的查寻事件。
目标切片确定模块303,用于依据所述查寻事件,确定所述流媒体的目标切片,以及获取所述目标切片的缓冲数据。
播放模块305,用于从所述目标切片的缓冲数据开始对所述流媒体进行播放。
在图3A的基础上,可选的,查寻事件生成模块301可以包括事件捕获子模块3011和查寻事件生成子模块3013,参见图3B。
事件捕获子模块3011,可以用于当监听到快进或快退操作命令时,捕获播放器的滑动游标事件并进行分析,确定游标滑动后停留在播放进度条上所指向的播放时间点;或者,捕获播放器的控件触发事件并进行分析,确定控件触发事件所对应的播放时间点。
查寻事件生成子模块3013,可以用于将所述播放时间点作为起播时间点生成查寻事件。
可选的,目标切片确定模块303可以包括切片查找子模块3031和目标切片确定子模块3033。其中,切片查找子模块3031可以用于查找所述流媒体对应的播放列表,确定所述查寻事件中起播时间点对应的切片。目标切片确定子模块3033可以用于将所述切片作为所述目标切片。
在本发明的一种优选实施例中,目标切片确定模块303,还可以包括如下子模块:
缓冲数据判断子模块3035,用于判断播放器的缓冲区是否存在所述目标切片的缓冲数据。
目标切片下载子模块3037,用于当所述缓冲区不存在目标切片的缓冲数据时,对目标切片进行下载,生成所述目标切片的缓冲数据,并保存在缓冲区。
可选的,目标切片下载子模块3037,可以包括:偏移信息确定单元30371、网络请求生成单元30373和目标切片下载单元30375。
其中,偏移信息确定单元30371,用于基于所述播放列表,确定目标切片对应的偏移信息。网络请求生成单元30373,用于采用所述偏移信息,生成网络请求。目标切片下载单元30375,用于基于所述网络请求,从服务器下载目标切片。
缓冲数据获取子模块3039,用于当所述缓冲区存在目标切片的缓冲数据时,从所述缓冲区获取所述目标切片的缓冲数据。
在本发明的一种优选实施例中,播放模块305可以包括如下子模块:
位置确定子模块3051,用于查找播放器的缓冲区,确定目标切片的第一帧对应的位置。
跳转子模块3053,用于跳转到所述第一帧对应的位置,从所述位置开始获取缓冲数据,对所述流媒体进行播放。
在播放流媒体的过程中,本发明实施例通过监听播放器,生成播放器的查寻事件,以及依据查寻事件确定目标切片,通过跳转至目标切片的缓冲数据,从该目标切片的缓冲数据开始,对所述流媒体进行播放,使得播放器在调整播放进度时无需查找关键帧,避免由于查找关键帧而导致时间浪费的问题,提高了播放器的起播效率,节省时间,从而提高了用户体验。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见 即可。
本领域内的技术人员应明白,本发明实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
例如,图4示出了可以实现根据本发明的电子装置。该电子装置传统上包括处理器410和以存储器420形式的计算机程序产品或者计算机可读介质。存储器420可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。存储器420具有用于执行上述方法中的任何方法步骤的程序代码431的存储空间430。例如,用于程序代码的存储空间430可以包括分别用于实现上面的方法中的各种步骤的各个程序代码431。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。这些计算机程序产品包括诸如硬盘,紧致盘(CD)、存储卡或者软盘之类的程序代码载体。这样的计算机程序产品通常为如参考图5所述的便携式或者固定存储单元。该存储单元可以具有与图4的电子装置中的存储器420类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括计算机可读代码431’,即可以由例如诸如410之类的处理器读取的代码,这些代码当由电子装置运行时,导致该电子装置执行上面所描述的方法中的各个步骤。
本发明实施例是参照根据本发明实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明实施例范围的所有变更和修改。
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个......”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。
以上对本发明所提供的一种基于播放器的播放方法和一种播放器装置,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。

Claims (15)

  1. 一种基于播放器的播放方法,其特征在于,包括:
    在播放流媒体的过程中,对播放器进行监听,生成播放器的查寻事件;
    依据所述查寻事件,确定所述流媒体的目标切片,以及获取所述目标切片的缓冲数据;
    从所述目标切片的缓冲数据开始对所述流媒体进行播放。
  2. 根据权利要求1所述的方法,其特征在于,所述对播放器进行监听,生成播放器的查寻事件,包括:
    当监听到快进或快退操作命令时,捕获播放器的滑动游标事件并进行分析,确定游标滑动后停留在播放进度条上所指向的播放时间点;或者,捕获播放器的控件触发事件并进行分析,确定控件触发事件所对应的播放时间点;
    将所述播放时间点作为起播时间点生成查寻事件。
  3. 根据权利要求1或2所述的方法,其特征在于,所述依据所述查寻事件,确定所述流媒体的目标切片,包括:
    查找所述流媒体对应的播放列表,确定所述查寻事件中起播时间点对应的切片;
    将所述切片作为所述目标切片。
  4. 根据权利要求1或2所述的方法,其特征在于,所述获取所述目标切片的缓冲数据,包括:
    判断播放器的缓冲区是否存在所述目标切片的缓冲数据;
    当所述缓冲区不存在目标切片的缓冲数据时,对目标切片进行下载,生成所述目标切片的缓冲数据,并保存在缓冲区;
    当所述缓冲区存在目标切片的缓冲数据时,从所述缓冲区获取所述目标切片的缓冲数据。
  5. 根据权利要4所述的方法,其特征在于,所述对目标切片进行下载, 包括:
    基于所述播放列表,确定目标切片对应的偏移信息;
    采用所述偏移信息,生成网络请求;
    基于所述网络请求,从服务器下载目标切片。
  6. 根据权利要求1或2所述的方法,其特征在于,所述从所述目标切片的缓冲数据开始对所述流媒体进行播放,包括:
    查找播放器的缓冲区,确定目标切片的第一帧对应的位置;
    跳转到所述第一帧对应的位置,从所述位置开始获取缓冲数据,对所述流媒体进行播放。
  7. 一种播放器装置,其特征在于,包括:
    查寻事件生成模块,用于在播放流媒体的过程中,对播放器进行监听,生成播放器的查寻事件;
    目标切片确定模块,用于依据所述查寻事件,确定所述流媒体的目标切片,以及获取所述目标切片的缓冲数据;
    播放模块,用于从所述目标切片的缓冲数据开始对所述流媒体进行播放。
  8. 根据权利要求7所述的播放器装置,其特征在于,所述查寻事件生成模块,包括:
    事件捕获子模块,用于当监听到快进或快退操作命令时,捕获播放器的滑动游标事件并进行分析,确定游标滑动后停留在播放进度条上所指向的播放时间点;或者,捕获播放器的控件触发事件并进行分析,确定控件触发事件所对应的播放时间点;
    查寻事件生成子模块,用于将所述播放时间点作为起播时间点生成查寻事件。
  9. 根据权利要求7或8所述的播放器装置,其特征在于,所述目标切片确定模块,包括:
    切片查找子模块,用于查找所述流媒体对应的播放列表,确定所述查寻 事件中起播时间点对应的切片;
    目标切片确定子模块,用于将所述切片作为所述目标切片。
  10. 根据权利要求7或8所述的播放器装置,其特征在于,所述目标切片确定模块,包括:
    缓冲数据判断子模块,用于判断播放器的缓冲区是否存在所述目标切片的缓冲数据;
    目标切片下载子模块,用于当所述缓冲区不存在目标切片的缓冲数据时,对目标切片进行下载,生成所述目标切片的缓冲数据,并保存在缓冲区;
    缓冲数据获取子模块,用于当所述缓冲区存在目标切片的缓冲数据时,从所述缓冲区获取所述目标切片的缓冲数据。
  11. 根据权利要10所述的播放器装置,其特征在于,所述目标切片下载子模块,包括:
    偏移信息确定单元,用于基于所述播放列表,确定目标切片对应的偏移信息;
    网络请求生成单元,用于采用所述偏移信息,生成网络请求;
    目标切片下载单元,用于基于所述网络请求,从服务器下载目标切片。
  12. 根据权利要求7或8所述的播放器装置,其特征在于,所述播放模块,包括:
    位置确定子模块,用于查找播放器的缓冲区,确定目标切片的第一帧对应的位置;
    跳转子模块,用于跳转到所述第一帧对应的位置,从所述位置开始获取缓冲数据,对所述流媒体进行播放。
  13. 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子装置上运行时,导致所述电子装置执行根据权利要求1-6中的任一个所述的基于播放器的播放方法。
  14. 一种计算机可读介质,其中存储了如权利要求13所述的计算机程序。
  15. 一种电子装置,其特征在于,包括:
    一个或多个处理器;
    用于存储处理器可执行指令的存储器;
    其中,所述处理器被配置为:
    在播放流媒体的过程中,对播放器进行监听,生成播放器的查寻事件;
    依据所述查寻事件,确定所述流媒体的目标切片,以及获取所述目标切片的缓冲数据;
    从所述目标切片的缓冲数据开始对所述流媒体进行播放。
PCT/CN2016/089258 2015-12-03 2016-07-07 一种基于播放器的播放方法及装置 Ceased WO2017092330A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/245,938 US20170163703A1 (en) 2015-12-03 2016-08-24 Player-based play method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510885362.8 2015-12-03
CN201510885362.8A CN105979276A (zh) 2015-12-03 2015-12-03 一种基于播放器的播放方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/245,938 Continuation US20170163703A1 (en) 2015-12-03 2016-08-24 Player-based play method and device

Publications (1)

Publication Number Publication Date
WO2017092330A1 true WO2017092330A1 (zh) 2017-06-08

Family

ID=56988252

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/089258 Ceased WO2017092330A1 (zh) 2015-12-03 2016-07-07 一种基于播放器的播放方法及装置

Country Status (3)

Country Link
US (1) US20170163703A1 (zh)
CN (1) CN105979276A (zh)
WO (1) WO2017092330A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117710544A (zh) * 2023-12-11 2024-03-15 厦门微沃时刻科技有限公司 序列帧动画播放方法、设备及存储介质

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106803999A (zh) * 2017-02-14 2017-06-06 北京时间股份有限公司 一种视频缓存处理方法、装置及服务器
CN109413443B (zh) * 2017-08-16 2021-03-16 中国移动通信有限公司研究院 一种时移功能的实现方法及装置
CN109756749A (zh) * 2017-11-07 2019-05-14 阿里巴巴集团控股有限公司 视频数据处理方法、装置、服务器和存储介质
CN110072123B (zh) * 2018-01-24 2022-04-15 中兴通讯股份有限公司 一种视频的恢复播放方法、视频播放终端及服务器
CN110139123A (zh) * 2018-02-02 2019-08-16 腾讯科技(深圳)有限公司 流媒体文件的播放、发送、处理方法和装置
US11303954B1 (en) * 2021-01-04 2022-04-12 Sony Corporation Long duration error correction with fast channel change for ATSC 3.0 real-time broadcast mobile application
US11451853B1 (en) 2021-08-06 2022-09-20 Sony Group Corporation Measuring ATSC 3 RF environment using autonomous vehicle
CN115708358B (zh) 2021-08-18 2025-05-16 北京字跳网络技术有限公司 一种视频处理方法、装置、设备及存储介质
CN115734033B (zh) * 2021-08-31 2024-12-20 腾讯科技(北京)有限公司 视频播放方法、装置和计算机可读存储介质
CN115002505A (zh) * 2022-08-02 2022-09-02 广州市千钧网络科技有限公司 一种中断重连直播流的时移控制方法及装置
CN115567757B (zh) * 2022-09-21 2026-01-13 北京百度网讯科技有限公司 播放处理方法、装置、设备及存储介质
CN115878919B (zh) * 2022-11-16 2025-12-19 四川长虹电器股份有限公司 一种对浏览器mse媒体源进行seek播放的方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130100811A1 (en) * 2010-06-14 2013-04-25 Ntt Electronics Corporation Output Rate Controller and Output Rate Control Method
CN103596020A (zh) * 2013-09-03 2014-02-19 百视通网络电视技术发展有限责任公司 电视节目的混合编排和播放方法及系统
CN104168512A (zh) * 2014-06-16 2014-11-26 乐视致新电子科技(天津)有限公司 一种显示视频信息的方法和装置
CN104581207A (zh) * 2014-12-23 2015-04-29 乐视致新电子科技(天津)有限公司 在线播放视频的方法、系统和播放应用代理设备
CN105100912A (zh) * 2014-05-12 2015-11-25 联想(北京)有限公司 流媒体处理方法和流媒体处理装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101415069B (zh) * 2008-10-22 2010-07-14 清华大学 一种服务器及其在线播放视频的发送方法
CN103581711B (zh) * 2013-10-31 2017-01-11 广州西维尔计算机系统有限公司 快进快退播放视频数据的方法及装置
CN103618912A (zh) * 2013-11-26 2014-03-05 乐视网信息技术(北京)股份有限公司 一种直播时移方法及服务器
CN104202684A (zh) * 2014-08-27 2014-12-10 珠海全志科技股份有限公司 一种分段网络视频无缝播放方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130100811A1 (en) * 2010-06-14 2013-04-25 Ntt Electronics Corporation Output Rate Controller and Output Rate Control Method
CN103596020A (zh) * 2013-09-03 2014-02-19 百视通网络电视技术发展有限责任公司 电视节目的混合编排和播放方法及系统
CN105100912A (zh) * 2014-05-12 2015-11-25 联想(北京)有限公司 流媒体处理方法和流媒体处理装置
CN104168512A (zh) * 2014-06-16 2014-11-26 乐视致新电子科技(天津)有限公司 一种显示视频信息的方法和装置
CN104581207A (zh) * 2014-12-23 2015-04-29 乐视致新电子科技(天津)有限公司 在线播放视频的方法、系统和播放应用代理设备

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117710544A (zh) * 2023-12-11 2024-03-15 厦门微沃时刻科技有限公司 序列帧动画播放方法、设备及存储介质

Also Published As

Publication number Publication date
US20170163703A1 (en) 2017-06-08
CN105979276A (zh) 2016-09-28

Similar Documents

Publication Publication Date Title
WO2017092330A1 (zh) 一种基于播放器的播放方法及装置
US10382511B2 (en) Synchronizing playback of digital media content
US8699862B1 (en) Synchronized content playback related to content recognition
US11829680B2 (en) System for managing transitions between media content items
US9390167B2 (en) System and methods for continuous audio matching
WO2017012440A1 (zh) 音视频跳转播放的方法和装置
WO2017092336A1 (zh) 一种流媒体的处理方法及装置
US20240176817A1 (en) Display apparatus, background music providing method thereof and background music providing system
CN103503467B (zh) 确定用户关注内容的方法和设备
CN105898535A (zh) 提高起播速度的方法、视频播放器及电子装置
CN103327410B (zh) 移动终端浏览器中视频的播放方法、系统和移动终端
WO2017092327A1 (zh) 一种播放方法及装置
US10096259B2 (en) Video playback device and method
WO2014101379A1 (zh) 一种基于m3u8列表协议直播流的编辑方法及装置
CA2908718C (en) System and method for streaming a media file from a server to a client device
US20160353168A1 (en) Methods, apparatuses, and/or systems for distributing video compilations of user-captured videos
US9164979B1 (en) Implicit ratings
CN105916030A (zh) 一种记录点播视频断点信息的方法、装置及系统
KR102107678B1 (ko) 미디어 정보 제공 서버, 미디어 콘텐츠와 관련된 미디어 정보를 검색하는 장치, 방법 및 컴퓨터 판독 가능한 기록 매체
US20160182942A1 (en) Real Time Combination of Listened-To Audio on a Mobile User Equipment With a Simultaneous Video Recording
CN102340705B (zh) 一种获取关键帧的系统及方法
US9628833B2 (en) Media requests for trickplay
CN117221655A (zh) 视频分享方法、装置、电子设备、存储介质及程序产品
WO2017016285A1 (zh) 一种实现多媒体文件下载的方法及装置
JP6003305B2 (ja) コンテンツ再生装置

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

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

Country of ref document: EP

Kind code of ref document: A1