A distributed cross-screen video synchronization method and system
By selecting the master and slave decoders in the decoder group and adjusting the number of displayed frames and clock synchronization, the problem of screen tearing on LED screens spliced with multiple decoders was solved, and synchronous display of cross-screen video was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-23
- Publication Date
- 2026-04-10
AI Technical Summary
On an LED screen composed of multiple decoders, when different decoders pull the same stream from the same encoder, the different decoders do not display the same frame, causing screen tearing.
By selecting the master and slave decoders in the decoder group, counting the number of transmitted frames, and adjusting the number of transmitted frames of the slave decoder to match that of the master decoder through network commands, the receiving time difference is calculated to adjust the clock of the slave decoder, ensuring that all decoders are synchronized.
It enables cross-screen synchronization between multiple decoders, avoiding screen tearing and ensuring that the same frame is displayed at the same time.
Smart Images

Figure CN116614690B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of distributed cross-screen video synchronization, in particular to a distributed cross-screen video synchronization method and system. BACKGROUND
[0002] The existing distributed system generally includes a video source, an encoder, a decoder and a display device. The encoder obtains the video source image, encodes and sends out through the network. The decoder receives the video stream of the encoding end through the network, and displays on the specified position of the display device through decoding, cropping and scaling. When different decoders pull the stream of the same encoding end, because the time of receiving, decoding and displaying the same frame by each decoder is different, it will cause that different decoders display different frames at the same time, resulting in picture tearing, which is particularly prominent on the LED screen spliced by multiple decoders. SUMMARY
[0003] Therefore, in view of the above technical problems, a distributed cross-screen video synchronization method and system are provided to solve the problem of picture tearing caused by different decoders displaying different frames at the same time when different decoders pull the stream of the same encoding end in the case of the LED screen spliced by multiple decoders.
[0004] In a first aspect, a distributed cross-screen video synchronization method is provided, which comprises the following steps:
[0005] sending a first video source data to an encoder;
[0006] encoding the first video source data by the encoder to generate a second video source data; the second video source data is composed of a plurality of video frames, wherein the plurality of video frames have different timestamp information respectively;
[0007] receiving the second video source data by a decoder group, obtaining third video source data through decoding, cropping and scaling processing, and sending the third video source data to a display terminal;
[0008] wherein the decoder group includes a plurality of decoders, among which one is determined as a master decoder and the others are determined as slave decoders; before sending the third video source data to the display terminal, the master decoder and the slave decoders count the number of display frames respectively; the master decoder sends a start command to the slave decoders and sends the current number of display frames of the master decoder;
[0009] the slave decoders adjust the number of display frames of the slave decoders to be consistent with the number of display frames of the master decoder according to the start command and the current number of display frames of the master decoder; the master decoder and the slave decoders send the current number of display frames information to the master decoder every preset number of frames;
[0010] After the main decoder receives the message, the main decoder records the time when the current frame number information is received, and puts the current frame number information into a message queue; if the current frame number information is sent by the main decoder, the main decoder searches the message queue to find whether there is corresponding current frame number information of the slave decoder; if the current frame number information is sent by the slave decoder, the main decoder searches the message queue to find whether there is corresponding current frame number information of the main decoder;
[0011] After the corresponding current frame number information of the main decoder or the slave decoder is found, the difference between the receiving time of the slave decoder and the receiving time of the main decoder is calculated, and the difference information is sent to the corresponding slave decoder through network command;
[0012] The slave decoder receives the difference information, and adjusts the clock of the slave decoder according to the difference information, wherein the decoder sends the third video source to the display terminal through HDMI.
[0013] In the above scheme, optionally, the sending of the first video source data to the encoder is that a PC sends the first video source data to the encoder through an HDMI line.
[0014] In the above scheme, further optionally, the encoding of the first video source data by the encoder to generate second video source data comprises: the encoder receives HDMI video signals and encodes, each frame of data after encoding has a different timestamp, the value of the timestamp is monotonically increasing, and the second video source data after encoding is sent to the decoder group through network multicast.
[0015] In the above scheme, further optionally, the method further comprises:
[0016] In the decoder group, one decoder is selected as a master node, and the remaining decoders are slave nodes;
[0017] Each frame of data in the second video stream data encoded by the encoder has a different timestamp, and after the master node receives the video frame data, the master node performs decoding, clipping and scaling processing on the video frame data, and sends the timestamp of the video frame data to other slave nodes through network multicast;
[0018] After the slave node receives the video frame data, the slave node performs decoding, clipping and scaling processing on the video frame data, and puts the processed video frame data and the timestamp of the video frame into a video queue;
[0019] Before the slave node displays a frame of data, the slave node searches the video queue for the corresponding frame according to the timestamp sent by the master node, and sends the frame to a display terminal.
[0020] In a second aspect, a distributed cross-screen video synchronization system comprises:
[0021] Input module: for PC to send first video source data to encoder;
[0022] Encoding module: for the encoder to encode the first video source data to generate second video source data; the second video source data is composed of a plurality of video frames, wherein the plurality of video frames have different timestamp information respectively;
[0023] Decoding module: for the decoder group to receive the second video source data, and to obtain third video source data through decoding, clipping and scaling processing, and to send the third video source data to the display terminal; wherein the decoder group includes a plurality of decoders, and in the decoders, one of them is determined as a master decoder, and the rest are slave decoders;
[0024] First adjusting module: for the master decoder and the slave decoders to count their respective display frame numbers before sending the third video source data to the display terminal; the master decoder sends a start command to the slave decoders and sends the current display frame number of the master decoder;
[0025] The slave decoders adjust their display frame numbers to be consistent with the display frame number of the master decoder according to the start command and the current display frame number of the master decoder; the master decoder and the slave decoders send the current display frame number information to the master decoder every preset frame number;
[0026] After the master decoder receives the message, it records the time when the current display frame number information is received, and puts the current display frame number information into a message queue; if the current display frame number information is sent by the master decoder, it searches the message queue to find whether there is corresponding current display frame number information of the slave decoders; if the current display frame number information is sent by the slave decoders, it searches the message queue to find whether there is corresponding current display frame number information of the master decoder;
[0027] After finding the corresponding current display frame number information of the master decoder or the slave decoders, it calculates the difference between the receiving time of the slave decoders and the receiving time of the master decoder, and sends the difference information to the corresponding slave decoders through network command;
[0028] The slave decoders receive the difference information, and adjust their own clock according to the difference information.
[0029] The PC sends the first video source data to the encoder through HDMI line.
[0030] The encoder encodes the first video source data to generate second video source data, including: the encoder receives a HDMI video signal and encodes, each frame of data after encoding has a different timestamp, the value of the timestamp is monotonically increasing, and the second video source data after encoding is sent to the decoder group through network multicasting.
[0031] The system further comprises a second adjusting module for selecting one decoder as a master node and the rest as slave nodes in the decoder group.
[0032] Each frame of data in the second video stream data encoded by the encoder has a different timestamp, and after the master node receives the video frame data, the master node performs decoding, clipping and scaling processing on the video frame data, and sends the timestamp of the video frame data to other slave nodes through network multicasting.
[0033] After the slave node receives the video frame data, the slave node performs decoding, clipping and scaling processing on the video frame data, and puts the processed video frame data and the timestamp of the video frame into a video queue.
[0034] Before the slave node displays a frame of data, the slave node finds the corresponding frame from the video queue according to the timestamp sent by the master node, and sends the frame to a display terminal.
[0035] The present application has at least the following beneficial effects:
[0036] Based on further analysis and research on the problems of the prior art, it is realized that when different decoding ends pull the stream of the same encoding end, the same frame is not displayed at the same time in the different decoding ends, causing the problem of picture tearing in the case of the LED screen spliced by multiple decoders.
[0037] The application receives the second video source data through a decoder group, decodes, clips, scales and processes to obtain third video source data, and sends the third video source data to a display terminal; wherein the decoder group comprises a plurality of decoders, in which one is determined as a master decoder and the others are slave decoders; before sending the third video source data to the display terminal, the master decoder and the slave decoders count their respective display frame numbers; the master decoder sends a start command to the slave decoders and sends the current display frame number of the master decoder; the slave decoders adjust the display frame number of the slave decoders to be consistent with the display frame number of the master decoder according to the start command and the current display frame number of the master decoder; the master decoder and the slave decoders send current display frame number information to the master decoder every preset frame number; after receiving the information, the master decoder records the time when the current display frame number information is received, and puts the current display frame number information into a message queue; if the current display frame number information is sent by the master decoder, the message queue is searched to find whether there is corresponding current display frame number information of the slave decoders; if the current display frame number information is sent by the slave decoders, the message queue is searched to find whether there is corresponding current display frame number information of the master decoder; after finding the corresponding current display frame number information of the master decoder or the slave decoders, the difference between the receiving time of the slave decoders and the receiving time of the master decoder is calculated, and the difference information is sent to the corresponding slave decoders through a network command; the slave decoders receive the difference information, adjust the slave decoder's own clock according to the difference information, and effectively realize cross-screen synchronization. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 A flowchart of a distributed cross-screen video synchronization method provided by an embodiment of the application is shown in the figure.
[0039] Figure 2 A processing diagram of the distributed cross-screen video synchronization method provided by an embodiment of the application is shown in the figure. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical scheme and advantages of the application clearer, the application is further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the application.
[0041] The distributed cross-screen video synchronization method provided by the application, as shown in the figure, comprises the following steps: Figure 1
[0042] sending the first video source data to an encoder;
[0043] The encoder encodes the first video source data to generate second video source data; the second video source data is composed of a plurality of video frames, wherein the plurality of video frames have different timestamp information respectively;
[0044] The decoder group receives the second video source data, decodes, clips, and scales to obtain third video source data, and sends the third video source data to a display terminal.
[0045] The decoder group includes a plurality of decoders, wherein one of the decoders is determined as a master decoder, and the rest are slave decoders; before sending the third video source data to the display terminal, the master decoder and the slave decoders count the respective frame numbers of the display terminal;
[0046] The slave decoder adjusts the frame number of the display terminal according to the start command and the current frame number of the master decoder, so that the frame number of the display terminal of the slave decoder is consistent with that of the master decoder; the master decoder and the slave decoder send the current frame number information to the master decoder every preset frame number;
[0047] After the master decoder receives the message, the master decoder records the time when the current frame number information is received, and puts the current frame number information into a message queue; if the current frame number information is sent by the master decoder, the master decoder searches the message queue to find whether there is corresponding current frame number information of the slave decoder; if the current frame number information is sent by the slave decoder, the master decoder searches the message queue to find whether there is corresponding current frame number information of the master decoder;
[0048] After the corresponding current frame number information of the master decoder or the slave decoder is found, the difference between the receiving time of the slave decoder and the receiving time of the master decoder is calculated, and the difference information is sent to the corresponding slave decoder through a network command;
[0049] The slave decoder receives the difference information and adjusts the clock of the slave decoder according to the difference information; the decoder sends the third video source to the display terminal through HDMI.
[0050] In one embodiment, the first video source data is sent to the encoder by a PC through an HDMI line.
[0051] In one embodiment, the encoder encodes the first video source data to generate second video source data, including: the encoder receives a HDMI video signal and encodes, each frame of the encoded data has a different timestamp, the value of the timestamp is monotonically increasing, and the second video source data is sent to the decoder group through network multicasting.
[0052] In one embodiment, the method further includes:
[0053] In the decoder group, one decoder is selected as a master node, and the remaining decoders are slave nodes;
[0054] Each frame of data in the second video stream data encoded by the encoder has a different timestamp, and after the master node receives the video frame data, the master node decodes, crops, and scales the video frame data and sends the timestamp of the video frame data to other slave nodes through network multicasting;
[0055] After the slave nodes receive the video frame data, the slave nodes decode, crop, and scale the video frame data and place the processed video frame data and the timestamp of the video frame data into a video queue;
[0056] Before the slave nodes display a frame of data, the slave nodes find the corresponding frame from the video queue according to the timestamp sent by the master node and send the frame to a display terminal.
[0057] In one embodiment, as shown in FIG. 1, the distributed method of the present patent includes: Figure 2
[0058] The video source is generally a PC, which sends a video signal to the encoder through a HDMI line;
[0059] The encoder receives a HDMI video signal and encodes, each frame of the encoded data has a different timestamp, the value of the timestamp is monotonically increasing, and the second video source data is sent to the decoder group through network multicasting;
[0060] The decoder receives the multicasting data of the encoder through the network, decodes, crops, scales, and the like, and finally displays the data to a display terminal through HDMI;
[0061] In one embodiment, cross-screen synchronization is achieved, and there are two aspects:
[0062] A group of decoders participating in cross-screen synchronization ensure that the phase difference of their pixel clocks is as small as possible. At the decoding end, when a frame of image is displayed is solved by the pixel clock. If there is a phase difference in the pixel clocks of the decoders participating in cross-screen synchronization, the same frame of image will be displayed first or later, and the image will be torn.
[0063] In the case of ensuring the synchronization of the pixel clock, the same frame is ensured to be sent to the display memory at the same time.
[0064] In one embodiment, for the first point, the patent proposes the following method:
[0065] In a group of decoders participating in cross-screen synchronization, one is selected as the master device DM, and the rest are slave devices DS;
[0066] The master device and the slave device count the number of display frames respectively;
[0067] The master device sends a start command to the slave device through the network and informs it of the current display frame number;
[0068] After receiving the start command sent by the master device, the slave device adjusts its display frame number to be consistent with the master node;
[0069] The master device and the slave device send the current display frame number message to the master device through the network every N frames;
[0070] After receiving the message, the master device records the time of receiving the message and puts the message into the message queue; if the message is sent by the master device, it checks whether there is a corresponding slave device message in the message queue; if the message is sent by the slave device, it checks whether there is a corresponding master device message in the message queue;
[0071] After finding the corresponding master-slave device messages, calculate the difference between the receiving time of the slave device and the receiving time of the master device, and send the difference information to the corresponding slave device through the network command;
[0072] After receiving the difference information, the slave device adjusts its clock. If the difference is greater than 0, it means that the clock of the slave device is slow and needs to be adjusted faster; otherwise, the clock of the slave device is adjusted slower;
[0073] In one embodiment, for the second point, the patent proposes the following method:
[0074] In a group of decoders that pull the same encoder multicast stream, one is selected as the master node, and the rest are slave nodes;
[0075] Each frame of data multicast by the encoder has a different timestamp. After receiving a frame of data, the master node decodes, clips, scales, and processes it, sends the timestamp of the frame to other slave nodes through network messages, and finally displays it to the terminal;
[0076] The slave node receives the timestamp message sent by the master node;
[0077] After receiving a frame of data, the slave node decodes, clips, scales, and processes it, and puts the processed video data and the timestamp of the frame into the video queue;
[0078] Before displaying a frame of data, the slave node searches for the corresponding frame from the video queue according to the time stamp sent by the master node;
[0079] Compared with the prior art, the embodiment can effectively realize cross-screen synchronization.
[0080] In one embodiment, a method for keeping the pixel clock phases of the respective decoding boxes consistent is as follows:
[0081] Suppose that three decoding boxes A, B and C need to be synchronized across screens, one of the decoding boxes is selected as the master node, and the rest of the decoding boxes are slave nodes. Here, A is selected as the master node, and B and C are selected as the slave nodes. B and C need to be synchronized with the master node A. A sends a start command to B and C through a network protocol, and A, B and C start counting the frame numbers of the frames to be displayed. Every N frames, the three decoding boxes send a message that N frames have been displayed to the node A through the network protocol. After receiving the message, the node A records the times TA, TB and TC at which the messages of the three decoding boxes arrive. The clock phase difference of the decoding box B relative to the decoding box A is calculated by comparing TB and TA. If TB-TA>0, it indicates that the clock of B is slower than that of A, and the pixel clock of B is adjusted according to the value of TB-TA. If TB-TA<0, it indicates that the clock of B is faster than that of A, and the pixel clock of B is adjusted according to the value of TB-TA. In this way, the clock of B is dynamically adjusted to keep the clock phase of B consistent with that of A. The synchronization of C and A is similar, and the clock of C is dynamically adjusted according to the values of TC and TA. In this way, the clock phases of the slave nodes can be kept consistent with that of the master node, and thus the synchronization can be realized.
[0082] In one embodiment, a method for displaying the same frame at the same time is as follows: To display the same frame at the same time, a special requirement is imposed on the encoding end, that is, each frame after encoding has a unique mark, which is temporarily referred to as a time stamp. This can be easily realized. Before displaying a frame, the master node tells the slave nodes the time stamp of the frame to be displayed through a network protocol. After receiving the message, the slave node checks the queue of frames to be displayed. If the time stamp is found, the frame corresponding to the time stamp is displayed. If the time stamp is not found, it needs to be determined whether the frame has been lost or has not been received. If the frame has not been received, it is waited for a certain period of time. If the frame has been lost or the frame has not been received after waiting for a certain period of time, the first frame in the queue of frames to be displayed is directly displayed. The frame is not synchronized.
[0083] According to the above embodiment, the cross-screen synchronization among multiple nodes (not limited to three nodes) can be realized.
[0084] It should be understood that, although Figure 1The steps in the flowchart of FIG. 1 are displayed in sequence according to the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise explicitly stated herein, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, Figure 1 At least a part of the steps in FIG. 1 can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with other steps or steps or stages in other steps.
[0085] In one embodiment, a distributed cross-screen video synchronization system is provided, comprising the following program modules:
[0086] An input module is configured to send first video source data to an encoder at a PC end;
[0087] An encoding module is configured to encode the first video source data by the encoder to generate second video source data; the second video source data is composed of a plurality of video frames, wherein the plurality of video frames have different timestamp information respectively;
[0088] A decoding module is configured to receive the second video source data by a decoder group, and obtain third video source data through decoding, clipping, and scaling processing, and send the third video source data to a display terminal; wherein the decoder group includes a plurality of decoders, and in the decoders, one of the decoders is determined as a master decoder, and the rest are slave decoders;
[0089] A first adjusting module is configured to, before sending the third video source data to the display terminal, count the number of display frames of the master decoder and the slave decoders respectively; the master decoder sends a start command to the slave decoders and sends the current number of display frames of the master decoder;
[0090] The slave decoders adjust the number of display frames of the slave decoders according to the start command and the current number of display frames of the master decoder, so that the number of display frames of the slave decoders is consistent with that of the master decoder; the master decoder and the slave decoders send the current number of display frames information to the master decoder every preset number of frames;
[0091] After the master decoder receives the message, records the time when the current number of display frames information is received, and puts the current number of display frames information into a message queue; if the current number of display frames information is sent by the master decoder, the message queue is searched to find whether there is corresponding current number of display frames information of the slave decoders; if the current number of display frames information is sent by the slave decoders, the message queue is searched to find whether there is corresponding current number of display frames information of the master decoder;
[0092] After finding the corresponding master decoder or slave decoder, the difference between the receiving time of the slave decoder and the receiving time of the master decoder is calculated, and the difference information is sent to the corresponding slave decoder through network command;
[0093] The slave decoder receives the difference information and adjusts the slave decoder's own clock according to the difference information.
[0094] In one embodiment, the PC sends the first video source data to the encoder through HDMI line.
[0095] In one embodiment, the encoder encodes the first video source data to generate the second video source data, including: the encoder receives the HDMI video signal and encodes, each frame of data after encoding has a different timestamp, the value of the timestamp is monotonically increasing, and the second video source data after encoding is sent to the decoder group through network multicast.
[0096] In one embodiment, the system further comprises a second adjusting module for selecting one decoder as the master node and the rest as the slave nodes in the decoder group.
[0097] Each frame of data in the second video stream data encoded by the encoder has a different timestamp, and after the slave node receives the video frame data, the slave node decodes, crops and scales the video frame data, and sends the timestamp of the video frame data to other slave nodes through network multicast.
[0098] After the slave node receives the video frame data, the slave node decodes, crops and scales the video frame data, and puts the processed video frame data and the timestamp of the video frame into the video queue.
[0099] Before the slave node displays a frame of data, the slave node finds the corresponding frame from the video queue according to the timestamp sent by the master node and sends it to the display terminal.
[0100] The specific limitations of the distributed cross-screen video synchronization system can refer to the limitations of the distributed cross-screen video synchronization method described above, and will not be repeated here. Each module in the above distributed cross-screen video synchronization system can be realized by software, hardware and their combinations in whole or in part. The above modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operations corresponding to each module.
[0101] Any combination of the technical features in the above embodiments can be made, and for the sake of brevity, not all possible combinations are described above, however, as long as the combination of the technical features does not exist in contradiction, it shall be considered within the scope of the present disclosure.
[0102] The above embodiments only express several implementation manners of the present application, and the description is relatively specific and detailed, but it shall not be understood as a limitation on the patent scope of the present application. It shall be pointed out that, for ordinary skilled persons in the art, several modifications and improvements can be made without departing from the concept of the present application, and these shall be within the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the appended claims.
Claims
1. A distributed cross-screen video synchronization method, characterized in that, The method includes: Send the first video source data to the encoder; The encoder encodes the first video source data to generate second video source data; the second video source data consists of multiple video frames, wherein each of the multiple video frames has different timestamp information. The decoder group receives the second video source data, performs decoding, cropping, and scaling to obtain the third video source data, and sends the third video source data to the display terminal. The decoder group includes multiple decoders, one of which is designated as the master decoder and the rest as slave decoders. Before sending the third video source data to the display terminal, the master decoder and the slave decoders count their respective number of frames to be displayed. The master decoder sends a start command to the slave decoders and sends its current number of frames to be displayed. The slave decoder adjusts its display frame count to match the master decoder's display frame count based on the start command and the master decoder's current display frame count; the master decoder and the slave decoder send the current display frame count information to the master decoder every preset number of frames. After receiving the message, the master decoder records the time when the current display frame count information was received and puts the current display frame count information into the message queue. If the current display frame count information is sent by the master decoder, it searches in the message queue for a corresponding slave decoder's current display frame count information. If the current display frame count information is sent by the slave decoder, it searches in the message queue for a corresponding master decoder's current display frame count information. After finding the current frame count information of the corresponding master decoder or slave decoder, calculate the difference between the reception time of the slave decoder and the reception time of the master decoder, and send the difference information to the corresponding slave decoder through network commands. The decoder receives the difference information and adjusts its own clock according to the difference information. The decoder sends the third video source to the display terminal via HDMI.
2. The method according to claim 1, characterized in that, The step of sending the first video source data to the encoder is to send the first video source data to the encoder from the PC via an HDMI cable.
3. The method according to claim 1, characterized in that, The encoder encodes the first video source data to generate the second video source data, including: the encoder receives an HDMI video signal and encodes it, each frame of the encoded data has a different timestamp, the value of the timestamp is monotonically increasing, and the encoded second video source data is sent to the decoder group via network multicast.
4. The method according to claim 1, characterized in that, The method further includes: In the decoder group, one decoder is selected as the master node, and the remaining decoders are slave nodes; Each frame of the second video stream data emitted by the encoder has a different timestamp. After receiving the video frame data, the master node decodes, trims, and scales the data, and then sends the timestamps of the video frame data to other slave nodes via network multicast. After receiving video frame data from the node, the data is decoded, cropped, and scaled. The processed video frame data and the timestamp of the video frame are then placed in the video queue. Before displaying a frame of data, the slave node retrieves the corresponding frame from the video queue based on the timestamp sent by the master node and sends it to the display terminal.
5. A distributed cross-screen video synchronization system, characterized in that, The system includes: Input module: Used by the PC to send the first video source data to the encoder; Encoding module: used by the encoder to encode the first video source data to generate second video source data; the second video source data consists of multiple video frames, wherein each of the multiple video frames has different timestamp information; Decoding module: used to receive the second video source data from the decoder group, perform decoding, cropping, and scaling to obtain the third video source data, and send the third video source data to the display terminal; wherein, the decoder group includes multiple decoders, among which one is determined as the master decoder and the rest are slave decoders; First adjustment module: used to count the number of frames to be sent to the display terminal by the main decoder and the slave decoder before the third video source data is sent to the display terminal; the main decoder sends a start command to the slave decoder and sends the current number of frames to be sent to the display terminal. The slave decoder adjusts its display frame count to match the master decoder's display frame count based on the start command and the master decoder's current display frame count; the master decoder and the slave decoder send the current display frame count information to the master decoder every preset number of frames. After receiving the message, the master decoder records the time when the current display frame count information was received and puts the current display frame count information into the message queue. If the current display frame count information is sent by the master decoder, it searches in the message queue for a corresponding slave decoder's current display frame count information. If the current display frame count information is sent by the slave decoder, it searches in the message queue for a corresponding master decoder's current display frame count information. After finding the current frame count information of the corresponding master decoder or slave decoder, calculate the difference between the reception time of the slave decoder and the reception time of the master decoder, and send the difference information to the corresponding slave decoder through network commands. The slave decoder receives the difference information and adjusts its own clock according to the difference information.
6. The system according to claim 5, characterized in that, The process of sending the first video source data to the encoder is described as the PC sending the first video source data to the encoder via an HDMI cable.
7. The system according to claim 5, characterized in that, The encoder encodes the first video source data to generate the second video source data, including: the encoder receives an HDMI video signal and encodes it, each frame of the encoded data has a different timestamp, the value of the timestamp is monotonically increasing, and the encoded second video source data is sent to the decoder group via network multicast.
8. The system according to claim 5, characterized in that, The system also includes: The second adjustment module is used to select one decoder as the master node and the remaining decoders as slave nodes in the decoder group. Each frame of the second video stream data emitted by the encoder has a different timestamp. After receiving the video frame data, the master node decodes, trims, and scales the data, and then sends the timestamps of the video frame data to other slave nodes via network multicast. After receiving video frame data from the node, the data is decoded, cropped, and scaled. The processed video frame data and the timestamp of the video frame are then placed in the video queue. Before displaying a frame of data, the slave node retrieves the corresponding frame from the video queue based on the timestamp sent by the master node and sends it to the display terminal.
Citation Information
Patent Citations
Method and system for realizing video synchronous output of distributed node equipment
CN108881955A
Method and system for video synchronization among multiple devices
CN111954050A