A method, system, device and medium for real-time video streaming playback with reduced latency
By detecting the difference in timestamps in the buffer and dynamically selecting the playback optimization strategy, the problem of real-time video stream latency accumulation in weak network environments is solved, low latency and high real-time video playback are achieved, and user experience is improved.
Patent Information
- Application Number
- CN202411893608.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-04
AI Technical Summary
In a weak network environment, the problem of delay accumulation of real-time video streams leads to video playback delay, seriously affecting the user viewing experience of high real-time requirements, such as sports events and live news broadcasts.
By detecting the timestamp difference in the buffer, dynamically select the appropriate playback optimization strategy, including frame chasing strategy, multiple playback strategy and frame skipping strategy, until the timestamp difference is eliminated, thereby reducing latency accumulation.
It effectively reduces the accumulation of latency of video playback, ensures the continuity and real-time nature of real-time video streams, and improves the user's viewing experience, especially in live broadcast scenarios.
Smart Images

Figure CN119767050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of H5 terminal real-time video playback, and in particular to a real-time video stream playback method, system, device and medium for reducing delay. Background Art
[0002] At present, real-time video streaming applications on H5 terminals are widely used in various network environments. However, in a weak network environment, network instability (such as high latency, high jitter, high packet loss rate and low bandwidth) will cause the delay of video data transmission to accumulate. When the network returns to normal, a large amount of data is transmitted to the playback end. Since the playback end does not render the latest video frame immediately, but renders the video frame in sequence, the current screen time of the playback end will be slower than the current Beijing time, that is, the playback delay phenomenon occurs, and the delay phenomenon may become more serious as the playback time increases. This phenomenon greatly affects the user's viewing experience for applications with high real-time requirements (such as sports events, news broadcasts, etc.).
[0003] Traditional solutions mainly focus on increasing buffer size, reducing video quality or using adaptive streaming technology (ABR) to cope with network fluctuations, but these methods have obvious shortcomings in ensuring real-time performance. Although increasing the buffer size can reduce stuttering, it will increase overall latency, which is not suitable for scenarios with high real-time requirements. Although reducing video quality can reduce latency to a certain extent, it will seriously affect the user's viewing experience. Adaptive streaming technology is difficult to avoid the problem of latency accumulation when the network fluctuates violently.
[0004] Therefore, how to reduce delay accumulation through more effective technical means in a weak network environment and ensure the continuity and real-time nature of real-time video streaming has become a technical problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present invention provide a real-time video stream playback method, system, device and medium for reducing latency to solve the problems existing in the related technologies. The technical solutions are as follows:
[0006] In a first aspect, an embodiment of the present invention provides a real-time video stream playback method for reducing latency, comprising:
[0007] In response to a buffer status detection request, obtaining a first display time of a currently played frame in the buffer and a second display time of a last played frame in the buffer, and calculating a difference between the first display time and the second display time to obtain a timestamp difference;
[0008] According to the comparison result of the timestamp difference and the set threshold, the corresponding playback optimization strategy is executed until the timestamp difference is eliminated; wherein the playback optimization strategy is one of the frame chasing strategy, the multiple playback strategy or the frame skipping strategy.
[0009] In one implementation, the buffer status detection request is triggered and generated according to a fixed time interval set by a timer.
[0010] In one embodiment, it further includes:
[0011] Get the video stream receiving rate of the buffer and the playback rate of the playback frames;
[0012] Calculate the difference between the video stream receiving rate and the playback rate to get the buffer filling rate;
[0013] Determine the current network status based on network parameters, including fill rate, timestamp difference, and packet loss rate;
[0014] When the current network status is weak, the video stream playback is paused and the last playback frame in the buffer is displayed until the current network status returns to normal.
[0015] In one embodiment, it further includes:
[0016] When the current network status returns to normal, the video stream is received again and saved in the buffer, and the size of the buffer is dynamically adjusted according to the current network jitter to balance the playback continuity and delay.
[0017] In one implementation, executing a corresponding playback optimization strategy according to a comparison result of the timestamp difference and a set threshold value includes:
[0018] When the timestamp difference is less than or equal to the first set threshold, the frame chasing strategy is started to adjust the playback rate of the playback frame;
[0019] When the timestamp difference is greater than a first set threshold value and less than or equal to a second set threshold value, a multiple playback strategy is initiated to adjust the playback multiple of the playback frame;
[0020] When the timestamp difference is greater than the second set threshold, a frame skipping strategy is started, where the frame skipping strategy is used to skip non-key frames and directly display the latest key frame;
[0021] The second set threshold is greater than the first set threshold.
[0022] In one implementation, starting the frame chasing strategy to adjust the playback rate of the playback frame includes:
[0023] Calculate the product of the timestamp difference and the preset frame tracking factor to obtain the adjustment factor;
[0024] Determine the playback multiple of the adjusted playback rate according to the adjustment factor;
[0025] Get the current playback rate, calculate the product of the playback multiple and the current playback rate, and get the new playback rate;
[0026] Adjust the current playback rate to the new playback rate so that the playback end gradually catches up with the latest keyframes.
[0027] In one embodiment, it further includes:
[0028] Get GOP duration;
[0029] Calculate the ratio between the timestamp difference and the GOP duration to obtain the frame skipping interval;
[0030] Execute the frame skipping strategy based on the frame skipping interval.
[0031] In a second aspect, an embodiment of the present invention provides a real-time video stream playback system for reducing time delay, which executes the real-time video stream playback method for reducing time delay as described above.
[0032] In a third aspect, an embodiment of the present invention provides an electronic device, the device comprising: a memory and a processor. The memory and the processor communicate with each other through an internal connection path, the memory is used to store instructions, the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory, the processor executes the method in any one of the above-mentioned embodiments.
[0033] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the method in any one of the above-mentioned embodiments is executed.
[0034] The advantages or beneficial effects of the above technical solution include at least:
[0035] The present invention can detect the buffer state, and dynamically select a suitable playback optimization strategy for playback through the difference between the first display time of the currently played frame in the buffer and the second display time of the last played frame in the buffer. The playback optimization strategy comprehensively applies the frame chasing strategy, the multiple playback strategy and the frame skipping strategy, which effectively reduces the accumulation of playback delay and ensures the real-time performance of the live video.
[0036] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present invention will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present invention and should not be regarded as limiting the scope of the present invention.
[0038] Figure 1 A schematic diagram of a flow chart of a real-time video stream playback method for reducing time delay according to the present invention;
[0039] Figure 2 A schematic diagram of the dynamic selection of the playback optimization strategy of the present invention;
[0040] Figure 3 The structure block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In the following, only some exemplary embodiments are briefly described. As those skilled in the art will appreciate, the described embodiments may be modified in various ways without departing from the spirit or scope of the present invention. Therefore, the drawings and descriptions are considered to be exemplary and non-restrictive in nature.
[0042] This embodiment provides a real-time video stream playback method for reducing latency, which is suitable for reducing the latency of real-time video stream playback on the H5 end in a weak network environment. It aims to detect the buffer state through a timer, and combine the comprehensive application of frame chasing strategy, multiple playback strategy and frame skipping strategy to effectively reduce the accumulation of playback delay and ensure the continuity and real-time performance of live video.
[0043] like Figure 1 As shown, the real-time video stream playback method for reducing latency in this embodiment specifically includes:
[0044] Step S1: In response to a buffer status detection request, obtain a first display time of a currently played frame in the buffer and a second display time of a last played frame in the buffer, and calculate a difference between the first display time and the second display time to obtain a timestamp difference.
[0045] When the player receives the video stream data, it creates a buffer to temporarily store the video stream data. Assume that the size of the buffer is B, the maximum number of frames that the buffer can store is N, and the size of a single frame of video data is S. frame , then the buffer size is:
[0046] B=N*S frame .
[0047] Before monitoring the status of the buffer, the timer needs to be initialized. The playback end initializes the timer and sets a fixed time interval (for example, every 100 milliseconds) to detect the status of the buffer.
[0048] When the timer is triggered at a time interval, a buffer status detection request is generated. Upon receiving the buffer status detection request, the playback end traverses the video stream data stored in the buffer, extracts the current playback frame and the last playback frame from the video stream data in the buffer, identifies the display timestamp of the current playback frame to obtain a first display time, and identifies the display timestamp of the last playback frame to obtain a second display time.
[0049] A timestamp difference is calculated according to the first display time and the second display time, and the timestamp difference represents the degree of delay accumulation. In this embodiment, the calculation expression of the timestamp difference ΔPTS is:
[0050] ΔPTS=PTS last -PTS current .
[0051] Furthermore, the player continuously receives the video stream data from the server and stores it in the buffer. Assume that the receiving rate of the video stream is R strean , the playback rate of the playback frame is R play , then the buffer filling rate R buffer for:
[0052] R buffer =R stream -R play ;
[0053] When R strean >R play When R buffer A positive value means that the buffer is increasing.
[0054] When R strean <R play When R buffer A negative value means the buffer is decreasing.
[0055] By dynamically adjusting R play , that is, adjusting the playback rate, can achieve buffer management. strean Significantly lower than R play When the player can reduce R play , or even pause playback to avoid buffer exhaustion.
[0056] In this embodiment, the playback end can use a real-time network detection algorithm to monitor R strean , ΔPTS, and packet loss rate to determine the current network status. Specifically, assuming that the receiving rate of the video stream is R strean Much lower than the playback frame rate R playIt can be considered that the current network is in a weak state; or the timestamp difference ΔPTS suddenly increases or continues to increase, which may indicate that the network delay is increasing or the network condition is deteriorating, which may be caused by network congestion or packet loss, and it can be considered that the current network is in a weak state; if the timestamp difference ΔPTS fluctuates, this may indicate that the network condition is unstable, there may be intermittent delays or packet loss, and it can also be considered that the current network is in a weak state.
[0057] When the network condition is detected to be deteriorating (e.g. insufficient bandwidth or increased latency), the network is in a weak network state and the player enters the weak network mode. When the weak network mode is activated, if the video stream data is insufficient for continuous playback (i.e. the buffer filling rate is lower than a certain threshold B), the player will enter the weak network mode. min ), the player will pause and display the last frame F n ,Right now:
[0058] F n =F decoded (t last );
[0059] Among them, F n The last successfully decoded frame.
[0060] When the network returns to normal, the server sends a large amount of video data to the player, which receives the video stream again and saves it in the buffer. At this time, the player can adjust the buffer size B according to the real-time requirements to balance the playback continuity and delay.
[0061] It should be noted that adjusting the buffer size according to real-time requirements refers to dynamically adjusting the size of the buffer according to the needs of real-time communication to balance the continuity and delay of playback. In other words, the purpose of adjusting the buffer size is to minimize delay while ensuring the smoothness of playback. And the method for adjusting the buffer size in this embodiment can be to dynamically adjust the size of the jitter buffer according to the current network jitter situation to reduce the delay caused by network fluctuations. For example, when an increase in jitter is detected, the size of the buffer can be increased to smooth the data flow. At the same time, an adaptive algorithm (such as a feedback-based control algorithm) is used to adjust the size of the buffer. These algorithms can adjust the capacity of the buffer in real time according to changes in network conditions to achieve the best balance between playback continuity and delay.
[0062] In this embodiment, a buffer status detection request is generated by a timer trigger. At this time, the playback end obtains the first display time of the current playback frame in the buffer and the second display time of the last playback frame in the buffer, and selects an appropriate playback optimization strategy for latency optimization based on the timestamp difference between the first display time and the second display time.
[0063] In some embodiments, when it is detected that the network is in a weak network state through methods such as the receiving rate or packet loss rate of the video stream, a buffer status detection request can also be actively initiated, and the playback end can obtain the first display time of the currently played frame in the buffer and the second display time of the last played frame in the buffer, and select an appropriate playback optimization strategy for delay optimization based on the timestamp difference between the first display time and the second display time.
[0064] Step S2: According to the comparison result between the timestamp difference and the set threshold, a corresponding playback optimization strategy is executed until the timestamp difference is eliminated; wherein the playback optimization strategy is one of a frame chasing strategy, a multiple playback strategy or a frame skipping strategy.
[0065] This embodiment dynamically selects an appropriate playback optimization strategy based on the size of the timestamp difference. Figure 2 As shown, the specific method of dynamically selecting an appropriate playback optimization strategy includes:
[0066] When the timestamp difference is less than or equal to the first set threshold, it means that the delay accumulation is small. At this time, the frame chasing strategy is started to adjust the playback rate of the playback frame to reduce the delay accumulation by slightly accelerating the playback.
[0067] When the timestamp difference is greater than the first set threshold and less than or equal to the second set threshold, it is equivalent to starting the multiple playback strategy to adjust the playback multiple of the playback frame in the case of a slight delay, thereby accelerating the progress by playing at a double speed.
[0068] When the timestamp difference is greater than the second set threshold, which is equivalent to a large accumulated delay, the frame skipping strategy is started. The frame skipping strategy is used to skip non-key frames and directly display the latest key frames to quickly synchronize with the real-time video stream.
[0069] The second set threshold is greater than the first set threshold. In this embodiment, the first set threshold may be 10 seconds, and the second set threshold may be 30 seconds.
[0070] Among them, in the frame chasing strategy, the playback rate adjustment method is:
[0071] Calculate the product of the timestamp difference and the preset frame tracking factor to obtain the adjustment factor;
[0072] Determine the playback multiple of the adjusted playback rate according to the adjustment factor;
[0073] Get the current playback rate, calculate the product of the playback multiple and the current playback rate, and get the new playback rate;
[0074] Adjust the current playback rate to the new playback rate so that the playback end gradually catches up with the latest keyframes.
[0075] The expression of the playback rate Rchase in this embodiment is:
[0076] R chase =R normal ×(1+α×ΔPTS);
[0077] Among them, R normal is the current playback rate, which is generally the normal playback rate;
[0078] α is the frame chasing factor, 0<α<1, and the frame chasing factor is dynamically adjusted according to the network status;
[0079] α×ΔPTS represents the adjustment factor. The product of the frame chasing factor α and the timestamp difference ΔPTS is used to quantify the impact of network delay or jitter on the playback rate. When ΔPTS increases, it means that the network delay or jitter causes the frame arrival interval to become longer, so the playback rate needs to be increased to catch up with the latest frame.
[0080] 1+α×ΔPTS is a multiple of the normal playback rate that is adjusted according to network delay or jitter. The purpose is to allow the playback end to synchronize to the latest key frame (I-Frame) in the video stream more quickly, thereby improving the real-time performance of the playback and reducing delays.
[0081] The core of the frame chasing strategy is to increase the playback rate moderately so that the playback end can gradually catch up with the latest key frame (I-Frame) and reduce delay accumulation.
[0082] In this embodiment, the multiple playback strategy is mainly to reduce the delay by increasing the playback rate. mul Determined by the following formula:
[0083] R mul =R normal ×m;
[0084] Where m is the multiple playback factor, usually between 1.5 and 2;
[0085] The multiple playback strategy is suitable for scenarios with slight delay accumulation. It speeds up the playback rate to achieve the purpose of quickly synchronizing real-time video streams.
[0086] In this embodiment, the frame skipping strategy speeds up the progress by skipping non-key frames, and the frame skipping interval is determined by the following formula:
[0087]
[0088] Where: T GOP is the duration of a GOP.
[0089] When ΔPTS increases, that is, the time interval between frame arrivals becomes longer, it may mean network delay or jitter. In this case, increasing the frame skipping interval can reduce the waiting time during playback and speed up the playback progress. GOP Increase, that is, the duration of GOP becomes longer, which means that GOP contains more frames. At this time, reducing the frame skipping interval can skip frames more frequently to maintain smooth playback. The key to the frame skipping strategy is to avoid unnecessary decoding and playback by skipping some frames, thereby speeding up the playback progress.
[0090] It should be noted that GOP (Group of Pictures) is a concept in video coding, which refers to a group of continuous pictures, consisting of an I frame (key frame) and several B / P frames (non-key frames); the duration of GOP refers to the length of time from the beginning to the end of a GOP, which is usually determined by the GOP length set during the encoding process, that is, the number of frames or time interval between two I frames.
[0091] Among them, the key frame (I-Frame) refers to the frame that is independently decoded in video encoding and does not rely on the information of other frames. It is an important processing object in frame chasing and frame skipping strategies.
[0092] A non-key frame (P / B-Frame) is a frame that depends on the previous and next frames for decoding and is usually skipped first in the frame skipping strategy.
[0093] The specific embodiments are as follows:
[0094] Example 1: Frame chasing strategy
[0095] In a weak network environment, the timer detects that ΔPTS is less than 10 seconds, and the player selects the frame chasing strategy and sets α = 0.2. chase =1.2×R normal The playback is accelerated at a rate until ΔPTS decreases to close to 0.
[0096] Example 2: Multiple playback strategy
[0097] In a weak network environment, the timer detects that ΔPTS is between 10 seconds and 30 seconds. The player selects a multiple playback strategy and sets m = 1.5. normal The rate is played until ΔPTS is eliminated.
[0098] Example 3: Frame skipping strategy
[0099] In a weak network environment, the timer detects that ΔPTS exceeds 30 seconds, and the player selects the frame skipping strategy. Assuming that the GOP interval is 2 seconds, S skip=ΔPTS / 2, skip some non-key frames and play the latest key frame directly.
[0100] Through timer detection, dynamic buffer management, frame chasing strategy, multiple playback strategy and frame skipping strategy, the playback end can effectively reduce the delay accumulation in video playback and ensure the continuity and smoothness of real-time video streaming. In a weak network environment, the method of the present invention can adaptively adjust the playback strategy to improve the user viewing experience, especially in live broadcast scenarios, and can maintain a high degree of real-time performance.
[0101] Another embodiment of the present invention provides a real-time video stream playback system for reducing time delay, which executes the real-time video stream playback method for reducing time delay as described above.
[0102] It should be noted that the functions of each module in the system of the embodiment of the present invention can refer to the corresponding description in the above method, which will not be repeated here.
[0103] Another embodiment of the present invention provides an electronic device, Figure 3 FIG. 2 shows a structural block diagram of an electronic device according to an embodiment of the present invention. Figure 3 As shown, the electronic device includes: a memory 100 and a processor 200, wherein the memory 100 stores a computer program that can be run on the processor 200. When the processor 200 executes the computer program, the real-time video stream playback method for reducing latency in the above embodiment is implemented. The number of the memory 100 and the processor 200 can be one or more.
[0104] The electronic device also includes:
[0105] The communication interface 300 is used to communicate with external devices and perform data exchange transmission.
[0106] If the memory 100, the processor 200 and the communication interface 300 are implemented independently, the memory 100, the processor 200 and the communication interface 300 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0107] Optionally, in a specific implementation, if the memory 100, the processor 200 and the communication interface 300 are integrated on a chip, the memory 100, the processor 200 and the communication interface 300 can communicate with each other through an internal interface.
[0108] An embodiment of the present invention provides a computer-readable storage medium storing a computer program, which implements the method provided in the embodiment of the present invention when executed by a processor.
[0109] An embodiment of the present invention further provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the method provided by the embodiment of the present invention.
[0110] An embodiment of the present invention also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method provided by the embodiment of the invention.
[0111] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting the advanced RISC machines (ARM) architecture.
[0112] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).
[0113] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0114] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0115] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0116] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of various changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A real-time video streaming playback method for reducing delay, characterized in that: include: In response to a buffer status detection request, obtaining a first display time of a currently played frame in a buffer and a second display time of a last played frame in the buffer, and calculating a difference between the first display time and the second display time to obtain a timestamp difference; According to the comparison result between the timestamp difference and the set threshold, a corresponding playback optimization strategy is executed until the timestamp difference is eliminated; wherein the playback optimization strategy is one of a frame chasing strategy, a multiple playback strategy or a frame skipping strategy.
2. The real-time video streaming playback method for reducing delay according to claim 1 is characterized in that: The buffer status detection request is generated according to a fixed time interval set by a timer.
3. The real-time video streaming playback method for reducing delay according to claim 1 is characterized in that: Also includes: Obtaining the video stream receiving rate and the playing rate of the playing frames in the buffer; Calculate the difference between the video stream receiving rate and the playing rate to obtain the filling rate of the buffer; Determine the current network state according to network parameters, wherein the network parameters include the fill rate, the timestamp difference, and the packet loss rate; When the current network state is a weak network state, the video stream playback is paused and the last playback frame in the buffer is displayed until the current network state returns to normal.
4. The real-time video streaming playback method for reducing delay according to claim 3 is characterized in that: Also includes: When the current network status returns to normal, the video stream is received again and stored in the buffer, and the size of the buffer is dynamically adjusted according to the current network jitter to balance the playback continuity and delay.
5. The real-time video streaming playback method for reducing delay according to claim 1, characterized in that: The executing a corresponding playback optimization strategy according to the comparison result of the timestamp difference and the set threshold value comprises: When the timestamp difference is less than or equal to a first set threshold, starting the frame chasing strategy to adjust the playback rate of the playback frame; When the timestamp difference is greater than the first set threshold and less than or equal to the second set threshold, the multiple playback strategy is activated to adjust the playback multiple of the playback frame; When the timestamp difference is greater than the second set threshold, the frame skipping strategy is started, where the frame skipping strategy is used to skip non-key frames and directly display the latest key frame; The second set threshold is greater than the first set threshold.
6. The real-time video stream playback method for reducing delay according to claim 5, characterized in that: The starting of the frame chasing strategy to adjust the playback rate of the playback frame includes: Calculate the product of the timestamp difference and a preset frame tracking factor to obtain an adjustment factor; Determining a playback multiple of the adjusted playback rate according to the adjustment factor; Obtaining the current playback rate, calculating the product of the playback multiple and the current playback rate, and obtaining a new playback rate; The current playback rate is adjusted to the new playback rate so that the playback end gradually catches up with the latest key frame.
7. The real-time video stream playback method for reducing delay according to claim 5, characterized in that: Also includes: Get GOP duration; Calculating a ratio between the timestamp difference and the GOP duration to obtain a frame skipping interval; The frame skipping strategy is executed according to the frame skipping interval.
8. A real-time video streaming playback system for reducing time delay, characterized in that: Execute the real-time video stream playback method for reducing delay as described in any one of claims 1 to 7.
9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the real-time video stream playback method for reducing delay as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the real-time video stream playback method for reducing delay as claimed in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Multi-screen television synchronous playing control method and system based on cloud storage
CN121367805A
Cloud storage-based multi-screen television synchronous playing control method and system
CN121367805B