Audio and video playing method, device, equipment, storage medium and program product
Patent Information
- Application Number
- CN202211635375.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2026-09-15
- Estimated Expiration
- 2042-12-19
AI Technical Summary
[0003]相关技术中,为了降低音视频播放时的卡顿率,通常对接收到的音视频数据先存储至缓存中,判断得出缓存中存放的数据到达一定数量后进行音视频数据的渲染播放,该种方式会导致音视频开始渲染播放的时间延迟增加,不利于尽快的实现音视频的首播
[0021]In this embodiment, a first lost frame is obtained from the cache queue, and its first playback time is determined based on the single-frame playback length of the audio/video frame. The cache queue contains queued audio/video frames, and the first lost frame is the first lost frame after the first frame in the cache queue. A second playback time for the first lost frame is calculated based on obtained network metrics. The playback time of the first frame in the queue is then determined based on both the first and second playback times for audio/video playback. This audio/video playback mechanism, by introducing a first lost frame, calculating the first playback time from the first frame in the queue based on the single-frame playback length of the audio/video frame, and calculating the second playback time based on obtained network metrics, ultimately determines the playback time of the first frame in the queue. This approach considers the impact of network conditions on audio/video playback stuttering, optimizes the audio/video playback mechanism, and improves the initial playback time.
Smart Images

Figure CN116233533B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of audio and video processing technology, and in particular to an audio and video playback method, apparatus, device, storage medium, and program product. Background Technology
[0002] With the development of network technology, audio and video have become the mainstream multimedia interaction methods. When a client plays audio and video, it first receives audio and video data sent by the server, and then renders and plays the audio and video data accordingly.
[0003] In related technologies, to reduce stuttering during audio and video playback, received audio and video data is typically stored in a cache first. Once a certain amount of data has been stored in the cache, the audio and video data is rendered and played. This method increases the time delay before the audio and video playback begins, hindering a quick initial playback. Conversely, methods designed for faster playback to reduce initial playback time often result in increased stuttering due to the smaller amount of cached audio and video data. Therefore, how to reduce stuttering while simultaneously achieving rapid rendering and playback has become a pressing issue. Summary of the Invention
[0004] This application provides an audio and video playback method, apparatus, device, storage medium, and program product, which optimizes the audio and video playback mechanism and improves the first playback time while ensuring a low stuttering rate during audio and video playback.
[0005] In a first aspect, embodiments of this application provide an audio / video playback method, the method comprising:
[0006] Obtain the first lost frame in the cache queue, wherein the cache queue contains enqueued audio and video frames, and the first lost frame is the first lost frame after the first frame in the cache queue.
[0007] The first playback time of the first lost frame is determined based on the single-frame playback length of the audio and video frames;
[0008] The second playback time of the first lost frame is calculated based on the obtained network indicator parameters;
[0009] The playback time of the first frame of the queue is determined based on the first playback time and the second playback time, and is used for audio and video playback.
[0010] Secondly, embodiments of this application also provide an audio / video playback device, including:
[0011] The lost frame acquisition module is configured to acquire the first lost frame in the cache queue, wherein the cache queue caches enqueued audio and video frames, and the first lost frame is the first lost frame after the first frame in the cache queue.
[0012] The first-time determination module is configured to determine the first playback time of the first lost frame based on the single-frame playback length of the audio and video frames;
[0013] The second time determination module is configured to calculate the second playback time of the first lost frame based on the acquired network indicator parameters.
[0014] The playback time determination module is configured to determine the playback time of the first frame of the queue based on the first playback time and the second playback time, for playing audio and video.
[0015] Thirdly, embodiments of this application also provide an audio / video playback device, which includes:
[0016] One or more processors;
[0017] Storage device for storing one or more programs.
[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the audio and video playback method described in the embodiments of this application.
[0019] Fourthly, embodiments of this application also provide a non-volatile storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to perform the audio and video playback method described in embodiments of this application.
[0020] Fifthly, embodiments of this application also provide a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor of the device reads from the computer-readable storage medium and executes the computer program, causing the device to perform the audio and video playback method described in embodiments of this application.
[0021] In this embodiment, a first lost frame is obtained from the cache queue, and its first playback time is determined based on the single-frame playback length of the audio / video frame. The cache queue contains queued audio / video frames, and the first lost frame is the first lost frame after the first frame in the cache queue. A second playback time for the first lost frame is calculated based on obtained network metrics. The playback time of the first frame in the queue is then determined based on both the first and second playback times for audio / video playback. This audio / video playback mechanism, by introducing a first lost frame, calculating the first playback time from the first frame in the queue based on the single-frame playback length of the audio / video frame, and calculating the second playback time based on obtained network metrics, ultimately determines the playback time of the first frame in the queue. This approach considers the impact of network conditions on audio / video playback stuttering, optimizes the audio / video playback mechanism, and improves the initial playback time. Attached Figure Description
[0022] Figure 1 A schematic diagram illustrating an exemplary audio / video playback method provided in this application embodiment;
[0023] Figure 2 A flowchart illustrating an audio / video playback method provided in this application embodiment;
[0024] Figure 3 This is a schematic diagram illustrating an audio / video frame buffering method using a buffer queue, as provided in an embodiment of this application.
[0025] Figure 4 A flowchart illustrating another audio / video playback method provided in this application embodiment;
[0026] Figure 5 A flowchart illustrating another audio / video playback method provided in this application embodiment;
[0027] Figure 6 A structural block diagram of an audio / video playback device provided in an embodiment of this application;
[0028] Figure 7 This is a schematic diagram of the structure of an audio / video playback device provided in an embodiment of this application. Detailed Implementation
[0029] The embodiments of this application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the embodiments of this application and are not intended to limit the scope of the embodiments. Furthermore, it should be noted that, for ease of description, only the parts relevant to the embodiments of this application are shown in the accompanying drawings, not the entire structure.
[0030] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0031] The audio and video playback method provided in this application embodiment can be applied to clients, such as smartphones, tablets, laptops, desktops, or customized terminals. Figure 1 This is a schematic diagram of an exemplary audio and video playback method provided in this application embodiment. Taking a live streaming scenario as an example, after a user clicks to enter the live streaming room through the client 10, the corresponding backend service allocates a corresponding server 20 to the client to transmit the audio and video data corresponding to the live streaming room. After receiving the audio and video data, the client 10 caches it and uses the audio and video playback mechanism set in this solution to control the audio and video playback.
[0032] Figure 2 A flowchart of an audio / video playback method provided in this application embodiment specifically includes the following steps:
[0033] Step S101: Obtain the first lost frame in the cache queue. The cache queue contains enqueued audio and video frames. The first lost frame is the first lost frame after the first frame in the cache queue.
[0034] In one embodiment, the client buffers the audio and video frames received from the server, such as by creating a buffer queue and adding the audio and video frames to the queue. Optionally, during the process of adding audio and video frames to the buffer queue, each audio and video frame is recorded with its own frame number, such as the first frame in the queue having a frame number of 1, the second audio and video frame having a frame number of 2, and so on.
[0035] In one embodiment, the first lost frame is the first lost frame after the first frame in the buffer queue, such as... Figure 3 As shown, Figure 3This is a schematic diagram of a buffer queue for caching audio and video frames provided in an embodiment of this application. Assume that the buffer queue currently buffers n audio and video frames, the frame number of the first frame in the queue is 1, and the frame number of the first lost frame is k, meaning the k-th frame is the first lost frame after the first frame in the buffer queue. Optionally, during the enqueue operation of audio and video frames in the buffer queue, if the content of the currently enqueued audio and video frame is lost, the content of that audio and video frame is empty or marked as a lost frame. The process of obtaining the first lost frame can be to sequentially traverse and query from smallest to largest frame number, and select the first lost frame determined by the query as the first lost frame.
[0036] Step S102: Determine the first playback time of the first lost frame based on the single-frame playback length of the audio and video frame.
[0037] In one embodiment, after obtaining the first lost frame, the first playback time of the first lost frame is determined. Optionally, the first playback time of the first lost frame is determined based on the single-frame playback length of the audio / video frame. For example, assuming the single-frame playback length of the audio / video frame is d, the playback time from the first frame of the queue to the first lost frame can be calculated based on the single-frame playback length d as the first playback time. Optionally, using... Figure 3 Taking the example shown, when storing audio and video frames with corresponding frame numbers sequentially in the buffer queue, the first playback time of the first lost frame can be obtained by multiplying the frame number of the first lost frame by the single-frame playback length of the audio and video frame. Taking the frame number of the first lost frame as k as an example, the first playback time is k*d. In another embodiment, the first playback time can also be obtained by sequentially adding the playback durations of each audio and video frame from the first frame of the queue to the first lost frame.
[0038] Step S103: Calculate the second playback time of the first lost frame based on the obtained network indicator parameters.
[0039] In one embodiment, a second playback time for the first lost frame is calculated based on acquired network indicator parameters. These network indicator parameters characterize the current transmission status of audio and video frames, and exemplify parameters such as network jitter, packet loss rate, and network round-trip latency. Since the first lost frame is a missing audio or video frame, if it is not received during audio / video playback, stuttering will occur. Therefore, a second playback time for the first lost frame is calculated based on the network indicator parameters; this second playback time represents the time it takes for the first lost frame to be successfully received.
[0040] Step S104: Determine the playback time of the first frame of the queue based on the first playback time and the second playback time, for audio and video playback.
[0041] In one embodiment, when controlling audio and video playback, the final decision on the playback time is made based on the first and second playback times calculated above. The playback time can be the time interval between the first frame being added to the cache queue and being rendered and played.
[0042] Optionally, if the second playback time is greater than or equal to the first playback time, the difference between the second playback time and the first playback time is determined as the playback time of the first frame in the queue. For example, assuming the first playback time is T1 and the second playback time is T2, if T2 is greater than or equal to T1, the playback time = T2 - T1. In this case, determining the difference between the second playback time and the first playback time as the playback time of the first frame in the queue means that when the first frame in the queue is played after a delay corresponding to this difference (i.e., the determined playback time), it has been correctly received by the time the first lost frame is played, thus achieving frameless audio and video playback.
[0043] Optionally, if the second playback time is less than the first playback time, the second playback time is determined as the playback time of the first frame in the queue. In this case, when the second playback time is less than the first playback time, it means that the first lost frame can be received in time. At this time, using the second playback time as the playback time of the first frame in the queue for audio and video playback can ensure that the first lost frame can be received before playback, thus preventing frame loss while improving the first playback time.
[0044] As described above, by obtaining the first lost frame from the cache queue, the first playback time of the first lost frame is determined based on the single-frame playback length of the audio / video frame. The cache queue contains queued audio / video frames, and the first lost frame is the first lost frame after the first frame in the cache queue. The second playback time of this first lost frame is calculated based on obtained network metrics. Finally, the playback time of the first frame in the queue is determined based on both the first and second playback times for audio / video playback. This audio / video playback mechanism, by introducing the first lost frame, calculating the first playback time from the first frame in the queue based on the single-frame playback length of the audio / video frame, and calculating the second playback time based on obtained network metrics, ultimately determines the playback time of the first frame in the queue. This approach considers the impact of network conditions on audio / video playback stuttering, optimizes the audio / video playback mechanism, and improves the initial playback time.
[0045] Figure 4 The flowchart of another audio / video playback method provided in the embodiments of this application gives a specific process for determining the second playback time, such as... Figure 4 As shown, it specifically includes:
[0046] Step S201: Obtain the first lost frame in the cache queue. The cache queue contains enqueued audio and video frames. The first lost frame is the first lost frame after the first frame in the cache queue.
[0047] Step S202: Determine the first playback time of the first lost frame based on the single-frame playback length of the audio and video frame.
[0048] Step S203: Calculate the retransmission time and jitter time of the first lost frame based on the obtained network index parameters, and determine the larger value of the retransmission time and the jitter time as the second playback time.
[0049] In one embodiment, the second playback time is determined based on the calculated retransmission time and jitter time of the first lost frame. Considering that the loss of the first lost frame could be due to delayed reception caused by network jitter or packet loss, the receiving time of the first lost frame for each of these two scenarios is calculated separately. These are the retransmission time and the jitter time, respectively. Since the actual cause of the first lost frame cannot be determined, the larger value between the retransmission time and the jitter time is determined as the second playback time.
[0050] Optionally, in calculating retransmission time and jitter time, the retransmission time is calculated based on the network round-trip time and data packet loss rate obtained from the network indicator parameters. The jitter time is determined using the network jitter value obtained from the network indicator parameters.
[0051] Optionally, when calculating the retransmission time of the first lost frame, the retransmission time is calculated based on the network round-trip time, data packet loss rate, and a determined target packet loss rate. The network round-trip time and data packet loss rate can be obtained through signaling probing. Optionally, after establishing a network connection with the server, the client can send a signaling probing command to the connected server to determine the network round-trip time, data packet loss rate, and network jitter value. For example, the network round-trip time is denoted as r, the data packet loss rate as l, and the network jitter value as j. The target packet loss rate can be the calculated percentage of the first lost frame's position in the current buffer queue. For example, if the first lost frame is the k-th frame, the calculated target packet loss rate is p = 1 / k. Optionally, the formula for calculating the retransmission time can be:
[0052] r*(log(p) / log(l))
[0053] When determining the jitter time, the network jitter value is determined as the jitter time of the first lost frame, i.e., j.
[0054] At this point, when finally determining the second playback time, the larger value between the retransmission time and the jitter time is selected, and max(j,r*(log(p) / log(l))) is determined as the second playback time.
[0055] Step S204: Determine the playback time of the first frame of the queue based on the first playback time and the second playback time, for audio and video playback.
[0056] As described above, by acquiring the first lost frame from the buffer queue, the first playback time of the first lost frame is determined based on the single-frame playback length of the audio and video frames. The buffer queue contains queued audio and video frames, and the first lost frame is the first lost frame after the first frame in the buffer queue. The second playback time of the first lost frame is calculated based on acquired network metrics. Finally, the playback time of the first frame in the queue is determined based on both the first and second playback times, and used for audio and video playback. This audio and video playback mechanism, by introducing the first lost frame, calculating the first playback time from the first frame in the queue based on the single-frame playback length of the audio and video frames, and calculating the second playback time based on acquired network metrics, ultimately determines the playback time of the first frame in the queue. This takes into account the impact of network conditions on audio and video playback stuttering, optimizes the audio and video playback mechanism, and improves the first playback time. Specifically, when considering the impact of network conditions on audio and video playback stuttering, the retransmission time and jitter time of the lost frame are calculated separately to reasonably predict its successful reception time, which is then used to determine the playback time, ensuring timely playback while avoiding stuttering.
[0057] Figure 5 A flowchart of another audio / video playback method provided in the embodiments of this application is shown below. Figure 5 As shown, it specifically includes:
[0058] Step S301: Receive audio and video data sent by the first server. The first server has pre-cached the audio and video data sent by the second server. The audio and video data in the second server is uploaded by the second client.
[0059] In one embodiment, the client currently executing the audio / video playback method is denoted as the first client, which, for example, could be a device used by a user. Taking a user using the first client to watch a live stream as an example, the second client could be a device used by the live stream host, which transmits the audio / video data to the second server. After the first client opens the live stream, when the signaling server assigns the first server to the first client for audio / video data acquisition, the second server transmits the received audio / video data from the second client to the first server. During the transmission, cached data is also transmitted to the first server so that the first client can acquire the audio / video data more quickly and promptly.
[0060] Step S302: Obtain the first lost frame in the cache queue. The cache queue contains enqueued audio and video frames. The first lost frame is the first lost frame after the first frame in the cache queue.
[0061] Step S303: Determine the first playback time of the first lost frame based on the single-frame playback length of the audio and video frame.
[0062] Step S304: Calculate the second playback time of the first lost frame based on the obtained network indicator parameters.
[0063] Step S305: Determine the playback time of the first frame of the queue based on the first playback time and the second playback time, for audio and video playback.
[0064] As described above, by acquiring the first lost frame from the cache queue, the first playback time of the first lost frame is determined based on the single-frame playback length of the audio / video frame. The cache queue contains queued audio / video frames, and the first lost frame is the first lost frame after the first frame in the cache queue. The second playback time of the first lost frame is calculated based on acquired network metrics. Finally, the playback time of the first frame in the queue is determined based on both the first and second playback times for audio / video playback. This audio / video playback mechanism, by introducing the first lost frame, calculating the first playback time from the first frame in the queue based on the single-frame playback length of the audio / video frame, and calculating the second playback time based on acquired network metrics, ultimately determines the playback time of the first frame in the queue. This takes into account the impact of network conditions on audio / video playback stuttering, optimizes the audio / video playback mechanism, and improves the initial playback time. Specifically, during audio / video transmission, for cases involving cross-server acquisition of audio / video data, the server currently connected to receives audio / video data from other servers, including cached data. This significantly improves the speed at which the current client acquires audio / video files and increases the initial playback time.
[0065] Based on the above technical solution, before calculating the second playback time of the first lost frame according to the acquired network indicator parameters, the audio and video playback method further includes: obtaining network indicator parameters through signaling detection when a connection is established with the first server; or, reading the historical network indicator parameters corresponding to the first server. Wherein, if the network indicator parameters of the same server are already recorded when determining the network indicator parameters, the historical network indicator parameters are used as the current network indicator parameters to improve the efficiency of determining the network indicator parameters.
[0066] Figure 6 This is a structural block diagram of an audio / video playback device provided in an embodiment of this application. The device is used to execute the audio / video playback method provided in the above embodiments, and has corresponding functional modules and beneficial effects for executing the method. For example... Figure 6 As shown, the device specifically includes: a lost frame acquisition module 101, a first time determination module 102, a second time determination module 103, and a playback time determination module 104, wherein,
[0067] The lost frame acquisition module 101 is configured to acquire the first lost frame in the cache queue, wherein the cache queue caches enqueued audio and video frames, and the first lost frame is the first lost frame after the first frame in the cache queue.
[0068] The first-time determination module 102 is configured to determine the first playback time of the first lost frame based on the single-frame playback length of the audio and video frames;
[0069] The second time determination module 103 is configured to calculate the second playback time of the first lost frame based on the acquired network indicator parameters.
[0070] The playback time determination module 104 is configured to determine the playback time of the first frame of the queue based on the first playback time and the second playback time, for playing audio and video.
[0071] As described above, by acquiring the first lost frame from the cache queue, the first playback time of the first lost frame is determined based on the single-frame playback length of the audio / video frame. The cache queue contains queued audio / video frames, and the first lost frame is the first lost frame after the first frame in the cache queue. The second playback time of this first lost frame is calculated based on acquired network metrics. Finally, the playback time of the first frame in the queue is determined based on both the first and second playback times for audio / video playback. This audio / video playback mechanism, by introducing the first lost frame, calculating the first playback time from the first frame in the queue based on the single-frame playback length of the audio / video frame, and calculating the second playback time based on acquired network metrics, ultimately determines the playback time of the first frame in the queue. This approach considers the impact of network conditions on audio / video playback stuttering, optimizes the audio / video playback mechanism, and improves the initial playback time.
[0072] In one possible embodiment, the first time determination module 102 is configured as follows:
[0073] The first playback time of the first lost frame is obtained by multiplying the frame number of the first lost frame by the single-frame playback length of the audio and video frame.
[0074] In one possible embodiment, the second time determination module 103 is configured as follows:
[0075] The retransmission time and jitter time of the first lost frame are calculated based on the obtained network indicator parameters.
[0076] The larger of the retransmission time and the jitter time is determined as the second playback time.
[0077] In one possible embodiment, determining the network indicator parameters based on the single-frame playback length of the audio and video frames includes network jitter value, data packet loss rate, and network round-trip latency. The second time determination module 103 is configured as follows:
[0078] The retransmission time of the first lost frame is calculated based on the network round-trip time, the data packet loss rate, and the determined target packet loss rate.
[0079] The network jitter value is determined as the jitter time of the first lost frame.
[0080] In one possible embodiment, the playback time determination module 104 is configured as follows:
[0081] If the second playback time is greater than or equal to the first playback time, the difference between the second playback time and the first playback time is determined as the playback time of the first frame of the queue.
[0082] If the second playback time is less than the first playback time, the second playback time is determined as the playback time of the first frame of the queue.
[0083] In one possible embodiment, the device further includes a data receiving module configured to:
[0084] Before determining the first lost frame in the cache queue based on the single-frame playback length of the audio and video frame, the audio and video data sent by the first server is received. The first server has pre-cached the audio and video data sent by the second server, and the audio and video data in the second server is uploaded by the second client.
[0085] In one possible embodiment, the device further includes a network metric determination module configured to:
[0086] The method of determining the playback length of a single frame based on the audio and video frames, before calculating the second playback time of the first lost frame based on the acquired network indicator parameters, involves obtaining the network indicator parameters through signaling detection while establishing a connection with the first server; or, reading the network indicator parameters corresponding to the first server from historical records.
[0087] Figure 7 This is a schematic diagram of the structure of an audio / video playback device provided in an embodiment of this application, as shown below. Figure 7 As shown, the device includes a processor 201, a memory 202, an input device 203, and an output device 204; the number of processors 201 in the device can be one or more. Figure 7 Taking a processor 201 as an example; the processor 201, memory 202, input device 203, and output device 204 in the device can be connected via a bus or other means. Figure 7 Taking a bus connection as an example, the memory 202, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the audio and video playback method in this embodiment. The processor 201 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 302, thereby realizing the aforementioned audio and video playback method. The input device 203 can be used to receive input digital or character information and generate key signal inputs related to user settings and function control of the device. The output device 204 may include a display device such as a screen.
[0088] This application also provides a non-volatile storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform an audio / video playback method described in the above embodiments, comprising:
[0089] Obtain the first lost frame in the cache queue, wherein the cache queue contains enqueued audio and video frames, and the first lost frame is the first lost frame after the first frame in the cache queue.
[0090] The first playback time of the first lost frame is determined based on the single-frame playback length of the audio and video frames;
[0091] The second playback time of the first lost frame is calculated based on the obtained network indicator parameters;
[0092] The playback time of the first frame of the queue is determined based on the first playback time and the second playback time, and is used for audio and video playback.
[0093] It is worth noting that in the above-described embodiments of the audio and video playback device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the protection scope of the embodiments of this application.
[0094] In some possible implementations, various aspects of the methods provided in this application can also be implemented as a program product comprising program code that, when run on a computer device, causes the computer device to perform the steps of the methods according to the various exemplary embodiments of this application described above. For example, the computer device can execute the audio / video playback method described in the embodiments of this application. The program product can be implemented using any combination of one or more readable media.
Claims
1. An audio and video playing method, applied to a first client, characterized in that, include: Obtain the first lost frame in the cache queue, wherein the cache queue contains enqueued audio and video frames, and the first lost frame is the first lost frame after the first frame in the cache queue. The first playback time of the first lost frame is determined based on the single-frame playback length of the audio and video frames; The second playback time of the first lost frame is calculated based on the obtained network indicator parameters. The second playback time represents the time when the first lost frame was successfully received. If the second playback time is less than the first playback time, the second playback time is determined as the playback time of the first frame of the queue, and used for audio and video playback.
2. The audio-video play method according to claim 1, wherein, Determining the first playback time of the first lost frame based on the single-frame playback length of the audio and video frames includes: The first playback time of the first lost frame is obtained by multiplying the frame number of the first lost frame by the single-frame playback length of the audio and video frame.
3. The audio-video play method according to claim 1, wherein, The step of calculating the second playback time of the first lost frame based on the acquired network indicator parameters includes: The retransmission time and jitter time of the first lost frame are calculated based on the obtained network indicator parameters. The larger of the retransmission time and the jitter time is determined as the second playback time.
4. The audio-video play method according to claim 3, wherein, The network metrics parameters include network jitter value, data packet loss rate, and network round-trip time. The calculation of the retransmission time and jitter time of the first lost frame based on the acquired network metrics parameters includes: The retransmission time of the first lost frame is calculated based on the network round-trip time, the data packet loss rate, and the determined target packet loss rate. The network jitter value is determined as the jitter time of the first lost frame.
5. The audio-video play method according to any one of claims 1-4, characterized in that, After calculating the second playback time of the first lost frame based on the acquired network indicator parameters, the method further includes: If the second playback time is greater than or equal to the first playback time, the difference between the second playback time and the first playback time is determined as the playback time of the first frame of the queue.
6. The audio-video play method according to any one of claims 1-4, characterized in that, Before retrieving the first lost frame from the buffer queue, the audio / video playback method further includes: The system receives audio and video data sent by a first server, which has pre-cached the audio and video data sent by a second server. The audio and video data in the second server is uploaded by the second client.
7. The audio / video play method according to claim 6, wherein, Before calculating the second playback time of the first lost frame based on the acquired network indicator parameters, the audio and video playback method further includes: If a connection is established with the first server, network indicator parameters are obtained through signaling probing; or, historical network indicator parameters corresponding to the first server are read.
8. An audio-video playback device, characterized by include: The lost frame acquisition module is configured to acquire the first lost frame in the cache queue, wherein the cache queue caches enqueued audio and video frames, and the first lost frame is the first lost frame after the first frame in the cache queue. The first-time determination module is configured to determine the first playback time of the first lost frame based on the single-frame playback length of the audio and video frames; The second time determination module is configured to calculate the second playback time of the first lost frame based on the acquired network indicator parameters, wherein the second playback time represents the time when the first lost frame was successfully received. The playback time determination module is configured to determine the second playback time as the playback time of the first frame of the queue when the second playback time is less than the first playback time, for the purpose of playing audio and video.
9. An audio-video playback device, the device comprising: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the audio / video playback method according to any one of claims 1-7.
10. A non-volatile storage medium storing computer-executable instructions, which, when executed by a computer processor, are used to perform the audio / video playback method according to any one of claims 1-7.
11. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the audio and video playback method according to any one of claims 1-7.
Citation Information
Patent Citations
Client terminal implementing method for real time monitoring video
CN101510999A
RTP packet loss retransmission method and device and playing terminal
CN114584845A