Multimedia playback method, device and computer readable storage medium
By time proofreading and generating a unified playlist on multiple terminals, the complex operation and network dependence problems during collaborative playback of multiple terminals are solved, and simple, low-cost and efficient synchronous playback is achieved.
Patent Information
- Application Number
- CN202210102601.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-27
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-01-27
AI Technical Summary
When multiple terminals collaborate on playing the same audio file, the operation is complicated and overly dependent on the network.
Through time proofing, the system time of multiple terminals is consistent, the same configuration information and content to be played are obtained and downloaded, and the same playlist is generated based on this information, so that synchronous playback that does not depend on the network is realized after time synchronization and playlist generation.
Simplifies operations, reduces system complexity and configuration deployment costs, reduces dependence on the network, and ensures synchronous playback of multiple terminals.
Smart Images

Figure CN114500476B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to a multimedia playback method, device, and computer-readable storage medium. Background Art
[0002] In the related art, when multiple terminals play the same audio file collaboratively, one terminal is usually used as a server and the other terminals are used as clients. The server sends the content played by the local terminal and the playback location data to the client terminal, and the terminal used as the client terminal uses this information as a synchronization signal to control the local playback. Summary of the invention
[0003] The embodiments of the present disclosure provide a multimedia playback method, device, and computer-readable storage medium to solve the problems of complex operation and excessive reliance on the network during synchronous playback.
[0004] On the one hand, an embodiment of the present disclosure provides a multimedia playback method, including:
[0005] Multiple terminals participating in the collaborative playback perform time calibration to keep the system time of the multiple terminals consistent;
[0006] Each terminal participating in the collaborative playback obtains configuration information and content to be played, wherein the configuration information includes playback start time information, content information to be played, and playback duration information of each content to be played;
[0007] Each terminal participating in the collaborative playback generates a playlist according to the configuration information, wherein the playlist includes at least information about the content to be played and time slice information corresponding to each content to be played, and each content to be played corresponds to one or more time slices;
[0008] When the system time of each terminal participating in the collaborative playback reaches the playback start time in the playback list, the terminal plays the content to be played according to the playback list.
[0009] On the other hand, the embodiment of the present disclosure further provides a multimedia playback device for participating in collaborative playback with other multimedia playback devices, the multimedia playback device comprising:
[0010] A time calibration module, used for performing time calibration to make the system time of the multimedia playback device and other multimedia playback devices participating in the collaborative playback consistent;
[0011] An information acquisition module, used to acquire configuration information and content to be played, wherein the configuration information includes playback start time information, content information to be played, and playback duration information of each content to be played; and
[0012] A list generation module, configured to generate a play list according to the configuration information, wherein the play list includes at least information about content to be played and time slice information corresponding to each content to be played, and each content to be played corresponds to one or more time slices;
[0013] The playing module is used to play the content to be played according to the play list when the system time reaches the play start time in the play list.
[0014] On the other hand, the embodiment of the present disclosure further provides a multimedia playback system, comprising a plurality of multimedia playback devices as described above, and a multimedia information publishing server for sending configuration information and content to be played to the multimedia playback devices.
[0015] On the other hand, an embodiment of the present disclosure further provides a multimedia playback device, including a processor and a memory storing a computer program that can be run on the processor, wherein the processor implements the steps of the above-mentioned multimedia playback method when executing the program.
[0016] On the other hand, an embodiment of the present disclosure further provides a computer-readable storage medium storing a computer program executable on a processor, wherein the computer program is used to implement the above-mentioned multimedia playback method when executed by the processor.
[0017] According to the method provided by the embodiments of the present disclosure, multiple terminals participating in collaborative playback achieve system time synchronization of the multiple terminals through time calibration, download the same content to be played and configuration information, and generate the same play list in the same way. After time synchronization and generation of the play list, the multiple collaborative playback terminals can achieve synchronous playback without relying on the network, which is simple to implement, reduces configuration and deployment costs, and reduces the complexity of the system.
[0018] Of course, it is not necessary to achieve all the advantages described above at the same time for any product or method of the present disclosure. Other features and advantages of the present disclosure will be described in the subsequent description embodiments, and partly become apparent from the description embodiments, or be understood by practicing the present disclosure. The purposes and other advantages of the embodiments of the present disclosure can be achieved and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings are used to provide a further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation on the technical solution of the present disclosure. The shapes and sizes of the components in the accompanying drawings do not reflect the actual proportions and are only intended to illustrate the contents of the present disclosure.
[0020] Figure 1This is a flow chart of a multimedia playback method according to an embodiment of the present disclosure;
[0021] Figure 2 A schematic diagram of a collaborative playback system including multiple multimedia playback devices according to an embodiment of the present disclosure;
[0022] Figure 3 It is a structural schematic diagram of a multimedia playback device according to an embodiment of the present disclosure;
[0023] Figure 4 It is a structural schematic diagram of a multimedia playback device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] The present disclosure describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present disclosure. Although many possible feature combinations are shown in the drawings and discussed in the embodiments, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.
[0025] The present disclosure includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features, and elements disclosed in the present disclosure may also be combined with any conventional features or elements to form a unique invention scheme defined by the claims. Any features or elements of any embodiment may also be combined with features or elements from other invention schemes to form another unique invention scheme defined by the claims. Therefore, it should be understood that any feature shown and / or discussed in the present disclosure may be implemented individually or in any appropriate combination. Therefore, except for the limitations made according to the attached claims and their equivalents, the embodiments are not subject to other limitations. In addition, various modifications and changes may be made within the scope of protection of the attached claims.
[0026] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps in the specific order described. As will be appreciated by those of ordinary skill in the art, other orders of steps are also possible. Therefore, the specific order of the steps set forth in the specification should not be interpreted as a limitation to the claims. In addition, the claims for the method and / or process should not be limited to the steps performed in the order written, and those skilled in the art can easily understand that these orders can be changed and still remain within the spirit and scope of the disclosed embodiments.
[0027] Unless otherwise defined, the technical terms or scientific terms used in this disclosure are the usual meanings understood by people with ordinary skills in the field to which this disclosure belongs. The "first", "second" and similar words used in this disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. In this disclosure, "plurality" can mean two or more numbers. "Include" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects.
[0028] In order to keep the following description of the embodiments of the present disclosure clear and concise, the present disclosure omits detailed descriptions of some known functions and known components. The drawings of the embodiments of the present disclosure only relate to the structures related to the embodiments of the present disclosure, and other structures can refer to the general design.
[0029] As mentioned above, in the related technologies, whether it is a terminal as a server or a dedicated streaming media server sending playback content to other clients, it is too dependent on the network, requires a large network bandwidth support, has high requirements on the server, and is complex to implement.
[0030] To this end, the present disclosure provides a multimedia playback method suitable for multi-terminal collaborative playback scenarios. Figure 1 As shown, the following steps are included:
[0031] Step 110, multiple terminals participating in the collaborative playback perform time calibration to keep the system time of the multiple terminals consistent;
[0032] For example, the time synchronization of multiple terminals can be achieved through the Network Time Protocol (NTP). The NTP protocol is a protocol used to synchronize computer time. It can synchronize computers with their servers or clock sources (such as quartz clocks, GPS, etc.). It can provide high-precision time correction (the difference between the standard on LAN is less than 1 millisecond, and tens of milliseconds on WAN), and can prevent malicious protocol attacks through encryption confirmation. Synchronization is completed through the NTP protocol, which is simple to implement and highly accurate.
[0033] After time synchronization, all terminals participating in synchronous playback use the same time as the synchronization reference and can synchronize based on local time, reducing dependence on the network.
[0034] Step 120, each terminal participating in the collaborative playback obtains configuration information and content to be played, wherein the configuration information includes playback start time information (including the start time of synchronous playback), content information to be played, and playback duration information of each content to be played;
[0035] The configuration information can be obtained by receiving it from a multimedia information publishing server (hereinafter referred to as the information publishing server), or by copying it from other computers or mobile hard disks.
[0036] There are many ways to obtain the content to be played, such as downloading the file resource from the information transmission server, or copying it from other computers or mobile hard disks.
[0037] In other embodiments, the configuration information and the content to be played may be obtained in the same manner or in different manners, for example, from different servers, or the configuration information is obtained from the server and the content to be played is obtained by copying.
[0038] The configuration information obtained by each terminal participating in the collaborative playback is the same as the content to be played.
[0039] Step 130: Each terminal participating in the collaborative playback generates a playlist according to the configuration information, wherein the playlist includes at least information about the content to be played and time slice information corresponding to each content to be played;
[0040] Each terminal participating in the collaborative playback generates the same playlist according to the same configuration information.
[0041] In an exemplary embodiment, the time slice information of each to-be-played content includes the start time and the end time of the corresponding to-be-played content. The to-be-played content information corresponds to the time slice information, or it can be understood that each to-be-played content is bound to a time slice. In this embodiment, each to-be-played content corresponds to one or more time slices, and the synchronization of media content is achieved by managing the media content in time slices, thereby reducing the complexity of the system.
[0042] Except for the first content to be played, the time slice information of each other content to be played is calculated based on the duration and start time of the content to be played before the content to be played. For the first content to be played, the start time in its time slice information is the play start time, and the end time is the play start time + the play duration of the content to be played. For the first content to be played, the start time in the time slice information of each other content to be played is the end time in the time slice information of the previous content to be played. Optionally, the start time in the time slice information of each other content to be played can also be the end time in the time slice information of the previous content to be played + the preset loading duration n (the unit can be, for example, n seconds, n is a positive integer ≥ 0, such as n = 1), and the end time is the start time + the play duration of the current content to be played.
[0043] Step 140: When the system time of each terminal participating in the collaborative playback reaches the playback start time in the playback list, the terminal plays the content to be played according to the playback list.
[0044] By adopting the method described in this embodiment, multiple terminals participating in collaborative playback achieve system time synchronization of the multiple terminals through time calibration, download the same content to be played and configuration information, and generate the same play list in the same way. After time synchronization and generation of the play list, the multiple collaborative playback terminals can achieve synchronous playback without relying on the network, which is simple to implement, reduces configuration and deployment costs, and reduces the complexity of the system.
[0045] In an exemplary embodiment, in the above step 130, each terminal participating in the collaborative play generates a playlist according to the configuration information, including:
[0046] Each terminal participating in the collaborative playback generates a first playlist that is less than or equal to the playback time threshold according to the configuration information and the preset playback time threshold, and generates a second playlist if there is content to be played that is not included in the playlist in the configuration information, and the second playlist is time-continuous with the first playlist. In other embodiments, the second playlist can also be generated when the first playlist is played.
[0047] In an exemplary embodiment, after the first playlist and the second playlist are generated, each terminal participating in the collaborative playback plays the content to be played according to the playlist when the system time reaches the playback start time in the playlist, including:
[0048] When the system time of each terminal participating in the collaborative playback reaches the playback start time in the first playlist, the terminal plays the content to be played according to the first playlist. When the first playlist is played, the terminal switches to the second playlist to continue playing, releases the first playlist, and determines if there is any unplayed content to be played in the configuration information, generates a third playlist, and the third playlist continues the second playlist in time, and so on, until there is no unplayed content to be played in the configuration information.
[0049] In an exemplary embodiment, in the above step 140, in the process of playing the content to be played according to the play list, the method specifically includes:
[0050] The synchronization check process is executed regularly to check whether the time slice corresponding to the currently playing content includes the current system time. If it does, continue playing. If it does not, stop playing the currently playing content and find the time slice including the current system time. The content corresponding to the current system time within the time slice (i.e. the time slice including the current system time) is played synchronously in real time (i.e. the real-time synchronization process).
[0051] In an exemplary embodiment, in the above step 140, in the process of playing the content to be played according to the play list, the method specifically includes:
[0052] Each time an item of content in the playlist is played, a synchronization check is performed to check whether the time slice corresponding to the next item of content in the playlist contains the current system time. If it does, the next item of content is played. If not, the time slice containing the current system time is searched for, and the content corresponding to the current system time within the time slice (i.e., the time slice containing the current system time) is played synchronously in real time (i.e., a real-time synchronization process).
[0053] The above-mentioned scheduled check and the synchronous check after each playback do not conflict with each other, and can be performed one by one, or both.
[0054] In an exemplary embodiment, the method further includes: periodically determining whether there is new configuration information and / or content to be played; if so, updating the playlist according to the new configuration information and / or content to be played; after updating the playlist, determining in which time slice of the playlist the current system time is included, and synchronously playing the content corresponding to the current system time within the time slice (i.e., the time slice including the current system time) in real time (i.e., a real-time synchronization process).
[0055] In an exemplary embodiment, when the playback content is non-video or non-audio playback content, the real-time synchronous playback of the playback content corresponding to the current system time in the time slice (i.e., the real-time synchronization process) includes:
[0056] For non-video playback content that does not require switching, the media content corresponding to the time slice is played;
[0057] For non-video playback content that requires switching, the time slice is divided into multiple sub-time slices according to the playback duration of each page, and it is determined which sub-time slice the current system time corresponds to, and the media content corresponding to the sub-time slice is played.
[0058] In an exemplary embodiment, when the playback content is video or audio, the real-time synchronous playback of the playback content corresponding to the current system time in the time slice includes:
[0059] Calculate the first difference between the current system time and the start time of the time slice, perform a modulo operation on the first difference and the total duration of the playback content to obtain the synchronous playback time, obtain the current playback position time, calculate the second difference between the current playback position time and the synchronous playback time, and determine whether the second difference is less than a preset error range. If it is, do not make any adjustments. If it is, adjust the current playback position time to the synchronous playback time. Modulo operation is to find the remainder of dividing two numbers. Performing a modulo operation on the first difference and the total duration of the playback content is to find the remainder of the first difference divided by the total duration of the playback content. The position time to which the current video should be played, that is, the synchronous playback time, can be calculated through the modulo operation.
[0060] In the disclosed embodiment method, the programs to be played are parsed into the same playlist between different terminals, and each terminal maintains the same dynamic playlist, without the need to maintain an additional synchronization server and client, and the synchronization of materials is achieved by scheduling and managing the media content in time slices, thereby reducing the complexity of the system, making the deployment simple, reducing a large amount of configuration and deployment costs, and avoiding the problem of single point failure of the server. In addition, since the network is only required for downloading media content and performing network time synchronization, the dependence on the network is limited. Even if the network is disconnected, the error change of each terminal within a few days will not be too large, and users who do not have very high synchronization requirements can also meet the usage requirements.
[0061] The above-mentioned embodiment method is described below through application examples. The specific method flow is as follows:
[0062] Step 210, multiple terminals participating in the collaborative playback perform time calibration to synchronize the system times of the multiple terminals;
[0063] For example, the NTP service address can be pre-configured, a service can be started to realize NTP time synchronization, an NTP client can be created on the terminal to be played collaboratively to connect to the service to obtain time, and the local system time can be changed. In other embodiments, the NTP service of the terminal system can be used as a substitute, and the operating system can usually realize this function automatically. Using the NTP service of the terminal to realize system time synchronization is more flexible in management, such as conveniently changing the service address and the synchronization frequency.
[0064] Step 220, obtaining configuration information and the program content to be played from the information transmission server, downloading the configuration information and the corresponding file resources to be played to the local terminal, or copying the configuration information and file resources from other computers or mobile hard disks to the local terminal;
[0065] The configuration information is used to record when and what content is played, so that each terminal can generate a playlist.
[0066] Step 230: Generate a playlist according to the configuration information, and play according to the generated playlist.
[0067] Parse the file resources, obtain the current content to be played (hereinafter referred to as elements) according to the program information in the configuration information, obtain the play time slice of each element according to the program play time set in the configuration information, form a play list, and bind the time slice to each play element. The elements include but are not limited to one or more of the following: pictures, PDF, WORD, video, audio, etc.
[0068] Optionally, the configuration information may also include special configuration requirements, such as a file resource playback mode, according to which the elements to be played are determined. For example, if the file resource is a PDF file, only a few pages of the file need to be played, or if the file resource is a video file, only a certain section of the file needs to be played.
[0069] All terminals generate the same playlist according to the same rules and use the system time after NTP synchronization to manage whether the current playing content is within its corresponding time slice to ensure the synchronization of the playing content.
[0070] For example, the configuration information includes: 6 pictures, 1 PDF, and 2 videos are played in sequence from 12:00 to 14:00. Each picture is displayed for 10 seconds, the PDF is displayed for 60 seconds, video 1 (total length 30 seconds) is played for 5 minutes, and video 2 (total length 30 minutes) is played for 5 minutes.
[0071] The playlist duration is set to 2 hours from 12:00:00 to 14:00:00. The above configuration information generates a playlist for a time period as shown in Table 1 (only the first two cycles are shown in the table).
[0072] Table 1
[0073]
[0074]
[0075] In this example, the total length of video 1 is 30 seconds. During the time slice of playing video 1, video 1 is played in a loop. The total length of video 2 is 30 minutes. During the time slice of playing video 2, you can set it to play from the beginning each time, or you can set it to play from the end position of the last playback.
[0076] In an exemplary embodiment, the total playback duration of a playlist should not be too long. If it is too long, the playlist may be too large, wasting resources. The longer the playlist duration, that is, the more time slices there are in the playlist, the larger the playlist will be, and it will take a longer time to traverse (traverse during playback). If the playlist is too short, the program will be parsed frequently (parsed when generating the playlist). A threshold configuration item (such as a playback duration threshold, or a time slice threshold) can be set for the playlist playback duration, and the user can set it according to the actual situation. For example, if the user plays very short content and switches frequently, the threshold can be configured to be smaller (shorter). If the content played is long, the threshold can be configured to be longer. Therefore, step 230 in the above process can be implemented as follows:
[0077] Step 230: The terminal generates multiple playlists according to the configuration information and the play duration threshold (or time slice threshold), and plays according to the generated playlists.
[0078] One way is that the terminal determines that the number of time slices in the playlist is greater than or equal to a preset time slice threshold, and divides the playlist into multiple parts; or another way is that the terminal generates the current playlist in real time according to the configuration information and the threshold of the playlist length. For example, in the process of generating the current playlist, the terminal generates a first playlist with a length less than or equal to the time slice threshold according to the preset time slice threshold and the configuration information. If there is any content to be played that is not included in the playlist in the configuration information, a new second playlist is generated, and the second playlist is chronologically continuous with the first playlist.
[0079] In an exemplary embodiment, a new playlist that is continuous in time can be generated when the current playlist is played. After the current playlist is played, it is immediately switched to the new playlist, and the current playlist is released. When the new playlist is played, a new continuous playlist is generated, and so on until the configured play end time. In this way, only two playlists need to be maintained on the terminal at most, and the two playlists are continuous in time.
[0080] Taking the above configuration information as an example, if the configured playback start time is 12:00:00, the terminal can generate two playlists according to the preset time slice threshold or the preset playback duration (for example, 2 hours), and the duration of each playlist is 2 hours. The first playlist is from 12:00:00 to 14:00:00, and the second playlist is from 14:00:00 to 16:00:00. When the first playlist is finished, switch to the second playlist, release the first playlist, determine if there is any unplayed content to be played in the configuration information, and generate a third playlist from 16:00:00 to 18:00:00, and repeat this cycle until the program is terminated or finished.
[0081] In an exemplary embodiment, in the above step 230, during the process of playing according to the playlist, a synchronization check process can be performed regularly to check whether the time slice corresponding to the currently played content contains the current system time. If it does, the play continues. If it does not, the player is notified to stop playing the currently played content, find the time slice containing the current system time, and play the content corresponding to the time slice in real time (i.e., real-time synchronization process). Optionally, the played elements can also be deleted from the current playlist.
[0082] For example, the time slice corresponding to the current playing content is 12:00:00 to 12:59:59. If the current system time is 12:30:00 or 12:59:59, it is considered that the time slice in the playlist includes the current time and the play continues. If the current system time is 13:00:00, it is considered that the time slice in the playlist does not include the current time, the play of the current playing content is stopped, and the time slice including the current system time is searched for, and the play content corresponding to the current system time in the time slice is played synchronously in real time (i.e., the real-time synchronization process).
[0083] In addition to being executed regularly, the above-mentioned check process can, in an exemplary embodiment, automatically perform a synchronization check each time a content item in the playlist is played. For example, in step 230, in the process of playing according to the playlist, each time a content item in the playlist is played, check the next content item in the playlist to determine whether the time slice corresponding to the next content item includes the current system time. If it does, play the next content item. If not, find the time slice that includes the current system time, and play the content corresponding to the time slice in real time and synchronously (i.e., real-time synchronization process). In other embodiments, it is also possible to automatically perform a synchronization check each time a content item is started to be played.
[0084] The above-mentioned timing synchronization check mechanism and the synchronization check mechanism after each playback of an item can exist at the same time, or can be executed selectively. Through the above-mentioned synchronization check mechanism, errors can be corrected in time to ensure synchronization of multi-terminal playback.
[0085] In an exemplary embodiment, after each content in the playlist is played, the content in the playlist can be deleted, that is, the playlist becomes smaller and smaller to reduce the traversal time.
[0086] In an exemplary embodiment, the above process may further include the following steps:
[0087] Periodically determine whether there is new configuration information and / or content to be played. If so, determine whether the playlist needs to be updated based on the new configuration information (this step is optional. In other embodiments, the playlist can be directly updated after determining that there is new configuration information and / or content to be played). If so, update the playlist based on the new configuration information and / or content to be played. If not, continue playing the current playlist. After updating the playlist, determine which time slice in the playlist the current system time is included in, and play the content corresponding to the current system time in the time slice in real time and synchronously (i.e., real-time synchronization process).
[0088] The situations where the playlist needs to be updated include, but are not limited to, one or more of the following: adding new play content, deleting play content, modifying the play time, etc.
[0089] The real-time synchronization process is described in detail below using non-video elements as an example.
[0090] For non-video elements, such as pictures, PDFs, etc., for non-video elements without switching requirements, such as single-frame pictures (such as pictures in jpg or png format) or single-page PDFs, if the current system time is within the time slice range, the element can be played directly. For non-video elements with switching requirements, such as multi-page PDFs, the time slice can be further subdivided according to the playback time of each page, and the current system time can be determined to which sub-time slice it corresponds, and then the logic of elements without switching requirements is used.
[0091] Taking the playlist in Table 1 as an example, if the current system time is 12:12:15, the time slice containing the current system time is searched in the playlist, which should be the time slice "12:12:10 to 12:12:19", and the corresponding playback content is Picture 2, so Picture 2 should be played for 5 seconds (12:12:15 to 12:12:19), and then the next element is switched according to the playlist.
[0092] If the current system time is 12:01:22, search the playlist for the time slice that contains the current system time. It should be the time slice "12:01:00 to 12:01:59". The corresponding content is PDF. For example, PDF has 5 pages and each page plays for 5 seconds. The time slice corresponding to PDF is further subdivided. The time slice 12:01:00 to 12:01:59 is subdivided into multiple sub-time slices, and a sub-playlist is generated:
[0093] Sub-time slot 1: 12:01:00 to 12:01:04 Play Page 1
[0094] Sub-time slice 2: 12:01:05 to 12:01:09 Play Page 2
[0095] Sub-time slot 3: 12:01:10 to 12:01:14 Play Page 3
[0096] Sub-time slot 4: 12:01:15 to 12:01:19 Play Page 4
[0097] Sub-time slot 5: 12:01:20 to 12:01:24 Play Page 5
[0098] Sub-time slot 6: 12:01:25 to 12:01:29 Play Page 1
[0099] Sub-time slot 7: 12:01:30 to 12:01:34 Play Page 2
[0100] Sub-time slot 8: 12:01:35 to 12:01:39 Play Page 3
[0101] Sub-time slot 9: 12:01:40 to 12:01:44 Play Page 4
[0102] Sub-time slot 10: 12:01:45 to 12:01:49 Play Page 5
[0103] Sub-time slot 11: 12:01:50 to 12:01:54 Play Page 1
[0104] Sub-time slot 12: 12:01:55 to 12:01:59 Play Page 2
[0105] The current system time is 12:01:22, which is included in sub-time slice 5. The corresponding playback content is page 5 of PDF. Therefore, page 5 should be played for 3 seconds (12:01:22 to 12:01:24), and then the corresponding media content of the next sub-time slice will continue to be played, that is, switch to the first page of PDF, and then continue to play PDF according to the above sub-playlist until this time slice ends. After the sub-playlist ends, continue to play according to the current playlist.
[0106] The real-time synchronization process is described in detail below using the video element as an example.
[0107] Unlike non-video elements, which can only be felt when switching, video elements can be felt directly as soon as they are out of sync, so the synchronization of video elements is more important and urgent. Video content consists of multiple frames, changes quickly, and occupies a high amount of system resources, so the synchronization of video elements is also more complicated.
[0108] The following factors need to be considered when synchronizing videos: video duration, corresponding time slice duration, start time of video playback, and allowable error range. Videos are composed of many frames and change very quickly, so the time accuracy of the calculation needs to be in milliseconds. However, considering the reaction speed of the human eye, a certain error range is allowed.
[0109] Taking the playlist in Table 1 as an example, if the current system time is 12:17:20.500 (500 represents the current millisecond value), the time slice containing the current system time is searched in the playlist, which should be the time slice "12:14:00 to 12:18:59", and the corresponding playback content is Video 1. Since the total length of Video 1 is 30 seconds, it can be looped 10 times within the time slice 12:14:00 to 12:18:59. The current system time 12:17:20.500 differs from the time slice start time 12:14:00 by 3 minutes, 20 seconds, and 500 milliseconds, that is, 200 seconds and 500 milliseconds. The modulus of this number of seconds and the video duration is 20 seconds and 500 milliseconds. Therefore, the current video should be played to the position of 20 seconds and 500 milliseconds (i.e., the synchronized playback time). The current playback position time is obtained through the video player, and the difference between this position time and 20 seconds and 500 milliseconds is taken. Taking the error threshold of 100 milliseconds as an example, if the difference is less than 100 milliseconds, it means that it is within the allowable error range and no adjustment is made. If it is greater than or equal to 100 milliseconds, it means that it exceeds the allowable error range and the video playback progress needs to be adjusted. The player progress is adjusted to the position of 20 seconds and 500 milliseconds to make the actual playback consistent with the plan. All terminals use the same plan to achieve the purpose of terminal synchronization. Real-time synchronization detection can be performed every time period to ensure that each terminal is synchronized within the allowable error range.
[0110] To achieve synchronization, the player used by each terminal needs to support adjusting the playback progress and be able to obtain the current playback position time with accurate milliseconds, and the millisecond level should not be greater than 100 milliseconds.
[0111] It should be noted that the smaller the error threshold, the better. If the error range is too small, it may cause frequent adjustments to the video playback progress in some cases, resulting in visible playback freezes or choppy sound. This threshold may be related to the current playback position accuracy provided by the video player. If the video player only provides second-level accuracy, then if the error threshold is set to milliseconds, the progress may be frequently adjusted, and the display may easily freeze. It can be set according to actual conditions.
[0112] The multi-terminal synchronization method of multimedia programs provided in this embodiment is that multiple terminals participating in collaborative playback use NTP time synchronization to make the system time of multiple playback terminals consistent. The multimedia information publishing service end can send the multimedia program that has been edited and the playback time interval is specified to the playback terminal, that is, multiple terminals receive the same configuration information and media content from the multimedia information publishing service end. Multiple terminals generate a play list arranged by time according to the playback time period for the received multimedia programs, and rotate to determine whether the currently played content is consistent with the play list. If not, the playback content is adjusted; if the playback content is a video, a time error range is specified for the video, and the time point at which the video should be played is calculated in combination with the time slice allocated for the video and the total duration of the video, and then compared with the current actual playback time point of the video. If the result is greater than the specified time error, the video playback progress is adjusted to ensure that the playback content of multiple terminals is consistent. In the information distribution system, it is ensured that multiple terminals play the same content synchronously.
[0113] The method of the disclosed embodiment can be applied to any scenario where synchronous playback is required, such as subway stations, restaurants, hospitals, supermarkets, etc.
[0114] Figure 2 The figure shows a collaborative playback system including multiple multimedia playback devices, including multiple multimedia playback devices, and a multimedia information publishing server for sending configuration information and content to be played to the multimedia playback devices. The multiple multimedia playback devices synchronize time with the time server through the network, and obtain configuration information and content to be played from the multimedia information publishing server, and then each multimedia playback device executes the multimedia playback method shown above to achieve synchronous playback.
[0115] In an exemplary embodiment, the present disclosure also provides a multimedia playback device for participating in collaborative playback with other multimedia playback devices, such as Figure 3 As shown, the multimedia playback device includes:
[0116] A time calibration module 301 is used to perform time calibration so that the system time of the multimedia playback device and other multimedia playback devices participating in the collaborative playback are consistent;
[0117] An information acquisition module 302 is used to acquire configuration information and content to be played, wherein the configuration information includes playback start time information, content information to be played, and playback duration information of each content to be played; and
[0118] A playlist generation module 303, configured to generate a playlist according to the configuration information, wherein the playlist at least includes information about the content to be played and time slice information corresponding to each content to be played, and each content to be played corresponds to one or more time slices;
[0119] The playing module 304 is used to play the content to be played according to the play list when the system time reaches the play start time in the play list.
[0120] The specific operations of each module are described in the above embodiments and will not be repeated here.
[0121] In an exemplary embodiment, the present disclosure also provides a multimedia playback device, which may include a processor and a memory, wherein the memory stores a computer program that can be run on the processor, wherein when the processor executes the computer program, the steps of the multimedia playback method in any of the above embodiments of the present disclosure are implemented.
[0122] In an exemplary embodiment, Figure 4 FIG. 1 is a schematic diagram of the structure of a display device in an embodiment of the present disclosure. Figure 4 As shown, the device 60 includes: at least one processor 601; and at least one memory 602 and a bus 603 connected to the processor 601; wherein the processor 601 and the memory 602 communicate with each other through the bus 603; the processor 601 is used to call the program instructions in the memory 602 to execute the steps of the multimedia playback method in any of the above embodiments.
[0123] The processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), a transistor logic device, etc., and the present disclosure does not limit this.
[0124] The memory may include a read-only memory (ROM) and a random access memory (RAM), and provides instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0125] In addition to the data bus, the bus may also include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 4 In the text file, various buses are marked as buses.
[0126] In the implementation process, the processing performed by the processing device can be completed by the hardware integrated logic circuit in the processor or the instructions in the form of software. That is, the method steps of the embodiment of the present disclosure can be embodied as being executed by a hardware processor, or being executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
[0127] In an exemplary embodiment, the present disclosure further provides a non-volatile computer-readable storage medium on which is stored a computer program executable on a processor, wherein the computer program implements the steps of the aforementioned multimedia playback method when executed by the processor.
[0128] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the functional modules / units mentioned in the above description are not divided equally; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0129] Although the embodiments disclosed in the present disclosure are as above, the contents described are only embodiments adopted to facilitate understanding of the present disclosure and are not intended to limit the present disclosure. Any technician in the field to which the present disclosure belongs can make any modifications and changes in the form and details of implementation without departing from the spirit and scope disclosed in the present disclosure, but the scope of patent protection of the present disclosure shall still be subject to the scope defined in the attached claims.
Claims
1. A multimedia playback method, characterized in that: include: Multiple terminals participating in the collaborative playback perform time calibration to keep the system time of the multiple terminals consistent; Each terminal participating in the collaborative playback obtains configuration information and content to be played, wherein the configuration information includes playback start time information, content information to be played, and playback duration information of each content to be played, and the content to be played includes two or more of the following: picture, PDF, WORD, video, audio; Each terminal participating in the collaborative playback generates a playlist according to the configuration information, wherein the playlist includes at least information about the content to be played and time slice information corresponding to each content to be played, and each content to be played corresponds to one or more time slices; wherein each terminal participating in the collaborative playback determines that the number of time slices in the playlist is greater than or equal to a preset time slice threshold, and divides the playlist into multiple time slices; or, each terminal participating in the collaborative playback generates a first playlist less than or equal to the play time threshold according to the configuration information and a preset play time threshold, and generates a second playlist if there is content to be played that is not included in the playlist in the configuration information, and the second playlist is time-continuous with the first playlist; Each terminal participating in the collaborative playback plays the content to be played according to the playlist when the system time reaches the play start time in the playlist, and deletes the content in the playlist after each content in the playlist is played; Among them, when playing the current playlist, a new playlist that is continuous in time is generated. After the current playlist is played, it is switched to the new playlist, and the current playlist is released. When playing the new playlist, a new continuous playlist is generated, and so on until the configured play end time. The terminal maintains two playlists, and the two playlists are continuous in time.
2. The method according to claim 1, characterized in that When the system time of each terminal participating in the collaborative playback reaches the playback start time in the playback list, the terminal plays the content to be played according to the playback list, including: When the system time of each terminal participating in the collaborative playback reaches the playback start time in the first playlist, the terminal plays the content to be played according to the first playlist. When the first playlist is played, the terminal switches to the second playlist to continue playing, releases the first playlist, and determines if there is any unplayed content to be played in the configuration information, generates a third playlist, and the third playlist continues the second playlist in time, and so on, until there is no unplayed content to be played in the configuration information.
3. The method according to claim 1, characterized in that In the process of playing the content to be played according to the play list, the method specifically includes: The synchronization check process is executed regularly to check whether the time slice corresponding to the currently playing content contains the current system time. If it does, continue playing. If it does not, stop playing the currently playing content, find the time slice containing the current system time, and play the content corresponding to the current system time in the time slice in real time.
4. The method according to claim 1, characterized in that: In the process of playing the content to be played according to the play list, the method specifically includes: Each time a content item in the playlist is played, a synchronization check is performed to check whether the time slice corresponding to the next content item in the playlist contains the current system time. If it does, the next content item is played. If not, a time slice containing the current system time is searched for, and the content corresponding to the current system time in the time slice is played synchronously in real time.
5. The method according to claim 1, characterized in that The method further comprises: Periodically determine whether there is new configuration information and / or content to be played. If so, update the playlist based on the new configuration information and / or content to be played. After updating the playlist, determine which time slice in the playlist the current system time is included in, and play the content corresponding to the current system time in the time slice in real time and synchronously.
6. The method according to claim 3, 4 or 5, characterized in that: When the playback content is non-video or non-audio playback content, the real-time synchronous playback of the playback content corresponding to the current system time in the time slice includes: For non-video playback content that does not require switching, the media content corresponding to the time slice is played; For non-video playback content that requires switching, the time slice is divided into multiple sub-time slices according to the playback duration of each page, and it is determined which sub-time slice the current system time corresponds to, and the media content corresponding to the sub-time slice is played.
7. The method according to claim 3, 4 or 5, characterized in that: When the playback content is video or audio, the real-time synchronous playback of the playback content corresponding to the current system time in the time slice includes: Calculate a first difference between the current system time and the start time of the time slice, perform a modulo operation on the first difference and the total duration of the playback content to obtain the synchronized playback time, obtain the current playback position time, calculate a second difference between the current playback position time and the synchronized playback time, and determine whether the second difference is less than a preset error range. If so, do not make any adjustment; if so, adjust the current playback position time to the synchronized playback time.
8. A multimedia playback device, characterized in that: Used to participate in collaborative playback with other multimedia playback devices, the multimedia playback device includes: A time calibration module, used for performing time calibration to make the system time of the multimedia playback device and other multimedia playback devices participating in the collaborative playback consistent; An information acquisition module, used to acquire configuration information and content to be played, wherein the configuration information includes playback start time information, content information to be played, and playback duration information of each content to be played, and the content to be played includes two or more of the following: picture, PDF, WORD, video, audio; and A list generation module is used to generate a playlist according to the configuration information, wherein the playlist at least includes information about content to be played and time slice information corresponding to each content to be played, and each content to be played corresponds to one or more time slices; wherein the list generation module determines that the number of time slices in the playlist is greater than or equal to a preset time slice threshold, and divides the playlist into multiple time slices; or, the list generation module generates a first playlist less than or equal to the play time threshold according to the configuration information and a preset play time threshold, and generates a second playlist if there is content to be played that is not included in the playlist in the configuration information, and the second playlist is time-continuous with the first playlist; The playing module is used to play the content to be played according to the playlist when the system time reaches the play start time in the playlist, and delete the content in the playlist after each content in the playlist is played; wherein, when the current playlist is played, a new playlist that is continuous in time is generated, after the current playlist is played, it is switched to the new playlist, the current playlist is released, and when the new playlist is played, a new continuous playlist is generated, and so on until the configured play end time. The device maintains two playlists, and the two playlists are continuous in time.
9. A multimedia playing system, comprising a plurality of multimedia playing devices as claimed in claim 8, and a multimedia information publishing server for sending configuration information and content to be played to the multimedia playing devices.
10. A multimedia playback device, comprising a processor and a memory storing a computer program that can be run on the processor, wherein: When the processor executes the program, the steps of the multimedia playback method according to any one of claims 1 to 7 are implemented.
11. A computer-readable storage medium, characterized in that: A computer program that can be run on a processor is stored thereon, and when the computer program is executed by the processor, the steps of the multimedia playback method as claimed in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and system for synchronously playing Flash on multiple terminals
CN102006319A
Multiple-player-terminal synchronized playing system and playing method
CN103200461A