SDIOverIP real-time streaming heterogeneous audio and video synchronous playback method

By encoding the video and audio streams of the SDIOverIP signal separately and using the PTP clock synchronization mechanism, the synchronous playback of audio and video data in heterogeneous networks is realized, which solves the problems of synchronous audio and video playback bandwidth and hardware costs in heterogeneous networks. Reduces terminal network bandwidth and hardware consumption.

CN118368474BActive Publication Date: 2024-09-24HANGZHOU ARCVIDEO TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410798753.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2024-09-24
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

In actual application scenarios, when different terminals are required to play video and audio synchronously through heterogeneous networks, the existing technical methods will increase the transmission network bandwidth and hardware performance consumption of the playback terminal, resulting in increased costs.

Method used

The video stream and audio stream of the SDIOverIP signal are encoded separately, synchronized through the PTP clock, converted into UTC time and written into the TS file encapsulation layer, transmitted through the heterogeneous network, and the playback terminal decapsulates and decodes according to the UTC time to achieve synchronous playback.

Benefits of technology

It reduces the network bandwidth and hardware cost of the playback terminal, realizes the synchronous playback of independent audio and video streams of SDIOverIP signals, and reduces the hardware investment cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118368474B
    Figure CN118368474B
Patent Text Reader

Abstract

The invention discloses a SDIOverIP real-time stream heterogeneous audio and video synchronous playback method, comprising the following steps: performing video encoding on a video stream of an SDIOverIP signal, performing audio encoding on an audio stream of an SDIOverIP signal, and encapsulating the encoded file into a TS file format; performing audio and video synchronization through a PTP clock using an SDIOverIP protocol, converting the PTP time of a corresponding audio and video frame into a world unified clock UTC time based on a PTP clock reference, and writing the converted UTC time of each frame of audio and video into a TS file encapsulation layer; transmitting the encoded audio and video TS file data through a heterogeneous network; an audio and video playback terminal receives the audio and video TS file data through a network link, decapsulates the UTC time corresponding to each frame through a UTC time encapsulation method, decodes the corresponding audio and video compression data, and controls synchronous broadcasting according to the audio and video UTC time and the local UTC time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of audio and video transcoding, and in particular relates to a method for synchronously playing heterogeneous audio and video of an SDIOverIP real-time stream. Background Art

[0002] With the popularization of optical fiber networks, the broadcasting and television systems and the Internet are gradually converting traditional SDI (Serial Digital Interface) baseband signals through the SDIOverIP protocol, and converting single lossless non-compressed video data and audio data through optical fiber networks. This allows the long-distance transmission and playback of baseband signals collected by cameras. However, in actual environments, due to different transmission network bandwidths and different playback terminals, SDIOverIP signals need to be converted into traditional audio and video compression signals for terminal playback. The current mainstream implementation method is to interweave and multiplex separate video and audio through audio and video encoding and file multiplexers to generate an audio and video stream, transmit the audio and video stream through the network, and play the audio and video stream on the playback terminal.

[0003] Since SDIOverIP audio and video have been interleaved and multiplexed into one audio and video stream, and the final playback is also the same terminal, the output audio and video are generally naturally synchronized. However, in actual application scenarios, there are situations where different terminals need to play video and audio separately through heterogeneous networks. Since the final terminal only needs to play the corresponding video or audio, if the current mainstream method is used to play uniformly through audio and video interleaved streams, it will greatly increase the transmission network bandwidth of the playback terminal. If the terminals decode the audio and video separately, it will also greatly increase the performance consumption of the terminal and the corresponding hardware investment cost. Summary of the invention

[0004] In view of the above problems, the present invention provides a method for synchronously playing heterogeneous audio and video of SDIOverIP real-time streams, which is used to reduce the network bandwidth and hardware cost of the playback terminal.

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] A method for synchronously playing heterogeneous audio and video of SDIOverIP real-time streams, comprising the following steps:

[0007] Encode the video stream of the SDIOverIP signal, encode the audio stream of the SDIOverIP signal, and encapsulate the encoded file into a TS file format;

[0008] The SDIOverIP protocol is used to synchronize audio and video through the PTP clock. Based on the PTP clock reference, the PTP time of the corresponding audio and video frame is converted to the world's unified clock UTC time, and the UTC time of each frame of audio and video after conversion is written into the TS file encapsulation layer;

[0009] Transmit the encoded audio and video TS file data through a heterogeneous network;

[0010] The audio and video playback terminal receives the audio and video TS file data through the network link, decapsulates the UTC time corresponding to each frame through the UTC time encapsulation method, decodes the corresponding audio and video compressed data, and controls the synchronous broadcast according to the audio and video UTC time and the local UTC time.

[0011] In a possible implementation, writing the UTC time of each frame of audio or video after conversion into the TS file encapsulation layer includes: defining an extended UTC time data structure at the TS file layer and storing it in PES_private_data.

[0012] In a possible implementation, the UTC time data structure includes a synchronization header, a version number, whether the UTC time is included, and two reserved fields, and ends with the UTC time.

[0013] In a possible implementation, the audio and video playback terminal is a heterogeneous playback terminal.

[0014] In one possible implementation, the heterogeneous playback terminals perform clock synchronization through a synchronous clock source, restore the UTC time of each audio and video frame of the input audio and video TS file data, decode the audio and video encoding stream, and play the audio and video according to the local UTC clock.

[0015] In a possible implementation, the synchronization clock source is an NTP clock server.

[0016] A possible implementation method further includes: adding the UTC time of the audio and video frame to the unified offset time, that is: UTC_play = UTC_frame + UTC_offset, where UTC_play is the actual playback frame UTC time, UTC_frame is the original audio and video frame UTC time, and UTC_offset is the playback delay time; controlling the audio and video frame playback according to the local UTC time of the terminal includes: if the local UTC time is less than the frame UTC time, waiting for the audio or video to play; if the local UTC time is greater than or equal to the frame UTC time, playing the audio or video.

[0017] In a possible implementation, the audio and video playback terminals are the same playback terminal.

[0018] A possible implementation further includes:

[0019] The same playback terminal performs clock synchronization through a synchronous clock source, restores the UTC time of each frame of audio and video TS file data input simultaneously, decodes the audio and video encoding stream, and plays audio and video according to the local UTC clock;

[0020] The UTC time of the audio and video frame is added to the unified offset time, that is: UTC_play = UTC_frame + UTC_offset, where UTC_play is the actual playback frame UTC time, UTC_frame is the original audio and video frame UTC time, and UTC_offset is the playback delay time; controlling the audio and video frame playback according to the local UTC time of the terminal includes: if the local UTC time is less than the frame UTC time, waiting for the audio or video to play; if the local UTC time is greater than or equal to the frame UTC time, playing the audio or video.

[0021] In a possible implementation, the synchronization clock source is an NTP clock server.

[0022] The adoption of the present invention has the following beneficial effects: the independent audio and video of the SDIOverIP signal are encoded, packaged and transmitted respectively, and the playback terminal obtains the corresponding network data stream separately according to its own video or audio playback, thereby solving the problem of the independent audio and video data stream of the SDIOverIP signal undergoing audio and video compression, ensuring that different terminals play the audio and video data synchronously, and realizing the independent audio and video stream of the SDIOverIP signal being transcoded, and realizing synchronous playback through a heterogeneous network. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flowchart of the steps of the SDIOverIP real-time stream heterogeneous audio and video synchronous playback method according to an embodiment of the present invention;

[0024] Figure 2 It is a structural schematic diagram of synchronous playback of heterogeneous playback terminals in the SDIOverIP real-time stream heterogeneous audio and video synchronous playback method according to an embodiment of the present invention;

[0025] Figure 3 The present invention is a structural diagram of synchronous playback by the same playback terminal in the SDIOverIP real-time stream heterogeneous audio and video synchronous playback method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] Reference Figure 1 , which is a flowchart of the step of the SDIOverIP real-time stream heterogeneous audio and video synchronous playback method according to an embodiment of the present invention, comprising the following steps:

[0028] S10, performing video encoding on the video stream of the SDIOverIP signal, performing audio encoding on the audio stream of the SDIOverIP signal, and encapsulating the encoded file into a TS file format;

[0029] S20 uses the SDIOverIP protocol to synchronize audio and video through the PTP clock. Based on the PTP clock reference, the PTP time of the corresponding audio and video frame is converted to the world unified clock UTC time, and the UTC time of each frame of audio and video after conversion is written into the TS file encapsulation layer;

[0030] S30, transmit the encoded audio and video TS file data through a heterogeneous network; the transmission protocol can be based on various heterogeneous protocols of TS (TSOverUDP, TSOverHTTP, HLS), and the transmission network can also be various heterogeneous networks (local area network, public network, CDN cloud), generally without specific restrictions.

[0031] S40, the audio and video playback terminal receives the audio and video TS file data through the network link, decapsulates the UTC time corresponding to each frame through the UTC time encapsulation method, decodes the corresponding audio and video compressed data, and controls the synchronous broadcast according to the audio and video UTC time and the local UTC time.

[0032] Since the bandwidth requirements of SDIOverIP signals are relatively high (3G for HD, 12G for 4K, and 48G for 8K), ordinary traditional networks cannot meet the above bandwidth requirements, so the SDIOverIP signals need to be encoded for video (H.264 / H.265...) and audio (AAC / MP2 / AC3...) to reduce the transmission bandwidth, and encapsulate the TS (Transport Stream) file format for network transmission. In order for the final playback terminal to synchronously play the audio and video streams, the synchronous clock information of the SDIOverIP signal needs to be transmitted to the audio and video playback terminal.

[0033] In a specific application example, in S20, the PTP time of the corresponding audio and video frame is converted into the world unified clock UTC time: UTC = PTP-37000000000, in nanoseconds.

[0034] Furthermore, writing the UTC time of each frame of audio and video after conversion into the TS file encapsulation layer includes: the TS file layer defines an extended UTC time data structure and stores it in PES_private_data, and the corresponding UTC time data structure is shown in Table 1, that is, the UTC time data structure includes a synchronization header, a version number, whether it contains UTC time, and 2 reserved fields, ending with the UTC time in milliseconds.

[0035] Table 1 UTC time data structure table

[0036]

[0037] In actual playback applications, there are two forms of synchronous playback: synchronous playback on heterogeneous playback terminals and synchronous playback on the same playback terminal.

[0038] like Figure 2 As shown, the audio and video playback terminal is a heterogeneous playback terminal. The heterogeneous playback terminal performs clock synchronization through a synchronous clock source, restores the UTC time of each audio and video frame of the input audio and video TS file data, decodes the audio and video encoding stream, and plays the audio and video according to the local UTC clock. The synchronous clock source is the NTP clock server. To achieve synchronous playback, it further includes: adding the UTC time of the audio and video frame to the unified offset time, that is: UTC_play = UTC_frame + UTC_offset, where UTC_play is the actual playback frame UTC time, UTC_frame is the original audio and video frame UTC time, and UTC_offset is the playback delay time; controlling the audio and video frame playback according to the local UTC time of the terminal includes: if the local UTC time is less than the frame UTC time, wait for the audio or video to play, if the local UTC time is greater than or equal to the frame UTC time, play the audio or video.

[0039] like Figure 3 As shown, the audio and video playback terminal is the same playback terminal. In order to achieve synchronous playback, it further includes:

[0040] The same playback terminal performs clock synchronization through a synchronous clock source, which is an NTP clock server. The audio and video TS file data input simultaneously is restored to the UTC time of each audio and video frame, the audio and video encoding stream is decoded, and the audio and video are played according to the local UTC clock.

[0041] The UTC time of the audio and video frame is added to the unified offset time, that is: UTC_play = UTC_frame + UTC_offset, where UTC_play is the actual playback frame UTC time, UTC_frame is the original audio and video frame UTC time, and UTC_offset is the playback delay time; controlling the audio and video frame playback according to the local UTC time of the terminal includes: if the local UTC time is less than the frame UTC time, waiting for the audio or video to play; if the local UTC time is greater than or equal to the frame UTC time, playing the audio or video.

[0042] The SDIOverIP real-time stream heterogeneous audio and video synchronous playback method of the embodiment of the present invention encodes, packages and transmits the independent audio and video of the SDIOverIP signal respectively. The playback terminal obtains the corresponding network data stream separately according to its own video or audio playback, thereby solving the problem of audio and video compression of the independent audio and video data stream of the SDIOverIP signal, ensuring that different terminals play audio and video data synchronously, and realizing transcoding of the independent audio and video stream of the SDIOverIP signal to achieve synchronous playback through a heterogeneous network.

[0043] It should be understood that the exemplary embodiments described herein are illustrative rather than restrictive. Although one or more embodiments of the present invention have been described in conjunction with the accompanying drawings, it should be understood by those skilled in the art that various changes in form and detail may be made without departing from the spirit and scope of the present invention as defined by the appended claims.

Claims

1. A method for synchronously playing heterogeneous audio and video of SDIOverIP real-time stream, characterized in that: The following steps are involved: Encode the video stream of the SDIOverIP signal, encode the audio stream of the SDIOverIP signal, and encapsulate the encoded file into a TS file format; The SDIOverIP protocol is used to synchronize audio and video through the PTP clock. Based on the PTP clock reference, the PTP time of the corresponding audio and video frame is converted to the world's unified clock UTC time, and the UTC time of each frame of audio and video after conversion is written into the TS file encapsulation layer; Writing the UTC time of each frame of audio and video after conversion into the TS file encapsulation layer includes: the TS file layer defines an extended UTC time data structure and stores it in PES_private_data; the UTC time data structure includes a synchronization header, a version number, whether it contains UTC time, and two reserved fields, and ends with UTC time; The encoded audio and video TS file data is transmitted through a heterogeneous network; the transmission protocol is a variety of heterogeneous protocols based on TS including TSOverUDP, TSOverHTTP, and HLS; the transmission network is a variety of heterogeneous networks including local area network, public network, and CDN cloud; The audio and video playback terminal receives the audio and video TS file data through the network link, decapsulates the UTC time corresponding to each frame through the UTC time encapsulation method, decodes the corresponding audio and video compressed data, and controls the synchronous broadcast according to the audio and video UTC time and the local UTC time. If the local UTC time is less than the frame UTC time, wait for the audio or video to play; if the local UTC time is greater than or equal to the frame UTC time, play the audio or video; The audio and video playback terminal is a heterogeneous playback terminal or a same playback terminal, and the heterogeneous playback terminal or the same playback terminal performs clock synchronization through a synchronous clock source, and the synchronous clock source is an NTP clock server; When it is a heterogeneous playback terminal, the heterogeneous playback terminal restores the UTC time of each audio and video frame from the audio and video TS file data input by each terminal, decodes the audio and video encoding stream, and plays the audio and video according to the local UTC clock; adds the UTC time of the audio and video frame to the unified offset time, that is: UTC_play = UTC_frame + UTC_offset, where UTC_play is the actual playback frame UTC time, UTC_frame is the original audio and video frame UTC time, and UTC_offset is the playback delay time; controls the playback of audio and video frames according to the local UTC time of the terminal; When it is the same playback terminal, the same playback terminal will restore the UTC time of each audio and video frame of the audio and video TS file data input simultaneously, decode the audio and video encoding stream, and play the audio and video according to the local UTC clock; add the UTC time of the audio and video frame to the unified offset time, that is: UTC_play = UTC_frame + UTC_offset, where UTC_play is the actual playback frame UTC time, UTC_frame is the original audio and video frame UTC time, and UTC_offset is the playback delay time; control the audio and video frame playback according to the local UTC time of the terminal.