Content playing method and device, electronic equipment and storage medium
By receiving and parsing signaling information to synchronously play video content, the problems of time deviation and network frame skipping in the video live streaming and sharing system have been solved, enabling synchronized playback for sharers and viewers and improving the user experience.
Patent Information
- Application Number
- CN202111064413.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-10
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2041-09-10
AI Technical Summary
In existing video live streaming and sharing systems, users experience time discrepancies and network frame skipping when sharing videos, which makes it impossible to guarantee real-time performance and consistency, thus affecting user experience.
By receiving and parsing signaling information, the system obtains the content identifier and playback progress of the main content, and uses the signaling information to synchronously play the main content, including periodically generated content identifiers and playback progress. It corrects the position and progress of local playback, supports role switching and version number management, and ensures synchronization and consistency.
It enables synchronized playback of video content between sharers and online viewers, reduces video loading delays, ensures that viewers and sharers watch the same content at the same time, and improves user experience.
Smart Images

Figure CN115802085B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of content playing, and particularly relates to a content playing method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the development of video technology and the application of network technology, video can realize very complex video live broadcast or sharing service. When a user intends to share video content, there is often a time deviation in sharing video in the existing video live broadcast sharing system, real-time performance cannot be guaranteed, and there are often frame skipping phenomena in shared video content due to network or algorithm problems, which makes the shared content inconsistent. Therefore, how to improve real-time and efficient sharing service and improve user experience has become a problem to be solved. SUMMARY
[0003] In order to at least solve the above technical problems, the purpose of the embodiments of the present application is to provide a content playing method, device, electronic equipment and storage medium.
[0004] According to a first aspect of the present application, the embodiments of the present application provide a content playing method, comprising:
[0005] receiving a signaling and parsing the signaling to obtain signaling information, wherein the signaling information includes information with a content identifier (identifier, referred to as ID) and a playing progress generated periodically when a sharer shares and plays a main state content, and the main state content is a content being watched by the sharer;
[0006] retrieving the content identifier and the playing progress of the main state content in the signaling information;
[0007] synchronously playing the main state content according to the content identifier and the playing progress of the main state content.
[0008] Further, the signaling information is carried and distributed by an audio and video stream in the main state content.
[0009] Further, the signaling information carries the content identifier in the currently played main state content, and carries a first identifier of a previous content and a second identifier of a next content, and a position value of the current content in a content list of the main state content.
[0010] Further, the signaling information is set as playing sub-signaling information, pausing sub-signaling information or list sub-signaling information; wherein the playing sub-signaling information and the pausing sub-signaling information both include the first identifier of the previous content, the content identifier of the current content and the second identifier of the next content, and the list sub-signaling information includes the content list of the main state content obtained by each network request and the position value k of the current content in the content list of the main state content.
[0011] Further, the synchronously playing the main-state content comprises:
[0012] Comparing a first position value of a currently played local content identifier with a second position value of a current content identifier in the signaling information every interval preset time;
[0013] If the first position value of the currently played local content identifier is inconsistent with the second position value of the current content identifier in the signaling information, the local content identifier played in the guest state is corrected.
[0014] Further, the method comprises:
[0015] If the first position value of the local content identifier played in the guest state is less than the second position value of the current content identifier in the signaling information, a content downslide switching process animation is performed;
[0016] If the first position value of the local content identifier played in the guest state is greater than the second position value of the current content identifier in the signaling information, a content upslide switching process animation is performed.
[0017] Further, the playing progress of the signaling information comprises a playing progress time of the main-state content;
[0018] When the local playing progress time currently played is inconsistent with the playing progress time of the main-state content, the local content playing progress played in the guest state is corrected.
[0019] Further, the method comprises:
[0020] When a difference between the local playing progress time currently played and the playing progress time of the main-state content is greater than a set threshold value, the signaling is determined to be valid, and the local playing progress is set to the corresponding main-state content playing progress time;
[0021] When the difference between the local playing progress time currently played and the playing progress time of the main-state content is less than or equal to the set threshold value, the signaling is determined to be invalid and ignored.
[0022] Further, when the signaling information is list sub-signaling information, the signaling is sent through a message channel;
[0023] When a user accesses content sharing in the middle of main-state content playing, a compensation signaling is acquired, the compensation signaling being list sub-signaling information within a preset time range temporarily stored by a server through the message channel.
[0024] Further, the signaling information further comprises a version number;
[0025] When the signaling information with the high version number is received, the signaling information with the low version number is no longer processed.
[0026] Further, the signaling information supports role switching between the sharer and the sharpee, and the version number in the signaling information is incremented after each role switching.
[0027] Further, the signaling information carries a content ID in the currently played main-state content, and also carries an ID of a previous content and an ID of a next content, marked as:
[0028] ["ID(n-1)", "k:IDn", "ID(n+1)"], or
[0029] ["ID(n-1)", "k:IDn:Ts", "ID(n+1)"]
[0030] wherein ID(n-1) represents the ID of the previous content, k:IDn represents the ID of the current content and the kth position of the current content in a content list of the main-state content, ID(n+1) represents the ID of the next content, Ts represents the content playing progress (timestamp), and n and k are natural numbers.
[0031] According to a second aspect of the present application, the embodiments of the present disclosure provide a content playing device, comprising:
[0032] a parsing module configured to receive a signaling and parse the signaling to obtain signaling information, wherein the signaling information comprises information with a content ID and a playing progress periodically generated when a sharer plays a main-state content, and the main-state content is a content being watched by the sharer;
[0033] a calling module configured to call the content ID and the playing progress of the main-state content in the signaling information;
[0034] a synchronizing module configured to synchronize playing of the main-state content according to the content ID and the playing progress of the main-state content.
[0035] According to a third aspect of the present application, the embodiments of the present disclosure provide an electronic device, comprising:
[0036] a memory configured to store computer readable instructions; and
[0037] a processor configured to run the computer readable instructions, so that the electronic device implements the method according to any one of the first aspect.
[0038] According to a fourth aspect of the present application, the present disclosure provides a computer readable storage medium, characterized in that the computer readable storage medium stores a program, and the program is executed to implement the method of any one of the first aspect.
[0039] The present disclosure provides a signaling synchronization playing video method and device, electronic equipment and computer readable storage medium, wherein the method comprises: receiving a signaling and analyzing the signaling to obtain signaling information, wherein the signaling information comprises information with a content identifier and a playing progress generated periodically when a sharer plays a main state content, and the main state content is a content being watched by the sharer; calling the content identifier and the playing progress of the main state content in the signaling information; and playing the main state content synchronously according to the content identifier and the playing progress of the main state content. The signaling synchronization playing content method of the present disclosure, when a content sharer starts to play a content, sends a signaling every certain time interval, and a network viewer receives the signaling and then pulls the signaling information of the playing content from a server to play the content from the "content identifier" and "current video playing progress" carried in the signaling information, thereby ensuring the synchronization of the content playing progress and the consistency of the playing content.
[0040] The above description is only a summary of the technical solutions of the present disclosure, in order to more clearly understand the technical means of the present disclosure, the following preferred embodiments are described in detail according to the content of the specification, and in order to make the above and other purposes, characteristics and advantages of the present disclosure more obvious and easy to understand, the following preferred embodiments are described in detail as follows, and the accompanying drawings are described as follows. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 The flowchart of the signaling synchronization playing content method provided by an embodiment of the present disclosure is shown in the figure;
[0042] Figure 2 The content sharer synchronization playing flowchart provided by an embodiment of the present disclosure is shown in the figure;
[0043] Figure 3 The content synchronization between the content sharer and the viewer provided by an embodiment of the present disclosure is shown in the figure;
[0044] Figure 4 The signaling synchronization playing content device provided by another embodiment of the present disclosure is shown in the figure;
[0045] Figure 5 The structure diagram of the electronic equipment provided by another embodiment of the present disclosure is shown in the figure. DETAILED DESCRIPTION
[0046] In order to more clearly describe the technical content of the present application, the following further describes in combination with specific embodiments.
[0047] The implementations described in the following exemplary embodiments are not meant to represent all implementations consistent with the present disclosure. Rather, they are simply examples of apparatuses and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0048] Embodiments of the present disclosure will be described in more detail with reference to the drawings. While certain embodiments of the disclosure will be shown and described in the drawings and specification, it is to be understood that the disclosure can take form in various ways and should not be construed as limited to the embodiments set forth herein, but should be interpreted in light of the principles described herein. It is to be understood that the drawings and embodiments are merely for illustrative purposes and are not to be construed as limiting the scope of the present disclosure.
[0049] It should be understood that various steps in the method implementations of the present disclosure can be performed in different sequences and / or concurrently. Additionally, the method implementations can include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0050] The term "includes" and its variants are meant to be open-ended, meaning that it includes but is not limited to. The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment." The term "another embodiment" means "at least one additional embodiment." The term "some embodiments" means "at least some embodiments." Related terms have analogous meanings to those described above.
[0051] It should be noted that the terms "first", "second", and the like, used in the present disclosure are merely used to distinguish different apparatuses, modules or units, and do not imply the order or sequence of the functions of the apparatuses, modules or units.
[0052] It should be noted that the terms "one", "multiple", and the like, used in the present disclosure are illustrative and not limiting, and those skilled in the art should understand that, unless otherwise explicitly indicated in the context, it should be understood as "one or more".
[0053] The terminology used in the present disclosure is merely for the purpose of describing particular embodiments and is not intended to limit the present disclosure. As used in the specification and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The embodiments of the disclosure are described in detail with reference to the drawings.
[0054] Figure 1The flowchart of the signaling synchronization playing content method provided by the embodiments of the present disclosure, the signaling synchronization playing video method provided by the embodiments of the present disclosure can be executed by a synchronization video playing device, which can be implemented as software, or as a combination of software and hardware, and can be integrated into a device in a signaling synchronization playing video system, such as a terminal device, a service device, or the Internet. As shown in Figure 1 the content sharer synchronization playing flowchart shown in Figure 2 the content sharer synchronization playing flowchart shown in
[0055] Step S101: receiving a signaling and parsing the signaling to obtain signaling information, wherein the signaling information includes information with a content identifier and a playing progress periodically generated when a sharer plays a main-state content, and the main-state content is a content being watched by the sharer.
[0056] In step S101, in the embodiments, the shared content, i.e., the content in the main state or the guest state, can be a video, an audio atlas, a courseware, etc. In the embodiments, the video is taken as an example, the main-state video sharer can be any user, and the user can realize real-time video stream sharing with other users, i.e., video sharing, in a call process or by starting a room, so that the network watcher and the sharer can simultaneously and synchronously play the same video content. When the sharer shares the video, the signaling information with a video ID and a playing progress is generated in a network system transmission channel, the video in the network is transmitted through an audio and video stream, the signaling information is distributed by the audio and video stream, the audio stream and the black frame are synthesized, and the black frame is added to pass information through an SEI channel, and the black frame occupies a very small space after compression algorithm. The signaling information is represented by the video ID and the playing progress time, and the signaling information also has a video list. For example, when the sharer plays a certain video in the video list, the sharer sends the signaling information with the video list, the video ID, and the playing progress to the network watcher, so that the network watcher and the sharer can synchronously play the same video content through the synchronization of the signaling information, and the content watched by the sharer and the network watcher is synchronized and consistent, so that the synchronization discussion and interaction between the watcher and the sharer can be realized.
[0057] The signaling information carries the video ID in the currently played main-state video, and also carries the ID of the previous video and the ID of the next video, which are marked as
[0058] ["ID(n-1)", "k:IDn", "ID(n+1)"], or
[0059] ["ID(n-1)", "k:IDn:Ts", "ID(n+1)"]
[0060] Wherein, ID(n-1) represents the ID of the previous video, k:IDn represents the ID of the current video and the kth position of the current video in the video list of the main video, ID(n+1) represents the ID of the next video, Ts represents the video playback progress (timestamp), and n and k are natural numbers.
[0061] The signaling information is configured as play sub-signaling information, pause sub-signaling information, or list sub-signaling information; wherein the play sub-signaling information and the pause sub-signaling information each include a first identifier of the previous video, a video identifier of the current video, and a second identifier of the next video, and the list sub-signaling information includes a video list of the main video obtained from each network request and a position value k of the current video in the video list of the main video.
[0062] During the synchronous playback of the host video in the guest state, the position value k of the local video ID played in the guest state is compared with the position value k at preset time intervals. 本地 The location value k of the current video ID in the signaling information 信令 ;
[0063] If the location value k of the local video ID played by the guest is... 本地 The location value k of the current video ID in the signaling information 信令 If they are inconsistent, then the position value k of the local video ID played in the guest state is... 本地 Make corrections.
[0064] If the location value k of the local playback ID in the guest playback is... 本地 If the ID of the current video is smaller than the ID of the signaling information, then the downward video animation will be rendered.
[0065] If the location value k of the local playback ID in the guest playback is... 本地 The location value k is greater than the current video ID in the signaling information. 信令 Then, the upward scrolling video animation will be rendered.
[0066] Specifically, the signaling not only carries the ID of the currently playing video, but also the IDs of the previous and next videos: "IDn". Taking n=2 as an example:
[0067] ["ID1","1:ID2","ID3"], where ID1 represents the ID of the previous video, 1:ID2 represents the ID of the current video and its position in the sharer's video list, and ID3 represents the ID of the next video. The existence of ID1 and ID3 ensures that viewers can obtain video content from the server in advance, reducing latency caused by video loading; secondly, it ensures that the viewing experience of watching the sharer's videos within the room is consistent with the experience of watching videos through the recommendation stream on their own.
[0068] ["ID1", "1:ID2", "ID3"] Each signaling will bring the current video to the first place in the list of the sharer video ("1:ID2"), and by analyzing and comparing, it can be ensured that the order of the sharer video list is consistent (the video list of the viewer is the full set or subset of the sharer, and the order of the sharer video list is consistent).
[0069] The signaling information further includes a video list of the main state video, and the signaling information is set to play sub-signaling information, pause sub-signaling information and list sub-signaling information, wherein the play sub-signaling information and the pause sub-signaling information each include an ID of a previous video, an ID of a current video and an ID of a next video, and the list sub-signaling information includes the video list of the main state video obtained each time a network request is made. Each play sub-signaling (cmd=1) and pause sub-signaling (cmd=2) carries three video IDs, and each list sub-signaling (cmd=3) carries the video list obtained each time a network request is made by the sharer. Through the three sub-signalings, the viewer can restore the video list of the sharer step by step. That is, the video list of the network viewer (audience) is the full set or subset of the sharer. Among them, the signaling of cmd=3 is sent through an IM channel (message channel), and the server will temporarily store the latest one. At the same time, when the viewer enters the room in the middle, the latest signaling temporarily stored will be distributed to the new user as a compensation signaling, so that the user can timely obtain the current play list of the sharer without waiting for the signaling synchronized every x seconds by the sharer. Otherwise, if the user enters the room and happens to miss the signaling synchronized every x seconds by the sharer, the viewer will be black screened for x seconds.
[0070] In addition, the signaling information further includes version number information, when a user receives a signaling information with a high version number, the signaling information with a low version number will not be processed any more, the signaling information supports role switching between the main state user and the guest state user, and the version number in the signaling information is incremented each time the role is switched. When a user receives a signaling with a high version, the signaling with a low version will not be processed any more.
[0071] The role switching of the sharer and the viewer can be supported during the sharing process. That is, the roles of the video sharer and the viewer can be exchanged, and after the exchange, the viewer becomes the video sharer. For example, in the case of interactive live streaming of two or more users, one user acts as a video sharer and the other user acts as a video viewer at a certain moment. When the other user needs to share live streaming, the roles are switched, and the other user becomes the video sharer while the original sharer becomes the video viewer. Each time the role is switched, the version number is switched to the latest version.
[0072] In this embodiment, the video sharer needs to distribute signaling information carrying video synchronization information in the network channel when sharing. The video synchronization information is the video list, video ID, and playing progress mentioned above. The transmitted signaling is distributed by audio and video streams. It ensures that the video content discussed by the sharer and the viewer is consistent. In this step, in order to synchronize the video playing, the synchronization is basically real-time, and the signaling can be distributed every short time interval, for example, 0.1-5 ms, for example, 0.2 ms. Of course, the time interval can be selected according to the working frequency of the hardware, and with the improvement of the hardware speed, the interval can be further shortened. Here, the video sharer is the host state playing party of the video, and the viewer is the guest state playing party of the video.
[0073] The signaling information is sent through two types of signaling channels SEI and channel IM. Among them, the channel SEI is sent redundantly by a timing task, and the time interval can be configured, for example, 0.1-5 ms, for example, 1234 ms. Of course, the time interval can be selected according to the working frequency of the hardware, and with the improvement of the hardware speed, the interval can be further shortened; the timing sending is combined with the state change sending, that is, it is sent immediately when the state changes. Channel IM, send after the success of the host state refresh and loadMore.
[0074] The signaling information is sent through a message channel, and the server temporarily stores the latest signaling information. When the guest state user connects in the middle of the host state video playing, the latest signaling information temporarily stored is distributed to the newly connected user as compensation signaling, so that the user can obtain the current playing video list of the host state video in time.
[0075] In this embodiment, real-time audio and video (WebRTC) is used for transmission of signaling information, which allows real-time peer-to-peer media exchange between two devices. The connection is established through the discovery and negotiation process of signaling, which is used to send or receive signaling information, and builds a two-way video call. WebRTC is a completely peer-to-peer technology for real-time exchange of audio, video and data. A discovery and media format negotiation must be performed first to locate two devices on different networks with each other, this process is called signaling, and involves two devices connecting to a third mutually agreed server, through this third-party server, the two devices can locate each other and exchange negotiation messages. A signaling server is needed to establish a WebRTC connection between two devices to connect both parties through the network. The role of the signaling server is to act as an intermediary to help both parties establish a connection with as little privacy exposure as possible. WebRTC does not provide a signaling delivery mechanism, and can use WebSocket or XMLHttpRequest, etc. to exchange token information with each other. The important thing is that the signaling server does not need to understand and interpret the signaling data content. The content of the message through the signaling server is actually a black box. When the ICE subsystem indicates that the signaling data is sent to another peer, the other peer knows how to receive this information through the signaling service and pass it to its own ICE subsystem. The signaling information with video list, video ID and play progress in this embodiment can realize the synchronous playback of video content between different users in the network.
[0076] In this embodiment, the video sharer is the main state playback party, and the network audience is the guest state playback party. In the video network, the guest state playback party receives the signaling sent by the video sharer through the signaling channel, and the signaling includes a video list, a video ID and a play progress, and the signaling information includes a play sub-signaling information, a pause sub-signaling information and a list sub-signaling information. The play sub-signaling information and the pause sub-signaling information each include an ID of a previous video, an ID of a current video and an ID of a next video. The video ID of the currently played main state video, and the ID of the previous video and the ID of the next video carried by the signaling information are parsed and marked as:
[0077] ["ID(n-1)", "k:IDn", "ID(n+1)"], or
[0078] ["ID(n-1)", "k:IDn:Ts", "ID(n+1)"]
[0079] Wherein, ID(n-1) represents the ID of the previous video, k:IDn represents the ID of the current video and the kth position of the current video in the video list of the main state video, ID(n+1) represents the ID of the next video, Ts represents the video play progress (timestamp), and n and k are natural numbers.
[0080] Specifically, taking n=2 as an example:
[0081] ["ID1", "1:ID2", "ID3"], ID1 represents the ID of the previous video, 1:ID2 represents the ID of the current video and the position of the current video in the list of videos shared by the sharer, and ID3 represents the ID of the next video. The presence of ID1 and ID3 can first ensure that the viewer can obtain the video content from the server in advance, reducing the delay caused by video loading; secondly, it can ensure that the viewer's experience of watching the sharer's video in the room is consistent with the experience of watching the recommended stream video by the viewer himself.
[0082] ["ID1", "1:ID2", "ID3"], each signaling carries the position of the current video in the list of videos shared by the sharer ("1:ID2"), and by analyzing and comparing, it can be ensured that the order of the list of videos shared by the sharer is consistent (the list of videos in the local of the viewer is the full set or subset of the list of videos shared by the sharer, and the order is consistent with the list of videos shared by the sharer).
[0083] The list sub-signaling information includes the video list of the main state video obtained by each network request. Each play sub-signaling (cmd=1) and pause sub-signaling (cmd=2) carries three video IDs, and each list sub-signaling (cmd=3) carries the video list obtained by each network request of the sharer. Through the three sub-signals, the viewer can restore the video list of the sharer step by step. That is, the list of videos in the local of the network viewer (audience) is the full set or subset of the list of videos shared by the sharer.
[0084] Step S102: retrieving the content identifier and play progress of the main state content in the signaling information.
[0085] In step S102, the video ID and play progress of the main state video in the signaling information parsed in step S101 are retrieved, wherein the video ID represents the video in the video list, and the play progress represents the time progress of the video playing, corresponding to the play timestamp information.
[0086] The retrieved signaling information contains ["ID1", "n:ID2", "ID3"], and each signaling carries the position of the current video in the list of videos shared by the sharer ("k:ID2"), for example, the information carried on the signaling is ["ID1", "5:ID2", "ID3"], indicating that the sharer is playing the 5th video, and the video ID is ID2. In addition, the signaling information also has a play progress time, for example, ["ID1", "5:ID2:Ts", "ID3"], indicating that the sharer is playing the 5th video, the video ID is ID2, and the play progress time is Ts.
[0087] Step S103: synchronously playing the main-state content according to the content identifier and the playing progress of the main-state content.
[0088] In step S103, based on the signaling information in step S101, for example, ["ID(n-1)", "k:IDn", "ID(n+1)"], the existence of ID(n-1) and ID(n+1) can first ensure that the viewer can obtain the video content from the server in advance, reducing the delay caused by video loading; secondly, it can ensure that the viewer's experience of watching the sharer's video in the room is consistent with the experience of watching the video stream by the viewer himself. ["ID(n-1)", "k:IDn", "ID(n+1)"] each signaling will bring the current video to the kth position of the sharer's video list ("k:IDn"), through analysis and comparison, it can be ensured that the order of the sharer's video list remains consistent (the viewer's local video list is the full set or subset of the sharer's video list, and the order is consistent with the sharer's video list). The list sub-signaling information includes the video list of the main-state video obtained by each network request. Each play sub-signaling (cmd=1) and pause sub-signaling (cmd=2) carries three video IDs, and each list sub-signaling (cmd=3) carries the video list obtained by each network request of the sharer. Through the three kinds of sub-signaling, the viewer can restore the sharer's video list step by step. That is, the viewer's (audience) local video list is the full set or subset of the sharer's video list. At the same time, by analyzing the playing progress time Ts of the current playing video of ["ID(n-1)", "k:IDn:Ts", "ID(n+1)"], the viewer can keep synchronized with the sharer to play the same video content.
[0089] In addition, the signaling synchronous playing video method of the embodiment further includes the step of correcting the local video played by the guest state (viewer) when the local video played by the guest state (viewer) is inconsistent with the position value k or progress of the main-state (sharer) video playing ID. Specifically:
[0090] 1) The position value k of the playing video ID is inconsistent:
[0091] When the guest state synchronously plays the main-state video, the position value k of the local video played by the guest state is compared every interval preset time 本地 with the position value k of the ID of the current video in the signaling information 信令 ; if the position value k of the local video played by the guest state 本地 is inconsistent with the position value k of the ID of the current video in the signaling information 信令 , the local video ID played by the guest state is corrected.
[0092] If the position value k of the local play ID of the guest state play 本地 is less than the position value k of the current video ID in the signaling information 信令 , a video animation of rendering a slide down is performed.
[0093] If the position value k of the local play ID of the guest state play 本地 is greater than the position value k of the current video ID in the signaling information 信令 , a video animation of rendering a slide up is performed.
[0094] For example, ["id1", "5:id2", "id3"], each signaling carries the position of the current video in the list of the sharer ("5:id2"), which represents that the fifth video is played. If the local play of the viewer is "3:id4", a slide down animation needs to be rendered because 3<5, and vice versa. Thus, through the position information carried by the signaling, the viewer can calculate whether the sharer is sliding up or down, so that the viewer can reproduce the UI animation of sliding up or down of the sharer.
[0095] 2) Inconsistent progress time of the same video played:
[0096] When the local play progress time of the guest state play is inconsistent with the play progress time of the host state video, the local video play progress of the guest state play is corrected.
[0097] When the difference between the local play progress time of the guest state play and the play progress time of the host state video is greater than a set threshold, it is determined as valid signaling, and the local play progress is forcibly set to the corresponding play progress time of the host state video during the guest state play.
[0098] When the difference between the local play progress time of the guest state play and the play progress time of the host state video is less than or equal to a set threshold, it is determined as invalid signaling, and the invalid signaling is ignored during the guest state play.
[0099] For example, the signaling carries the play timestamp (i.e. the play progress time) of the host state video "Ts": 1234, which represents that the current play progress of the sharer is 1234 milliseconds. When the difference between the progress of the viewer and the progress of the sharer is greater than a set threshold, it is considered as valid signaling, and the progress of the viewer is forcibly set to 1234 milliseconds. When the difference between the progress of the viewer and the progress of the sharer is less than or equal to a set threshold, it is considered as invalid signaling, and the viewer discards the information without processing, thereby improving the smoothness of the play of the viewer and reducing performance loss.
[0100] As shown in FIG. 1, Figure 3 a content synchronization diagram between a content sharer and a viewer is shown.
[0101] The video sharer (the main state player) plays the video in the main state and shares it in real time. After sharing, signaling information carrying the video list, video ID and playing progress (playing timestamp) is generated and sent through two types of signaling channels SEI and channel IM. Among them, channel SEI is sent redundantly by a timing task, and the time interval can be configured, for example, the interval is 0.1-5ms, for example, 1234ms. Of course, the time interval can be selected according to the working frequency of the hardware. With the improvement of the speed of the hardware, the interval can be further shortened; the timing sending is combined with the state change sending, that is, it is sent immediately when the state changes. Channel IM is sent after the main state refresh and loadMore are successful. After the signaling information is sent to the audience (the guest state player) locally, the guest state is analyzed, the video list, video ID and playing progress (playing timestamp) in the signaling information are parsed and called, and the video ID and playing progress are synchronously rendered for local video playing.
[0102] In combination with the following table, each playing sub-signaling (cmd=1) and pausing sub-signaling (cmd=2) carries three video IDs, and each list sub-signaling (cmd=3) carries the video list obtained by the sharer through each network request; the state of cmd, that is:
[0103] {"cmd":1}1-the main state is in the playing state;
[0104] {"cmd":2}2-the main state is in the pausing state;
[0105] {"cmd":3}3-the main state synchronizes the list data to the guest state.
[0106] Through the three sub-signaling, the viewer can restore the video list of the sharer. That is, the video list of the network viewer (the audience) is the full set or subset of the sharer. Among them, the signaling of cmd=3 is sent through the IM channel (message channel). The server will temporarily store the latest one, and when the viewer enters the room in the middle, the latest signaling temporarily stored will be distributed to the new user entering the room as a compensation signaling. The user can timely obtain the current playing list of the sharer without waiting for the signaling synchronized by the sharer every x seconds. Otherwise, if the user enters the room and misses the signaling synchronized by the sharer every x seconds, the viewer will be black screen for x seconds.
[0107] Figure 4 The signaling synchronization playing content device schematic diagram is provided for another embodiment of the present disclosure. The device comprises:
[0108] The parsing module 401, the calling module 402 and the synchronization module 403.
[0109] Among them:
[0110] The parsing module 401 is configured to receive signaling and parse the signaling to obtain signaling information, wherein the signaling information includes information with a content identifier and a playing progress generated periodically when a sharer shares and plays a main-state content, and the main-state content is a content being watched by the sharer.
[0111] In the embodiment, the shared content, i.e., the content in the main state or the guest state, can be a video, an audio atlas, a courseware, etc. In the embodiment, the video is taken as an example. When a sharer of a main-state video shares the video in a network, signaling information with a video ID and a playing progress is generated in a network system transmission channel. The video in the network is transmitted through an audio / video stream. The signaling information is distributed by the audio / video stream. The audio / video stream is composed of an audio stream and a black frame. The black frame is added to pass information through an SEI channel. The black frame occupies a very small space after compression algorithm. The signaling information is represented by a video ID and a playing progress time to represent a synchronization instruction. The signaling information also has a video list. For example, when the sharer plays a certain video in the video list, the sharer sends signaling information with the video list, a video ID and a playing progress to network viewers. Through the synchronization of the signaling information, the network viewers and the sharer can synchronously play the same video content, so that the content watched by the sharer and the network viewers is synchronized and consistent, and the synchronization discussion and interaction between the viewers and the sharer can be realized.
[0112] The signaling information carries a video ID of the currently played main-state video, and also carries an ID of a previous video and an ID of a next video, which are marked as:
[0113] ["ID(n-1)", "k:IDn", "ID(n+1)"], or
[0114] ["ID(n-1)", "k:IDn:Ts", "ID(n+1)"]
[0115] wherein ID(n-1) represents the ID of the previous video, k:IDn represents the ID of the current video and the kth position of the current video in the video list of the main-state video, ID(n+1) represents the ID of the next video, Ts represents the video playing progress (timestamp), and n and k are natural numbers.
[0116] The signaling information further includes a video list of the main-state video. The signaling information is set as a playing sub-signaling information, a pause sub-signaling information and a list sub-signaling information. The playing sub-signaling information and the pause sub-signaling information both include an ID of a previous video, an ID of a current video and an ID of a next video. The list sub-signaling information includes a video list of the main-state video obtained by each network request.
[0117] In addition, the signaling information further includes version number information, when a user receives signaling information of a high version number, the user no longer processes signaling information of a low version number, the signaling information supports role switching between a host user and a guest user, and the version number in the signaling information is incremented each time the role is switched. When a user receives signaling of a high version, the user no longer processes signaling of a low version. The role switching of a sharer and a viewer can be supported, and the latest version number is switched each time the role is switched.
[0118] In this embodiment, the host video sharer needs to distribute signaling information carrying video synchronization information in the network channel when sharing, the video synchronization information being the video list, the video ID, and the playing progress and the like mentioned above. The transmitted signaling is distributed by the audio and video stream. It is ensured that the video content discussed by the sharer and the viewer is consistent. In this step, in order to synchronize the video playing, the synchronization is basically real-time, and the signaling can be distributed every short time interval, for example, 0.1-5 ms, for example, 0.2 ms. Of course, the time interval can be selected according to the working frequency of the hardware, and with the improvement of the hardware speed, the interval can be further shortened. Here, the video sharer is the host playing party of the video, and the viewer is the guest playing party of the video.
[0119] The signaling information is sent through two types of signaling channels SEI and channel IM. Among them, the channel SEI is sent redundantly by a timing task, and the time interval can be configured, for example, 0.1-5 ms, for example, 1234 ms. Of course, the time interval can be selected according to the working frequency of the hardware, and with the improvement of the hardware speed, the interval can be further shortened. The timing sending is combined with state change sending, that is, immediately sent when the state changes. The channel IM is sent after the host refresh and loadMore are successful. The signaling information is sent through a message channel, and the server temporarily stores the latest signaling information. When the guest user connects in the middle of the host video playing, the latest signaling information temporarily stored is distributed to the newly connected user as compensation signaling, so that the user can timely obtain the current playing video list of the host video.
[0120] In this embodiment, in the video network, the guest playing party receives the signaling sent by the video sharer through a signaling channel, the signaling including a video list, a video ID, and a playing progress, playing sub-signaling information, pause sub-signaling information, and list sub-signaling information, wherein the playing sub-signaling information and the pause sub-signaling information each include an ID of a previous video, an ID of a current video, and an ID of a next video. The video ID in the host video currently played, and the ID of the previous video and the ID of the next video carried by the signaling information are parsed out.
[0121] The calling module 402 is configured to call the content identifier and the playing progress of the main-state content in the signaling information.
[0122] The video ID of the main-state video in the parsed signaling information is called, where the video ID represents the video in the video list, and the playing progress represents the time progress of the video playing, corresponding to the playing timestamp information.
[0123] The signaling information called contains ["ID1", "k:ID2", "ID3"], and each signaling carries the position of the current video in the video list of the sharer ("k:ID2"). For example, the information carried on the signaling is ["ID1", "5:ID2", "ID3"], indicating that the sharer is playing the fifth video, and the video ID is ID2. In addition, the signaling information also has a playing progress time, for example, ["ID1", "5:ID2:Ts", "ID3"], indicating that the sharer is playing the fifth video, the video ID is ID2, and the playing progress time is Ts.
[0124] The synchronization module 403 is configured to synchronize the playing of the main-state content according to the content identifier and the playing progress of the main-state content.
[0125] Firstly, it can ensure that the viewer can obtain the video content from the server in advance, reducing the delay caused by video loading; secondly, it can ensure that the viewer's experience of watching the sharer's video in the room is consistent with the experience of watching the recommended stream video. ["ID(n-1)", "k:IDn", "ID(n+1)"] each signaling carries the position of the current video in the video list of the sharer ("k:IDn"), and through analysis and comparison, it can be ensured that the order of the video list of the sharer is consistent (the video list of the viewer is the full set or subset of the video list of the sharer, and the order is consistent with the video list of the sharer). The list sub-signaling information includes the video list of the main-state video obtained by each network request. At the same time, by analyzing the playing progress time Ts of the current playing video of ["ID(n-1)", "k:IDn:Ts", "ID(n+1)"], the viewer can keep synchronized playing of the unified video content with the sharer.
[0126] Further, the device further comprises:
[0127] The correction module is configured to correct the local video played in the guest state when the local video played in the guest state and the position value k or the progress of the main-state (sharer) playing video ID are inconsistent. Specifically, it includes:
[0128] 1) The video ID correction submodule is configured to correct the local video played in the guest state when the position value k of the playing video ID is inconsistent:
[0129] When the guest state synchronously plays the host state video, every interval preset time compares the position value k of the local video ID played by the guest state 本地 with the position value k of the current video ID in the signaling information 信令 If the position value k of the local video ID played by the guest state 本地 is inconsistent with the position value k of the current video ID in the signaling information 信令 , the local video played by the guest state is corrected.
[0130] If the position value k of the local video ID played by the guest state 本地 is less than the position value k of the current video ID in the signaling information 信令 , a video animation of sliding down is rendered.
[0131] If the position value k of the local video ID played by the guest state 本地 is greater than the position value k of the current video ID in the signaling information 信令 , a video animation of sliding up is rendered.
[0132] 2) A video progress correction submodule, configured to correct the local video played by the guest state when the progress time of the same video played is inconsistent:
[0133] When the local progress time of the video played by the guest state is inconsistent with the progress time of the video played by the host state, the local video played by the guest state is corrected.
[0134] Specifically used for:
[0135] When the difference between the local progress time of the video played by the guest state and the progress time of the video played by the host state is greater than a set threshold, it is determined as valid signaling, and the local progress time is forcibly set to the corresponding progress time of the video played by the host state when the guest state plays;
[0136] When the difference between the local progress time of the video played by the guest state and the progress time of the video played by the host state is less than or equal to a set threshold, it is determined as invalid signaling, and the invalid signaling is ignored when the guest state plays.
[0137] Figure 4 The device shown can execute Figure 1 the method of the embodiment shown, and the parts not described in detail in the embodiment can refer to the related description of Figure 1 the embodiment shown. The execution process and technical effects of the technical solution are described in Figure 1 the embodiment shown, which will not be described here.
[0138] Reference will be made below to Figure 5This illustration shows a structural schematic of an electronic device 500 suitable for implementing another embodiment of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0139] like Figure 5 As shown, the electronic device 500 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device 500. The processing unit 501, ROM 502, and RAM 503 are interconnected via a communication line 504. An input / output (I / O) interface 505 is also connected to the communication line 504.
[0140] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic device 500 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 500 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0141] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, it performs the functions defined in the methods of embodiments of this disclosure.
[0142] It should be noted that the computer-readable medium in the present disclosure can be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device or apparatus. In the present disclosure, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium that can send, propagate or transmit the program for use by or in connection with an instruction execution system, device or apparatus. The program code contained in the computer-readable medium can be transmitted by any suitable medium, including but not limited to a wire, a cable, a RF (radio frequency) or the like, or any suitable combination thereof.
[0143] In some embodiments, the client, server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
[0144] The computer-readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device and not be assembled into the electronic device.
[0145] The computer-readable medium described above carries one or more programs, when the one or more programs are executed by the electronic device, the electronic device is caused to: perform the interaction method in the above-described embodiments.
[0146] Computer program code for carrying out operations of the present disclosure can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0147] The computer program instructions can also be loaded onto a computer or other programmable information processing apparatus to cause a series of operations to be performed on the computer or other programmable information processing apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable information processing apparatus implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0148] The units described in the embodiments of the present disclosure can be implemented by hardware, software, or a combination of hardware and software. In some cases, the names of the units do not constitute a limitation on the units themselves.
[0149] The functions described in this specification can be implemented in part or in whole through one or more hardware logic components. For example, and without limitation, illustrative types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Program-specific Integrated Circuits (ASICs), Program-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.
[0150] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include but not limited to an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more of: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0151] According to one or more embodiments of the present disclosure, an electronic device is provided, including: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform any of the methods of the preceding first aspect.
[0152] According to one or more embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, characterized in that the non-transitory computer-readable storage medium stores computer instructions for causing a computer to perform any of the methods of the preceding first aspect.
[0153] The above description is merely exemplary of preferred embodiments of the present disclosure and of the application of the principles of the present disclosure. It is therefore understood that the disclosure is not limited to the specific technical features described above, and that the scope of the disclosure should also encompass other technical solutions formed by any combination of the above technical features or equivalent features, without departing from the above disclosure. For example, the above features can be replaced with other features disclosed in the present disclosure (but not limited to) having similar functions to form technical solutions.
Claims
1. A method for playing content, characterized in that, include: Receive signaling about a real-time video stream and parse the signaling to obtain signaling information about the real-time video stream. The signaling information includes information with content identifier and playback progress that is periodically generated when the sharer shares and plays the main content of the real-time video stream. The main content is the content that the sharer is currently watching. Retrieve the content identifier and playback progress of the main content from the signaling information; According to the content identifier and playback progress of the main content, the main content of the real-time video stream is played synchronously. The signaling information is configured as play sub-signaling information, pause sub-signaling information, or list sub-signaling information; wherein the play sub-signaling information and the pause sub-signaling information each include a first identifier of the previous content, a content identifier of the current content, and a second identifier of the next content, and the list sub-signaling information includes a content list of the main content obtained for each network request and the position value of the current content in the content list of the main content; When the signaling information is a list sub-signaling information, the signaling is sent through the message channel; When a user accesses content sharing midway through the playback of the main content, a compensation signaling is obtained. The compensation signaling is a list of sub-signaling information temporarily stored by the server within a preset time range through the message channel.
2. The method according to claim 1, characterized in that, The signaling information is carried and distributed by the audio and video streams in the main content.
3. The method according to claim 1, characterized in that, The signaling information carries the content identifier of the currently playing main content, as well as the first identifier of the previous content and the second identifier of the next content, and the position value of the current content in the content list of the main content.
4. The method according to claim 1, characterized in that, The synchronous playback of the main content includes: At preset time intervals, the first position value of the currently playing local content identifier is compared with the second position value of the current content identifier in the signaling information; If the first position value of the currently playing local content identifier is inconsistent with the second position value of the current content identifier in the signaling information, the local content identifier of the guest playback is corrected.
5. The method according to claim 4, characterized in that, The method includes: If the first position value of the local playback identifier in the guest mode is less than the second position value of the current content identifier in the signaling information, then the content scrolling switching animation is rendered. If the first position value of the local playback identifier in the guest state is greater than the second position value of the current content identifier in the signaling information, then the animation of the content swiping up to switch is rendered.
6. The method according to claim 1, characterized in that: The playback progress of the signaling information includes the playback progress time of the main content; When the current local playback progress time is inconsistent with the playback progress time of the main content, the playback progress of the local content played in the guest state is corrected.
7. The method according to claim 6, characterized in that, The method includes: When the difference between the current local playback progress time and the playback progress time of the main content is greater than a set threshold, the signaling is deemed valid, and the local playback progress is set to the corresponding main content playback progress time. When the difference between the current local playback progress time and the playback progress time of the main content is less than or equal to a set threshold, the signaling is considered invalid and ignored.
8. The method according to claim 1, characterized in that: The signaling information also includes a version number; When a higher version signaling message is received, the lower version signaling message will no longer be processed.
9. A device for playing content, characterized in that, include: The parsing module is used to receive signaling about the real-time video stream and parse the signaling to obtain signaling information about the real-time video stream. The signaling information includes information with content identifier and playback progress that is periodically generated when the sharer shares and plays the main content of the real-time video stream. The main content is the content that the sharer is currently watching. The retrieval module is used to retrieve the content identifier and playback progress of the main content in the signaling information; The synchronization module is used to synchronously play the main content according to the content identifier and playback progress of the main content; The signaling information is configured as play sub-signaling information, pause sub-signaling information, or list sub-signaling information; wherein the play sub-signaling information and the pause sub-signaling information each include a first identifier of the previous content, a content identifier of the current content, and a second identifier of the next content, and the list sub-signaling information includes a content list of the main content obtained for each network request and the position value of the current content in the content list of the main content; When the signaling information is a list sub-signaling information, the signaling is sent through the message channel; When a user accesses content sharing midway through the playback of the main content, a compensation signaling is obtained. The compensation signaling is a list of sub-signaling information temporarily stored by the server within a preset time range through the message channel.
10. An electronic device, comprising: Memory, used to store computer-readable instructions; as well as A processor for executing the computer-readable instructions, causing the electronic device to perform the method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that, when executed by a computer, enables the implementation of the method as described in any one of claims 1-8.
Citation Information
Patent Citations
Video sharing method and device
CN106162236A
Video synchronous display method, device and system
CN111372112A