Video Optimization Method, Device, Medium and Equipment for a Set-Top Box

By caching and adjusting the playback rate, the user experience problem caused by the out-of-synchronization of audio and video is solved, and the audio and video synchronization of set-top box videos is realized, which improves the user viewing experience.

CN119893225BActive Publication Date: 2025-07-18SICHUAN TIANYI COMHEART TELECOM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510380083.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-18
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

The audio and video synchronization methods of video in the prior art lead to a decrease in user experience, and may cause stuck, skipped frame playback and black screen, affecting the user's viewing experience.

Method used

Responding to the audio and video synchronization command initiated by the user, cache the current frame video data, adjust the playback rate to synchronize the picture and audio, and switch back to the live video during synchronization to ensure the integrity and smoothness of video playback.

Benefits of technology

It realizes the gradual synchronization of audio and video without interrupting video playback, improving the user's viewing experience and ensuring the integrity and smoothness of video playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119893225B_ABST
    Figure CN119893225B_ABST
Patent Text Reader

Abstract

The present application discloses a video optimization method, device, medium and equipment for a set-top box, which relates to the technical field of video processing and aims to solve the problem that the audio-visual synchronization means for videos in the prior art will reduce the user experience. When the user's viewing effect deteriorates due to audio-visual asynchronization while watching a video, the present application allows the user to independently initiate a synchronization command. After initiating the command, the subsequent live video is cached, and then the cached data is played instead of the live video to ensure the integrity of the user's viewing. During the process of playing the cached video, the lagging party in the picture and audio is made to increase the playback rate, so that the audio and video are gradually synchronized without interruption or stuttering, and the live video is switched back with the time point at which synchronization occurs as a marker, making the time stamps of the currently played picture and audio of the live video synchronized, realizing the audio-visual synchronization of the set-top box video and effectively enhancing the user's viewing experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of video processing, and particularly relates to a video optimization method, device, medium and equipment for a set-top box. Background Technique

[0002] A set-top box, full name Digital Video Converter Box (abbreviated as STB), is a device that connects a television to an external signal source. It can receive digital TV signals from cable, satellite antenna, broadband network, and terrestrial broadcast, and convert them into a format suitable for playing on a television. Through the set-top box, users can watch high-definition and 4K ultra-high-definition TV programs, enjoying a more delicate picture and shocking sound effects.

[0003] When watching a program video, there may be a problem of audio-visual asynchronization of the video, with an obvious time difference between the picture and the sound, resulting in a poor user experience. The currently commonly used solution is to appropriately set a delay time for the video stream (picture) or the audio stream, and wait for the timestamps of the two to match and synchronize before playing. However, this method may cause phenomena such as stuttering, frame skipping, and black screen in the video program, resulting in the interruption of the user's video viewing and incomplete viewing of the video, reducing the user's experience. Summary of the Invention

[0004] The main purpose of this application is to provide a video optimization method, device, medium and equipment for a set-top box, aiming to solve the problem that the existing audio-visual synchronization means for videos will reduce the user experience.

[0005] To achieve the above object, the technical solutions adopted in the embodiments of this application are as follows:

[0006] In a first aspect, an embodiment of this application provides a video optimization method for a set-top box, including the following steps:

[0007] In response to an audio-visual synchronization instruction initiated by the user, cache the live video after the current frame video to obtain cached video data; wherein, the cached video data includes cached picture data and cached audio data;

[0008] Determine the data with a lag in playback among the cached picture data and the cached audio data as the data to be synchronized;

[0009] Adjust the playback rate of the data to be synchronized, and play the cached video data instead of the live video until the cached picture data and the cached audio data are synchronized to obtain the time point at synchronization;

[0010] At the time point of synchronization, switch the playback back to the live video and clear the cached video data.

[0011] In a possible implementation of the first aspect, before adjusting the playback rate of the data to be synchronized, the method further includes:

[0012] Obtaining the number of delayed frames according to the cached video data and the cached audio data;

[0013] Determining the size of the playback rate of the data to be synchronized according to the size of the number of delayed frames.

[0014] In a possible implementation of the first aspect, after obtaining the time point at synchronization, the method further includes:

[0015] Determining the number of transition frames according to the size of the number of delayed frames;

[0016] Postponing the time point at synchronization according to the number of transition frames to obtain the target time point;

[0017] Playing the cached video data at the normal playback rate between the time point at synchronization and the target time point;

[0018] Switching the playback back to the live video at the time point at synchronization and clearing the cached video data, including:

[0019] Switching the playback back to the live video at the target time point and clearing the cached video data.

[0020] In a possible implementation of the first aspect, playing the cached video data at the normal playback rate between the time point at synchronization and the target time point includes:

[0021] Playing the cached video data at the normal playback rate between the time point at synchronization and the target time point, and adjusting the color parameters of the cached video data to be consistent with the live video based on color correction.

[0022] In a possible implementation of the first aspect, adjusting the color parameters of the cached video data to be consistent with the live video based on color correction includes:

[0023] Adjusting the color parameters of the cached video data based on color correction so that the color parameters of the cached video data change step by step starting from the time point until they change to be consistent with the live video at the target time point.

[0024] In a possible implementation of the first aspect, adjusting the playback rate of the data to be synchronized and playing the cached video data instead of the live video until the cached video data and the cached audio data are synchronized to obtain the time point at synchronization includes:

[0025] Adjust the playback rate of the data to be synchronized, and play the cached video data instead of the live video until the timestamp difference between the cached video data and the cached audio data in the currently played cached video data is within the threshold range, confirm that the cached video data and the cached audio data are synchronized, and obtain the time point at synchronization.

[0026] In a possible implementation manner of the first aspect, before adjusting the playback rate of the data to be synchronized and playing the cached video data instead of the live video, the method further includes:

[0027] Set a filtering window;

[0028] Adjust the playback rate of the data to be synchronized and play the cached video data instead of the live video, including:

[0029] Adjust the playback rate of the data to be synchronized and play the cached video data that has been processed by the filtering window instead of the live video.

[0030] In a second aspect, an embodiment of the present application provides a video optimization device for a set-top box, including:

[0031] A caching module, which is used to cache the live video after the current frame video in response to the audio-visual synchronization instruction initiated by the user, and obtain the cached video data; wherein, the cached video data includes cached video data and cached audio data;

[0032] A determination module, which is used to determine that the data with a playback lag in the cached video data and the cached audio data is the data to be synchronized;

[0033] A synchronization module, which is used to adjust the playback rate of the data to be synchronized, and play the cached video data instead of the live video until the cached video data and the cached audio data are synchronized, and obtain the time point at synchronization;

[0034] A switching module, which is used to switch the playback back to the live video at the time point of synchronization and clear the cached video data.

[0035] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, storing a computer program, which when loaded and executed by a processor, implements the video optimization method for a set-top box provided in any one of the above first aspects.

[0036] In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein,

[0037] The memory is used to store a computer program;

[0038] The processor is used to load and execute the computer program so that the electronic device executes the video optimization method for a set-top box provided in any one of the above first aspects.

[0039] Compared with the prior art, the beneficial effects of the present application are as follows:

[0040] A video optimization method, device, medium and equipment for a set-top box provided by an embodiment of the present application. The method includes: in response to an audio-visual synchronization instruction initiated by a user, caching the live video after the current frame video to obtain cached video data; wherein the cached video data includes cached picture data and cached audio data; determining, among the cached picture data and the cached audio data, the data with a playback lag as the data to be synchronized; adjusting the playback rate of the data to be synchronized, and playing the cached video data instead of the live video until the cached picture data and the cached audio data are synchronized to obtain the time point at synchronization; switching the playback back to the live video at the time point at synchronization, and clearing the cached video data. When the user's viewing effect deteriorates due to audio-visual asynchronization when watching a video, the present application allows the user to independently initiate a synchronization instruction. After initiating the instruction, the subsequent live video is cached, and then the cached data is played instead of the live video to ensure the integrity of the user's viewing. During the process of playing the cached video, the lagging party between the picture and the audio is accelerated in playback rate, and the audio and video are gradually synchronized without interruption or stuttering, and the time point at synchronization is used as a marker to switch back to the live video, so that the time stamps of the current played picture and audio of the live video are synchronized, realizing the audio-visual synchronization of the set-top box video and effectively enhancing the user's viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a schematic structural diagram of an electronic device for the hardware operating environment involved in an embodiment of the present application;

[0042] Figure 2 It is a schematic flowchart of the video optimization method for a set-top box provided by an embodiment of the present application;

[0043] Figure 3 It is a schematic module diagram of the video optimization device for a set-top box provided by an embodiment of the present application;

[0044] Reference numerals in the figure: 101 - processor, 102 - communication bus, 103 - network interface, 104 - user interface, 105 - memory. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0046] Refer to the attached Figure 1 attachment Figure 1Schematic diagram of the electronic device structure of the hardware operating environment involved in the solution of the embodiment of the present application. The electronic device may include: a processor 101, such as a central processing unit (CPU), a communication bus 102, a user interface 104, a network interface 103, and a memory 105. Among them, the communication bus 102 is used to realize the connection and communication between these components. The user interface 104 may include a display screen (Display) and an input unit such as a keyboard (Keyboard). Optionally, the user interface 104 may further include a standard wired interface and a wireless interface. The network interface 103 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WI-FI) interface). The memory 105 may optionally be a storage device independent of the foregoing processor 101. The memory 105 may be a high-speed random access memory (Random Access Memory, RAM) or a stable non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory; the processor 101 may be a general-purpose processor, including a central processor, a network processor, etc., or may be a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0047] Those skilled in the art can understand that the structure shown in the appendix Figure 1 does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0048] As shown in the appendix Figure 1 The memory 105, as a storage medium, may include an operating system, a network communication module, a user interface module, and a video optimization device for a set-top box.

[0049] In the electronic device shown in the appendix Figure 1 the network interface 103 is mainly used for data communication with a network server; the user interface 104 is mainly used for data interaction with a user; the processor 101 and the memory 105 in the present application may be arranged in the electronic device. The electronic device calls the video optimization device for the set-top box stored in the memory 105 through the processor 101 and executes the video optimization method for the set-top box provided in the embodiment of the present application.

[0050] Referring to the appendix Figure 2 Based on the hardware device of the foregoing embodiment, an embodiment of the present application provides a video optimization method for a set-top box, including the following steps:

[0051] S10: In response to the audio-visual synchronization instruction initiated by the user, cache the live video after the current video frame to obtain cached video data; wherein, the cached video data includes cached video frame data and cached audio data.

[0052] In the specific implementation process, when the user is watching a TV program and finds that the audio and video are out of sync, they can trigger an audio-visual synchronization instruction by pressing a button on the set-top box or remote control. A storage module can be set in the set-top box to cache the video. The video frame at the time when the synchronization instruction is initiated is regarded as the current frame, and the subsequent live video starts to be cached, which is the cached video data. The problem of audio-visual out-of-sync lies in the out-of-sync between the video stream (video frame) and the audio stream. Therefore, the cached video data is also divided into video frame data and audio data for processing. Since the live video is played step by step, and in this application, after caching the data and processing it, it will be immediately replaced for playing. Therefore, there will be no pressure on caching a large amount of video data, nor will there be a lag during audio-visual synchronization due to insufficient data processing capabilities.

[0053] S20: Determine the data with a later playback among the cached video frame data and the cached audio data as the data to be synchronized.

[0054] In the specific implementation process, audio-visual out-of-sync means that there is an obvious time difference between the video frame and the sound when watching a video. If the playback of the video is decomposed into the playback of the video frame and the audio, then simply put, audio-visual out-of-sync is that the playback of the two is one fast and one slow. Use the data with a later playback as the data to be synchronized and synchronize it to the other data.

[0055] S30: Adjust the playback rate of the data to be synchronized, and play the cached video data instead of the live video until the cached video frame data and the cached audio data are synchronized to obtain the time point of synchronization.

[0056] In the specific implementation process, for the data with a later playback, adjust its playback rate, which is commonly referred to as fast-forwarding the video or audio. After adjustment, to ensure the integrity of the user's viewing and not let the user wait for a long time, use the cached video data to replace the live video for playback. During this playback period, as the data to be synchronized is fast-forwarded, the time difference relative to the other data will gradually be compensated, and thus audio-visual synchronization is achieved. The time point when audio-visual synchronization is achieved is the time point of synchronization. To improve the adjustment effect, the playback rate can be controlled, that is: before adjusting the playback rate of the data to be synchronized, the method further includes:

[0057] Obtain the number of delayed video frames according to the cached video frame data and the cached audio data;

[0058] Determine the size of the playback rate of the data to be synchronized according to the size of the number of delayed video frames.

[0059] By comparing the cached video data and the cached audio data, the number of frames difference between the two at the same moment is obtained, which is recorded as the delay frames. The delay frames are the number of frames of the lagging data that needs to be fast-forwarded to catch up with the normal playback. To make the synchronization effect better, the progress of this process is controlled by the rate. The larger the delay frames, the faster the playback rate is controlled, so that the synchronization efficiency is maintained at the same level.

[0060] In one embodiment, adjusting the playback rate of the data to be synchronized and playing the cached video data instead of the live video until the cached video data and the cached audio data are synchronized, and obtaining the time point at synchronization, includes:

[0061] Adjusting the playback rate of the data to be synchronized and playing the cached video data instead of the live video until, in the currently played cached video data, the time stamp difference between the cached video data and the cached audio data is within the threshold range, confirming that the cached video data and the cached audio data are synchronized, and obtaining the time point at synchronization.

[0062] In the specific implementation process, the adjustment of audio-visual synchronization does not necessarily mean that the time stamps are exactly the same. Due to signal delay and the time for the user to have a reaction feedback during viewing, a deviation in audio-visual synchronization within a certain range will not affect the normal viewing experience. Therefore, a threshold range can be set, and during the playback process, continuously and periodically verify the time stamp difference between the video data and the audio data of the currently played video. If the time stamp difference of a certain frame is within the threshold range, the audio-visual synchronization can be regarded as completed.

[0063] Since the cached video data is affected by the built-in modules of the set-top box to a certain extent, such as the storage module, the acquisition module, the signal transmitter, etc., the cached video may have noise. To improve the video quality, the embodiment of the present application adopts filtering processing and plays the cached video after filtering processing, that is: before adjusting the playback rate of the data to be synchronized and playing the cached video data instead of the live video, the method further includes:

[0064] Setting a filtering window;

[0065] Adjusting the playback rate of the data to be synchronized and playing the cached video data instead of the live video, includes:

[0066] Adjusting the playback rate of the data to be synchronized and playing the cached video data that has been processed by the filtering window instead of the live video.

[0067] In the specific implementation process, filtering can be achieved through a filter. In this application, since the cached video is to be played and the data will change, the method of setting a filtering window can be adopted. Let the video data pass through the filtering window first, and the filtering operation only processes the data entering the window within the window range, which also reduces the processing pressure. Since it is not clear when the synchronization is completed, this processing method can also save resources and does not require wasting resources to process the video after synchronization is completed.

[0068] S40: Switch the playback back to the live video at the time point of synchronization and clear the cached video data.

[0069] In the specific implementation process, after achieving audio-visual synchronization using the cached video, at the time point of synchronization, the playback is switched back to the normal live video, and the time stamp of the cached video data at the time point of synchronization is synchronized to the live video. In this way, the live video being played normally plays the subsequent video with the synchronized time stamp, achieving the switching of audio-visual synchronization and without interrupting the video playback in the middle. After the switching, the cached video is cleared, which does not occupy memory resources and maintains the original working effect of the set-top box.

[0070] In one embodiment, after obtaining the time point of synchronization, the method further includes:

[0071] Determine the transition frames according to the size of the delayed frames;

[0072] Delay the time point of synchronization according to the transition frames to obtain the target time point;

[0073] Play the cached video data at the normal playback rate between the time point of synchronization and the target time point;

[0074] Switching the playback back to the live video at the time point of synchronization and clearing the cached video data includes:

[0075] Switch the playback back to the live video at the target time point and clear the cached video data.

[0076] In the specific implementation process, in order to ensure a smooth transition between the cached video and the live video, a period of playback is reserved for transition after the synchronization is achieved, that is, the time between the time point of synchronization and the target time point. Since synchronization has been achieved at the previous time point, the cached video is played at the normal playback rate during this period, and then switched back to the live video for playback after playing to the target time point.

[0077] To further improve the switching effect, a means of color correction is provided to process the video data. Specifically: playing the cached video data at the normal playback rate between the time point of synchronization and the target time point includes:

[0078] Between the time point at synchronization and the target time point, play the buffered video data at the normal playback rate, and adjust the color parameters of the buffered video data to be consistent with the live video based on color correction.

[0079] In the specific implementation process, since the process of buffering the video may cause a decrease in video quality, which is usually reflected as a color transformation, directly switching will cause a sudden change in the color of the picture in terms of perception. In order to avoid the reduction in the viewing experience caused by this sudden change, it is processed through color correction. Color correction refers to adjusting video parameters related to color such as hue, brightness, and contrast, so that these parameters of the processed object are consistent with the expected parameters. In the embodiment of the present application, through the color correction process of the unique buffered video data, its various parameters are kept consistent with the live video. In order to further avoid the sudden change in color in terms of perception and make this correction smoother, let the adjustment of color correction be carried out step by step. In the transition time period, start adjusting from the time point at synchronization, gradually adjust the magnitudes of various parameters, and adjust to be consistent with the live video at the target time point, that is: based on color correction, adjust the color parameters of the buffered video data to be consistent with the live video, including:

[0080] Based on color correction, adjust the color parameters of the buffered video data so that the color parameters of the buffered video data change step by step starting from the time point until they change to be consistent with the live video at the target time point.

[0081] In this way, not only the connection of the audio-visual synchronized video is realized, but also the connection of the sensory color is realized, further enhancing the user experience.

[0082] In this embodiment, when the user's viewing effect deteriorates due to audio-visual asynchronization while watching a video, let the user independently initiate a synchronization command. After initiating the command, cache the subsequent live video, and then play the cached data instead of the live video to ensure the integrity of the user's viewing. During the process of playing the cached video, let the lagging party in the picture and audio accelerate the playback rate, and make the audio and video gradually synchronized without interruption or stuttering, and use the time point at synchronization as a mark to switch back to the live video, so that the time stamps of the current playing picture and audio of the live video are synchronized, realizing the audio-visual synchronization of the set-top box video and effectively enhancing the user's viewing experience.

[0083] Refer to the attached Figure 3 , based on the same inventive concept as in the foregoing embodiment, the embodiment of the present application also provides a video optimization device for a set-top box, including:

[0084] A caching module, which is used to cache the live video after the current frame of video in response to the audio-visual synchronization instruction initiated by the user, and obtain cached video data; wherein, the cached video data includes cached picture data and cached audio data;

[0085] A determination module, which is used to determine that the data with a playback lag in the cached picture data and the cached audio data is the data to be synchronized;

[0086] A synchronization module, which is used to adjust the playback rate of the data to be synchronized, and play the cached video data instead of the live video until the cached picture data and the cached audio data are synchronized, and obtain the time point at synchronization;

[0087] A switching module, which is used to switch the playback back to the live video at the time point of synchronization, and clear the cached video data.

[0088] Those skilled in the art should understand that the division of each module in the embodiment is only a division of logical functions. In actual application, they can be fully or partially integrated into one or more actual carriers, and these modules can all be implemented in the form of software called by a processing unit, or all be implemented in the form of hardware, or be implemented in the form of a combination of software and hardware. It should be noted that each module in the video optimization device of the set-top box in this embodiment corresponds one by one to each step in the video optimization method of the set-top box in the foregoing embodiment. Therefore, the specific implementation manner of this embodiment can refer to the implementation manner of the foregoing video optimization method of the set-top box, and will not be elaborated here.

[0089] Based on the same inventive concept as in the foregoing embodiment, an embodiment of the present application further provides a computer-readable storage medium, storing a computer program, which when loaded and executed by a processor, implements the video optimization method of the set-top box provided by the embodiment of the present application.

[0090] Based on the same inventive concept as in the foregoing embodiment, an embodiment of the present application further provides an electronic device, including a processor and a memory, wherein,

[0091] The memory is used to store a computer program;

[0092] The processor is used to load and execute the computer program so that the electronic device executes the video optimization method of the set-top box provided by the embodiment of the present application.

[0093] In some embodiments, the computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or it can be various devices including one or any combination of the above memories. The computer can be various computing devices including smart terminals and servers.

[0094] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.

[0095] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).

[0096] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.

[0097] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0098] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0099] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0100] In summary, a video optimization method, apparatus, medium, and device for a set-top box provided in this application. The method includes: in response to an audio-video synchronization instruction initiated by a user, caching the live video after the current frame video to obtain cached video data; where the cached video data includes cached picture data and cached audio data; determining the data with a later playback among the cached picture data and the cached audio data as the data to be synchronized; adjusting the playback rate of the data to be synchronized, and playing the cached video data instead of the live video until the cached picture data and the cached audio data are synchronized to obtain the time point at synchronization; switching the playback back to the live video at the time point at synchronization, and clearing the cached video data. When the user's viewing experience deteriorates due to audio-video out-of-sync while watching a video, this application allows the user to independently initiate a synchronization instruction. After initiating the instruction, the subsequent live video is cached, and then the cached data is played instead of the live video to ensure the integrity of the user's viewing. During the playback of the cached video, the lagging party between the picture and the audio is accelerated in playback rate, and the audio and video are gradually synchronized without interruption or stuttering. The live video is switched back at the time point at synchronization as a marker, so that the time stamps of the current picture and audio of the live video are synchronized, realizing the audio-video synchronization of the set-top box video and effectively enhancing the user's viewing experience.

[0101] The foregoing are only the preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application shall be included within the protection scope of this application.

Claims

1. A video optimization method for a set-top box, characterized in that, Including the following steps: In response to a user-initiated audio-visual synchronization instruction, cache the live video after the current frame video to obtain cached video data; wherein, the cached video data includes cached video frame data and cached audio data; Determine that the data with a playback lag among the cached video frame data and the cached audio data is the data to be synchronized; Adjust the playback rate of the data to be synchronized, and play the cached video data instead of the live video until the cached video frame data and the cached audio data are synchronized, to obtain the time point at synchronization; before adjusting the playback rate of the data to be synchronized, the method further includes: Obtain the number of delayed frames according to the cached video frame data and the cached audio data; Determine the magnitude of the playback rate of the data to be synchronized according to the magnitude of the number of delayed frames; After obtaining the time point at synchronization, the method further includes: Determine the number of transition frames according to the magnitude of the number of delayed frames; Delay the time point at synchronization according to the number of transition frames to obtain a target time point; Play the cached video data at the normal playback rate between the time point at synchronization and the target time point; At the time point at synchronization, switch the playback back to the live video and clear the cached video data; the step of switching the playback back to the live video and clearing the cached video data at the time point at synchronization includes: At the target time point, switch the playback back to the live video and clear the cached video data.

2. The video optimization method of the set-top box according to claim 1, wherein The step of playing the cached video data at the normal playback rate between the time point at synchronization and the target time point includes: Play the cached video data at the normal playback rate between the time point at synchronization and the target time point, and adjust the color parameters of the cached video data to be consistent with those of the live video based on color correction.

3. The video optimization method of the set-top box according to claim 2, wherein The step of adjusting the color parameters of the cached video data to be consistent with those of the live video based on color correction includes: Adjust the color parameters of the cached video data based on color correction, so that the color parameters of the cached video data change step by step starting from the time point until they become consistent with those of the live video at the target time point.

4. The video optimization method of the set-top box according to claim 1, characterized in that, The step of adjusting the playback rate of the data to be synchronized, and playing the cached video data instead of the live video until the cached video frame data and the cached audio data are synchronized, to obtain the time point at synchronization includes: Adjust the playback rate of the data to be synchronized, and play the cached video data instead of the live video until the time stamp difference between the cached video frame data and the cached audio data in the currently played cached video data is within a threshold range, confirm that the cached video frame data and the cached audio data are synchronized, and obtain the time point at synchronization.

5. The video optimization method of the set-top box according to claim 1, wherein Before adjusting the playback rate of the data to be synchronized, and playing the cached video data instead of the live video, the method further includes: Set a filtering window; The step of adjusting the playback rate of the data to be synchronized, and playing the cached video data instead of the live video includes: Adjust the playback rate of the data to be synchronized, and play the buffered video data processed by the filtering window instead of the live video.

6. A video optimization device for a set-top box, characterized in that It includes: A buffer module, which is used to buffer the live video after the current frame video in response to the audio-visual synchronization instruction initiated by the user, and obtain buffered video data; wherein, the buffered video data includes buffered video frame data and buffered audio data; A determination module, which is used to determine that the data with a playback lag in the buffered video frame data and the buffered audio data is the data to be synchronized; A synchronization module, which is used to adjust the playback rate of the data to be synchronized, and play the buffered video data instead of the live video until the buffered video frame data and the buffered audio data are synchronized, and obtain the time point at synchronization; before adjusting the playback rate of the data to be synchronized, it further includes: Obtain the number of delayed frames according to the buffered video frame data and the buffered audio data; Determine the magnitude of the playback rate of the data to be synchronized according to the magnitude of the number of delayed frames; After obtaining the time point at synchronization, it further includes: Determine the number of transition frames according to the magnitude of the number of delayed frames; Delay the time point at synchronization according to the number of transition frames to obtain a target time point; Play the buffered video data at the normal playback rate between the time point at synchronization and the target time point; A switching module, which is used to switch the playback back to the live video at the time point at synchronization and clear the buffered video data; the switching the playback back to the live video at the time point at synchronization and clearing the buffered video data includes: Switch the playback back to the live video at the target time point and clear the buffered video data.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is loaded and executed by the processor, it implements the video optimization method of the set-top box as described in any one of claims 1-5.

8. An electronic device, characterized in that, It includes a processor and a memory, wherein, The memory is used to store a computer program; The processor is used to load and execute the computer program, so that the electronic device executes the video optimization method of the set-top box as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Live broadcast method, device and system, equipment and computer readable storage medium

    CN111294634A

  • Display device and sound and picture synchronization method

    CN114827679A