Video transmission method and storage medium with tightly integrated transmission protocol and codec

By tightly integrating the transmission protocol and codec, calculating the frame interval and target frame size, and generating high- and low-quality frames, the problem of data packet loss and latency caused by network changes in existing technologies is solved, and stable, low-latency real-time video transmission is achieved.

CN116193164BActive Publication Date: 2024-08-30CHINA APPLIED TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211605127.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-14
Publication Date
2024-08-30
Estimated Expiration
2042-12-14

AI Technical Summary

Technical Problem

Existing real-time video transmission methods cannot respond quickly when network conditions change, resulting in severe packet loss and queuing delays, especially in environments with large variations in network capacity, such as cellular networks and Wi-Fi.

Method used

By tightly integrating transmission protocols and codecs, calculating frame interval time and target frame size, generating high-quality and low-quality frames, and dynamically adjusting video transmission quality according to network capacity, a rapid response to network changes can be achieved.

Benefits of technology

It provides stable, low-latency real-time video transmission even under fluctuating network conditions, making it suitable for environments with significant changes in network capacity and reducing packet loss and queuing delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116193164B
    Figure CN116193164B
Patent Text Reader

Abstract

The present invention provides a video transmission method and storage medium that tightly integrates a transmission protocol and a codec. The method includes: after a receiving end receives a network segment, the receiving end calculates the frame interval time, and sends the frame interval time to a sending end through a transmission protocol; the sending end calculates the target frame size of the next frame through the frame interval time and the target delay; the sending end encoder generates two frames: high-quality frames and low-quality frames; the sending end selects the frame generated in step 3 to send according to the target frame size in step 2. The present invention tightly combines the codec and the transmission protocol, allowing the application to explore alternative encodings for each video frame at different quality levels. To find an encoding with a compressed frame size that meets the instantaneous capacity of the network. The method does not require a special codec or transmission protocol. The present invention can integrate the existing codec and transmission protocol together to quickly respond to changes in network bandwidth and reduce delays caused by network fluctuations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of computer real-time video transmission, and in particular to a video transmission method that tightly integrates a transmission protocol and a codec. Background Art

[0002] Real-time video transmission technology is widely used in video conferencing, remote surgery, remote calls, live video broadcasting and other scenarios. The real-time video transmission system is mainly composed of codecs and transmission protocols. The encoder at the sending end encodes the video information obtained by the camera into frames. The transmission protocol divides the frames into segments and transmits them to the receiving end; the decoder at the receiving end receives the network segments, decodes the frames, and generates a video stream.

[0003] In order to achieve low-latency, high-quality real-time video transmission, the industry generally adopts the following methods: 1. Adaptive video. Figure 1 , the system typically includes a video codec and a transport protocol as independent subsystems, each with its own rate control logic and control loops. The transport protocol provides the codec with an estimate of the network data rate, while the video encoder selects encoding parameters to match its average bitrate. 2. Joint source-channel video coding, this approach assumes that the data rate is fixed or slowly varying, and that packet loss and queuing delays can be modeled as random processes independent of the application itself. In this context, previous work has focused on source coding (video compression) and channel coding (forward error correction) to enable applications to cope with packet loss and delays.

[0004] However, although the current methods have many advantages, they do not take into account that packet loss and queuing delays are affected by how much data the application chooses to send, and cannot respond quickly to changes in network bandwidth. When network conditions change, existing methods will cause serious packet loss and queuing delays. Summary of the invention

[0005] The present invention provides a video transmission method that tightly integrates a transmission protocol and a codec, which can solve at least one of the above technical problems.

[0006] To achieve the above object, the present invention adopts the following technical solutions:

[0007] A video transmission method that tightly integrates a transmission protocol and a codec comprises the following steps:

[0008] Step 1: After receiving the network segment, the receiver calculates the interframe time and sends the interframe time to the sender through the transmission protocol;

[0009] Step 2: The sender calculates the target frame size of the next frame by using the frame interval time and the target delay;

[0010] Step 3: The encoder at the transmitting end generates two types of frames: high-quality frames and low-quality frames;

[0011] Step 4: The sender selects the frame generated in step 3 to send based on the target frame size in step 2.

[0012] On the other hand, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.

[0013] It can be seen from the above technical solutions that the video transmission method of the present invention, which tightly integrates the transmission protocol and the codec, can respond quickly to changes in network conditions by estimating the current network capacity, thereby avoiding data packet loss and queuing delays.

[0014] The beneficial effects of the present invention are as follows:

[0015] The method of the present invention closely combines the codec and the transmission protocol, allowing the application to explore alternative encodings of each video frame at different quality levels to find an encoding whose compressed frame size meets the instantaneous capacity of the network. The method does not require a special codec or transmission protocol. As a specific system, it can integrate existing codecs and transmission protocols, quickly respond to changes in network bandwidth, and reduce delays caused by network fluctuations.

[0016] Compared with the traditional method of setting the bit rate, the method of the present invention closely combines the transmission protocol and the codec, calculates the frame interval and the next target frame size, determines the optimal transmission quality of each frame in a finer granularity, and can achieve a balance between video picture quality and network delay by setting the target delay time.

[0017] The method of the present invention has a better effect in communication media with changing network conditions, and is more suitable for communication environments with large changes in network capacity such as cellular networks and WiFi. It can provide stable and low-latency real-time video transmission under fluctuating network conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 It is a low-coupling system consisting of existing encoders and transmission protocols;

[0019] Figure 2 is a schematic diagram of frames of a transmitting end and a receiving end of an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of a codec and a transmission protocol closely combined in an embodiment of the present invention;

[0021] Figure 4 2 is a schematic diagram of an example of a process of selecting a frame at a transmitting end according to an embodiment of the present invention;

[0022] Figure 5 This is an example of selecting a high-quality frame by a transmitting end in an embodiment of the present invention;

[0023] Figure 6 This is an example of the transmitting end skipping this frame in an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.

[0025] like Figure 1 As shown, the video transmission method of tightly integrating the transmission protocol and the codec described in this embodiment includes the following steps:

[0026] Step 1: After receiving the network segment, the receiver calculates the interframe time and sends the interframe time to the sender through the transmission protocol;

[0027] Step 2: The sender calculates the target frame size of the next frame by using the frame interval time and the target delay;

[0028] Step 3: The encoder at the transmitting end generates two types of frames: high-quality frames and low-quality frames;

[0029] Step 4: The sender selects the frame generated in step 3 to send based on the target frame size in step 2.

[0030] Among them, the step 1 "after receiving the network packet, the receiving end calculates the frame interval time and sends the frame interval time to the sending end through the transmission protocol." means that when frame i is received, the receiving end calculates a smoothed frame interval time τ using the following formula i When a frame is sent, it is divided into many fragments (such as Figure 2 ), where T i is the arrival time of the last fragment of frame i, T i-1 is the arrival time of the last fragment of frame i-1; grace_period i It is the time interval between sending two frames, which is determined by the grace_period in the transport protocol. i Field acquisition; τ i-1 is the frame interval time of the last calculation, α is the smoothing coefficient, the value range is 0-1, usually 0.2.

[0031] τ i =α(T i -T i-1 -grace_period i)+(1-α)τ i-1

[0032] When the frame interval τ i After the calculation is completed, the receiving end sends the frame interval time τ through the transmission protocol i Sent to the sender.

[0033] The step 2 "the transmitting end calculates the target frame size of the next frame by using the frame interval time and the target delay." refers to the frame interval time τ sent by the receiving end in step 1 received by the transmitting end. i After that, the upper limit of the target frame size is set for the next frame according to the set target delay time d (usually d is in milliseconds). In order to avoid the delay time exceeding d, network congestion and delay are avoided by avoiding the transmission of frame data larger than the target frame size. The formula for calculating the target frame size is as follows:

[0034] Target frame size = (d / τ i -N i )MTU

[0035] where τ i is the frame interval, d is the target delay time, N i It is the number of data fragments being sent, which is obtained by subtracting the number of fragments that the receiver has confirmed to have received from the number of data fragments that have been sent. MTU is the maximum transmission unit. Due to the limitations of the link layer protocol, the maximum size of each fragment is MTU.

[0036] like Figure 3 As shown, the sender generates a target frame size for each frame using the transport protocol. Compared with the transport protocol specifying the codec bit rate at regular intervals, the codec is more closely integrated with the transport protocol to adapt to changes in network bandwidth.

[0037] The step 3 "the encoder at the transmitting end generates two types of frames: high-quality frames and low-quality frames" means that when the encoder at the transmitting end encodes the real-time video information into frames, it generates two types of frames: high-quality frames and low-quality frames, and the data sizes of the two frames are different. Since it is difficult to let the encoder generate frames that strictly meet the target frame size, it is simplified to two types: high-quality frames and low-quality frames.

[0038] Furthermore, step 4 "the sender selects the frame generated in step 3 to send according to the target frame size in step 2." means that the sender selects a suitable frame to send according to the frame selection algorithm. The frame selection algorithm of the sender is described as follows. The frame skip counter is used to avoid the situation where the target frame size is continuously smaller than the low-quality frame, so that no frame is sent. Whenever a frame is ignored, the frame skip counter is incremented by one. When the frame skip counter is greater than 4, a low-quality frame must be sent.

[0039] Among them, the frame selection algorithm:

[0040] Algorithm input: low-quality frame, high-quality frame;

[0041] Algorithm steps:

[0042] (1) If the high-quality frame size does not exceed the target frame size, return a high-quality frame

[0043] (2) If the low-quality frame size does not exceed the target frame size or the frame skip counter is greater than 4, the low-quality frame is returned; otherwise, the frame skip counter is incremented by one.

[0044] After selecting the appropriate frame, the sender sends the frame to the receiver.

[0045] Several examples show how the selection algorithm selects frames of different qualities. Figure 4 , the target frame size is 30KB, the high-quality frame size is 50KB, which is larger than the target frame size, and the low-quality frame size is 25KB, which is smaller than the target frame size. Then the low-quality frame is selected and sent to the receiving end. Figure 5 , the target frame size is 55KB, and the high-quality frame size is 50KB. If it is smaller than the target frame size, the high-quality frame 50KB is selected and sent to the receiving end. Figure 6 , the target frame size is 5KB, the high-quality frame size is 50KB which is larger than the target frame size, and the low-quality frame size is 25KB which is larger than the target frame size, then skip this frame and do not send it, and consider the next frame.

[0046] In summary, this method tightly integrates the codec and the transport protocol, allowing the application to explore alternative encodings of each video frame at different quality levels to find an encoding whose compressed frame size meets the instantaneous capacity of the network. This method does not require a special codec or transport protocol. As a specific system, it can integrate existing codecs and transport protocols, quickly respond to changes in network bandwidth, and reduce delays caused by network fluctuations.

[0047] Compared with the traditional method of setting the bit rate, this method closely combines the transmission protocol and codec, calculates the frame interval and the next target frame size, determines the optimal transmission quality of each frame in a finer granularity, and can achieve a balance between video picture quality and network delay by setting the target delay time.

[0048] This method works better in communication media with changing network conditions, and is more suitable for communication environments with large changes in network capacity such as cellular networks and WiFi. It can provide stable and low-latency real-time video transmission under fluctuating network conditions.

[0049] In yet another aspect, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of any of the above methods.

[0050] On the other hand, the present invention further discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of any of the above methods.

[0051] In another embodiment provided by the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of any method in the above embodiments.

[0052] It is understandable that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the above method.

[0053] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0054] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0055] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A video transmission method that tightly integrates a transmission protocol and a codec, characterized in that: The following steps are included: Step 1: After receiving the network segment, the receiver calculates the interframe time and sends the interframe time to the sender through the transmission protocol; Step 2: The sender calculates the target frame size of the next frame by using the frame interval time and the target delay; Step 3: The encoder at the transmitting end generates two types of frames: high-quality frames and low-quality frames; Step 4: The sender selects the frame generated in step 3 and sends it according to the target frame size in step 2; The step 4 in which the transmitting end selects the frame generated in step 3 to send according to the target frame size in step 2 specifically includes the transmitting end selecting the corresponding frame to send according to the frame selection algorithm; Among them, the frame selection algorithm includes: Algorithm input: low-quality frame, high-quality frame; Algorithm steps: (1) If the high-quality frame size does not exceed the target frame size, return a high-quality frame; (2) If the low-quality frame size does not exceed the target frame size or the frame skip counter is greater than 4, the low-quality frame is returned; otherwise, the frame skip counter is incremented by one; After selecting the corresponding frame, the sender sends the frame to the receiver.

2. The video transmission method of tightly integrating transmission protocol and codec according to claim 1, characterized in that: In step 1, after the receiving end receives the network packet, the frame interval time is calculated and sent to the sending end through the transmission protocol; it means that when frame i is received, the receiving end calculates a smoothed frame interval time τ using the following formula i ; When a frame is sent, it is divided into multiple fragments, where T i is the arrival time of the last fragment of frame i, T i-1 is the arrival time of the last fragment of frame i-1; grace_period i It is the time interval between sending two frames, which is determined by the grace_period in the transport protocol. i Field acquisition; τ i-1 is the frame interval time of the last calculation, α is the smoothing coefficient, and its value range is 0-1. t i =α(T i -T i-1 -grace_period i )+(1-a)τ i-1 When the frame interval τ i After the calculation is completed, the receiving end sends the frame interval time τ through the transmission protocol i Sent to the sender.

3. The video transmission method of tightly integrating transmission protocol and codec according to claim 2, characterized in that: In step 2, the sending end calculates the target frame size of the next frame by using the frame interval time and the target delay, specifically, the frame interval time τ sent by the receiving end in step 1 received by the sending end i Then, according to the set target delay time d, where the unit of d is milliseconds, the upper bound of the target frame size is set for the next frame; The formula for the target frame size is calculated as follows: Target frame size = (d / τ i -N i )MTU where τ i is the frame interval, d is the target delay time, N i It is the number of data fragments being sent, which is obtained by subtracting the number of fragments that the receiver has confirmed to have received from the number of data fragments that have been sent; MTU is the maximum transmission unit. Due to the limitations of the link layer protocol, the maximum size of each fragment is MTU.

4. The video transmission method of tightly integrating transmission protocol and codec according to claim 3, characterized in that: In step 3, the encoder at the transmitting end generates two types of frames: high-quality frames and low-quality frames. Specifically, when the encoder at the transmitting end encodes the real-time video information into frames, it generates two types of frames of different quality: high-quality frames and low-quality frames, and the data sizes of the two frames are different.

5. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Systems and methods for channel switching

    CN101536523A

  • Data transmission and processing method and system, micro viewer and electronic equipment

    CN106358000A

  • Video compression transmission method and device based on dynamic coding frame, equipment and medium

    CN113259660A

  • Method and apparatus for smoothing and multiplexing video data flows

    US6310857B1