Dynamic adjustment method for virtual audio and video buffer, and corresponding storage medium
By obtaining the standard video frame latency and audio frame latency of the video frame and adjusting the number of video frame buffers, the problem of inconsistent virtual audio and video synchronization was solved, thus improving the user experience.
Patent Information
- Application Number
- PCT/CN2024/116623
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-25
- Filing Date
- 2024-09-03
- Publication Date
- 2026-01-02
AI Technical Summary
In existing technologies, the consistency of virtual audio and video synchronization is poor, resulting in a poor user experience.
By acquiring the standard video frame delay of the video frame, the standard audio frame delay is determined, and the video frame delay is adjusted according to the current number of video frame buffers and the preset frame rate to achieve audio and video consistency.
It improves the synchronization consistency of virtual audio and video, thus enhancing the user experience.
Smart Images

Figure CN2024116623_02012026_PF_FP_ABST
Abstract
Description
Virtual audio and video buffer dynamic adjustment method and corresponding storage medium TECHNICAL FIELD
[0001] The present application relates to the technical field of information transmission, and in particular to a virtual audio and video buffer dynamic adjustment method and a storage medium. BACKGROUND
[0002] The video and audio of a webcam come from different units. Real-time video comes from a camera lens, and real-time audio comes from a PC audio. After the real-time video is acquired by the camera lens, it is buffered, encoded, and transmitted, and then provided to a PC decoder through a USB interface. The PC decoder decodes the video and adds it to a video buffer queue. Finally, the video is output to a virtual camera video driver, which provides the video to a third-party application (such as a video conference). Real-time audio comes from a microphone of the PC. After the microphone acquires the sound, it is added to an audio buffer, and then provided to a virtual sound card driver, which provides the audio to a third-party application (such as a video conference). In actual applications, the higher the consistency of audio-video synchronization, the more beneficial it is to the application of a speaker video, and the more helpful it is to improve the quality of service and user satisfaction.
[0003] The PC clock and the camera clock are not consistent, so a certain buffer needs to be introduced, and synchronization needs to be performed regularly. The audio and video are synchronized through a synchronization algorithm. In addition, the sensitivity of the human ear to sound is much higher than the sensitivity of the video. The audio output needs to be stable and cannot have obvious fluctuations, otherwise the sound will sound strange. Therefore, after the audio buffer is determined, the video frames are processed, thereby improving the consistency of audio-video synchronization. Therefore, how to improve the consistency of virtual audio and video has become a technical problem to be solved. TECHNICAL PROBLEM
[0004] The present application provides a virtual audio and video buffer dynamic adjustment method and a storage medium to improve the consistency of virtual audio and video.
[0005] In a first aspect, the present application provides a virtual audio and video buffer dynamic adjustment method, which comprises:
[0006] determining a set of calibration video frames in the video frame, and determining a standard video frame delay based on the video frame buffer quantity of each calibration video frame in the set of calibration video frames;
[0007] acquiring a standard video frame delay of the video frame, and determining a standard audio frame delay according to the standard video frame delay;
[0008] determining a current video frame delay based on the current video frame buffer quantity and a preset frame rate;
[0009] determine a corresponding standard video frame buffer quantity based on the standard audio frame delay;
[0010] in a case where the current video frame delay is greater than a delay maximum value, perform frame extraction processing on the current video frame buffer quantity based on the standard video frame buffer quantity, so that an adjusted current video frame delay is within the error range;
[0011] in a case where the current video frame delay is less than a delay minimum value, perform frame insertion adjustment on the current video frame buffer quantity based on the standard video frame buffer quantity, so that an adjusted current video frame delay is within the error range.
[0012] In a second aspect, the present application further provides a virtual audio and video buffer dynamic adjustment method, the method comprising:
[0013] determine a standard audio frame delay according to the standard video frame delay;
[0014] determine a current video frame delay based on a current video frame buffer quantity and a preset frame rate;
[0015] in a case where the current video frame delay is not within an error range of the standard video frame delay, adjust the current video frame delay based on the standard audio frame delay.
[0016] In a third aspect, the present application further provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executed by a processor to cause the processor to implement the virtual audio and video buffer dynamic adjustment method as described above.
[0017] The present application discloses a virtual audio and video buffer dynamic adjustment method and a storage medium, the virtual audio and video buffer dynamic adjustment method comprising: determining a standard audio frame delay according to a standard video frame delay of a video picture; determining a current video frame delay based on a current video frame buffer quantity and a preset frame rate; and in a case where the current video frame delay is not within an error range of the standard video frame delay, adjusting the current video frame delay based on the standard audio frame delay. In this way, the present application determines a standard audio frame delay based on a standard video frame delay, and in a case where the standard audio frame delay is determined, adjusts a current video frame buffer quantity in real time based on an error between a current video frame delay and the standard video frame delay, and based on the standard audio frame delay, thereby improving the consistency of virtual audio and video. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort.
[0019] Fig. 1 is a schematic flow chart of a virtual audio and video buffer dynamic adjustment method according to an embodiment of the present application;
[0020] Fig. 2 is a structural schematic block diagram of a computer device according to an embodiment of the present application. Best mode of the present application
[0021] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative effort are within the scope of protection of the present application.
[0022] The flow chart shown in the drawings is only an example, and it is not necessary to include all the contents and operations / steps, and it is not necessary to execute in the described order. For example, some operations / steps can be decomposed, combined or partially merged, so the actual execution order can be changed according to the actual situation.
[0023] It should be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clearly indicated by the context, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0024] It should also be understood that the term "and / or" used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0025] The embodiments of the present application provide a virtual audio and video buffer dynamic adjustment method and a storage medium. The virtual audio and video buffer dynamic adjustment method can be applied to a server. The standard audio frame delay is determined by the standard video frame delay. In the case of determining the standard audio frame delay, the current video frame buffer quantity is adjusted in real time according to the error between the current video frame delay and the standard video frame delay and based on the standard audio frame delay, thereby improving the consistency of the audio and video. The server can be an independent server or a server cluster.
[0026] Some embodiments of the present application will be described in detail with reference to the drawings. The following embodiments and features can be combined with each other in the case of no conflict.
[0027] Referring to FIG. 1, FIG. 1 is a schematic flowchart of a virtual audio and video buffer dynamic adjustment method according to an embodiment of the present application. The virtual audio and video buffer dynamic adjustment method can be applied to a server.
[0028] As shown in FIG. 1, the virtual audio and video buffer dynamic adjustment method specifically includes steps S10 to S30.
[0029] In step S10, a standard video frame delay of a video picture is obtained, and a standard audio frame delay is determined according to the standard video frame delay.
[0030] In one embodiment, since the sensitivity of human ears to sound is much higher than the sensitivity to video, the standard audio frame delay is determined first, and then the current video frame is adjusted according to the standard audio frame delay as a reference standard.
[0031] Specifically, the average value of the video frame delay of the first several frames in the video picture can be calculated, and the average value of the video frame delay is determined as the standard video frame. The audio buffer size is the average value of the video frame delay, and the delay of n (such as n = 10) video frames can be averaged. Bias is the minimum basic data of the audio buffer, and is usually a multiple of 1024. The specific calculation formula is:
[0032] Audio frame delay = video frame delay average + Bias.
[0033] The average value of the video frame delay can be set by the user's demand, for example, according to the length of the video, to determine the average value of the video frame delay calculated from several video frames.
[0034] In step S20, the current video frame delay is determined based on the current video frame buffer quantity and the preset frame rate.
[0035] Specifically, the current video frame delay can be determined by the current video frame buffer quantity, which can be realized by the following method:
[0036] The frame rate corresponding to the current video frame buffer quantity is obtained, and the current video frame delay can be determined according to the ratio of the number of the current video frame buffer quantity to the frame rate. For example, the current frame rate is 25 FPS, that is, 25 video frames are buffered in 1 second, and the time corresponding to each video frame is 40 ms. If the current video frame buffer quantity is 250 frames, according to the product of 40 ms and 250 frames, it can be known that the current video frame delay is 10 seconds when the current video frame buffer quantity is 250 frames.
[0037] Step S30, in the case that the current video frame delay is not in the error range of the standard video frame delay, adjusting the current video frame delay based on the standard audio frame delay.
[0038] Specifically, adjusting the current video frame delay based on the standard audio frame delay includes two ways.
[0039] The first way is that in the case that the current video frame delay exceeds the maximum error of the standard video frame delay, that is, the number of current video frame buffer is large, the frame extraction way can be selected to make the current video frame delay fall within the error range of the standard video frame delay. The frame extraction way is specifically to extract all the current buffer picture frames, for example, there are 300 picture frames, and 25 picture frames need to be discarded to achieve 250 picture frames, then 25 / 300=8.333, that is, one picture can be discarded every 8-9 frames to ensure the continuity of the remaining picture playback.
[0040] The second way is that in the case that the current video frame delay is less than the minimum error of the standard video frame delay, that is, the number of current video frame buffer is small, part of the video frames can be copied (the picture display effect is that the picture appears to stop) or the current n video frames can be inserted (the picture display effect is that the picture display speed slows down) to make the current video frame delay fall within the error range of the standard video frame delay.
[0041] The embodiment discloses a virtual audio and video cache dynamic adjustment method and a storage medium. The virtual audio and video cache dynamic adjustment method comprises the following steps: acquiring a standard video frame delay of a video picture, determining a standard audio frame delay according to the standard video frame delay; determining a current video frame delay based on a current video frame buffer quantity and a preset frame rate; and adjusting the current video frame delay based on the standard audio frame delay in the case that the current video frame delay is not in the error range of the standard video frame delay. Through the above manner, the standard audio frame delay is determined based on the standard video frame delay, and in the case that the standard audio frame delay is determined, the current video frame buffer quantity is adjusted in real time according to the error between the current video frame delay and the standard video frame delay and based on the standard audio frame delay, thereby improving the consistency of the virtual audio and video.
[0042] Based on the embodiment shown in FIG. 1, in the embodiment, step S30 comprises:
[0043] determining a corresponding standard video frame buffer quantity based on the standard audio frame delay;
[0044] adjusting the current video frame buffer quantity based on the standard video frame buffer quantity according to the relationship between the current video frame delay and the error range, so that the current video frame delay is within the error range.
[0045] Specifically, since the standard audio frame delay is set to be equal to the standard video frame delay, the standard video frame buffer quantity can be calculated according to the standard video frame delay and the frame rate of the video.
[0046] The error range of the current video frame delay and the standard video frame delay can be understood as three cases, i.e., the current video frame delay exceeds the maximum value in the error range, the current video frame delay is within the error range, and the current video frame delay is less than the minimum value in the error range.
[0047] If the current video frame delay is within the error range, the video and the audio are normally synchronized. For example, it is determined in advance that the standard audio frame delay and the standard video frame delay are both 10 seconds, and the error range is set to be 10%, i.e., 1 second. If the current video frame delay is within 9-11 seconds, the video and the audio are normally synchronized.
[0048] More preferably, according to the relationship between the current video frame delay and the error range, the current video frame buffer quantity is adjusted based on the standard video frame buffer quantity, so that the current video frame delay is within the error range, including:
[0049] In the case that the current video frame delay is greater than the maximum delay value, the current video frame buffer quantity is frame-sampled based on the standard video frame buffer quantity, so that the adjusted current video frame delay is within the error range.
[0050] Specifically, in the case that the current video frame delay is greater than the maximum delay value, the current video frame buffer quantity is frame-sampled based on the standard video frame buffer quantity, so that the adjusted current video frame delay is within the error range, including:
[0051] The difference between the current video frame buffer quantity and the standard video frame buffer quantity is calculated.
[0052] The ratio of the current video frame buffer quantity and the difference is calculated.
[0053] Based on the ratio, a target frame in the current video frame buffer quantity is determined, and the target frame is deleted from the current video frame buffer quantity.
[0054] In an embodiment, taking 25fps as an example, i.e., 25 video frames are buffered per second, and each video frame corresponds to a time of 40ms. If, before this, the standard audio frame delay and the standard video frame delay are both set to be 10 seconds, then correspondingly, the standard video frame buffer quantity buffered in 10 seconds should be 250 frames, and if the current video frame buffer quantity exceeds the maximum value in the error range, the current video frame buffer quantity is maintained within the maximum error range by frame-sampling.
[0055] If the current video frame buffer quantity is 300 frames, the frame extraction is performed in the following manner:
[0056] If the standard video frame buffer quantity is 250 frames, the error is 10%, i.e. the maximum error is 275 frames, 25 frames of the 300 frames are discarded, i.e. 300-275=25. As to how to determine the 25 frames to be discarded, 300 / 25=12, i.e. one frame is extracted every 12 frames, thereby 275 frames are reserved.
[0057] More preferably, based on the relationship between the current video frame delay and the error range, the current video frame buffer quantity is adjusted based on the standard video frame buffer quantity, so that the current video frame delay is within the error range, comprising:
[0058] In the case that the current video frame delay is less than the minimum delay value, the current video frame buffer quantity is adjusted based on the standard video frame buffer quantity, so that the adjusted current video frame delay is within the error range.
[0059] Specifically, in the case that the current video frame delay is less than the minimum value within the error range, still taking 25fps as an example, i.e. 25 frames of video frames are buffered per second, and each video frame corresponds to a time of 40ms. If before this, the standard audio frame delay and the standard video frame delay are both set to 10 seconds, correspondingly, the standard video frame buffer quantity buffered within 10 seconds should be 250 frames.
[0060] If the current video frame buffer quantity is only 230 frames, 20 frames of them need to be duplicated, so that the current video frame buffer quantity reaches 250 frames, thereby ensuring the audio-video synchronization.
[0061] Based on the embodiment shown in FIG. 1, before step S10, the embodiment comprises:
[0062] determining a set of calibration video frames in the video picture, determining the standard video frame delay based on the video frame buffer quantity of each calibration video frame in the set of calibration video frames.
[0063] Further, determining a set of calibration video frames in the video picture, determining the standard video frame delay based on the video frame buffer quantity of each calibration video frame in the set of calibration video frames, comprises:
[0064] determining the first preset number of calibration video frames of the video picture as the set of calibration video frames;
[0065] obtaining the calibration video frame frame rate of each calibration video frame, and determining the original buffer quantity of each calibration video frame based on the calibration video frame frame rate.
[0066] Based on each of the original buffer quantity, determine the original single frame delay of each calibration video frame, and determine the standard video frame delay according to each of the original single frame delay.
[0067] In specific embodiments, the calibration video frame set is to select a certain number of calibration video frames from the video picture, and the original buffer quantity of each calibration video frame is determined through the original buffer quantity corresponding to each calibration video frame. The standard video frame delay is determined in real time based on the original buffer quantity of each calibration video frame in the calibration video frame set.
[0068] The standard video frame delay is set by the user, which is used to determine the standard audio frame delay.
[0069] More preferably, based on each of the original buffer quantity, determine the original single frame delay of each calibration video frame, and determine the standard video frame delay according to each of the original single frame delay, comprising:
[0070] Calculate the sum of each of the original single frame delay;
[0071] Divide the sum of each of the original single frame delay by the preset number to obtain the single frame delay average, and determine the single frame delay average as the standard video frame delay.
[0072] For example, take the first 10 frames of the video picture as the calibration video frame set, and the frame rate is 25fps. For example, when the first video frame is played, the video frame buffer quantity is 250 frames, and the current video frame delay is 10s. When the second video frame is played, the video frame buffer quantity is 225 frames (no new video data is received during the playing of the first video frame), and the current video frame delay is 9s. When the third video frame is played, the video frame buffer quantity is 275 frames (50 frames of video data are received by the video player during the playing of the second video frame), and the current video frame delay is 11s. In this way, after calculating the original single frame delay of the first 10 frames, the single frame delay average can be determined by dividing the sum of the original single frame delay by 10, and then the single frame delay average is used as the standard video frame delay.
[0073] The complete embodiment will be illustrated below.
[0074] When the user needs to synchronize the virtual audio and video, the standard video frame delay needs to be determined based on the single frame video frame delay of a number of video frames in the video picture, and then the standard audio frame delay is set to be consistent with the standard video frame delay. For example, the first 10 frames of the video picture are selected as the calibration video frame set, the original single frame delay of each video frame in the calibration video frame set is determined, and the single frame delay average of each video frame is calculated as the standard video frame delay and the standard audio frame delay.
[0075] It is easy to understand that the specific selection of the calibration video frame set in this embodiment can be determined based on the specific length of the video. If the video is long, more video frames can be selected to determine the standard video frame delay and standard audio frame delay, thereby improving the accuracy of the standard video frame delay and standard audio frame delay data.
[0076] Given that users are more sensitive to sound than video, the number of video frame buffers needs to be adjusted to ensure audio-video synchronization. The current number of video frame buffers is obtained, and the current video frame latency is determined based on this number and the frame rate. For example, assuming the standard video frame latency and standard audio frame latency are both 10 seconds, the frame rate is 25fps, and the error range is ±10%, the standard video frame buffer count corresponding to the standard video frame latency should be 10 * 25 = 250 frames. When the current video frame buffer count is 300 frames, this exceeds 250(1 + 10%) = 275 frames. Therefore, 25 frames need to be deleted. The specific 25 frames to discard can be determined by using 300 / 25 = 12, meaning one frame is extracted every 12 frames, thus retaining 275 frames and preserving video integrity as much as possible.
[0077] Correspondingly, if the current video frame buffer count is less than 225 frames [i.e., 250 * (1 - 10%) = 225], for example, only 220 frames, then the current video frame buffer count needs to be supplemented to 225 frames (i.e., the minimum value within the error range) by copying the current video frame buffer or interpolating frames.
[0078] If the current number of video frame buffers is exactly within the error range of the standard number of video frame buffers, i.e., 225-275 frames, then audio and video synchronization will be performed directly.
[0079] Please refer to Figure 2, which is a schematic block diagram of a computer device provided in an embodiment of this application. This computer device may be a server.
[0080] Referring to Figure 2, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.
[0081] Non-volatile storage media can store operating systems and computer programs. These computer programs include program instructions that, when executed, cause the processor to perform any method for dynamically adjusting virtual audio / video buffers.
[0082] The processor provides computing and control capabilities, supporting the operation of the entire computer device.
[0083] The internal storage provides an environment for running of a computer program in a nonvolatile storage medium, and the computer program, when executed by the processor, can make the processor execute any one of the virtual audio and video buffer dynamic adjustment methods.
[0084] The network interface is configured to perform network communication, such as sending the assigned task. Those skilled in the art can understand that the structure shown in FIG. 3 is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0085] The computer readable storage medium stores a computer program, and the computer program includes program instructions. The processor executes the program instructions to implement any one of the virtual audio and video buffer dynamic adjustment methods provided in the embodiments of the present application.
[0086] The computer readable storage medium can be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.
[0087] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for dynamically adjusting virtual audio and video buffers, comprising: A set of calibration video frames is determined in the video frame, and the standard video frame delay is determined based on the number of video frame buffers for each calibration video frame in the set of calibration video frames. Obtain the standard video frame delay of the video frame, and determine the standard audio frame delay based on the standard video frame delay; The current video frame delay is determined based on the current video frame buffer size and the preset frame rate. Based on the standard audio frame delay, determine the corresponding number of standard video frame buffers; If the current video frame delay is greater than the maximum delay value, the current video frame buffer quantity is adjusted based on the standard video frame buffer quantity to perform frame extraction processing so that the adjusted current video frame delay is within the error range. If the current video frame delay is less than the minimum delay value, the current video frame buffer quantity is adjusted by interpolation based on the standard video frame buffer quantity so that the adjusted current video frame delay is within the error range.
2. The method for dynamically adjusting virtual audio and video buffers according to claim 1, wherein when the current video frame delay is greater than the maximum delay value, frame extraction processing is performed on the current video frame buffer quantity based on the standard video frame buffer quantity to ensure that the adjusted current video frame delay is within the error range, comprising: Calculate the difference between the current number of video frame buffers and the standard number of video frame buffers; Calculate the ratio of the current video frame buffer count to the difference; Based on the ratio, the target frame in the current video frame buffer quantity is determined, and the target frame is deleted from the current video frame buffer quantity.
3. The method for dynamically adjusting virtual audio and video buffers according to claim 1, wherein determining a set of calibration video frames in the video frame and determining the standard video frame delay based on the number of video frame buffers for each calibration video frame in the set of calibration video frames includes: The first preset number of calibration video frames of the video image are determined as the calibration video frame set; Obtain the calibration video frame rate of each calibration video frame, and determine the original buffer quantity of each calibration video frame based on the calibration video frame rate; Based on the original number of buffers, the original single-frame delay of each calibrated video frame is determined, and the standard video frame delay is determined based on the original single-frame delay.
4. The method for dynamically adjusting virtual audio and video buffers according to claim 3, wherein determining the original single-frame delay of each calibrated video frame based on the original buffer quantity, and determining the standard video frame delay based on the original single-frame delay, includes: Calculate the sum of the original single-frame delays; Divide the sum of the original single-frame delays by the preset number to obtain the average single-frame delay, and determine the average single-frame delay as the standard video frame delay.
5. A method for dynamically adjusting virtual audio and video buffers, comprising: Obtain the standard video frame delay of the video frame, and determine the standard audio frame delay based on the standard video frame delay; The current video frame delay is determined based on the current video frame buffer size and the preset frame rate. If the current video frame delay is not within the error range of the standard video frame delay, the current video frame delay is adjusted based on the standard audio frame delay.
6. The method for dynamically adjusting virtual audio and video buffers according to claim 5, wherein adjusting the current video frame delay based on the standard audio frame delay when the current video frame delay is not within the error range of the standard video frame delay includes: Based on the standard audio frame delay, determine the corresponding number of standard video frame buffers; Based on the relationship between the current video frame delay and the error range, the current video frame buffer quantity is adjusted according to the standard video frame buffer quantity so that the current video frame delay is within the error range.
7. The method for dynamically adjusting virtual audio and video buffers according to claim 6, wherein the error range includes a maximum delay value, and the step of adjusting the current video frame buffer quantity based on the standard video frame buffer quantity according to the relationship between the current video frame delay and the error range, so that the current video frame delay is within the error range, includes: If the current video frame delay is greater than the maximum delay value, the current video frame buffer quantity is adjusted based on the standard video frame buffer quantity to perform frame extraction processing so that the adjusted current video frame delay is within the error range.
8. The method for dynamically adjusting virtual audio and video buffers according to claim 7, wherein when the current video frame delay is greater than the maximum delay value, frame extraction processing is performed on the current video frame buffer quantity based on the standard video frame buffer quantity to ensure that the adjusted current video frame delay is within the error range, comprising: Calculate the difference between the current number of video frame buffers and the standard number of video frame buffers; Calculate the ratio of the current video frame buffer count to the difference; Based on the ratio, the target frame in the current video frame buffer quantity is determined, and the target frame is deleted from the current video frame buffer quantity.
9. The method for dynamically adjusting virtual audio and video buffers according to claim 6, wherein the error range includes a minimum delay value, and the step of adjusting the current video frame buffer quantity based on the standard video frame buffer quantity according to the relationship between the current video frame delay and the error range, so that the current video frame delay is within the error range, includes: If the current video frame delay is less than the minimum delay value, the current video frame buffer quantity is adjusted by interpolation based on the standard video frame buffer quantity so that the adjusted current video frame delay is within the error range.
10. The method for dynamically adjusting virtual audio and video buffers according to claim 5, wherein before determining the standard audio frame delay based on the standard video frame delay, the method includes: A set of calibration video frames is determined in the video frame, and the standard video frame delay is determined based on the number of video frame buffers for each calibration video frame in the set of calibration video frames.
11. The method for dynamically adjusting virtual audio and video buffers according to claim 10, wherein determining a set of calibration video frames in the video frame and determining the standard video frame delay based on the number of video frame buffers for each calibration video frame in the set of calibration video frames includes: The first preset number of calibration video frames of the video image are determined as the calibration video frame set; Obtain the calibration video frame rate of each calibration video frame, and determine the original buffer quantity of each calibration video frame based on the calibration video frame rate; Based on the original number of buffers, the original single-frame delay of each calibrated video frame is determined, and the standard video frame delay is determined based on the original single-frame delay.
12. The method for dynamically adjusting virtual audio and video buffers according to claim 11, wherein determining the original single-frame delay of each calibrated video frame based on the original buffer quantity, and determining the standard video frame delay based on the original single-frame delay, comprises: Calculate the sum of the original single-frame delays; Divide the sum of the original single-frame delays by the preset number to obtain the average single-frame delay, and determine the average single-frame delay as the standard video frame delay.
13. A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to implement the virtual audio / video buffer dynamic adjustment method as described in claim 1.
Citation Information
Patent Citations
Audio-video synchronization method and system
CN111641858A
Video playing method and device, electronic equipment and storage medium
CN115942048A
Virtual audio and video cache dynamic adjustment method and device and storage medium
CN118678119A
Method and system for video processing
US20130300846A1