WO2018188365A1 - 同步播放方法、装置和系统 - Google Patents

同步播放方法、装置和系统 Download PDF

Info

Publication number
WO2018188365A1
WO2018188365A1 PCT/CN2017/115794 CN2017115794W WO2018188365A1 WO 2018188365 A1 WO2018188365 A1 WO 2018188365A1 CN 2017115794 W CN2017115794 W CN 2017115794W WO 2018188365 A1 WO2018188365 A1 WO 2018188365A1
Authority
WO
WIPO (PCT)
Prior art keywords
play
time
start position
synchronous
terminal
Prior art date
Application number
PCT/CN2017/115794
Other languages
English (en)
French (fr)
Inventor
冯锐
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2018188365A1 publication Critical patent/WO2018188365A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/242Synchronization processes, e.g. processing of PCR [Program Clock References]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/262Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
    • H04N21/26208Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists the scheduling operation being performed under constraints
    • 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/41Structure of client; Structure of client peripherals
    • 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/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4122Peripherals receiving signals from specially adapted client devices additional display device, e.g. video projector
    • 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/41Structure of client; Structure of client peripherals
    • H04N21/4104Peripherals receiving signals from specially adapted client devices
    • H04N21/4126The peripheral being portable, e.g. PDAs or mobile phones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4305Synchronising client clock from received content stream, e.g. locking decoder clock with encoder clock, extraction of the PCR packets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/4302Content synchronisation processes, e.g. decoder synchronisation
    • H04N21/4307Synchronising the rendering of multiple content streams or additional data on devices, e.g. synchronisation of audio on a mobile phone with the video output on the TV screen

Definitions

  • the present disclosure relates to multimedia file playback technologies in the electronic field, for example, to a synchronous playback method, apparatus, and system.
  • the mobile terminal In the mobile terminal market, in order to promote the selling point information of the mobile phone, such as hardware configuration, high-quality sound quality, high-resolution screen, etc., the mobile terminal can automatically display the promotional video file on the booth.
  • the mobile phone terminals In practical applications, multiple mobile phone terminals respectively play video files, so that the screens of multiple mobile terminal screens are different, which is messy and easily disturbs the user's attention and attention.
  • synchronous playback is usually performed by live broadcast, and the mainstream uses live streaming (https), wherein the hls protocol is based on Hypertext Transport Protocol (HTTP). Protocol, the transmission data includes m3u description files and ts media files. Multiple terminals are connected to the hls live broadcast server. By continuously downloading m3u files and ts files, and playing them in accordance with ts, real-time synchronous playback is achieved.
  • the live broadcast method has certain limitations, such as using a live broadcast server, which has high cost and bandwidth. Cost and server cost; the synchronization accuracy of the live server is not high.
  • the live broadcast service is suitable for real-time production of video content playback, which can achieve lower delay. And play synchronously, but can not achieve the true meaning of synchronized playback.
  • the present disclosure provides a synchronous playback method, apparatus, and system, which can be more accurate in synchronization time precision, and the networking environment is simple and convenient, and has no additional cost.
  • a synchronous playback method is applied to a second terminal, and the method includes:
  • synchronous play information includes: synchronization of the multimedia file Play time and sync play start position;
  • determining the synchronous play information according to the at least one first start play time and the at least one first play start position, the second start play time, and the second play start position including:
  • the acquiring the second startup play time and the second playback start location of the multimedia file of the second terminal includes:
  • the startup play time and the play start position of the multimedia file local to the second terminal are reset, and the reset second play play time and the second play start position are obtained.
  • the playing the multimedia file in synchronization with the first terminal according to the synchronous play information includes:
  • the start time of the first timed task is a synchronous play time
  • the first timed task includes: playing a multimedia file from the synchronous play start position
  • the first timing task is executed when the start time of the first timed task is reached.
  • the method before the receiving the first message sent by the at least one first terminal, the method further includes:
  • the method further includes:
  • Synchronous playback start position including:
  • a synchronous playback device includes: a receiving unit, an obtaining unit, a determining unit, and a playing unit, wherein
  • the receiving unit is configured to receive a first message sent by the at least one first terminal, where the first message carries a first start play time and a first play start position of the multimedia file;
  • the acquiring unit is configured to acquire a second startup play time and a second playback start position of the multimedia file of the second terminal;
  • the determining unit is configured to determine synchronous play information according to the at least one first start play time and the at least one first play start position, the second start play time, and the second play start position, the synchronous play
  • the information includes: synchronous play time of the multimedia file and a synchronous play start position;
  • the playing unit is configured to play the multimedia file synchronously with the first terminal according to the synchronous play information.
  • the determining unit is configured to determine, respectively, that the time difference between the at least one first start playing time and the current time is a first time value, determine that the time difference between the second start playing time and the current time is a second time value, and further set Determining, according to the first time value and the second time value, the synchronous play time, determining, according to the at least one first play start position and the second play start position, the multimedia file synchronization play start position .
  • the device further includes: a processing unit,
  • the determining unit is configured to determine, in a preset time period, whether a startup play time and a play start position of the multimedia file local to the second terminal are reset;
  • the processing unit is configured to reset a startup play time and a play start position of the multimedia file local to the second terminal, if not reset, to obtain a reset second play time and a second play start position.
  • the device further includes: a setting unit, an execution unit,
  • the setting unit is configured to set a first timing task according to the synchronous playing information, where a starting time of the first timing task is a synchronous playing time, and the first timing task comprises: starting from the synchronous playing The location starts playing multimedia files;
  • the execution unit is configured to execute the first timing task when a start time of the first timing task is reached.
  • the device further includes: a sending unit,
  • the acquiring unit is configured to acquire a preset start play time and a preset play start position of the multimedia file
  • the setting unit is configured to set a second timing task, where a start time of the second timing task is the preset start playing time, and the second timing task includes: starting from the preset playing position Start playing multimedia files;
  • the sending unit is configured to send a second message to the at least one first terminal, where the second message carries a preset start play time and a preset play start position, so that the at least one first terminal arrives
  • the second timing task is executed when the second timing task starts.
  • the sending unit is further configured to send a third message to the at least one first terminal, where the third message carries the synchronous play information, so that the at least one first terminal is according to the synchronization Play information to play multimedia files.
  • the determining unit is configured to determine that a maximum value of the first time value and the second time value is the synchronous play time, and further configured to determine the at least one first play start position The maximum value in the second playback start position is the synchronized playback start position.
  • a synchronous playback system comprising: at least two synchronized playback devices as described above, the at least two synchronized playback devices as described above being in the same local area network.
  • a computer readable storage medium storing computer executable instructions for performing the synchronous play method described above.
  • the embodiment also provides a synchronous playback device including one or more processors, a memory, and one or more programs, the one or more programs being stored in the memory when processed by one or more When the device is executed, the above synchronous playback method is executed.
  • the embodiment further provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer And causing the computer to execute any of the above-described synchronous playback methods.
  • the synchronous playing method, device and system provided by the present disclosure can realize that a plurality of terminals synchronously play video, so that the user sees that the video of each terminal is consistent, which can improve the display effect, and, in synchronization time precision. More accurate, the playback picture can be completely consistent, and there is no network delay.
  • the networking environment is simple and convenient, and there is no additional cost.
  • FIG. 1 is a schematic flowchart 1 of a synchronous play method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart 2 of a synchronous play method according to an embodiment of the present invention
  • FIG. 3 is a schematic flowchart 3 of a synchronous play method according to an embodiment of the present invention.
  • FIG. 4 is a schematic structural diagram 1 of a synchronous playback apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram 2 of a synchronous playback apparatus according to an embodiment of the present invention.
  • FIG. 6 is a schematic structural diagram of hardware of a synchronous playback device according to an embodiment of the present disclosure.
  • This embodiment provides a synchronous playback method. As shown in FIG. 1, the method may include the following steps.
  • step 101 a first message sent by at least one first terminal is received.
  • the first message carries a first start play time and a first play start position of the multimedia file, that is, each first message carries a first start play time and a first play start of the multimedia file of the first terminal. position.
  • the first startup play time refers to starting to play the multimedia file at a certain time of the terminal system, for example, starting the multimedia file at 13:10 of the terminal system time; the first playback start position refers to a certain one in the multimedia file. Start playing multimedia files at any time, for example, start playing video at 00:02:16 of the video.
  • the multimedia file may be a video file, an audio file, or the like, and may also be other multimedia files.
  • the execution body of the synchronous playback method provided in this embodiment is a synchronous playback device, and the synchronous playback device may be a second terminal, or may be a synchronous playback software system installed on the second terminal, where the terminal may be a mobile phone or a tablet computer.
  • the terminal may be a mobile phone or a tablet computer.
  • the system time of the at least one first terminal and the second terminal that perform synchronous play is calibrated, the clocks are kept consistent, and the at least one first terminal and the second terminal are in the same local area network, and the same is saved. Multimedia files.
  • the method before the receiving the first message sent by the at least one terminal, the method further includes the following steps.
  • the multimedia file is played from the preset playback start position.
  • step 102 a second start play time and a second play start position of the multimedia file of the second terminal are acquired.
  • the acquiring the second startup play time and the second playback start location of the multimedia file of the second terminal includes:
  • the startup play time and the play start position of the multimedia file local to the second terminal are reset, and the reset second play play time and the second play start position are obtained.
  • the reset means that after the second terminal receives the message of the other terminal, the startup time and the playback start position of the multimedia file are reset, because the terminal has a memory function, and the last playback time and multimedia file play are recorded.
  • resynchronization needs to be recalculated.
  • the calculation principle is that the start play time is the current time and then delay for a certain time, and the play start position is the current play progress time.
  • step 103 synchronous play information is determined according to at least one first start play time and at least one first play start position, the second start play time, and the second play start position.
  • the synchronous play information includes: a synchronous play time of the multimedia file and a synchronous play start position.
  • the determining the synchronous play information according to the at least one first start play time and the at least one first play start position, the second start play time, and the second play start position includes the following steps.
  • the synchronous play time is determined according to the first time value and the second time value, and the determining is performed according to the at least one first play start position and the second play start position.
  • the multimedia file synchronous playback start position may include the following steps.
  • each terminal may send a message to other terminals, and the content of the synchronous broadcast message includes a start play time, a video play start position, and a message sent by another terminal, and compares a latest start play time. And the video playback start position, and finally the reference start play time and the video play start position, that is, the synchronous play time and the video sync play start position are negotiated.
  • the second terminal is the mobile phone A
  • the plurality of first terminals are: the mobile phone B, the mobile phone C, the mobile phone D, the mobile phone E, the mobile phone F, the second start playing time of the mobile phone A is 13:10, and the mobile phone A is second.
  • the video playback start position is 00:02:16, the first start play time of mobile phone B is 13:13, the first video play start position of mobile phone B is 00:02:11, and the first start play time of mobile phone C is 13: 05, the first video playback position of mobile phone C is 00:01:35, the first startup time of mobile phone D is 13:08, mobile phone D
  • the starting position of a video playback is 00:02:20, the first playback time of the mobile phone E is 13:01, the first video playback start position of the mobile phone E is 00:02:05, and the first startup playback time of the mobile phone F is 13 :16, the first video playback start position of the mobile phone F is 00:01:55, and the latest start playback time is 13:16, and the latest video playback start position is 00:02.
  • the synchronous playback time is 13:16
  • the video synchronization playback start position is 00:02:20.
  • the system time of the mobile phone A is 13:16
  • the video is played from the video 00:02:20.
  • the synchronous play provided in this embodiment is based on the latest start play time and the latest video play start position of all the terminals that are synchronously played, and the synchronization principle can also be set as the earliest start play time or the earliest video play start. The position is correct, and the same effect can be achieved.
  • step 104 the multimedia file is played in synchronization with the first terminal according to the synchronized play information.
  • the synchronously playing the multimedia file according to the synchronous play information includes: setting a first timed task according to the synchronous play information, where a start time of the first timed task is a synchronous play time,
  • the first timing task includes: playing a multimedia file from a synchronous playback start position of the multimedia file; and executing the first timing task when a start time of the first scheduled task is reached.
  • the method further includes the following steps.
  • the at least one first terminal and the second terminal simultaneously start playing the preset same multimedia file, and start from the reference play.
  • the location starts playing the multimedia file, for example, playing the video file from the video sync playback start position to achieve full sync playback.
  • the synchronous play method provided in this embodiment can realize that a plurality of terminals synchronously play multimedia files, so that the user sees that the information of the multimedia files on each terminal is the same, for example, the user sees the video of each terminal. It is consistent and can improve the display effect. Moreover, the synchronization time accuracy is more accurate, the playback picture can be completely consistent, and there is no network delay. The networking environment is simple and convenient, and no additional cost is incurred.
  • This embodiment provides a synchronous playback method. As shown in FIG. 2, the method may include the following steps.
  • step 201 a preset start play time and a preset play start position of the multimedia file are acquired, and the second timed task is set.
  • the start time of the second timed task is the preset start play time, and the second timed task includes: playing a multimedia file from the preset play start position.
  • the execution body of the synchronous playback method provided in this embodiment is a synchronous playback device, and the synchronous playback device may be a second terminal, or may be a synchronous playback software system installed on the second terminal, where the terminal may be a mobile phone or a tablet computer.
  • the terminal may be a mobile phone or a tablet computer.
  • the system time of the at least one first terminal and the second terminal that perform synchronous play is calibrated, the clocks are kept consistent, and the at least one first terminal and the second terminal are in the same local area network, and the same is saved. Multimedia files.
  • step 202 a second message is sent to the at least one first terminal, where the second message carries a preset start play time and a preset play start position, so that the at least one first terminal arrives at the The second timing task is executed at the start time of the second timed task.
  • step 203 the first message sent by the at least one first terminal is received.
  • the first message carries a first start play time and a first play start position of the multimedia file.
  • step 204 determining, in a preset time period, a multimedia file local to the second terminal Whether the play time and the play start position are reset.
  • step 205 if there is no reset, the startup play time and the play start position of the second terminal are reset, and the reset second play play time and the second play start position are obtained.
  • step 206 the time difference between the at least one first start playing time and the current time is determined as a first time value, and the time difference between the second start playing time and the current time is determined to be a second time value.
  • step 207 the synchronized play time is determined according to the first time value and the second time value, and the multimedia file is determined according to the at least one first play start position and the second play start position. Synchronous playback start position.
  • step 208 a first timing task is set according to the synchronized play information.
  • the start time of the first timed task is a synchronous play time
  • the first timed task includes: playing a multimedia file from the multiple synchronized play start position.
  • Step 209 When the start time of the first timing task is reached, the first timing task is executed.
  • the synchronous play method provided in this embodiment can realize that a plurality of terminals synchronously play multimedia files, so that the user sees that the information of the multimedia files on each terminal is the same, for example, the user sees the video of each terminal. It is consistent and can improve the display effect. Moreover, the synchronization time accuracy is more accurate, the playback picture can be completely consistent, and there is no network delay. The networking environment is simple and convenient, and no additional cost is incurred.
  • a synchronous play software system is installed on the plurality of terminals, and the synchronous play software system may include a main control subsystem, a message subsystem, a synchronization policy subsystem, and a play subsystem.
  • the main control subsystem is a working module that controls the entire system; the message subsystem receives and sends a synchronization request; the synchronization policy subsystem is a decision start playback time and a video playback start time; The system controls video playback according to the playback request.
  • Step (1) starting the synchronous play software system of the terminal, starting the main control subsystem to start working.
  • Step (2) The main control subsystem obtains a startup play time and a video playback start position from the synchronization policy subsystem.
  • the startup play time of the synchronization policy subsystem defaults to one cycle time based on the current system time of the terminal, and the video playback start position defaults to 0, and records are performed.
  • Step (3) the task is set by the main control subsystem, and the start time of the timed task is the start play time.
  • step (4) the main control subsystem notifies the message subsystem to send a synchronization message.
  • Step (5) The message subsystem obtains the start play time and the video play start position from the synchronization policy subsystem, that is, obtains the synchronization time.
  • Step (6) The message subsystem sends a synchronization message to other terminals in the local area network, where the synchronization message includes: a start play time and a video play start position.
  • Step (7) The message subsystem receives the synchronization message sent by other terminals.
  • Step (8) The message subsystem reads out the start play time and the video play start position of other terminals in the synchronization message, and transmits the start play time and the video play start position of the other terminal to the synchronization policy subsystem, that is, the synchronization time is transmitted. .
  • Step (9) in a time period, if the synchronization policy subsystem has not reset the startup play time and the video playback start position of the terminal, reset the start play time and the video play start position of the terminal, and start playing.
  • the time is delayed by one cycle time based on the current system time of the terminal, and the video playback start position is the current playback progress time, that is, the local synchronization time is reset.
  • Step (10) The synchronization policy subsystem synchronizes the playback time of the terminal. If the synchronization start playback time of the terminal is later than the remote start playback time, the startup time of the terminal is If it is the remote end, it will be recorded as the synchronous start playback time; if the video playback start position of the terminal is later than the far end, the video playback of the terminal will be played. The starting position is correct, otherwise it is based on the far end and recorded as the starting position of the synchronized video playback, that is, the synchronization time is determined.
  • Step (11) the synchronization policy subsystem informs the main control subsystem that there is a new startup play time and a video playback start position, that is, the update synchronization time.
  • Step (12) the main control subsystem cancels the existing timing task, and re-times the new timing task, and the starting time of the new timing task is a new startup play time, that is, the synchronization start playback time.
  • step (13) the main control subsystem notifies the message subsystem to send a synchronization message.
  • Step (14) The message subsystem obtains a new startup play time and a new video playback start position from the synchronization policy subsystem, that is, a synchronous start play time and a synchronous video play start position.
  • Step (17) the playback subsystem starts playing the video, and starts playing the video from the start position of the synchronized video playback.
  • the synchronous play method provided in this embodiment can realize synchronous play of video by multiple terminals, and the applicable scenarios include: multiple terminals are simultaneously activated, and multiple terminals can be synchronously played; several terminals are being played synchronously, and some are The new terminal joins, does not interrupt the playback progress of several terminals, and can still enable the newly added terminal to play synchronously with other terminals; compared with hls live broadcast, this embodiment provides a synchronous play method, which is more accurate in synchronization time precision.
  • the playback screen is completely consistent and there is no network Delay, the networking environment is simple and convenient, and there is no additional cost.
  • the embodiment provides a synchronous playback device 30.
  • the device 30 includes a receiving unit 301, an obtaining unit 302, a determining unit 303, and a playing unit 308.
  • the receiving unit 301 is configured to receive a first message sent by the at least one first terminal, where the first message carries a first start play time and a first play start position of the multimedia file.
  • the obtaining unit 302 is configured to acquire a second startup play time and a second play start position of the multimedia file of the second terminal.
  • the determining unit 303 is configured to determine synchronization play information according to the at least one first start play time and the at least one first play start position, the second start play time, and the second play start position, the synchronization
  • the play information includes: a synchronous play time of the multimedia file and a synchronous play start position.
  • the playing unit 308 is configured to play the multimedia file synchronously with the first terminal according to the synchronous play information.
  • the determining unit 303 is configured to determine, respectively, that the time difference between the at least one first start playing time and the current time is a first time value, and determine that the time difference between the second start playing time and the current time is a second time value, and further Is configured to determine the synchronous play time according to the first time value and the second time value, and determine, according to the at least one first play start position and the second play start position, the multimedia file synchronous play start position.
  • the apparatus further includes a processing unit 306.
  • the determining unit 303 is configured to determine whether the start play time and the play start position of the multimedia file local to the second terminal are reset within a preset time period.
  • the processing unit 306 is configured to reset the startup play time and the play start position of the second terminal locally if no reset is performed, and obtain the reset second play play time and the second play start position.
  • the apparatus further includes: a setting unit 304, an execution unit 305,
  • the setting unit 304 is configured to set a first timing task according to the synchronous playing information, where a starting time of the first timing task is a synchronous playing time, and the first timing task includes: starting from the synchronous playing Start playing multimedia files at the beginning.
  • the executing unit 305 is configured to execute the first timing task when the start time of the first timing task is reached.
  • the apparatus further includes: a sending unit 307.
  • the obtaining unit 302 is configured to acquire a preset start play time and a preset play start position of the multimedia file.
  • the setting unit 304 is configured to set a second timing task, where a start time of the second timing task is the preset start playing time, and the second timing task includes: starting from the preset playing The location starts playing multimedia files.
  • the sending unit 307 is configured to send a second message to the at least one first terminal, where the second message carries a preset start play time and a preset play start position, so that the at least one first terminal is The second timing task is executed when the start time of the second timing task is reached.
  • the sending unit 307 is further configured to send a third message to the at least one first terminal, where the third message carries the synchronous play information, so that the at least one first terminal is configured according to the Synchronize playback information to play multimedia files.
  • the determining unit 303 is configured to determine that a maximum value of the first time value and the second time value is the synchronous play time, and further configured to determine the at least one first play start position. And a maximum value in the second play start position is a synchronized play start position of the multimedia file.
  • the receiving unit 301, the obtaining unit 302, the determining unit 303, the setting unit 304, the executing unit 305, the processing unit 306, the sending unit 307, and the playing unit 308 may be Realized by a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA) on the terminal.
  • CPU central processing unit
  • MPU microprocessor
  • DSP digital signal processor
  • FPGA field programmable gate array
  • the understanding of the synchronous playback device provided in this embodiment may refer to the description of the foregoing synchronous playback method embodiment.
  • the synchronous playback device provided in this embodiment can realize synchronous playback of video by multiple terminals, so that the user sees that the video on each terminal is consistent, which can improve the display effect, and is more accurate in synchronization time precision.
  • the playback screen can be completely consistent, and there is no network delay.
  • the networking environment is simple and convenient, and there is no additional cost.
  • the embodiment further provides a synchronous playback system, the system comprising at least two synchronous playback devices as described above, the system time of the at least two synchronous playback devices as described above being calibrated, keeping the clocks consistent, and being in the same Local area network and save the same multimedia files.
  • the synchronous playing system can realize synchronous playing of video by multiple terminals, so that the user sees the video on each terminal in a consistent manner, which can improve the display effect, and the accuracy of the synchronization time is more accurate, and the playing screen can be completely maintained. Consistent, there is no network delay, the networking environment is simple and convenient, and there is no additional cost.
  • the embodiment further provides a computer readable storage medium storing computer executable instructions for performing the above synchronous playback method.
  • FIG. 6 is a schematic diagram showing the hardware structure of a synchronous playback device according to this embodiment.
  • the synchronous playback device includes: one or more processors 610 and a memory 620.
  • One processor 610 is taken as an example in FIG.
  • the synchronous playback device may further include: an input device 630 and an output device 640.
  • the processor 610, the memory 620, the input device 630, and the output device 640 in the synchronous playback device may be connected by a bus or other means, as exemplified by a bus connection in FIG.
  • Input device 630 can receive input numeric or character information, and output device 640 can include display Display devices such as screens.
  • the memory 620 is a computer readable storage medium that can be used to store software programs, computer executable programs, and modules.
  • the processor 610 executes a plurality of functional applications and data processing by executing software programs, instructions, and modules stored in the memory 620 to implement any of the above-described embodiments.
  • the memory 620 may include a storage program area and an storage data area, wherein the storage program area may store an operating system, an application required for at least one function; the storage data area may store data created according to the use of the synchronous playback device, and the like.
  • the memory may include volatile memory such as random access memory (RAM), and may also include non-volatile memory such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device.
  • Memory 620 can be a non-transitory computer storage medium or a transitory computer storage medium.
  • the non-transitory computer storage medium such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device.
  • memory 620 can optionally include memory remotely located relative to processor 610, which can be connected to the synchronous playback device over a network. Examples of the above networks may include the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
  • the implementation of all or part of the processes in the foregoing embodiment may be performed by a computer program executing related hardware, and the program may be stored in a non-transitory computer readable storage medium, and the program may include, when executed, A flow of an embodiment of the method, wherein the non-transitory computer readable storage medium is a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory (RAM).
  • the non-transitory computer readable storage medium is a magnetic disk, an optical disk, a read only memory (ROM), or a random access memory (RAM).
  • This embodiment can be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware aspects. Moreover, the present disclosure may employ computer usable storage media in one or more of the computer usable program code embodied therein. A form of computer program product implemented on a quality (including disk storage and optical storage, etc.).
  • each of the flowchart and/or block diagrams can be implemented by computer program instructions.
  • 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 device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • the synchronous playing method, device and system provided by the present disclosure can realize that a plurality of terminals synchronously play video, so that the user sees that the video of each terminal is consistent, which can improve the display effect, and, in synchronization time precision. More accurate, the playback picture can be completely consistent, and there is no network delay.
  • the networking environment is simple and convenient, and there is no additional cost.

Abstract

一种同步播放方法、装置和系统,其中,所述方法包括:接收至少一个第一终端发送的第一消息,所述第一消息携带多媒体文件的第一启动播放时间和第一播放起始位置;获取第二终端的多媒体文件的第二启动播放时间和第二播放起始位置;根据至少一个第一启动播放时间和至少一个第一播放起始位置、所述第二启动播放时间、所述第二播放起始位置确定同步播放信息,所述同步播放信息包括:多媒体文件的同步播放时间和同步播放起始位置;根据所述同步播放信息与第一终端同步播放多媒体文件。

Description

同步播放方法、装置和系统 技术领域
本公开涉及电子领域的多媒体文件播放技术,例如涉及一种同步播放方法、装置和系统。
背景技术
随着电子及通信技术的不断发展,终端在人们生活中的应用越来越广泛。在手机终端卖场,为宣传手机的卖点信息,比如硬件配置、高品质音质、高分辨率屏幕等等,展台上展示手机终端可以自动播放宣传视频文件。在实际应用中,多个手机终端分别播放视频文件,这样,多个手机终端屏幕显示画面不同,显得较乱,容易打乱用户的注意力和关注度。
相关技术中,为了使得多个终端同步播放视频,通常通过直播实现同步播放,主流采用实时流传输(http live streaming,hls)协议,其中,hls协议是基于超文本传输(Hyper Text Transport Protocol,HTTP)协议,传输数据包括m3u描述文件和ts媒体文件。多个终端连接hls直播服务器,通过不断下载m3u文件和ts文件,并按照ts先后播放,实现实时同步播放,但是,采用直播方法具有一定的局限性,如采用直播服务器,成本较高,有带宽费用和服务器成本;直播服务器的同步精度不高,受制网络状态影响,会出现多终端不能完全画面同步,也可能出现视频不流畅的问题;直播服务适合实时生产视频内容播放,能达到较低延时且同步播放,但无法达到真正意义的同步播放效果。
发明内容
本公开提供一种同步播放方法、装置和系统,可以在同步时间精度上更准确,组网环境简单方便,无额外成本支出。
一种同步播放方法,应用于第二终端,所述方法包括:
接收至少一个第一终端发送的第一消息,所述第一消息携带多媒体文件的第一启动播放时间和第一播放起始位置;
获取第二终端的多媒体文件的第二启动播放时间和第二播放起始位置;
根据至少一个第一启动播放时间和至少一个第一播放起始位置、所述第二启动播放时间、所述第二播放起始位置确定同步播放信息,所述同步播放信息包括:多媒体文件的同步播放时间和同步播放起始位置;
根据所述同步播放信息与第一终端同步播放多媒体文件。
可选地,所述根据至少一个第一启动播放时间和至少一个第一播放起始位置、第二启动播放时间、第二播放起始位置确定同步播放信息,包括:
分别确定所述至少一个第一启动播放时间与当前时间的时间差为第一时间值,确定第二启动播放时间与当前时间的时间差为第二时间值;
根据所述第一时间值和所述第二时间值确定所述同步播放时间,根据所述至少一个第一播放起始位置和第二播放起始位置确定所述多媒体文件的同步播放起始位置。
可选地,所述获取第二终端的多媒体文件的第二启动播放时间和第二播放起始位置,包括:
在预设时间周期内,确定第二终端本地的多媒体文件的启动播放时间和播放起始位置是否被重置;
若没有重置,则重置所述第二终端本地的多媒体文件的启动播放时间和播放起始位置,获得重置后的第二启动播放时间和第二播放起始位置。
可选地,所述根据所述同步播放信息与第一终端同步播放多媒体文件,包括:
根据所述同步播放信息设定第一定时任务,所述第一定时任务的开始时间为同步播放时间,所述第一定时任务包括:从所述同步播放起始位置开始播放多媒体文件;
当到达所述第一定时任务的开始时间时,执行所述第一定时任务。
可选地,在所述接收至少一个第一终端发送的第一消息之前,所述方法还包括:
获取多媒体文件的预设启动播放时间和预设播放起始位置,设定第二定时任务,所述第二定时任务的开始时间为所述预设启动播放时间,所述第二定时任务包括:从所述预设播放起始位置开始播放多媒体文件;
发送第二消息给所述至少一个第一终端,所述第二消息携带预设启动播放时间和预设播放起始位置,以使得所述至少一个第一终端在到达所述第二定时任务的开始时间时,执行所述第二定时任务。
可选地,在所述根据所述同步播放信息设定第一定时任务之后,所述方法还包括:
发送第三消息给所述至少一个第一终端,所述第三消息携带所述同步播放信息,以使得所述至少一个第一终端根据所述同步播放信息播放多媒体文件。
可选地,所述根据所述第一时间值和所述第二时间值确定所述同步播放时间,根据所述至少一个第一播放起始位置和第二播放起始位置确定所述多媒体文件的同步播放起始位置,包括:
确定所述第一时间值和所述第二时间值中最大值为所述同步播放时间,确定所述至少一个第一播放起始位置和第二播放起始位置中的最大值为所述多媒 体文件的同步播放起始位置。
一种同步播放装置,包括:接收单元、获取单元、确定单元、播放单元,其中,
所述接收单元,设置为接收至少一个第一终端发送的第一消息,所述第一消息携带多媒体文件的第一启动播放时间和第一播放起始位置;
所述获取单元,设置为获取第二终端的多媒体文件的第二启动播放时间和第二播放起始位置;
所述确定单元,设置为根据至少一个第一启动播放时间和至少一个第一播放起始位置、所述第二启动播放时间、所述第二播放起始位置确定同步播放信息,所述同步播放信息包括:多媒体文件的同步播放时间和同步播放起始位置;
所述播放单元,设置为根据所述同步播放信息与第一终端同步播放多媒体文件。
可选地,所述确定单元,设置为分别确定至少一个第一启动播放时间与当前时间的时间差为第一时间值,确定第二启动播放时间与当前时间的时间差为第二时间值,还设置为根据所述第一时间值和所述第二时间值确定所述同步播放时间,根据所述至少一个第一播放起始位置和第二播放起始位置确定所述多媒体文件同步播放起始位置。
可选地,所述装置还包括:处理单元,
所述确定单元,设置为在预设时间周期内,确定第二终端本地的多媒体文件的启动播放时间和播放起始位置是否被重置;
所述处理单元,设置为若没有重置,则重置所述第二终端本地的多媒体文件的启动播放时间和播放起始位置,获得重置后的第二启动播放时间和第二播放起始位置。
可选地,所述装置还包括:设定单元、执行单元,
所述设定单元,设置为根据所述同步播放信息设定第一定时任务,所述第一定时任务的开始时间为同步播放时间,所述第一定时任务包括:从所述同步播放起始位置开始播放多媒体文件;
所述执行单元,设置为当到达所述第一定时任务的开始时间时,执行所述第一定时任务。
可选地,所述装置还包括:发送单元,
所述获取单元,设置为获取多媒体文件的预设启动播放时间和预设播放起始位置;
所述设定单元,设置为设定第二定时任务,所述第二定时任务的开始时间为所述预设启动播放时间,所述第二定时任务包括:从所述预设播放起始位置开始播放多媒体文件;
所述发送单元,设置为发送第二消息给所述至少一个第一终端,所述第二消息携带预设启动播放时间和预设播放起始位置,以使得所述至少一个第一终端在到达所述第二定时任务的开始时间时,执行所述第二定时任务。
可选地,所述发送单元,还设置为发送第三消息给所述至少一个第一终端,所述第三消息携带所述同步播放信息,以使得所述至少一个第一终端根据所述同步播放信息播放多媒体文件。
可选地,所述确定单元,是设置为确定所述第一时间值和所述第二时间值中最大值为所述同步播放时间,还设置为确定所述至少一个第一播放起始位置和第二播放起始位置中的最大值为所述同步播放起始位置。
一种同步播放系统,所述系统包括:至少两个如上所述的同步播放装置,所述至少两个如上所述的同步播放装置处于同一个局域网络。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述同步播放方法。
本实施例还提供一种同步播放设备,该同步播放设备包括一个或多个处理器、存储器以及一个或多个程序,所述一个或多个程序存储在存储器中,当被一个或多个处理器执行时,执行上述同步播放方法。
本实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述任意一种同步播放方法。
本公开提供的同步播放方法、装置和系统,可以实现多个终端同步播放视频,这样,用户看到每个终端上的视频的画面是一致的,可以提升展示效果,而且,在同步时间精度上更准确,播放画面能够完全保持一致,也没有网络时延,组网环境简单方便,无额外成本支出。
附图说明
在附图中,相似的附图标记可在不同的视图中描述相似的部件。具有不同字母后缀的相似附图标记可表示相似部件的不同示例。附图以示例的方式大体示出了本文中所讨论的多个实施例。
图1为本实施例提供的同步播放方法流程示意图一;
图2为本实施例提供的同步播放方法流程示意图二;
图3为本实施例提供的同步播放方法流程示意图三;
图4为本实施例提供的同步播放装置结构示意图一;
图5为本实施例提供的同步播放装置结构示意图二;
图6为本实施例提供的一种同步播放设备的硬件结构示意图。
具体实施方式
下面将结合本实施例中的附图,对本公开的技术方案进行描述。
本实施例提供一种同步播放方法,如图1所示,该方法可以包括以下步骤。
在步骤101中,接收至少一个第一终端发送的第一消息。
其中,所述第一消息携带多媒体文件的第一启动播放时间和第一播放起始位置,即每一个第一消息携带一个第一终端的多媒体文件的第一启动播放时间和第一播放起始位置。
这里,第一启动播放时间是指在终端系统的某一时间开始播放多媒体文件,例如,在终端系统时间的13:10开始播放多媒体文件;第一播放起始位置是指在多媒体文件的某一时刻开始播放多媒体文件,例如,在视频的00:02:16开始播放视频。
其中,多媒体文件可以为视频文件、音频文件等,还可以为其它的多媒体文件。
本实施例提供的同步播放方法的执行主体为同步播放装置,该同步播放装置可以为第二终端,也可以为安装在第二终端上的同步播放软件系统,其中,终端可以为手机、平板电脑等具有视频播放功能的电子设备。
本实施例中,进行同步播放的至少一个第一终端和第二终端的系统时间经过校准,保持时钟一致,而且该至少一个第一终端和第二终端处于同一个局域网络下,并保存有相同的多媒体文件。
可选地,在所述接收至少一个终端发送的第一消息之前,所述方法还包括以下步骤。
获取多媒体文件的预设启动播放时间和预设播放起始位置,设定第二定时任务,所述第二定时任务的开始时间为所述预设启动播放时间,所述第二定时任务包括:从所述预设播放起始位置开始播放多媒体文件。
发送第二消息给所述至少一个第一终端,所述第二消息携带预设启动播放时间和预设播放起始位置,以使得所述至少一个第一终端在到达所述第二定时任务的开始时间时,执行所述第二定时任务。
在步骤102中,获取第二终端的多媒体文件的第二启动播放时间和第二播放起始位置。
一种可能的实现方式中,所述获取第二终端的多媒体文件的第二启动播放时间和第二播放起始位置,包括:
在预设时间周期内,确定第二终端本地的多媒体文件的启动播放时间和播放起始位置是否被重置。
若没有重置,则重置所述第二终端本地的多媒体文件的启动播放时间和播放起始位置,获得重置后的第二启动播放时间和第二播放起始位置。
这里,重置是指第二终端收到其他终端的消息后,重新设置多媒体文件的启动播放时间和播放起始位置,因为终端有记忆功能,记的是上一次的启动播放时间和多媒体文件播放起始时刻,重新同步就需要重新计算,计算的原则是,启动播放时间是当前时间再延后一定时间长,播放起始位置是当前播放进度时刻。
在步骤103中,根据至少一个第一启动播放时间和至少一个第一播放起始位置、所述第二启动播放时间、所述第二播放起始位置确定同步播放信息。
其中,所述同步播放信息包括:多媒体文件的同步播放时间和同步播放起始位置。
一种可能的实现方式中,所述根据至少一个第一启动播放时间和至少一个第一播放起始位置、第二启动播放时间、第二播放起始位置确定同步播放信息,包括以下步骤。
分别确定所述至少一个第一启动播放时间与当前时间的时间差为第一时间值,确定第二启动播放时间与当前时间的时间差为第二时间值。
根据所述第一时间值和所述第二时间值确定所述同步播放时间,根据所述至少一个第一播放起始位置和第二多媒体文播放起始位置确定所述多媒体文件同步播放起始位置。
一种可能的实现方式中,根据所述第一时间值和所述第二时间值确定所述同步播放时间,根据所述至少一个第一播放起始位置和第二播放起始位置确定所述多媒体文件同步播放起始位置,可以包括以下步骤。
确定所述第一时间值和所述第二时间值中最大值为所述同步播放时间,确定所述至少一个第一播放起始位置和第二播放起始位置中的最大值为所述多媒体文件同步播放起始位置。
本实施例中,每个终端可以发送消息给其它终端,该同步广播消息内容包括启动播放时间、视频播放起始位置,同时接收其它终端发来的消息,比对出一个最晚的启动播放时间和视频播放起始位置,最终协商出基准启动播放时间和视频播放起始位置,即同步播放时间和视频同步播放起始位置。
示例性的,第二终端为手机A,多个第一终端分别为:手机B、手机C、手机D、手机E、手机F,手机A第二启动播放时间为13:10,手机A第二视频播放起始位置为00:02:16,手机B第一启动播放时间为13:13,手机B第一视频播放起始位置为00:02:11,手机C第一启动播放时间为13:05,手机C第一视频播放起始位置为00:01:35,手机D第一启动播放时间为13:08,手机D第 一视频播放起始位置为00:02:20,手机E第一启动播放时间为13:01,手机E第一视频播放起始位置为00:02:05,手机F第一启动播放时间为13:16,手机F第一视频播放起始位置为00:01:55,比对出一个最晚的启动播放时间为13:16,比对出一个最晚的视频播放起始位置为00:02:20,即同步播放时间为13:16,视频同步播放起始位置为00:02:20,当手机A的系统时间为13:16时,从视频的00:02:20开始播放视频。
本实施例提供的同步播放是以同步播放的所有终端中最晚的启动播放时间和最晚视频播放起始位置为准,同步的原则也可以设定为最早启动播放时间或最早视频播放起始位置为准,同样能够达到同步播放的效果。
在步骤104中,根据所述同步播放信息与第一终端同步播放多媒体文件。
一种可能的实现方式中,根据所述同步播放信息同步播放多媒体文件,包括:根据所述同步播放信息设定第一定时任务,其中,所述第一定时任务的开始时间为同步播放时间,所述第一定时任务包括:从所述多媒体文件同步播放起始位置开始播放多媒体文件;当到达所述第一定时任务的开始时间时,执行所述第一定时任务。
可选地,在所述根据所述同步播放信息设定第一定时任务之后,所述方法还包括以下步骤。
发送第三消息给所述至少一个第一终端,所述第三消息携带所述同步播放信息。
可选地,当基准启动时间到达时,即当第二终端的系统时间到达同步播放时间,至少一个第一终端和第二终端同时启动播放预设的相同的多媒体文件,且从基准播放起始位置开始播放多媒体文件,例如,从视频同步播放起始位置开始播放视频文件,以达到完全同步播放。
本实施例提供的同步播放方法,可以实现多个终端同步播放多媒体文件,这样,用户看到每个终端上的多媒体文件的信息是相同的,例如,用户看到每个终端上的视频的画面是一致的,可以提升展示效果,而且,在同步时间精度上更准确,播放画面能够完全保持一致,也没有网络时延,组网环境简单方便,无额外成本支出。
本实施例提供一种同步播放方法,如图2所示,该方法可以包括以下步骤。
在步骤201中,获取多媒体文件的预设启动播放时间和预设播放起始位置,设定第二定时任务。
其中,所述第二定时任务的开始时间为所述预设启动播放时间,所述第二定时任务包括:从所述预设播放起始位置开始播放多媒体文件。
本实施例提供的同步播放方法的执行主体为同步播放装置,该同步播放装置可以为第二终端,也可以为安装在第二终端上的同步播放软件系统,其中,终端可以为手机、平板电脑等具有多媒体文件播放功能的电子设备。
本实施例中,进行同步播放的至少一个第一终端和第二终端的系统时间经过校准,保持时钟一致,而且该至少一个第一终端和第二终端处于同一个局域网络下,并保存有相同的多媒体文件。
在步骤202中,发送第二消息给所述至少一个第一终端,所述第二消息携带预设启动播放时间和预设播放起始位置,以使得所述至少一个第一终端在到达所述第二定时任务的开始时间时,执行所述第二定时任务。
在步骤203中,接收至少一个第一终端发送的第一消息。
其中,所述第一消息携带多媒体文件的第一启动播放时间和第一播放起始位置。
在步骤204中,在预设时间周期内,确定第二终端本地的多媒体文件的启 动播放时间和播放起始位置是否被重置。
在步骤205中,若没有重置,则重置所述第二终端本地的启动播放时间和播放起始位置,获得重置后的第二启动播放时间和第二播放起始位置。
在步骤206中,分别确定所述至少一个第一启动播放时间与当前时间的时间差为第一时间值,确定第二启动播放时间与当前时间的时间差为第二时间值。
在步骤207中,根据所述第一时间值和所述第二时间值确定所述同步播放时间,根据所述至少一个第一播放起始位置和第二播放起始位置确定所述多媒体文件的同步播放起始位置。
在步骤208中,根据所述同步播放信息设定第一定时任务。
其中,所述第一定时任务的开始时间为同步播放时间,所述第一定时任务包括:从所述多同步播放起始位置开始播放多媒体文件。
步骤209、当到达所述第一定时任务的开始时间时,执行所述第一定时任务。
本实施例提供的同步播放方法,可以实现多个终端同步播放多媒体文件,这样,用户看到每个终端上的多媒体文件的信息是相同的,例如,用户看到每个终端上的视频的画面是一致的,可以提升展示效果,而且,在同步时间精度上更准确,播放画面能够完全保持一致,也没有网络时延,组网环境简单方便,无额外成本支出。
本实施例提供的同步播放方法中,进行同步播放的多个终端处于同一个局域网络下,该多个终端中的每个终端的系统时间经过校准,保持时钟一致,存有相同的视频文件。该多个终端上安装有同步播放软件系统,该同步播放软件系统可以包括主控子系统、消息子系统、同步策略子系统、播放子系统。
其中,主控子系统是控制整个系统的工作模块;消息子系统是接收和发送同步请求;同步策略子系统是决策启动播放时间和视频播放起始时刻;播放子 系统根据播放请求控制视频播放。
操作流程如图3所示。
步骤(1)、启动终端的同步播放软件系统,启动主控子系统开始工作。
步骤(2)、主控子系统从同步策略子系统获得启动播放时间、视频播放起始位置。
同步策略子系统的启动播放时间缺省为终端当前系统时间基础上再延时一个周期时间,视频播放起始位置缺省为0,并做记录。
步骤(3)、主控子系统设定时任务,定时任务的开始时间为启动播放时间。
步骤(4)、主控子系统通知消息子系统发送同步消息。
步骤(5)、消息子系统从同步策略子系统获得启动播放时间和视频播放起始位置,即获得同步时间。
步骤(6)、消息子系统向局域网内的其它终端发送同步消息,同步消息包括:启动播放时间和视频播放起始位置。
步骤(7)、消息子系统接收到其它终端发送的同步消息。
步骤(8)、消息子系统读出同步消息中其它终端的启动播放时间和视频播放起始位置,把其它终端的启动播放时间和视频播放起始位置传给同步策略子系统,即传递同步时间。
步骤(9)、一个时间周期内,如果同步策略子系统未重置过本终端的启动播放时间和视频播放起始位置,则重置本终端的启动播放时间和视频播放起始位置,启动播放时间为终端当前系统时间基础上再延时一个周期时间,视频播放起始位置为当前播放进度时刻,即重置本地同步时间。
步骤(10)、同步策略子系统比对本终端的同步启动播放时间,如果本终端的同步启动播放时间晚于远端的启动播放时间,则以本终端的启动播放时间为 准,否则以远端为准,并记录为同步启动播放时间;比对本终端的视频播放起始位置,如果本终端的视频播放起始位置晚于远端的,则以本终端的视频播放起始位置为准,否则以远端的为准,并记录为同步视频播放起始位置,即决策出同步时间。
步骤(11)、同步策略子系统告知主控子系统有新的启动播放时间和视频播放起始位置,即更新同步时间。
步骤(12)、主控子系统取消已有的定时任务,重新定时新的定时任务,新的定时任务的开始时刻为新的启动播放时间,即同步启动播放时间。
步骤(13)、主控子系统通知消息子系统发送同步消息。
步骤(14)、消息子系统从同步策略子系统获得新的启动播放时间、新的视频播放起始位置,即同步启动播放时间、同步视频播放起始位置。
步骤(15)、消息子系统向局域网内的其它终端发送同步消息,同步消息包括新的启动播放时间和新的视频播放起始位置,即同步启动播放时间、同步视频播放起始位置。
步骤(16)、主控子系统设置的定时任务的开始时间到达后,通知播放子系统。
步骤(17)、播放子系统开始播放视频,并从同步视频播放起始位置开始播放视频。
本实施例提供的同步播放方法,可以实现多个终端同步播放视频,可以应用的场景包括:多个终端同时启动,可以达到多个终端同步播放;已有几个终端正在同步播放,又有的新的终端加入,不打断已有几个终端的播放进度,仍能够让新加入的终端与其他终端同步播放;对比hls直播,本实施例提供同步播放方法,在同步时间精度上更准确,播放画面能够完全保持一致,也没有网络 时延,组网环境简单方便,无额外成本支出。
本实施例提供一种同步播放装置30,如图4所示,所述装置30包括:接收单元301、获取单元302、确定单元303、播放单元308。
所述接收单元301,设置为接收至少一个第一终端发送的第一消息,所述第一消息携带多媒体文件的第一启动播放时间和第一播放起始位置。
所述获取单元302,设置为获取第二终端的多媒体文件的第二启动播放时间和第二播放起始位置。
所述确定单元303,设置为根据至少一个第一启动播放时间和至少一个第一播放起始位置、所述第二启动播放时间、所述第二播放起始位置确定同步播放信息,所述同步播放信息包括:多媒体文件的同步播放时间和同步播放起始位置。
所述播放单元308,设置为根据所述同步播放信息与第一终端同步播放多媒体文件。
可选地,所述确定单元303,设置为分别确定至少一个第一启动播放时间与当前时间的时间差为第一时间值,确定第二启动播放时间与当前时间的时间差为第二时间值,还设置为根据所述第一时间值和所述第二时间值确定所述同步播放时间,根据所述至少一个第一播放起始位置和第二播放起始位置确定所述多媒体文件同步播放起始位置。
如图5所示,所述装置还包括:处理单元306。
所述确定单元303,设置为在预设时间周期内,确定第二终端本地的多媒体文件的启动播放时间和播放起始位置是否被重置。
所述处理单元306,设置为若没有重置,则重置所述第二终端本地的启动播放时间和播放起始位置,获得重置后的第二启动播放时间和第二播放起始位置。
可选地,如图5所示,所述装置还包括:设定单元304、执行单元305,
所述设定单元304,设置为根据所述同步播放信息设定第一定时任务,所述第一定时任务的开始时间为同步播放时间,所述第一定时任务包括:从所述同步播放起始位置开始播放多媒体文件。
所述执行单元305,设置为当到达所述第一定时任务的开始时间时,执行所述第一定时任务。
可选地,如图5所示,所述装置还包括:发送单元307。
所述获取单元302,设置为获取多媒体文件的预设启动播放时间和预设播放起始位置。
所述设定单元304,设置为设定第二定时任务,所述第二定时任务的开始时间为所述预设启动播放时间,所述第二定时任务包括:从所述预设播放起始位置开始播放多媒体文件。
所述发送单元307,设置为发送第二消息给所述至少一个第一终端,所述第二消息携带预设启动播放时间和预设播放起始位置,以使得所述至少一个第一终端在到达所述第二定时任务的开始时间时,执行所述第二定时任务。
可选地,所述发送单元307,还设置为发送第三消息给所述至少一个第一终端,所述第三消息携带所述同步播放信息,以使得所述至少一个第一终端根据所述同步播放信息播放多媒体文件。
可选地,所述确定单元303,设置为确定所述第一时间值和所述第二时间值中最大值为所述同步播放时间,还设置为确定所述至少一个第一播放起始位置和第二播放起始位置中的最大值为所述多媒体文件同步播放起始位置。
在实际应用中,所述接收单元301、获取单元302、确定单元303、设定单元304、执行单元305、处理单元306、发送单元307以及播放单元308可由位 于终端上的中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)、或现场可编程门阵列(FPGA)等实现。
可选地,本实施例提供的同步播放装置的理解可以参考上述同步播放方法实施例的说明。
本实施例提供的同步播放装置,可以实现多个终端同步播放视频,这样,用户看到每个终端上的视频的画面是一致的,可以提升展示效果,而且,在同步时间精度上更准确,播放画面能够完全保持一致,也没有网络时延,组网环境简单方便,无额外成本支出。
本实施例还提供一种同步播放系统,该系统包括至少两个如上所述的同步播放装置,该至少两个如上所述的同步播放装置的系统时间经过校准,保持时钟一致,且处于同一个局域网络,并保存有相同的多媒体文件。该同步播放系统可以实现多个终端同步播放视频,这样,用户看到每个终端上的视频的画面是一致的,可以提升展示效果,而且,在同步时间精度上更准确,播放画面能够完全保持一致,也没有网络时延,组网环境简单方便,无额外成本支出。
本实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述同步播放方法。
图6是本实施例的一种同步播放设备的硬件结构示意图,如图6所示,该同步播放设备包括:一个或多个处理器610和存储器620。图6中以一个处理器610为例。
所述同步播放设备还可以包括:输入装置630和输出装置640。
所述同步播放设备中的处理器610、存储器620、输入装置630和输出装置640可以通过总线或者其他方式连接,图6中以通过总线连接为例。
输入装置630可以接收输入的数字或字符信息,输出装置640可以包括显 示屏等显示设备。
存储器620作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块。处理器610通过运行存储在存储器620中的软件程序、指令以及模块,以执行多种功能应用以及数据处理,以实现上述实施例中的任意一种同步播放方法。
存储器620可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据同步播放设备的使用所创建的数据等。此外,存储器可以包括随机存取存储器(Random Access Memory,RAM)等易失性存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件或者其他非暂态固态存储器件。
存储器620可以是非暂态计算机存储介质或暂态计算机存储介质。该非暂态计算机存储介质,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器620可选包括相对于处理器610远程设置的存储器,这些远程存储器可以通过网络连接至同步播放设备。上述网络的实例可以包括互联网、企业内部网、局域网、移动通信网及其组合。
实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来执行相关的硬件来完成的,该程序可存储于一个非暂态计算机可读存储介质中,该程序在执行时,可包括如上述方法的实施例的流程,其中,该非暂态计算机可读存储介质可以为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。
本实施例可提供为方法、系统、或计算机程序产品。因此,本公开可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介 质(包括磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本公开是参照本实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的,可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
工业实用性
本公开提供的同步播放方法、装置和系统,可以实现多个终端同步播放视频,这样,用户看到每个终端上的视频的画面是一致的,可以提升展示效果,而且,在同步时间精度上更准确,播放画面能够完全保持一致,也没有网络时延,组网环境简单方便,无额外成本支出。

Claims (16)

  1. 一种同步播放方法,应用于第二终端,所述方法包括:
    接收至少一个第一终端发送的第一消息,所述第一消息携带多媒体文件的第一启动播放时间和第一播放起始位置;
    获取第二终端的多媒体文件的第二启动播放时间和第二播放起始位置;
    根据至少一个第一启动播放时间和至少一个第一播放起始位置、所述第二启动播放时间、所述第二播放起始位置确定同步播放信息,所述同步播放信息包括:多媒体文件的同步播放时间和同步播放起始位置;
    根据所述同步播放信息与第一终端同步播放多媒体文件。
  2. 根据权利要求1所述的方法,其中,所述根据至少一个第一启动播放时间和至少一个第一播放起始位置、第二启动播放时间、第二播放起始位置确定同步播放信息,包括:
    分别确定所述至少一个第一启动播放时间与当前时间的时间差为第一时间值,确定第二启动播放时间与当前时间的时间差为第二时间值;
    根据所述第一时间值和所述第二时间值确定所述同步播放时间,根据所述至少一个第一播放起始位置和第二播放起始位置确定所述多媒体文件的同步播放起始位置。
  3. 根据权利要求1所述的方法,其中,所述获取第二终端的多媒体文件的第二启动播放时间和第二播放起始位置,包括:
    在预设时间周期内,确定第二终端本地的多媒体文件的启动播放时间和播放起始位置是否被重置;
    若没有重置,则重置所述第二终端本地的多媒体文件的启动播放时间和播放起始位置,获得重置后的第二启动播放时间和第二播放起始位置。
  4. 根据权利要求1所述的方法,其中,所述根据所述同步播放信息与第一 终端同步播放多媒体文件,包括:
    根据所述同步播放信息设定第一定时任务,所述第一定时任务的开始时间为同步播放时间,所述第一定时任务包括:从所述同步播放起始位置开始播放多媒体文件;
    当到达所述第一定时任务的开始时间时,执行所述第一定时任务。
  5. 根据权利要求1至4任一项所述的方法,其中,在所述接收至少一个第一终端发送的第一消息之前,所述方法还包括:
    获取多媒体文件的预设启动播放时间和预设播放起始位置,设定第二定时任务,所述第二定时任务的开始时间为所述预设启动播放时间,所述第二定时任务包括:从所述预设播放起始位置开始播放多媒体文件;
    发送第二消息给所述至少一个第一终端,所述第二消息携带预设启动播放时间和预设播放起始位置,以使得所述至少一个第一终端在到达所述第二定时任务的开始时间时,执行所述第二定时任务。
  6. 根据权利要求4所述的方法,其中,在所述根据所述同步播放信息设定第一定时任务之后,所述方法还包括:
    发送第三消息给所述至少一个第一终端,所述第三消息携带所述同步播放信息,以使得所述至少一个第一终端根据所述同步播放信息播放多媒体文件。
  7. 根据权利要求2所述的方法,其中,所述根据所述第一时间值和所述第二时间值确定所述同步播放时间,根据所述至少一个第一播放起始位置和第二播放起始位置确定所述多媒体文件的同步播放起始位置,包括:
    确定所述第一时间值和所述第二时间值中最大值为所述同步播放时间,确定所述至少一个第一播放起始位置和第二播放起始位置中的最大值为所述多媒体文件的同步播放起始位置。
  8. 一种同步播放装置,包括:接收单元、获取单元、确定单元、播放单元,其中,
    所述接收单元,设置为接收至少一个第一终端发送的第一消息,所述第一消息携带多媒体文件的第一启动播放时间和第一播放起始位置;
    所述获取单元,设置为获取第二终端的多媒体文件的第二启动播放时间和第二播放起始位置;
    所述确定单元,设置为根据至少一个第一启动播放时间和至少一个第一播放起始位置、所述第二启动播放时间、所述第二播放起始位置确定同步播放信息,所述同步播放信息包括:多媒体文件的同步播放时间和同步播放起始位置;
    所述播放单元,设置为根据所述同步播放信息与第一终端同步播放多媒体文件。
  9. 根据权利要求8所述的装置,其中,所述确定单元,设置为分别确定至少一个第一启动播放时间与当前时间的时间差为第一时间值,确定第二启动播放时间与当前时间的时间差为第二时间值,还设置为根据所述第一时间值和所述第二时间值确定所述同步播放时间,根据所述至少一个第一播放起始位置和第二播放起始位置确定所述多媒体文件同步播放起始位置。
  10. 根据权利要求8述的装置,还包括:处理单元,
    所述确定单元,设置为在预设时间周期内,确定第二终端本地的多媒体文件的启动播放时间和播放起始位置是否被重置;
    所述处理单元,设置为若没有重置,则重置所述第二终端本地的多媒体文件的启动播放时间和播放起始位置,获得重置后的第二启动播放时间和第二播放起始位置。
  11. 根据权利要求8所述的装置,还包括:第一设定单元、执行单元,
    所述设定单元,设置为根据所述同步播放信息设定第一定时任务,所述第一定时任务的开始时间为同步播放时间,所述第一定时任务包括:从所述同步播放起始位置开始播放多媒体文件;
    所述执行单元,设置为当到达所述第一定时任务的开始时间时,执行所述第一定时任务。
  12. 根据权利要求8至11任一项所述的装置,还包括:发送单元,
    所述获取单元,设置为获取多媒体文件的预设启动播放时间和预设播放起始位置;
    所述设定单元,设置为设定第二定时任务,所述第二定时任务的开始时间为所述预设启动播放时间,所述第二定时任务包括:从所述预设播放起始位置开始播放多媒体文件;
    所述发送单元,设置为发送第二消息给所述至少一个第一终端,所述第二消息携带预设启动播放时间和预设播放起始位置,以使得所述至少一个第一终端在到达所述第二定时任务的开始时间时,执行所述第二定时任务。
  13. 根据权利要求12所述的装置,其中,所述发送单元,还设置为发送第三消息给所述至少一个第一终端,所述第三消息携带所述同步播放信息,以使得所述至少一个第一终端根据所述同步播放信息播放多媒体文件。
  14. 根据权利要求9所述的装置,其中,所述确定单元,是设置为确定所述第一时间值和所述第二时间值中最大值为所述同步播放时间,还设置为确定所述至少一个第一播放起始位置和第二播放起始位置中的最大值为所述同步播放起始位置。
  15. 一种同步播放系统,包括:至少两个如权利要求8-14任一项所述的同步播放装置,所述至少两个如权利要求8-14任一项所述的同步播放装置处于同 一个局域网络。
  16. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1-7任一项的方法。
PCT/CN2017/115794 2017-04-12 2017-12-13 同步播放方法、装置和系统 WO2018188365A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710235533.1A CN108696762A (zh) 2017-04-12 2017-04-12 一种同步播放方法、装置和系统
CN201710235533.1 2017-04-12

Publications (1)

Publication Number Publication Date
WO2018188365A1 true WO2018188365A1 (zh) 2018-10-18

Family

ID=63793094

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/115794 WO2018188365A1 (zh) 2017-04-12 2017-12-13 同步播放方法、装置和系统

Country Status (2)

Country Link
CN (1) CN108696762A (zh)
WO (1) WO2018188365A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111198666A (zh) * 2018-11-20 2020-05-26 中科创达软件股份有限公司 一种基于Hypervisor的多屏开机动画联动方法及相关设备
CN111541531A (zh) * 2020-04-27 2020-08-14 腾讯音乐娱乐科技(深圳)有限公司 一种双端时延对齐方法及装置、服务器、存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070276524A1 (en) * 2006-05-29 2007-11-29 Funai Electric Co., Ltd Digital Sound Signal Processing Apparatus
CN102170584A (zh) * 2011-03-14 2011-08-31 华为技术有限公司 同步hs终端设备之间媒体播放的方法、装置和系统
CN104954727A (zh) * 2014-03-25 2015-09-30 鸿富锦精密工业(深圳)有限公司 音视频同步控制设备及方法
CN105656616A (zh) * 2014-12-03 2016-06-08 中国移动通信集团公司 多设备间数据同步的方法、装置、发送端及接收端
CN106028221A (zh) * 2016-07-14 2016-10-12 广东欧珀移动通信有限公司 一种控制时间同步的方法及智能音箱

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103839558B (zh) * 2012-11-23 2016-08-31 三星电子(中国)研发中心 同步播放方法及服务器、播放器
CN103198848B (zh) * 2013-01-31 2016-02-10 广东欧珀移动通信有限公司 同步播放方法及系统
CN104464767B (zh) * 2013-09-17 2018-03-20 惠州超声音响有限公司 同步多个播放装置的音频播放的方法及音频播放系统
CN104539999A (zh) * 2014-11-24 2015-04-22 深圳市金立通信设备有限公司 一种多媒体数据共享方法及终端
CN106470352B (zh) * 2015-08-18 2020-04-07 中兴通讯股份有限公司 直播频道播放方法、装置及系统
CN106411903B (zh) * 2016-10-08 2019-08-23 Oppo广东移动通信有限公司 一种播放控制方法、装置及终端
CN106385611B (zh) * 2016-10-08 2019-04-12 Oppo广东移动通信有限公司 一种媒体数据的播放方法、装置及系统
CN106412665A (zh) * 2016-10-18 2017-02-15 北京小米移动软件有限公司 多媒体的同步播放控制方法、装置及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070276524A1 (en) * 2006-05-29 2007-11-29 Funai Electric Co., Ltd Digital Sound Signal Processing Apparatus
CN102170584A (zh) * 2011-03-14 2011-08-31 华为技术有限公司 同步hs终端设备之间媒体播放的方法、装置和系统
CN104954727A (zh) * 2014-03-25 2015-09-30 鸿富锦精密工业(深圳)有限公司 音视频同步控制设备及方法
CN105656616A (zh) * 2014-12-03 2016-06-08 中国移动通信集团公司 多设备间数据同步的方法、装置、发送端及接收端
CN106028221A (zh) * 2016-07-14 2016-10-12 广东欧珀移动通信有限公司 一种控制时间同步的方法及智能音箱

Also Published As

Publication number Publication date
CN108696762A (zh) 2018-10-23

Similar Documents

Publication Publication Date Title
US11178451B2 (en) Dynamic playout of transition frames while transitioning between playout of media streams
JP5854243B2 (ja) Ipビデオ信号同期のための方法及び装置
US20150382050A1 (en) System and method for synchronizing media output devices connected on a network
WO2019134293A1 (zh) 一种直播方法、装置、服务器及介质
WO2017107516A1 (zh) 网络视频播放方法及装置
WO2017000554A1 (zh) 音视频文件生成方法、装置及系统
CN109391799B (zh) 一种监控视频同步方法、装置及视频采集设备
JP7181989B2 (ja) 新規コンテンツを取得する際の予想待ち時間に基づくコンテンツ修正の事前準備
EP3571848A1 (en) Content streaming system and method
JP2017509196A5 (zh)
US10855763B2 (en) Method and apparatus for synchronizing applications' consumption of remote data
WO2015117418A1 (zh) 屏幕分辨率调节方法及移动终端
WO2018188365A1 (zh) 同步播放方法、装置和系统
WO2016112641A1 (zh) 客户端、流媒体数据接收方法和流媒体数据传输系统
WO2017076009A1 (zh) 一种节目回看方法、一种播放器及一种终端
EP3868043B1 (en) Wireless audio synchronization
WO2018224839A2 (en) Methods and systems for generating a reaction video
WO2016169439A1 (zh) 一种多媒体共享方法及相关设备与系统
US10727963B1 (en) Techniques for synchronizing content
WO2016061890A1 (zh) 一种资源共享方法、终端、系统及计算机存储介质
CN112351201A (zh) 多媒体数据处理方法、系统、装置、电子设备和存储介质
US11621023B2 (en) Media recording system

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

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

Country of ref document: EP

Kind code of ref document: A1