Video playing processing method and device, storage medium and equipment

By transmitting pre-start and actual start commands between devices, and combining system time difference and start time, the problem of screen synchronization when multiple devices play videos simultaneously is solved, improving the synchronization effect of initial playback and long-term playback.

CN122269067APending Publication Date: 2026-06-23SHENZHEN TCL DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610518461.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-17
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

When multiple different devices play videos synchronously, the differences in video playback characteristics cannot be effectively corrected by existing technology, resulting in poor picture synchronization, especially during the first playback and during long-term playback.

Method used

By transmitting pre-start and actual start commands between devices, and combining the system time difference and start-up time, the video playback time is adjusted to achieve synchronization between devices.

Benefits of technology

It effectively corrects the differences in video playback characteristics and improves the picture synchronization effect when multiple devices play videos simultaneously for the first time and for extended periods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122269067A_ABST
    Figure CN122269067A_ABST
Patent Text Reader

Abstract

The application discloses a video playing processing method and device, a storage medium and equipment, and relates to the technical field of Internet. The first device can: in response to a pre-playing instruction sent by a second device, start playing a video, the first device and the second device have a system time difference; pause playing the video when the first frame is ready, and determine a first playing time consumption from starting to play the video to when the first frame is ready; in response to a real playing instruction sent by the second device, trigger to continue playing the video according to the first playing time consumption and the system time difference, so as to synchronize playing the video with the second device. The application can improve the picture synchronization effect when multiple devices synchronize playing the video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, specifically to a video playback processing method, apparatus, storage medium, and device. Background Technology

[0002] Currently, when multiple devices need to play the same video synchronously, most video synchronization solutions focus on system clock synchronization or fixed delay strategies. However, due to the differences in video playback characteristics between different devices (especially devices on different platforms), current video synchronization solutions often cannot effectively correct these differences, resulting in poor picture synchronization when multiple devices play videos synchronously, especially when multiple devices play videos synchronously for the first time or when playing videos for a long time. Summary of the Invention

[0003] This application provides a video playback processing solution that can effectively improve the picture synchronization effect when multiple devices play videos simultaneously, especially when multiple devices play videos simultaneously for the first time and when playing videos simultaneously for a long time.

[0004] The embodiments of this application provide the following technical solutions: According to one embodiment of this application, a video playback processing method is applied to a first device. The method includes: responding to a pre-start playback command sent by a second device, starting to play a video, wherein there is a system time difference between the first device and the second device; pausing the playback of the video when the first frame is ready, and determining a first start playback time from the start of the video playback to the time when the first frame is ready; responding to a true start playback command sent by the second device, triggering continued playback of the video based on the first start playback time and the system time difference, so as to play the video synchronously with the second device.

[0005] According to one embodiment of this application, a video playback processing method is applied to a second device. The method includes: sending a pre-start playback command to a first device, instructing the first device to start playing a video and pause playback when the first frame is ready, wherein there is a system time difference between the first device and the second device, and the second device determines a first start playback time from the start of playback of the video to the time when the first frame is ready; sending a true start playback command to the first device, instructing the first device to trigger continued playback of the video based on the first start playback time and the system time difference, so that the first device and the second device play the video synchronously.

[0006] According to one embodiment of this application, a video playback processing apparatus is applied to a first device. The apparatus includes: a playback start module, configured to: start playing a video in response to a pre-start playback command sent by a second device, wherein there is a system time difference between the first device and the second device; a video pause module, configured to: pause playing the video when the first frame is ready, and determine a first playback start time from the start of playing the video to the time when the first frame is ready; and a video resume module, configured to: in response to a true playback start command sent by the second device, trigger continued playback of the video based on the first playback start time and the system time difference, so as to play the video synchronously with the second device.

[0007] According to one embodiment of this application, a video playback processing apparatus is applied to a second device. The apparatus includes: a first sending module, configured to: send a pre-start playback command to a first device, instructing the first device to start playing a video and pause playback when the first frame is ready, wherein there is a system time difference between the first device and the second device, and the second device determines a first start playback time from the start of playing the video to the time when the first frame is ready; and a second sending module, configured to: send a true start playback command to the first device, instructing the first device to trigger continued playback of the video based on the first start playback time and the system time difference, so that the first device and the second device play the video synchronously.

[0008] According to another embodiment of this application, a storage medium stores a computer program thereon, which, when executed by a device's processor, causes the device to perform the methods described in the embodiments of this application.

[0009] According to another embodiment of this application, an apparatus may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the methods described in the embodiments of this application.

[0010] According to another embodiment of this application, a computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of the device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the device to perform the methods provided in the various optional implementations described in the embodiments of this application.

[0011] In this embodiment of the application, the first device can: respond to a pre-start playback command sent by the second device, start playing a video, wherein there is a system time difference between the first device and the second device; pause playing the video when the first frame is ready, and determine a first start playback time from the start of playing the video to the time when the first frame is ready; respond to a true start playback command sent by the second device, trigger continued playback of the video according to the first start playback time and the system time difference, so as to play the video synchronously with the second device.

[0012] In this embodiment of the application, the first device first responds to the pre-start playback command sent by the second device, starts playing video, and pauses playing video when the first frame is ready, and determines the first playback time from the start of video playback to the first frame being ready. Further, the first device then responds to the true playback command sent by the second device, and triggers continued video playback based on the first playback time and the system time difference. This can comprehensively consider the video playback characteristics of the first device and the system time deviation between the first device and the second device, effectively correcting the impact of the difference in video playback characteristics on video synchronization, and improving the picture synchronization effect when the first device and the second device play video synchronously. In particular, it can improve the picture synchronization effect when multiple devices play video synchronously for the first time and when playing video synchronously for a long time. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 An architectural diagram of a video playback system according to an embodiment of this application is shown.

[0015] Figure 2 A flowchart of a video playback processing method according to an embodiment of this application is shown.

[0016] Figure 3 A flowchart illustrating the system time difference determination according to an embodiment of this application is shown.

[0017] Figure 4 A flowchart of a video playback processing method according to another embodiment of this application is shown.

[0018] Figure 5 A flowchart of a video playback processing method according to another embodiment of this application is shown.

[0019] Figure 6 The diagram illustrates the architecture of a video playback system in one scenario.

[0020] Figure 7 This diagram illustrates the architecture of another video playback system in one scenario.

[0021] Figure 8 A flowchart illustrating device networking in one scenario is shown.

[0022] Figure 9 A flowchart illustrating device interaction in one scenario is shown.

[0023] Figure 10 A flowchart illustrating the video synchronization playback process in one scenario is shown.

[0024] Figure 11 A block diagram of a video playback processing apparatus according to an embodiment of this application is shown.

[0025] Figure 12 A block diagram of a video playback processing apparatus according to another embodiment of this application is shown.

[0026] Figure 13 A block diagram of a device according to one embodiment of this application is shown. Detailed Implementation

[0027] The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are merely illustrative of the present disclosure and are not intended to limit the present disclosure. Furthermore, the embodiments provided below are some embodiments for implementing the present disclosure, and not all embodiments for implementing the present disclosure. Unless otherwise specified, the technical solutions described in the embodiments of the present disclosure can be implemented in any combination.

[0028] It should be noted that, in the embodiments of this disclosure, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a method or apparatus that includes a list of elements includes not only the elements expressly described, but also other elements not expressly listed, or elements inherent to implementing the method or apparatus. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other related elements (e.g., steps in the method or units in the apparatus; for example, a unit may be a portion of circuitry, a portion of a processor, a portion of a program or software, etc.) in the method or apparatus that includes that element.

[0029] For example, the video playback processing method provided in this disclosure includes a series of steps, but the video playback processing method provided in this disclosure is not limited to the steps described. Similarly, the video playback processing apparatus provided in this disclosure includes a series of units, but the apparatus provided in this disclosure is not limited to the units explicitly described, but may also include units that need to be set up for obtaining relevant information or processing based on information.

[0030] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure.

[0031] It is understood that in the specific implementation of this application, relevant data is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0032] Currently, when multiple devices need to play the same video synchronously, most video synchronization solutions focus on system clock synchronization or fixed delay strategies. However, due to the differences in video playback characteristics between different devices (especially devices on different platforms), current video synchronization solutions often cannot effectively correct these differences, resulting in poor picture synchronization when multiple devices play videos synchronously, especially when multiple devices play videos synchronously for the first time or when playing videos for a long time.

[0033] To address these issues, this application provides a video playback processing solution that can effectively improve the picture synchronization effect when multiple devices play videos simultaneously, especially when multiple devices play videos simultaneously for the first time and when playing videos simultaneously for a long period of time.

[0034] The following is a detailed description of relevant embodiments of the video playback processing solution provided in this application.

[0035] Figure 1 A schematic diagram illustrating the architecture of a video playback system according to an embodiment of this application is provided. Figure 1As shown, the video playback system may include multiple first devices 101 and second devices 102. The second devices 102 can establish connections with the multiple first devices 101, and the multiple first devices 101 and second devices 102 can play videos synchronously. The first devices 101 can be devices such as televisions, computers, mobile phones, smartwatches, in-vehicle devices, virtual reality devices, etc., and the second devices 102 can also be devices such as televisions, computers, mobile phones, smartwatches, in-vehicle devices, virtual reality devices, etc.

[0036] The communication protocol between the multiple first devices 101 and second devices 102 can be selected according to the actual situation. For example, it can be a PUB / SUB, REQ / REP, WebSocket, MQTT or DLNA protocol, etc. This application does not make any special restrictions on this.

[0037] Figure 2 A flowchart illustrating a video playback processing method performed on the side of a first device according to an embodiment of this application is shown schematically. Figure 2 As shown, the video playback processing method executed by each first device may include steps S210 to S230.

[0038] Step S210: In response to the pre-start playback command sent by the second device, start playing the video. There is a system time difference between the first device and the second device. Step S220: Pause video playback when the first frame is ready, and determine the first playback time from when video playback starts to when the first frame is ready. In step S230, in response to the true start-up command sent by the second device, the system triggers continued video playback based on the first start-up time and the system time difference, so as to play the video synchronously with the second device.

[0039] There is a system time difference between the first device and the second device. This system time difference refers to the deviation in system time when the first device and the second device transmit information or instructions. Each first device and the second device has a corresponding system time difference, and the system time differences between different first devices and second devices can be the same or different.

[0040] After receiving the pre-start playback command from the second device, the first device starts playing the video and can determine the time when the video starts playing (i.e., the first playback start time tb1). After starting the video playback, the first device pauses the video playback when the first frame is ready. At this time, the first device is in a paused playback state when the first frame is ready, and the first device can determine the time when the first frame is ready (i.e., the first frame arrival time td1).

[0041] After pausing video playback, the first device can determine the first playback time Tdelta1 from the start of video playback to the time when the first frame is ready, based on the first playback start time tb1 and the first frame arrival time td1, where Tdelta1 = td1 - tb1. Here, "first frame ready" means the video player has prepared the first frame of the video (i.e., the first frame). Specifically, the first frame can be considered ready upon receiving the first frame callback (i.e., the time when the first frame is ready can be equal to the time when the first frame callback is received). The first frame callback can be a callback function or event notification triggered by the video player after receiving the first frame of the video.

[0042] After the first device pauses video playback when the first frame is ready, upon receiving a true start-up command from the second device, the first device triggers continued video playback based on the initial start-up time and the system time difference (i.e., resuming playback from when the video was paused after the first frame was ready). By combining the initial start-up time and the system time difference, the video start-up characteristics of the first device and the system time deviation between the first and second devices can be comprehensively considered, effectively correcting the impact of differences in video start-up characteristics on video synchronization and significantly improving the synchronization effect when the first and second devices play video simultaneously.

[0043] When multiple first devices execute the aforementioned video playback processing flow, the multiple first devices and second devices can play the video synchronously, effectively improving the picture synchronization effect when multiple first devices and second devices play the video simultaneously. Good picture synchronization can also be achieved when multiple first devices and second devices are devices from different platforms.

[0044] In summary, in this embodiment of the present application, the first device first responds to the pre-start playback command sent by the second device, starts playing video, and pauses video playback when the first frame is ready, and determines the first playback time from the start of video playback to the time when the first frame is ready. Further, the first device then responds to the true playback command sent by the second device, and triggers continued video playback based on the first playback time and the system time difference. This approach can comprehensively consider the video playback characteristics of the first device and the system time deviation between the first and second devices, effectively correcting the impact of differences in video playback characteristics on video synchronization, and improving the synchronization effect when the first and second devices play video simultaneously. In particular, it can improve the synchronization effect when multiple devices play video simultaneously for the first time and when playing video simultaneously for a long time.

[0045] The following description Figure 2 Further optional specific embodiments are provided for each step performed during video playback processing in the example implementation.

[0046] In one embodiment, before "step S210, in response to the pre-start playback command sent by the second device, start playing video", the method may further include: obtaining the measured system time deviation by performing information transmission interaction test with the second device; and determining the system time difference between the first device and the second device based on the measured system time deviation.

[0047] The first device performs information transmission interaction tests with the second device, and the measured system time deviation between the two devices is obtained. This measured system time deviation refers to the deviation in system time when the first and second devices transmit information or instructions. Based on this measured system time deviation, the final system time difference between the first and second devices can be accurately determined. This system time difference allows for accurate video synchronization processing, improving the picture synchronization effect when the first and second devices play video simultaneously.

[0048] Furthermore, in one embodiment, obtaining the measured system time deviation by interacting with the second device through information transmission may include: sending first information to the second device and determining a first transmission time when sending the first information; receiving second information fed back by the second device and determining a second reception time when receiving the second information, wherein the second information carries the first reception time when the second device received the first information and the second transmission time when sending the second information; subtracting the first transmission time from the first reception time to obtain a first time deviation; subtracting the second transmission time from the second reception time to obtain a second time deviation, wherein the measured system time deviation is equal to the average of the first time deviation and the second time deviation.

[0049] The first device sends a first message to the second device (the first message may carry the second device's unique identification information (such as IP or MAC address)), and the first device can determine and record the first device's system time when sending the first message (i.e., the first sending time T1). When the second device receives the first message, it can determine and record the second device's system time when receiving the first message (i.e., the first receiving time T2).

[0050] The second device can further send second information back to the first device. This second information may carry a first reception time T2 and a second transmission time T3, where the second transmission time T3 is the system time of the second device when it sends the second information. When the first device receives the second information, it can determine and record the system time of the first device at the time of receiving the second information (i.e., the second reception time T4).

[0051] Subtracting the first transmission time T1 from the first reception time T2 yields the first time deviation T2-T1, and subtracting the second transmission time T3 from the second reception time T4 yields the second time deviation T4-T3. The measured system time deviation O is equal to the average of the first time deviation and the second time deviation, i.e., O = ((T2 - T1) + (T4 - T3)) / 2. In this embodiment, by testing the round-trip first time deviation T2-T1 and the second time deviation T4-T3 respectively, the average of the first time deviation T2-T1 and the second time deviation T4-T3 is taken as the measured system time deviation. This measured system time deviation can accurately represent the system time deviation when transmitting information or instructions between the first device and the second device.

[0052] Optionally, in some embodiments, the first time deviation T2-T1 can be directly used as the measured system time deviation; in some embodiments, the second time deviation T4-T3 can be directly used as the measured system time deviation.

[0053] See Figure 3 Furthermore, in one embodiment, multiple measured system time deviations are obtained by performing multiple information transmission interaction tests; determining the system time difference between the first device and the second device based on the measured system time deviations may include: step S310, determining qualified adjacent deviations based on the multiple measured system time deviations, where a qualified adjacent deviation refers to two adjacent measured system time deviations whose deviation difference is less than or equal to the frame rendering time; step S320, when the proportion of qualified adjacent deviations is greater than a predetermined proportion, the median of the multiple measured system time deviations is taken as the system time difference.

[0054] The first device can perform multiple rounds of information transmission interaction tests with the second device. Each round of information transmission interaction tests can determine a measured system time deviation, and these measured system time deviations can be stored in a queue in order. For example, by performing 10 rounds of information transmission interaction tests in sequence, 10 measured system time deviations, O1, O2, ..., O10, can be obtained sequentially and stored in a queue.

[0055] Qualified adjacent deviations can be determined based on the time deviations of multiple measured systems. A qualified adjacent deviation refers to the time deviation between two adjacent measured systems whose deviation difference is less than or equal to the frame rendering time. Specifically, the deviation difference between two adjacent measured systems can be calculated separately. If the deviation difference is less than or equal to the frame rendering time, a qualified adjacent deviation is considered to exist. For example, if the deviation difference between O1 and O2 is less than or equal to the frame rendering time, then O1 and O2 are considered qualified adjacent deviations; if the deviation difference between O3 and O4 is less than or equal to the frame rendering time, then O3 and O4 are considered qualified adjacent deviations, and so on.

[0056] Furthermore, based on each deviation difference, it can be determined whether a qualified adjacent deviation occurs. The proportion P of qualified adjacent deviations is the number of times qualified adjacent deviations occur (N1) divided by the total number of deviation differences (N2). When the proportion of qualified adjacent deviations is greater than a predetermined proportion, the median of multiple measured system time deviations is taken as the system time difference. Specifically, taking the 10 measured system time deviations O1, O2, ..., O10 as examples, the deviation difference between two adjacent measured system time deviations is calculated, resulting in a total of 9 deviation differences (N2=9). If the number of times a qualified adjacent deviation occurs is 7, then P=7 / 9. When the predetermined proportion is 6 / 9, the median of O1, O2, ..., O10 is taken as the final system time difference.

[0057] Frame rendering time refers to the time required to render one frame. Taking Android as an example, frame rendering time is typically 16ms. The predetermined percentage can be set according to actual conditions, and this application does not impose any special restrictions on it.

[0058] In this embodiment, when the proportion of qualified adjacent deviations is greater than a predetermined proportion, the median of multiple measured system time deviations is taken as the system time difference. This can effectively eliminate interference from possible network fluctuations. The system time difference obtained in this way is used for video playback processing in this embodiment, which can further improve the picture synchronization effect when playing videos synchronously.

[0059] See Figure 4 In one embodiment, before triggering continued video playback based on the first playback time and the system time difference in response to the true start playback command sent by the second device in step S230, the method may further include: step S222, sending a ready command to the second device after pausing video playback; and step S224, receiving the true start playback command sent by the second device, wherein the true start playback command is generated and sent by the second device based on the ready command.

[0060] The first device responds to the pre-playback command sent by the second device, starts playing video, pauses playback when the first frame is ready, and determines the first playback time elapsed from the start of playback to the first frame's readiness. After pausing playback, the first device can send a ready command to the second device, indicating that it is ready to trigger continued playback (e.g., the first playback time has been determined). Then, the second device generates and sends a true playback command to the first device based on this ready command, instructing it to begin triggering continued playback based on the first playback time elapsed and the system time difference. Simultaneously, the second device can also begin preparing to trigger continued playback while sending the true playback command (i.e., setting the second device to trigger continued playback after a synchronized preparation time has elapsed after sending the true playback command). Therefore, the first and second devices can reliably ensure synchronized triggering of continued playback, further improving the picture synchronization effect during synchronized video playback.

[0061] Furthermore, in one embodiment, when the second device plays video synchronously with multiple first devices, the second device can send pre-start playback instructions to multiple second devices in batches at the same time. Afterward, the second device can send a true start playback instruction only to the first devices that have returned a ready instruction within a predetermined time limit.

[0062] In one embodiment, the second device also starts playing video when sending the pre-start playback command and pauses playback when the first frame is ready. The second device triggers continued playback when the synchronization preparation time is reached after sending the true start playback command. In step S230, triggering continued video playback based on the first start playback time and the system time difference may include: calculating the true start playback time based on the first start playback time, the system time difference, and the synchronization preparation time; and triggering continued video playback at the true start playback time.

[0063] When the second device sends a pre-start playback command to the first device, the second device also starts playing video and pauses playback when the first frame is ready. Subsequently, after sending a true start playback command to the first device and reaching the synchronization preparation time, the second device triggers continued video playback (i.e., resumes playback from where the first frame was paused). Specifically, when the second device sends a true start playback command to the first device at a certain command sending time, the second device will trigger continued video playback during the synchronization playback time, which is equal to the command sending time plus the synchronization preparation time.

[0064] After receiving the true start-up command, the first device calculates the true start-up time based on the first start-up time, the system time difference, and the synchronization preparation time. The first device then triggers the continuation of video playback at the true start-up time (i.e., resumes video playback from the point where the first frame is ready and playback has been paused). In this way, the time difference between the first device and the second device when playing the first frame will be very small, and the first device and the second device can accurately synchronize the playback from the first frame.

[0065] Furthermore, in one embodiment, the time taken for the second device to start playing video until the first frame is ready is the second start-up time; the true start-up time is calculated based on the first start-up time, the system time difference, and the synchronization preparation time, including: calculating the true start-up time based on the first start-up time, the second start-up time, the system time difference, and the synchronization preparation time.

[0066] When the second device sends a pre-start playback command to the first device, the second device also starts playing video and can determine the time when the second device starts playing video (i.e., the second start playback time tb2). After starting video playback, the second device pauses video playback when the first frame is ready. At this time, the second device is in a paused playback state where the first frame is ready, and the second device can determine the time when the first frame is ready (i.e., the second first frame arrival time td2). After pausing video playback, the second device can determine the second start playback time Tdelta2 from the start of video playback to the time when the first frame is ready, based on the second start playback time tb2 and the second first frame arrival time td2, where Tdelta2 = td2 - tb2.

[0067] The second device can send the second start-up time Tdelta2 in the true start-up command to the first device. Then, the first device can further combine the first start-up time, the second start-up time, the system time difference, and the synchronization preparation time to calculate a more accurate true start-up time. The first device triggers the continued playback of the video at this true start-up time, which allows the first device and the second device to synchronize the playback of the picture more accurately from the first frame.

[0068] Furthermore, in one embodiment, the true start time is calculated based on the first start time, the second start time, the system time difference, and the synchronization preparation time, including: subtracting the second start time from the first start time to obtain the start time difference; obtaining the target time difference based on the start time difference; subtracting the system time difference and the target time difference from the synchronization preparation time to obtain the delayed playback time; and determining the time between the delayed playback time and the time of receiving the true start time instruction as the true start time.

[0069] The determined start-up time difference F = first start-up time Tdelta1 - second start-up time Tdelta2. Based on this determined start-up time difference F, the target time difference Fdiff is obtained. The delayed playback duration dm = synchronization preparation time ST - system time difference OS - target time difference Fdiff. The true start-up time is defined as the time between the first device receiving the true start-up command and the delayed playback duration. The first device triggers continued video playback at this true start-up time, allowing for more precise synchronization between the first and second devices from the first frame.

[0070] In one embodiment, when obtaining the target playback time difference based on the start-up time difference, the start-up time difference determined in this instance can be designated as the target playback time difference. Further, in another embodiment, the start-up time difference that appears most frequently can be determined from the start-up time difference determined in this video playback process and the start-up time differences determined in previous video playback processes, and this most frequently occurring start-up time difference can be designated as the target playback time difference. The applicant has found that the target playback time difference determined in this manner, when used in the embodiments of this application, can effectively further improve the synchronized playback effect.

[0071] Furthermore, in one embodiment, the aforementioned method for determining the synchronization preparation duration may include: firstly, determining a pre-agreed synchronization preparation duration; or secondly, obtaining the synchronization preparation duration from the true start broadcast command.

[0072] In the first method, a synchronization preparation time is pre-agreed upon for the first and second devices, and the second device can obtain this synchronization preparation time according to the pre-agreed time. When the second device plays video synchronously with multiple first devices, the accurate synchronization time corresponding to different first devices can be the same or different.

[0073] In the second approach, the second device dynamically determines a synchronization preparation time based on the actual situation and sends this preparation time along with the start-up command to the first device. Further, in a specific implementation of this second approach, when the second device is playing video synchronously with multiple first devices, the second device can receive a readiness command from each first device. This readiness command can carry the first start-up time and system time difference determined by the first device. The second device can then determine the synchronization preparation time for each first device based on its first start-up time and system time difference. The exact synchronization times for different first devices can be the same or different.

[0074] Figure 5 A flowchart illustrating a video playback processing method performed on the side of a second device according to an embodiment of this application is shown schematically. Figure 5As shown, the video playback processing method performed by the second device may include steps S410 to S420. The specific terms used have the same meanings as in the above embodiments, and can be found in the relevant descriptions in the foregoing embodiments.

[0075] Step S410: Send a pre-start playback command to the first device to instruct the first device to start playing video and pause playing video when the first frame is ready. There is a system time difference between the first device and the second device, and the second device determines the first start playback time from when the video starts playing to when the first frame is ready. Step S420: Send a true start-up command to the first device to instruct the first device to trigger continued video playback based on the first start-up time and the system time difference, so that the first device and the second device can play the video synchronously.

[0076] The first device responds to the pre-start playback command sent by the second device, starts playing the video, and pauses playback when the first frame is ready. It then determines the first playback time from the start of playback to the first frame being ready. Subsequently, the first device responds to the actual playback command sent by the second device, triggering continued playback based on the first playback time and the system time difference. This approach comprehensively considers the video playback characteristics of the first device and the system time deviation between the first and second devices, effectively correcting the impact of differences in video playback characteristics on video synchronization. This improves the synchronization effect when the first and second devices play video simultaneously, especially enhancing the synchronization effect when multiple devices play video simultaneously for the first time or when playing video simultaneously for a long period of time.

[0077] Furthermore, in one embodiment, it may also include: starting video playback when sending a pre-start playback command to the first device, and pausing video playback when the first frame is ready; triggering continued video playback when the synchronization preparation time is reached after sending a true start playback command to the first device.

[0078] When the second device sends a pre-start playback command to the first device, the second device also starts playing video and pauses playback when the first frame is ready. Subsequently, after sending a true start playback command to the first device and reaching the synchronization preparation time, the second device triggers continued video playback (i.e., resumes playback from where the first frame was paused). Specifically, when the second device sends a true start playback command to the first device at a certain command sending time, the second device will trigger continued video playback during the synchronization playback time, which is equal to the command sending time plus the synchronization preparation time.

[0079] After receiving the true start-up command, the first device calculates the true start-up time based on the first start-up time, the system time difference, and the synchronization preparation time. The first device then triggers the continuation of video playback at the true start-up time (i.e., resumes video playback from the point where the first frame is ready and playback has been paused). In this way, the time difference between the first device and the second device when playing the first frame will be very small, and the first device and the second device can accurately synchronize the playback from the first frame.

[0080] Furthermore, in one embodiment, before sending the true start-up command to the first device, the process may further include: receiving a ready command sent by the first device after pausing video playback; correspondingly, sending the true start-up command to the first device includes: sending the true start-up command to the first device according to the ready command.

[0081] The first device responds to the pre-playback command sent by the second device, starts playing video, pauses playback when the first frame is ready, and determines the first playback time elapsed from the start of playback to the first frame's readiness. After pausing playback, the first device can send a ready command to the second device, indicating that it is ready to trigger continued playback (e.g., the first playback time has been determined). Then, the second device generates and sends a true playback command to the first device based on this ready command, instructing it to begin triggering continued playback based on the first playback time elapsed and the system time difference. Simultaneously, the second device can also begin preparing to trigger continued playback while sending the true playback command (i.e., setting the second device to trigger continued playback after a synchronized preparation time has elapsed after sending the true playback command). Therefore, the first and second devices can reliably ensure synchronized triggering of continued playback, further improving the picture synchronization effect during synchronized video playback.

[0082] Furthermore, in one embodiment, when the second device plays video synchronously with multiple first devices, the second device can send pre-start playback instructions to multiple second devices in batches at the same time. Afterward, the second device can send a true start playback instruction only to the first devices that have returned a ready instruction within a predetermined time limit.

[0083] To facilitate better implementation of the video playback processing method provided in the embodiments of this application, the following describes the aforementioned embodiments in further detail with reference to a scenario in which video playback processing is performed by applying the aforementioned embodiments of this application.

[0084] First, refer to Figure 6 and Figure 7 In this scenario, the video playback system includes a host 610 and multiple sub-hosts 620, wherein the host 610 is equivalent to the second device in the aforementioned embodiment, and the sub-hosts 620 are equivalent to the first device in the aforementioned embodiment.

[0085] In this scenario, such as Figure 6 As shown, the host 610 and multiple slave units 620 can send synchronous playback commands (such as pre-start playback commands or real start playback commands) through PUB / SUB mode. In PUB / SUB mode, the host, as the publisher PUB, sends out synchronous playback commands, and the slave units, as subscribers SUB, filter according to the subscribed topics and only take the synchronous playback commands they want, and then start to execute synchronous actions according to the synchronous playback commands.

[0086] In this scenario, such as Figure 7 As shown, the host 610 and multiple slave units 620 can conduct point-to-point time communication (such as information transmission and ready command transmission in information transmission interaction test) through REQ / REP mode. In REQ / REP mode, the host, as the requesting end REP, initiates a request and then waits for the response from the responding end REQ. One request must correspond to one response.

[0087] In this scenario, the host and slave machines first form a network, such as... Figure 8 The network topology process shown may include steps S610 to S680. The host machine may include a publishing module (ZeroMQ Publisher) and a context manager 1 (ZContext), while the slave machine may include a context manager 2 (ZContext) and a subscription module (ZeroMQSubscriber).

[0088] Step S610: The host initiates a subscription service; Step S620: The publishing module creates a publisher endpoint (PUBSocket); Step S630: Message manager 1 binds the publisher endpoint to a predetermined first port; Step S640: The slave machine initiates a subscription service; Step S650: The subscription module creates a subscriber endpoint (SUBSocket); Step S660: Message manager 2 binds the subscriber endpoint to a predetermined first port and the host IP (which can be bound to the input host IP or the host IP broadcast by the host); Step S670: Set the subscription topic to subscribe to messages (such as synchronous playback commands) from the host. Following this process, the host and slave machines complete the network setup and the PUB / SUB mode binding. Subsequently, the host 610 and multiple slave machines 620 can send synchronous playback commands (such as pre-playback commands or true playback commands) in PUB / SUB mode.

[0089] Step S610 can be followed by step S680, which performs preparation operations (Loading), such as preparing to receive connection requests from subscribers and initializing the message queue. The communication endpoint (ZMQ-Socket) can include a subscriber endpoint (SUBSocket) and a publisher endpoint (PUBSocket).

[0090] In this scenario, the primary and secondary machines further connect and synchronize their time, such as... Figure 9 The connection process shown may include steps S710 to S7130. The host may further include a server (ZeroMQ Server), and the slave may further include a client (ZeroMQ Client).

[0091] Step S710: The host starts the connection request service (REP service); Step S720: The server creates a request endpoint (REPSocket); Step S730: Message manager 1 binds the request endpoint to a predetermined second port; Step S740: The request endpoint blocks (RecvStr) waiting for a message to be sent by the client on the slave side; Step S750: The slave starts the connection response service (REQ service); Step S760: The client creates a response endpoint (REQSocket); Step S770: Message manager 2 binds the response endpoint to a predetermined second port and the host IP (which can be bound to the input host IP or the host IP broadcast by the host); Step S740: The response endpoint also blocks (RecvStr) waiting for a message to be sent by the server on the host side.

[0092] Further, in step S780, after the connection is triggered on the secondary machine (e.g., by clicking the connection control), the client sends a connection request message to the requesting endpoint. This connection request may carry basic information such as the secondary machine's IP address and device information. In step S790, the requesting endpoint transmits the connection request message to the server. In step S7100, after receiving the connection request message, the server updates the host interface (the host interface can update the list of relevant information of the secondary machine). In step S7110, the server sends a request confirmation message to the responding endpoint. In step S7120, the responding endpoint transmits the request confirmation message to the client. In step S7130, after receiving the request confirmation message, the secondary machine can confirm that a REQ / REP mode connection has been established with the host, and the secondary machine can update its interface (the secondary machine interface can update the list of relevant information of the host).

[0093] Furthermore, the host and slave machines undergo a time synchronization process. In each round of the time synchronization process, the slave machine "obtains the measured system time deviation by conducting a round of information transmission interaction test with the host." This scenario may specifically include steps S7140 to S7190. Finally, the slave machine "determines the system time difference between the slave machine and the host machine based on the measured system time deviation."

[0094] When the slave unit "obtains the measured system time deviation by conducting a round of information transmission interaction test with the master unit", the slave unit can perform the following actions: send the first information to the master unit and determine the first sending time when sending the first information; receive the second information fed back by the master unit and determine the second receiving time when receiving the second information, the second information carrying the first receiving time when the master unit received the first information and the second sending time when sending the second information; subtract the first sending time from the first receiving time to obtain the first time deviation; subtract the second sending time from the second receiving time to obtain the second time deviation, and the measured system time deviation is equal to the average of the first time deviation and the second time deviation.

[0095] Specifically, such as Figure 9 As shown, in step S7140, the slave machine starts the time synchronization process. In step S7150, the client sends the first information to the requesting endpoint and determines the first sending time when sending the first information; in step S7160, the requesting endpoint sends the first information back to the server, and the server can receive the first receiving time when receiving the first information; in step S7170, the server sends the second information to the responding endpoint, and the second information carries the first receiving time and the second sending time when sending the second information; in step S7180, the responding endpoint sends the second information back to the client, and the client can determine the second receiving time when receiving the second information; in step S7180, the client subtracts the first sending time T1 from the first receiving time T2 to obtain the first time deviation T2-T1, and subtracts the second sending time T3 from the second receiving time T4 to obtain the second time deviation T4-T3. The measured system time deviation O = ((T2 - T1) + (T4 - T3)) / 2.

[0096] Furthermore, when the slave unit can "determine the system time difference between the slave unit and the master unit based on the measured system time deviation", it can specifically include: determining qualified adjacent deviations based on multiple measured system time deviations, where qualified adjacent deviations refer to two adjacent measured system time deviations whose deviation difference is less than or equal to the frame rendering time; when the proportion of qualified adjacent deviations is greater than a predetermined proportion, the median of the multiple measured system time deviations is taken as the system time difference.

[0097] Furthermore, the host and slave units further implement a video synchronization playback process, which may include: the host sending a pre-start playback command to the slave unit and starting video playback, pausing video playback when the first frame is ready, and the host also determining the time elapsed from starting video playback to the first frame being ready as the second start playback time; the slave unit responding to the pre-start playback command sent by the host, starting video playback, pausing video playback when the first frame is ready, and determining the first start playback time elapsed from starting video playback to the first frame being ready; after pausing video playback, the slave unit sending a ready command to the host; the host generating and sending a true start playback command based on the ready command, and triggering continued video playback when the synchronization preparation time is reached after the host sends the true start playback command to the slave unit; the slave unit "responding to the true start playback command sent by the host, triggering continued video playback based on the first start playback time and the system time difference," to synchronize video playback with the host.

[0098] The sub-machine's "responding to the true start-up command sent by the host, triggering continued video playback based on the first start-up time and the system time difference" can include: calculating the true start-up time based on the first start-up time, the second start-up time, the system time difference, and the synchronization preparation time; and triggering continued video playback at the true start-up time.

[0099] Specifically, see Figure 10 The video synchronization playback process performed by the host and the slave in this scenario may specifically include steps S810 to S8180.

[0100] Step S810: The host sends a pre-start playback command to the slave. Step S820: The host starts playing video and determines the time when the host starts playing video (i.e., the second start playback time tb2). Step S830: The host pauses playing video when the first frame is ready and determines the time when the first frame is ready (i.e., the second first frame arrival time td2), and the second start playback time Tdelta2 = td2 - tb2 can be calculated. Step S840: The publishing module publishes the pre-start playback command to the subscriber endpoint. Step S850: The subscriber endpoint transmits the pre-start playback command to the subscription module. Step S860: The subscription module determines that the pre-start playback command is a subscription command based on the subscription topic and transmits the pre-start playback command to the slave. In step S870, the slave unit responds to the pre-start playback command, starts playing video, and can determine the time when the video starts playing (i.e., the first start playback time tb1); in step S880, the slave unit pauses playing video when the first frame is ready, and can determine the time when the first frame is ready (i.e., the first first frame arrival time td1); and can calculate the first start playback time Tdelta1=td1-tb1.

[0101] Step S890: The slave device sends a ready instruction to the master device; Step S8100: The client sends the ready instruction to the requesting endpoint; Step S8110: The requesting endpoint transmits the ready instruction to the server; Step S8120: The server transmits the ready instruction to the master device; Step S8130: The master device generates and sends a true start broadcast instruction based on the ready instruction; the true start broadcast instruction may carry a second start broadcast duration Tdelta2; Step S8140: The publishing module publishes the true start broadcast instruction to the subscriber endpoint; Step S8150: The subscriber endpoint transmits the true start broadcast instruction to the subscription module; Step S8160: The subscription module determines that the true start broadcast instruction is a subscription instruction based on the subscription topic and transmits the true start broadcast instruction to the slave device.

[0102] In step S8170, the slave unit responds to the true start-up command sent by the master unit, calculates the true start-up time based on the first start-up time, the second start-up time, the system time difference, and the synchronization preparation time, and triggers the continued playback of the video at the true start-up time.

[0103] The true start time is calculated based on the first start time, the second start time, the system time difference, and the synchronization preparation time. Specifically, this includes: subtracting the second start time from the first start time to obtain the start time difference; obtaining the target time difference based on the start time difference; subtracting the system time difference and the target time difference from the synchronization preparation time to obtain the delayed playback time; and determining the true start time as the time between receiving the true start command and the delayed playback time. The determined start time difference F = first start time Tdelta1 - second start time Tdelta2. The target time difference Fdiff is obtained based on the determined start time difference F. The delayed playback time dm = synchronization preparation time ST - system time difference OS - target time difference Fdiff. The true start time is defined as the time between receiving the true start command and the delayed playback time, after which the first device receives the true start command. The first device triggers continued video playback at this true start time.

[0104] In step S8180, after the host sends a true start-up command to the slave and reaches the synchronization preparation time, it triggers the continuation of video playback, thereby enabling the slave and host to play the video synchronously.

[0105] In this scenario, applying the aforementioned embodiments of this application for video playback processing can at least have the following beneficial effects: Considering the video start-up characteristics of the secondary and primary machines and the system time deviation between them, the impact of differences in video start-up characteristics on video synchronization can be effectively corrected, improving the synchronization effect when the secondary and primary machines play videos synchronously. This is particularly beneficial when multiple secondary and primary machines play videos synchronously for the first time and during extended periods of synchronous playback. Furthermore, in this scenario, the primary machine and multiple secondary machines can subsequently exchange synchronous playback commands (such as pre-start-up commands or true start-up commands) via PUB / SUB mode; and the primary and secondary machines can further confirm the correctness of command transmission and ensure the reliability of synchronous video playback through point-to-point time communication via REQ / REP mode (such as information transmission and readiness command transmission in information transmission interaction tests).

[0106] To facilitate better implementation of the video playback processing method provided in the embodiments of this application, the embodiments of this application also provide a video playback processing apparatus based on the above-described video playback processing method. The meanings of the terms used are the same as in the above-described video playback processing method, and specific implementation details can be found in the descriptions in the method embodiments.

[0107] Figure 11 A block diagram of a video playback processing apparatus according to an embodiment of this application is shown.

[0108] like Figure 11 The video playback processing device 900 shown can be applied to a first device. The video playback processing device 900 may include: a playback start module 910, which can be used to: start playing video in response to a pre-start playback command sent by a second device, wherein there is a system time difference between the first device and the second device; a video pause module 920, which can be used to: pause playing the video when the first frame is ready, and determine a first start playback time from the start of playing the video to the time when the first frame is ready; and a video resume playback module 930, which can be used to: trigger continued playback of the video in response to a true start playback command sent by the second device, based on the first start playback time and the system time difference, so as to play the video synchronously with the second device.

[0109] In one embodiment, the second device also starts playing the video when sending the pre-start playback command and pauses playback when the first frame is ready. Furthermore, the second device triggers continued playback when the synchronization preparation time is reached after sending the true start playback command. When triggering continued playback of the video based on the first start playback time and the system time difference, the video continuation module 930 can be used to: calculate the true start playback time based on the first start playback time, the system time difference, and the synchronization preparation time; and trigger continued playback of the video at the true start playback time.

[0110] In one embodiment, the time taken for the second device to start playing the video until the first frame is ready is the second start-up time; when the true start-up time is calculated based on the first start-up time, the system time difference, and the synchronization preparation time, the video continuation module 930 can be used to: calculate the true start-up time based on the first start-up time, the second start-up time, the system time difference, and the synchronization preparation time.

[0111] In one embodiment, when the true start time is calculated based on the first start time, the second start time, the system time difference, and the synchronization preparation time, the video continuation module 930 can be used to: subtract the second start time from the first start time to obtain the start time difference; obtain a target time difference based on the start time difference; subtract the system time difference and the target time difference from the synchronization preparation time to obtain the delayed playback time; and determine the true start time as the time between the time of receiving the true start instruction and the delayed playback time.

[0112] In one embodiment, the video playback processing device 900 may further include a duration determination module, which can be used to: determine the pre-agreed synchronization preparation duration; or, obtain the synchronization preparation duration from the true start playback command.

[0113] In one embodiment, before triggering continued playback of the video based on the first playback time and the system time difference in response to the true playback start command sent by the second device, the video playback processing device 900 further includes an instruction sending and receiving module that can be used to: send a ready command to the second device after pausing playback of the video; and receive the true playback start command sent by the second device, wherein the true playback start command is generated and sent by the second device based on the ready command.

[0114] In one embodiment, before starting video playback in response to a pre-start instruction sent by the second device, the video playback processing device 900 further includes a time synchronization module that can be used to: obtain a measured system time deviation by performing information transmission interaction tests with the second device; and determine the system time difference between the first device and the second device based on the measured system time deviation.

[0115] In one embodiment, multiple measured system time deviations are obtained through multiple information transmission interaction tests. When determining the system time difference between the first device and the second device based on the measured system time deviations, the time synchronization module can be used to: determine qualified adjacent deviations based on the multiple measured system time deviations, wherein the qualified adjacent deviations refer to two adjacent measured system time deviations whose deviation difference is less than or equal to the frame rendering time; when the proportion of qualified adjacent deviations is greater than a predetermined proportion, the median of the multiple measured system time deviations is taken as the system time difference.

[0116] In one embodiment, when obtaining the measured system time deviation through information transmission interaction with the second device, the time synchronization module can be used to: send first information to the second device and determine a first transmission time when sending the first information; receive second information fed back by the second device and determine a second reception time when receiving the second information, wherein the second information carries the first reception time when the second device received the first information and the second transmission time when sending the second information; subtract the first transmission time from the first reception time to obtain a first time deviation; subtract the second transmission time from the second reception time to obtain a second time deviation, wherein the measured system time deviation is equal to the average of the first time deviation and the second time deviation.

[0117] Figure 12 A block diagram of a video playback processing apparatus according to another embodiment of this application is shown.

[0118] like Figure 12 The video playback processing device 1000 shown can be applied to a second device. The video playback processing device 1000 may include: a first sending module 1010, which can be used to: send a pre-start playback command to the first device, instructing the first device to start playing the video and pause playing the video when the first frame is ready, wherein there is a system time difference between the first device and the second device, and the second device determines a first start playback time from the start of playing the video to the time when the first frame is ready; and a second sending module 1020, which can be used to: send a true start playback command to the first device, instructing the first device to trigger continued playback of the video according to the first start playback time and the system time difference, so that the first device and the second device play the video synchronously.

[0119] In one embodiment, the video playback processing device 1000 further includes a playback control module for: starting playback of the video when sending the pre-start playback command to the first device, and pausing playback of the video when the first frame is ready; and triggering continued playback of the video when the synchronization preparation time is reached after sending the true start playback command to the first device.

[0120] In one embodiment, before sending the true start-up command to the first device, the video playback processing device 1000 further includes an instruction receiving module for: receiving a ready command sent by the first device after pausing the playback of the video; correspondingly, when sending the true start-up command to the first device, the second sending module 1020 can be used for: sending the true start-up command to the first device according to the ready command.

[0121] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0122] Furthermore, embodiments of this application also provide a device, such as... Figure 13 As shown, Figure 13 A block diagram of a device according to an embodiment of this application is shown, specifically: The device may include components such as a processor 1101 with one or more processing cores, a memory 1102 with one or more computer-readable storage media, a power supply 1103, and an input unit 1104. Those skilled in the art will understand that... Figure 13 The device structure shown does not constitute a limitation on the device and may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. Wherein: The processor 1101 is the control center of the device, connecting various parts of the computer device via various interfaces and lines. It executes various functions and processes data by running or executing software programs and / or modules stored in the memory 1102, and by calling data stored in the memory 1102. Optionally, the processor 1101 may include one or more processing cores; preferably, the processor 1101 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user page, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 1101.

[0123] The memory 1102 can be used to store software programs and modules. The processor 1101 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102. The memory 1102 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory 1102 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 1102 may also include a memory controller to provide the processor 1101 with access to the memory 1102.

[0124] The device also includes a power supply 1103 that supplies power to the various components. Preferably, the power supply 1103 can be logically connected to the processor 1101 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 1103 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0125] The device may also include an input unit 1104, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0126] Although not shown, the device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 1101 in the device can load the executable files corresponding to the processes of one or more computer programs into the memory 1102 according to the following instructions, and the processor 1101 runs the computer programs stored in the memory 1102, thereby realizing the various functions in the foregoing embodiments of this application.

[0127] For example, when the device is the first device, the processor 1101 can execute: in response to a pre-start playback command sent by the second device, start playing the video, where there is a system time difference between the first device and the second device; pause playing the video when the first frame is ready, and determine a first start playback time from the start of playing the video to the time when the first frame is ready; in response to a true start playback command sent by the second device, trigger continued playback of the video based on the first start playback time and the system time difference, so as to play the video synchronously with the second device.

[0128] For example, when the device is the second device, the processor 1101 can execute: sending a pre-start playback instruction to the first device, instructing the first device to start playing the video and pause playing the video when the first frame is ready, wherein there is a system time difference between the first device and the second device, and the second device determines a first playback time from the start of playing the video to the time when the first frame is ready; sending a true playback instruction to the first device, instructing the first device to trigger continued playback of the video based on the first playback time and the system time difference, so that the first device and the second device play the video synchronously.

[0129] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0130] Therefore, embodiments of this application also provide a storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the methods provided in embodiments of this application.

[0131] The storage medium can be a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0132] Since the computer program stored in the storage medium can execute the steps of any of the methods provided in the embodiments of this application, the beneficial effects that the methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0133] According to another embodiment of this application, a computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of the device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the device to perform the methods provided in the various optional implementations described in the embodiments of this application.

[0134] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0135] It should be understood that this application is not limited to the embodiments described above and shown in the accompanying drawings, but various modifications and changes can be made without departing from its scope.

Claims

1. A video playback processing method, characterized in that, Applied to a first device, the method includes: In response to the pre-start playback command sent by the second device, the video playback is started, and there is a system time difference between the first device and the second device; Pause playback of the video when the first frame is ready, and determine the first playback time from when playback of the video begins until the first frame is ready; In response to the true start-up command sent by the second device, based on the first start-up time and the system time difference, the video is triggered to continue playing, so as to play the video synchronously with the second device.

2. The method according to claim 1, characterized in that, The second device also starts playing the video when sending the pre-start playback command and pauses playback when the first frame is ready. The second device triggers continued playback when the synchronization preparation time is reached after sending the true start playback command. The step of triggering continued playback of the video based on the first playback time and the system time difference includes: The true start time is calculated based on the first start time, the system time difference, and the synchronization preparation time. The video will continue playing at the specified start time.

3. The method according to claim 2, characterized in that, The time taken for the second device from starting to play the video until the first frame is ready is the second playback time. The calculation of the true start time based on the first start-up time, the system time difference, and the synchronization preparation time includes: The true start time is calculated based on the first start time, the second start time, the system time difference, and the synchronization preparation time.

4. The method according to claim 3, characterized in that, The calculation of the true start time based on the first start time, the second start time, the system time difference, and the synchronization preparation time includes: Subtract the second start-up time from the first start-up time to obtain the start-up time difference; Based on the aforementioned start-up time difference, the target time difference is obtained; Subtracting the system time difference and the target time difference from the synchronization preparation time yields the delayed playback time. The time between the time the true start-up command is received and the time of the delayed playback duration is determined as the true start-up time.

5. The method according to claim 2, characterized in that, The method for determining the synchronization preparation time includes: Determine the pre-agreed synchronization preparation time; Alternatively, the synchronization preparation time can be obtained from the true start broadcast command.

6. The method according to claim 1, characterized in that, Before triggering continued playback of the video based on the first start-up time and the system time difference in response to the true start-up command sent by the second device, the method further includes: After pausing the video playback, a ready command is sent to the second device; The device receives the true start broadcast command sent by the second device, which is generated and sent by the second device based on the ready command.

7. The method according to any one of claims 1 to 6, characterized in that, Before initiating video playback in response to a pre-start playback command sent by the second device, the method further includes: The measured system time deviation was obtained by conducting information transmission interaction tests with the second device. The system time difference between the first device and the second device is determined based on the measured system time deviation.

8. The method according to claim 7, characterized in that, Multiple time deviations of the actual measured system were obtained by conducting multiple information transmission and interaction tests. Determining the system time difference between the first device and the second device based on the measured system time deviation includes: A qualified adjacent deviation is determined based on the time deviation of multiple measured systems. The qualified adjacent deviation refers to the time deviation of two adjacent measured systems whose deviation difference is less than or equal to the frame rendering time. When the proportion of qualified adjacent deviations is greater than a predetermined proportion, the median of the multiple measured system time deviations is taken as the system time difference.

9. The method according to claim 7, characterized in that, The step of obtaining the measured system time deviation through information transmission and interaction with the second device includes: Send first information to the second device and determine the first sending time when sending the first information; Receive the second information fed back by the second device, determine the second receiving time when the second information is received, and the second information carries the first receiving time when the second device receives the first information and the second sending time when the second information is sent. Subtracting the first transmission time from the first reception time yields the first time deviation; The second time deviation is obtained by subtracting the second transmission time from the second reception time. The measured system time deviation is equal to the average of the first time deviation and the second time deviation.

10. A video playback processing method, characterized in that, Applied to a second device, the method includes: Send a pre-start playback command to the first device to instruct the first device to start playing the video and pause playing the video when the first frame is ready. There is a system time difference between the first device and the second device, and the second device determines the first playback time from starting to play the video to when the first frame is ready. A true start-up command is sent to the first device to instruct the first device to continue playing the video based on the first start-up time and the system time difference, so that the first device and the second device play the video synchronously.

11. The method according to claim 10, characterized in that, The method further includes: When the pre-start playback command is sent to the first device, the video playback is started, and the video playback is paused when the first frame is ready; After the true start-up command is sent to the first device, and the synchronization preparation time is reached, the video playback is triggered to continue.

12. The method according to any one of claims 10 to 11, characterized in that, Before sending the true start broadcast command to the first device, the method further includes: Receive a ready command sent by the first device after pausing the playback of the video; Correspondingly, sending the true start broadcast command to the first device includes: The true start broadcast command is sent to the first device according to the ready command.

13. A video playback processing device, characterized in that, Applied to a first device, the device includes: The playback module is enabled to: respond to a pre-start playback command sent by the second device and start playing video, wherein there is a system time difference between the first device and the second device; The video pause module is used to: pause the playback of the video when the first frame is ready, and determine the first playback time from the start of the video playback to the time when the first frame is ready; The video playback continuation module is used to: respond to the true start playback command sent by the second device, and trigger the continuation of video playback based on the first start playback time and the system time difference, so as to play the video synchronously with the second device.

14. A storage medium, characterized in that, It stores a computer program that, when executed by the device's processor, causes the device to perform the method described in any one of claims 1 to 9 or any one of claims 10 to 12.

15. A device, characterized in that, include: Memory, which stores computer programs; A processor reads a computer program stored in memory to perform the method according to any one of claims 1 to 9 or any one of claims 10 to 12.