A whiteboard and audio and video synchronization method, device, equipment and storage medium
Mixing the audio and video information and whiteboard data of multiple anchor terminals through the instant messaging server solves the problems of audio and video stream delay and whiteboard confusion in multi-anchor live broadcasts, realizes the synchronization of multi-anchor audio, video and whiteboard, and improves the live broadcast effect and audience experience.
Patent Information
- Application Number
- CN202111543498.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-16
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-12-16
AI Technical Summary
In a multi-host network live broadcast scenario, existing technology is difficult to synchronize audio and video streams and whiteboard data, resulting in the audience being unable to see the complete whiteboard information of multiple hosts in real time, affecting the live broadcast effect and audience experience.
The audio and video information and whiteboard drawing data of multiple anchor terminals are mixed and streamed through the instant messaging server and pushed to the live broadcast server to achieve synchronization of audio, video and whiteboards for multiple anchors, improving the live broadcast effect and audience experience.
It realizes the synchronization of multi-host audio, video and whiteboard, improves the live broadcast effect and the audience's viewing experience, and solves the problems of audio and video stream delay and whiteboard confusion in the existing technology.
Smart Images

Figure CN114205637B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a whiteboard and audio and video synchronization method, device, equipment and storage medium. Background Art
[0002] Currently, with the vigorous development of network technology, communication technology and multimedia technology, online live broadcast has achieved unprecedented development. Due to its strong interactivity, flexible and convenient real-time publishing and the ability to meet people's personalized needs, online live broadcast plays an increasingly important role in various industries.
[0003] However, while the online live broadcast industry is developing rapidly, it has also generated many problems. For example, in scenarios with multiple anchors (such as one speaker and multiple guests) such as corporate education, anchors in multiple locations not only have audio and video streams, but can also interact with other anchors by drawing on a whiteboard. In the process of multi-anchor video live broadcast, each anchor has his own whiteboard interface. Not only does he need to synchronize his own whiteboard data to other anchors, he also needs to synchronize the data drawn by other anchors to his own whiteboard interface, so as to achieve interaction between multiple anchors and display the real-time interactive whiteboard interface on the whiteboard interface of the audience watching the live broadcast. Therefore, in order to improve the live broadcast effect of the anchor and the viewing experience of the audience, how to synchronize the audio and video streams and whiteboards of multiple anchors in a multi-anchor scenario has become a problem currently faced.
[0004] At present, the whiteboard and audio and video of the anchor are usually synchronized by the following two methods: (1) Using the desktop sharing method, the entire desktop of the anchor device (including the whiteboard and the anchor avatar) is collected as an audio and video stream for distribution. (2) Using the software sharing method, the data on the whiteboard is used as one audio and video stream, and the anchor's camera is used as another audio and video stream. The playback end obtains the above two streams and plays them simultaneously. However, due to the delay caused by different network transmission protocols, the above two methods are not suitable for multiple anchors. For example, when two anchors need to draw a whiteboard in a live broadcast, no matter which of the above methods is used, the audience cannot see the complete whiteboard information and can only obtain the video of one end. In addition, since the whiteboard data in the above two anchor streams are independent of each other and cannot be mixed, otherwise the whiteboard will be confused. Therefore, if the audience pulls the videos of the two anchors at the same time for multi-interface independent playback, the multiple interfaces cannot be merged, resulting in a very poor viewing experience.
[0005] To sum up, how to achieve synchronization of audio, video and whiteboard of multiple anchors is a problem that needs to be further solved. Summary of the invention
[0006] In view of this, the purpose of this application is to provide a whiteboard and audio and video synchronization method, device, equipment and storage medium, which can achieve the synchronization of multi-host audio and video and whiteboard, improve the live broadcast effect of multiple hosts and the viewing experience of the audience. The specific scheme is as follows:
[0007] In a first aspect, the present application discloses a whiteboard and audio and video synchronization method, comprising:
[0008] Determine multiple target anchor terminals for whiteboard drawing during the current multi-anchor live broadcast;
[0009] Respectively obtain the audio and video information and whiteboard drawing data of any of the target anchor terminals to obtain a first audio and video information stream, and respectively send all the information in the first audio and video information stream to a preset instant messaging server;
[0010] Forwarding any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process through the instant messaging server, so as to display the audio and video information on the local whiteboards of the other anchor terminals and restore the whiteboard drawing data;
[0011] All the first audio and video information streams and the second audio and video information streams of all other anchor terminals are obtained from the instant messaging server, and the first audio and video information stream and the second audio and video information stream are mixed to obtain a mixed audio and video information stream, and then the mixed audio and video information stream is pushed to the live broadcast server.
[0012] Optionally, the acquiring of audio and video information and whiteboard drawing data of any target anchor terminal to obtain a first audio and video information stream includes:
[0013] The audio and video information and whiteboard drawing data of any of the target anchor terminals are obtained, and the whiteboard drawing data is formatted into JSON format data to obtain JSON format data, and then the JSON format data and the audio and video information are used as the first audio and video information stream.
[0014] Optionally, sending all the information in the first audio and video information stream to a preset instant messaging server together includes:
[0015] The JSON format data in the first audio and video information stream is written in real time into the DataChannel of the WebRTC server to obtain DataChannel data, and the DataChannel data and the audio and video information are sent to the WebRTC server through the DataChannel channel.
[0016] Optionally, the step of obtaining all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the instant messaging server, mixing the first audio and video information stream and the second audio and video information stream to obtain a mixed audio and video information stream, and then pushing the mixed audio and video information stream to the live broadcast server includes:
[0017] Pull all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the WebRTC server in real time through a preset mixing server;
[0018] Mixing the first audio and video information stream and the second audio and video information stream to obtain a mixed audio and video information stream;
[0019] The audio and video in the mixed audio and video information stream are encoded by the H.264 video encoding standard and the AAC audio encoding standard, and the encoded mixed audio and video information stream is sent to the live broadcast server according to a preset real-time information transmission protocol.
[0020] Optionally, the step of pulling all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the WebRTC server in real time through a preset stream mixing server includes:
[0021] Pull all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the WebRTC server in real time through a preset mixing server, and determine whether the DataChannel data exists during the pulling process;
[0022] If the DataChannel data exists, the DataChannel data is converted into the SEI of the H.264 video coding standard to obtain SEI data.
[0023] Optionally, after pushing the mixed audio and video information stream to the live broadcast server, the method further includes:
[0024] Pulling the mixed audio and video information stream from the live broadcast server, and playing the mixed audio and video information stream on the viewer terminal;
[0025] During the playback process, it is determined whether the SEI data exists in the mixed audio and video information stream. If so, the SEI data is used as whiteboard data and restored in the local whiteboard.
[0026] Optionally, after pushing the mixed audio and video information stream to the live broadcast server, the method further includes:
[0027] The mixed audio and video information stream is pulled from the live broadcast server through the HTTP-FLV protocol or the HLS protocol, and the mixed audio and video information stream is played on the viewer terminal.
[0028] In a second aspect, the present application discloses a whiteboard and audio and video synchronization device, comprising:
[0029] The anchor terminal determination module is used to determine multiple target anchor terminals for whiteboard drawing during the current multi-anchor live broadcast;
[0030] An information acquisition module, used to respectively acquire audio and video information and whiteboard drawing data of any target anchor terminal to obtain a first audio and video information stream;
[0031] An information sending module, used for sending all the information in the first audio and video information stream to a preset instant messaging server;
[0032] An information forwarding module, used for forwarding any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process through the instant messaging server, so as to display the audio and video information on the local whiteboards of the other anchor terminals and restore the whiteboard drawing data;
[0033] A stream mixing module is used to obtain all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the instant messaging server, and mix the first audio and video information streams with the second audio and video information streams to obtain a mixed audio and video information stream, and then push the mixed audio and video information stream to the live broadcast server.
[0034] In a third aspect, the present application discloses an electronic device, comprising a processor and a memory; wherein the processor implements the aforementioned whiteboard and audio and video synchronization method when executing a computer program stored in the memory.
[0035] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned whiteboard and audio and video synchronization method is implemented.
[0036] It can be seen that the present application first determines multiple target anchor terminals that are performing whiteboard drawing during the current multi-anchor live broadcast process, and then obtains the audio and video information and whiteboard drawing data of any of the target anchor terminals respectively to obtain a first audio and video information stream, and sends all the information in the first audio and video information stream to a preset instant messaging server respectively, and then forwards any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process through the instant messaging server, so as to display the audio and video information on the local whiteboard of the other anchor terminals and restore the whiteboard drawing data, and finally obtains all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the instant messaging server, and mixes the first audio and video information stream and the second audio and video information stream to obtain a mixed audio and video information stream, and then pushes the mixed audio and video information stream to the live broadcast server. It can be seen that the present application synchronously transmits the whiteboard drawing data and audio and video information of each anchor terminal through a preset instant messaging server, and then pulls the audio and video information and whiteboard drawing data of all anchor terminals from the instant messaging server and mixes the streams, thereby realizing the synchronization of audio, video and whiteboard in the case of multiple anchors, improving the live broadcast effect of multiple anchors and the viewing experience of the audience. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0038] Figure 1 A flow chart of a whiteboard and audio and video synchronization method disclosed in this application;
[0039] Figure 2 A flowchart of a specific whiteboard and audio and video synchronization method disclosed in this application;
[0040] Figure 3 This is a schematic diagram of the structure of a whiteboard and audio and video synchronization device disclosed in this application;
[0041] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0043] The present application embodiment discloses a method for synchronizing a whiteboard and audio and video. Figure 1 As shown, the method includes:
[0044] Step S11: determining multiple target anchor terminals for whiteboard drawing during the current multi-anchor live broadcast.
[0045] In this embodiment, during the live broadcast of multiple anchors at the same time, multiple anchor terminals that are drawing on the whiteboard are first determined, that is, the target anchor terminals. It can be understood that in addition to the target anchor terminal, there may also be one or more anchor terminals that are not using the whiteboard for drawing during the current live broadcast of multiple anchors.
[0046] Step S12: respectively obtain the audio and video information and whiteboard drawing data of any of the target anchor terminals to obtain a first audio and video information stream, and respectively send all the information in the first audio and video information stream to a preset instant messaging server.
[0047] In this embodiment, after determining the multiple target anchor terminals that are performing whiteboard drawing during the current multi-anchor live broadcast, the audio and video and whiteboard drawing feature information of any of the above target anchor terminals are collected respectively to obtain the corresponding audio and video information and whiteboard drawing data, and then the collected whiteboard drawing data and the above audio and video information are formatted accordingly to obtain the audio and video information stream of the target anchor terminal, that is, the first audio and video information stream, and send them together to the preset instant communication server. Among them, the above whiteboard drawing feature information includes but is not limited to the action information of whiteboard drawing, the time of whiteboard drawing, the position of whiteboard drawing, the trajectory of whiteboard drawing, etc.; the action information of whiteboard drawing includes but is not limited to the call of whiteboard drawing tools, such as rectangles, straight lines, curves, brushes, circles, erasers, undo, restore, delete and other functions supported in the whiteboard drawing tool; the instant communication server includes but is not limited to WebRTC (WebReal-Time Communication, web instant communication) server, etc.
[0048] It is understandable that, in this embodiment, it is necessary to first establish a live broadcast room for multiple anchors, and the interaction between the anchors can be realized through a preset instant communication server, and each anchor terminal can pull the audio and video information of all other anchor terminals except itself through the instant communication server. After the above-mentioned live broadcast room for multiple anchors is established, during the live broadcast of multiple anchors, there is not only audio and video information, but also whiteboard drawing data of multiple anchors drawing on the whiteboard at the same time. In the process of acquiring the above-mentioned whiteboard drawing data, the data can be collected according to a preset time interval, preferably, it can be collected every 200 milliseconds.
[0049] Step S13: forwarding any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process through the instant messaging server, so as to display the audio and video information on the local whiteboards of the other anchor terminals and restore the whiteboard drawing data.
[0050] In this embodiment, the audio and video information and whiteboard drawing data of any of the target anchor terminals are obtained respectively to obtain the first audio and video information stream, and after all the information in the first audio and video information stream is sent to the preset instant communication server respectively, the first audio and video information stream corresponding to any of the target anchor terminals can be forwarded through the instant communication server, specifically, it can be forwarded to all other anchor terminals in the current multi-anchor process. It should be pointed out that all other anchor terminals include not only all other target anchor terminals other than any of the target anchor terminals, but also all other anchor terminals that have not performed whiteboard drawing operations. After forwarding any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process, the other anchor terminals obtain the first audio and video information stream, and then display the audio and video information in the first audio and video information stream in the local whiteboard, and restore the whiteboard drawing data in the first audio and video information stream in the local whiteboard.
[0051] Step S14: Obtain all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the instant messaging server, mix the first audio and video information stream and the second audio and video information stream to obtain a mixed audio and video information stream, and then push the mixed audio and video information stream to the live broadcast server.
[0052] In this embodiment, after forwarding any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process through the instant messaging server, not only can the first audio and video information streams of all the target anchor terminals be obtained from the instant messaging server, but also the audio and video information streams of all other anchor terminals that have not performed whiteboard drawing operations, that is, the second audio and video information stream, can be obtained, and the first audio and video information stream and the second audio and video information stream are mixed using a preset mixing server to obtain a mixed audio and video information stream, and then the mixed audio and video information stream is pushed to the preset live broadcast server.
[0053] In this embodiment, after pushing the mixed audio and video information stream to the live broadcast server, it specifically includes: pulling the mixed audio and video information stream from the live broadcast server through the HTTP-FLV protocol or the HLS protocol, and playing the mixed audio and video information stream at the audience terminal. It can be understood that when it is necessary to play the whiteboard and audio and video screen in the above-mentioned multi-anchor live broadcast process at the audience end, the mixed audio and video information stream can be obtained through a preset live broadcast transmission protocol, such as pulling the mixed audio and video information stream from the live broadcast server through the HTTP-FLV (i.e., video stream based on the hypertext transfer protocol) protocol or the HLS (i.e., HTTP Live Streaming, a streaming media network transmission protocol based on the hypertext transfer protocol) protocol, and playing the mixed audio and video information stream at any audience terminal. During the playback process, the whiteboard drawing data in the mixed audio and video information stream is restored as the whiteboard data of the audience terminal.
[0054] It can be seen that the embodiment of the present application first determines multiple target anchor terminals that are performing whiteboard drawing during the current multi-anchor live broadcast process, and then obtains the audio and video information and whiteboard drawing data of any of the target anchor terminals respectively to obtain a first audio and video information stream, and sends all the information in the first audio and video information stream to a preset instant messaging server respectively, and then forwards any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process through the instant messaging server, so that the audio and video information can be displayed on the local whiteboard of the other anchor terminals and the whiteboard drawing data can be restored, and finally, all the first audio and video information streams and the second audio and video information streams of all other anchor terminals are obtained from the instant messaging server, and the first audio and video information stream and the second audio and video information stream are mixed to obtain a mixed audio and video information stream, and then the mixed audio and video information stream is pushed to the live broadcast server. It can be seen that the embodiment of the present application synchronously transmits the whiteboard drawing data and audio and video information of each anchor terminal through a preset instant messaging server, and then pulls the audio and video information and whiteboard drawing data of all anchor terminals from the instant messaging server and mixes them, thereby realizing the synchronization of audio, video and whiteboard in the case of multiple anchors, improving the live broadcast effect of multiple anchors and the viewing experience of the audience.
[0055] The present application embodiment discloses a specific method for synchronizing a whiteboard with audio and video. Figure 2 As shown, the method includes:
[0056] Step S21: determining multiple target anchor terminals for whiteboard drawing during the current multi-anchor live broadcast.
[0057] Step S22: respectively obtain the audio and video information and whiteboard drawing data of any of the target anchor terminals, and format the whiteboard drawing data into JSON format data to obtain JSON format data, and then use the JSON format data and the audio and video information as the first audio and video information stream.
[0058] In this embodiment, after determining multiple target anchor terminals that perform whiteboard drawing during the current multi-anchor live broadcast, the audio and video information and whiteboard drawing data corresponding to any one of the above target anchor terminals can be collected according to a preset collection period, and the collected whiteboard drawing data can be formatted into JSON format data to obtain JSON format data, and then the formatted JSON format data and the audio and video information can be used as the audio and video information stream of the target anchor terminal, that is, the first audio and video information stream.
[0059] Step S23: Write the JSON format data in the first audio and video information stream into the DataChannel of the WebRTC server in real time to obtain DataChannel data, and send the DataChannel data and the audio and video information to the WebRTC server through the DataChannel channel.
[0060] In this embodiment, the audio and video information and whiteboard drawing data of any target anchor terminal are obtained respectively, and the whiteboard drawing data is formatted into JSON format data to obtain JSON format data, and then the JSON format data and the audio and video information are used as the first audio and video information stream, and the JSON format data in the first audio and video information stream is written into the DataChannel (data channel) of the WebRTC server in real time to obtain corresponding DataChannel data, and the DataChannel data and the audio and video information are transmitted to the WebRTC server through the DataChannel channel in the WebRTC server, that is, the formatted whiteboard drawing data is transmitted together with the audio and video, and interacts with the WebRTC server through the audio and video channels of the WebRTC server.
[0061] Step S24: forwarding the DataChannel data and the audio and video information of any target anchor terminal to all other anchor terminals in the multi-anchor live broadcast process through the WebRTC server, so as to display the audio and video information on the local whiteboard of the other anchor terminals and restore the DataChannel data.
[0062] In this embodiment, the JSON format data in the first audio and video information stream is written in real time into the DataChannel of the WebRTC server to obtain DataChannel data, and after the DataChannel data and the audio and video information are sent to the WebRTC server through the DataChannel channel, the DataChannel data and the audio and video information of any target anchor terminal can be forwarded to all other anchor terminals in the multi-anchor live broadcast process through the above-mentioned WebRTC server. When all other anchor terminals obtain the DataChannel data and the audio and video information, they can display the audio and video information in the local whiteboard and restore the DataChannel data as whiteboard data.
[0063] Step S25: Pull all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the WebRTC server in real time through a preset mixing server.
[0064] In this embodiment, after the DataChannel data and the audio and video information of any target anchor terminal are forwarded to all other anchor terminals in the multi-anchor live broadcast process through the WebRTC server, the first audio and video information stream of all the target anchor terminals and the audio and video information of all other anchor terminals that have not performed whiteboard drawing, that is, the second audio and video information stream, can be pulled in real time from the above-mentioned WebRTC server through a preset mixing server.
[0065] In this embodiment, the step of pulling all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the WebRTC server in real time through a preset mixing server may specifically include: pulling all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the WebRTC server in real time through a preset mixing server, and determining whether the DataChannel data exists during the pulling process; if the DataChannel data exists, converting the DataChannel data into the SEI of the H.264 video coding standard to obtain the SEI data. In this embodiment, after the WebRTC server forwards any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process, the preset mixing stream server can pull the audio and video streams of all anchor terminals in the current multi-anchor live broadcast process from the above-mentioned WebRTC server, that is, pull the first audio and video information streams corresponding to all target anchor terminals performing whiteboard drawing and the second audio and video information streams corresponding to all other anchor terminals not performing whiteboard drawing, and in the process of pulling, determine whether there is DataChannel data in the pulled information, that is, determine whether the DataChannel channel of the WebRTC server carries data, and if so, obtain the data in the DataChannel, that is, the DataChannel data, and convert the above-mentioned DataChannel data into SEI (Supplemental Enhancement Information) of the H.264 video coding standard to obtain SEI data.
[0066] Step S26: Mix the first audio and video information stream and the second audio and video information stream to obtain a mixed audio and video information stream.
[0067] Step S27: Encode the audio and video in the mixed audio and video information stream using the H.264 video coding standard and the AAC audio coding standard, and send the encoded mixed audio and video information stream to the live broadcast server according to a preset real-time information transmission protocol.
[0068] In this embodiment, after all the first audio and video information streams and the second audio and video information streams of all other anchor terminals are pulled from the WebRTC server in real time by the preset mixing server, the audio and video in the mixed audio and video information streams can be encoded respectively by the H.264 (a digital video compression format) video coding standard and the AAC (Advanced Audio Coding) audio coding standard, and the encoded mixed audio and video information streams can be sent to the preset live broadcast server according to the preset real-time information transmission protocol (RTMP, Real Time Messaging Protocol).
[0069] In this embodiment, after pushing the mixed audio and video information stream to the live broadcast server, it specifically also includes: pulling the mixed audio and video information stream from the live broadcast server, and playing the mixed audio and video information stream on the viewer terminal; during the playback process, judging whether the SEI data exists in the mixed audio and video information stream, if so, using the SEI data as whiteboard data and restoring it on the local whiteboard. It is understandable that after sending the above-mentioned mixed audio and video information stream to the live broadcast server, the viewer terminal can pull the above-mentioned mixed audio and video information stream in real time through the preset HTTP-FLV protocol or HLS protocol and play it on the local whiteboard. Furthermore, during the playback process, it is also necessary to judge whether SEI data exists, if so, obtain the SEI data, and restore it on the whiteboard of the viewer terminal as whiteboard data.
[0070] For more specific processing procedures of the above steps S21 and S26, reference may be made to the corresponding contents disclosed in the above embodiments, which will not be described in detail here.
[0071] It can be seen that the embodiment of the present application can realize the synchronous sending of whiteboard data and audio and video information and data interaction between multiple anchor terminals through the DataChannel channel of the WebRTC server. The whiteboard drawing data and audio and video information of all anchor terminals can be mixed through the preset mixing server. The mixed data can be encoded and pushed to the viewer terminal through the H.264 video encoding standard and the AAC audio encoding standard, thereby realizing the synchronization of whiteboards and audio and video between multiple anchors, and improving the interaction between multiple anchors and the viewing experience of the audience.
[0072] Correspondingly, the present application also discloses a whiteboard and audio and video synchronization device, see Figure 3 As shown, the device comprises:
[0073] The anchor terminal determination module 11 is used to determine multiple target anchor terminals for whiteboard drawing during the current multi-anchor live broadcast;
[0074] The information acquisition module 12 is used to respectively acquire the audio and video information and whiteboard drawing data of any target anchor terminal to obtain a first audio and video information stream;
[0075] An information sending module 13, used for sending all the information in the first audio and video information stream to a preset instant messaging server;
[0076] An information forwarding module 14 is used to forward any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process through the instant messaging server, so as to display the audio and video information on the local whiteboards of the other anchor terminals and restore the whiteboard drawing data;
[0077] The mixing module 15 is used to obtain all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the instant messaging server, and mix the first audio and video information streams with the second audio and video information streams to obtain a mixed audio and video information stream, and then push the mixed audio and video information stream to the live broadcast server.
[0078] Among them, the specific working processes of the above-mentioned modules can refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.
[0079] It can be seen that in the embodiment of the present application, multiple target anchor terminals that perform whiteboard drawing during the current multi-anchor live broadcast are first determined, and then the audio and video information and whiteboard drawing data of any of the target anchor terminals are obtained respectively to obtain a first audio and video information stream, and all the information in the first audio and video information stream is sent together to a preset instant messaging server respectively, and then any of the first audio and video information streams is forwarded to all other anchor terminals in the multi-anchor live broadcast process through the instant messaging server, so that the audio and video information is displayed on the local whiteboard of the other anchor terminals and the whiteboard drawing data is restored, and finally, all the first audio and video information streams and the second audio and video information streams of all other anchor terminals are obtained from the instant messaging server, and the first audio and video information stream and the second audio and video information stream are mixed to obtain a mixed audio and video information stream, and then the mixed audio and video information stream is pushed to the live broadcast server. It can be seen that the embodiment of the present application synchronously transmits the whiteboard drawing data and audio and video information of each anchor terminal through a preset instant messaging server, and then pulls the audio and video information and whiteboard drawing data of all anchor terminals from the instant messaging server and mixes them, thereby realizing the synchronization of audio, video and whiteboard in the case of multiple anchors, improving the live broadcast effect of multiple anchors and the viewing experience of the audience.
[0080] In some specific embodiments, the information acquisition module 12 may specifically include:
[0081] The first information acquisition unit is used to acquire the audio and video information and whiteboard drawing data of any of the target anchor terminals, and format the whiteboard drawing data into JSON format data to obtain JSON format data, and then use the JSON format data and the audio and video information as the first audio and video information stream.
[0082] In some specific embodiments, the information sending module 13 may specifically include:
[0083] A data writing unit, used for writing the JSON format data in the first audio and video information stream into the DataChannel of the WebRTC server in real time to obtain DataChannel data;
[0084] An information sending unit is used to send the DataChannel data and the audio and video information to the WebRTC server through the DataChannel channel.
[0085] In some specific embodiments, the flow mixing module 15 may specifically include:
[0086] A second information acquisition unit is used to pull all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the WebRTC server in real time through a preset mixing server;
[0087] A stream mixing unit, configured to mix the first audio and video information stream and the second audio and video information stream to obtain a mixed audio and video information stream;
[0088] The audio and video encoding unit is used to encode the audio and video in the mixed audio and video information stream according to the H.264 video encoding standard and the AAC audio encoding standard, and send the encoded mixed audio and video information stream to the live broadcast server according to the preset real-time information transmission protocol.
[0089] In some specific embodiments, the second information acquisition unit may specifically include:
[0090] A third information acquisition unit is used to pull all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the WebRTC server in real time through a preset mixing server, and determine whether the DataChannel data exists during the pulling process;
[0091] The data conversion unit is used to convert the DataChannel data into the SEI of the H.264 video coding standard to obtain SEI data when the DataChannel data exists.
[0092] In some specific embodiments, after the stream mixing module 15, the following may also be included:
[0093] A fourth information acquisition unit, configured to pull the mixed audio and video information stream from the live broadcast server, and play the mixed audio and video information stream on the viewer terminal;
[0094] A judging unit, used for judging whether the SEI data exists in the mixed audio and video information stream during the playback process;
[0095] The data restoration unit is used to use the SEI data as whiteboard data and restore it in the local whiteboard if it exists.
[0096] In some specific embodiments, after the stream mixing module 15, the following may also be included:
[0097] The playback unit is used to pull the mixed audio and video information stream from the live broadcast server through the HTTP-FLV protocol or the HLS protocol, and play the mixed audio and video information stream on the viewer terminal.
[0098] Furthermore, the present application also discloses an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0099] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the whiteboard and audio / video synchronization method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0100] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0101] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0102] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the whiteboard and audio and video synchronization method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0103] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the whiteboard and audio and video synchronization method disclosed above. The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, and will not be repeated here.
[0104] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0105] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0106] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0107] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0108] The above is a detailed introduction to a whiteboard and audio and video synchronization method, device, equipment and storage medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A whiteboard and audio and video synchronization method, characterized in that: include: Determine multiple target anchor terminals for whiteboard drawing during the current multi-anchor live broadcast; The audio and video information and whiteboard drawing data of any target anchor terminal are respectively obtained to obtain a first audio and video information stream, and all the information in the first audio and video information stream is respectively sent to a preset instant communication server; the whiteboard drawing data includes action information of whiteboard drawing, time of whiteboard drawing, position of whiteboard drawing, and track of whiteboard drawing; the action information of whiteboard drawing includes calling of a whiteboard drawing tool, and the whiteboard drawing tool supports rectangle, straight line, curve, brush, circle, eraser, undo, restore, and delete functions; Forwarding any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process through the instant messaging server, so as to display the audio and video information on the local whiteboards of the other anchor terminals and restore the whiteboard drawing data; Obtain all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the instant messaging server, mix the first audio and video information streams with the second audio and video information streams to obtain a mixed audio and video information stream, and then push the mixed audio and video information stream to the live broadcast server; The step of obtaining the audio and video information and whiteboard drawing data of any of the target anchor terminals to obtain the first audio and video information stream includes: obtaining the audio and video information and whiteboard drawing data of any of the target anchor terminals, and formatting the whiteboard drawing data into JSON format data to obtain JSON format data, and then using the JSON format data and the audio and video information as the first audio and video information stream; Sending all the information in the first audio and video information stream to a preset instant messaging server includes: writing the JSON format data in the first audio and video information stream into the DataChannel of the WebRTC server in real time to obtain DataChannel data, and sending the DataChannel data and the audio and video information to the WebRTC server through the DataChannel channel.
2. The whiteboard and audio and video synchronization method according to claim 1, characterized in that: The method of obtaining all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the instant messaging server, mixing the first audio and video information stream and the second audio and video information stream to obtain a mixed audio and video information stream, and then pushing the mixed audio and video information stream to the live broadcast server includes: Pull all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the WebRTC server in real time through a preset mixing server; Mixing the first audio and video information stream and the second audio and video information stream to obtain a mixed audio and video information stream; The audio and video in the mixed audio and video information stream are encoded by the H.264 video encoding standard and the AAC audio encoding standard, and the encoded mixed audio and video information stream is sent to the live broadcast server according to a preset real-time information transmission protocol.
3. The whiteboard and audio and video synchronization method according to claim 2, characterized in that: The method of pulling all the first audio and video information streams and the second audio and video information streams of all other anchor terminals in real time from the WebRTC server through a preset mixing server includes: Pull all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the WebRTC server in real time through a preset mixing server, and determine whether the DataChannel data exists during the pulling process; If the DataChannel data exists, the DataChannel data is converted into the SEI of the H.264 video coding standard to obtain the SEI data.
4. The whiteboard and audio / video synchronization method according to claim 3, characterized in that: After pushing the mixed audio and video information stream to the live broadcast server, the method further includes: Pulling the mixed audio and video information stream from the live broadcast server, and playing the mixed audio and video information stream on the viewer terminal; During the playback process, it is determined whether the SEI data exists in the mixed audio and video information stream. If so, the SEI data is used as whiteboard data and restored in the local whiteboard.
5. The whiteboard and audio / video synchronization method according to any one of claims 1 to 4, characterized in that: After pushing the mixed audio and video information stream to the live broadcast server, the method further includes: The mixed audio and video information stream is pulled from the live broadcast server through the HTTP-FLV protocol or the HLS protocol, and the mixed audio and video information stream is played on the viewer terminal.
6. A whiteboard and audio and video synchronization device, characterized in that: include: The anchor terminal determination module is used to determine multiple target anchor terminals for whiteboard drawing during the current multi-anchor live broadcast; An information acquisition module is used to respectively acquire audio and video information and whiteboard drawing data of any target anchor terminal to obtain a first audio and video information stream; the whiteboard drawing data includes action information of whiteboard drawing, time of whiteboard drawing, position of whiteboard drawing, and track of whiteboard drawing; the action information of whiteboard drawing includes a call to a whiteboard drawing tool, and the whiteboard drawing tool supports rectangle, straight line, curve, brush, circle, eraser, undo, restore, and delete functions; An information sending module, used for sending all the information in the first audio and video information stream to a preset instant messaging server; An information forwarding module, used for forwarding any of the first audio and video information streams to all other anchor terminals in the multi-anchor live broadcast process through the instant messaging server, so as to display the audio and video information on the local whiteboards of the other anchor terminals and restore the whiteboard drawing data; A stream mixing module, used for obtaining all the first audio and video information streams and the second audio and video information streams of all other anchor terminals from the instant messaging server, mixing the first audio and video information streams with the second audio and video information streams to obtain a mixed audio and video information stream, and then pushing the mixed audio and video information stream to the live broadcast server; The information acquisition module is specifically used to acquire the audio and video information and whiteboard drawing data of any target anchor terminal, and format the whiteboard drawing data into JSON format data to obtain JSON format data, and then use the JSON format data and the audio and video information as the first audio and video information stream; The information sending module is specifically used to write the JSON format data in the first audio and video information stream into the DataChannel of the WebRTC server in real time, obtain DataChannel data, and send the DataChannel data and the audio and video information to the WebRTC server through the DataChannel channel.
7. An electronic device, characterized in that: It comprises a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the whiteboard and audio and video synchronization method as described in any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the whiteboard and audio and video synchronization method as described in any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Whiteboard and video synchronization method and device, computing equipment and storage medium
CN109547831A
Live broadcast method and device, computer equipment and storage medium
CN111541905A
Method and system for carrying out browser stream pushing based on WebRTC
CN112073423A
Audio and video data transmission method and device and storage medium
CN112291498A
Video conference live broadcast method, device and system
CN112543297A
