Video processing method, device, electronic equipment and medium

By obtaining the video object and user interface layer in the electronic device and processing the video object separately, the problem of stuck and delay caused by the UI layer is solved, and the video fluency and user experience are improved.

CN114302209BActive Publication Date: 2024-10-29VIVO MOBILE COMM CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111630152.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2024-10-29
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

When electronic devices play videos, the existence of the UI layer causes visual freezes and delays, reducing the smoothness of the video picture and the user's visual effect.

Method used

By obtaining the video object and user interface layer in the video, the video object is processed separately without affecting the display effect of the UI layer, thereby improving the smoothness of the video picture.

Benefits of technology

It effectively avoids lag and delay in the UI layer, improves the smoothness of the video screen and the user's visual experience, and improves the efficiency of electronic devices playing videos.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114302209B_ABST
    Figure CN114302209B_ABST
Patent Text Reader

Abstract

The present application discloses a video processing method, device, electronic device and medium, belonging to the field of communication technology. The method comprises: when playing a first video, obtaining a first video object and a user interface layer from the first video, wherein the first video object is any one of the following: a video layer in the first video, a video screen in the first video that does not overlap with the user interface layer; performing video processing on the first video object to obtain a second video object; and obtaining and playing a second video based on the second video object and the user interface layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of communication technology, and specifically relates to a video processing method, device, electronic equipment and medium. Background Art

[0002] With the development of terminal technology, users have higher and higher requirements on the image quality of videos played by electronic devices. Generally, electronic devices can perform relevant processing on videos to ensure the smoothness of the video images displayed by the electronic devices.

[0003] However, in the process of video processing by electronic devices, visual freezes and delays may occur, such as ghosting of scrolling bullet screens and freezes when static controls are touched, resulting in low smoothness of the video screen and poor visual effects for users, leading to poor efficiency in video playback by electronic devices. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a video processing method, device, electronic device and medium.

[0005] In a first aspect, an embodiment of the present application provides a video processing method, which includes: when playing a first video, obtaining a first video object and a user interface layer from the first video, the first video object being any one of the following: a video layer in the first video, a video screen in the first video that does not overlap with the user interface layer; performing video processing on the first video object to obtain a second video object; and obtaining and playing a second video based on the second video object and the user interface layer.

[0006] In a second aspect, an embodiment of the present application provides a video processing device, which includes: an acquisition module, a processing module and a playback module. The acquisition module is used to acquire a first video object and a user interface layer from the first video when playing the first video, and the first video object is any one of the following: a video layer in the first video, a video screen in the first video that does not overlap with the user interface layer. The processing module is used to perform video processing on the first video object acquired by the acquisition module to obtain a second video object. The playback module is used to obtain and play the second video based on the second video object obtained by the processing module and the user interface layer obtained by the acquisition module.

[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the electronic device implements the steps of the method described in the first aspect.

[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the electronic device implements the steps of the method described in the first aspect.

[0009] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0010] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to enable an electronic device to implement the method described in the first aspect.

[0011] In an embodiment of the present application, during the process of playing a first video by an electronic device, in order to improve the smoothness of the picture of the first video, the electronic device can obtain a first video object (i.e., a video layer in the first video or a video picture in the first video that does not overlap with the user interface layer) and a user interface layer from the first video, and then the electronic device can perform video processing on the first video object to obtain a second video object, and finally, the electronic device can obtain and play the second video based on the second video object and the user interface layer. In this solution, since the electronic device can obtain the first video object and the UI layer from the first video, and perform video processing on the first video object separately without affecting the display effect of the UI layer, this avoids the phenomenon of visual freezes and delays in the UI layer caused by processing the entire video, improves the smoothness of the video picture displayed by the electronic device, and improves the visual effect of the user watching the video, thereby improving the efficiency of the electronic device in playing videos. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 is a flow chart of a video processing method provided by an embodiment of the present application;

[0013] Figure 2 is a structural schematic diagram of a video processing device provided in an embodiment of the present application;

[0014] Figure 3 This is one of the hardware structure diagrams of an electronic device provided in an embodiment of the present application;

[0015] Figure 4 This is the second schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0016] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0017] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0018] The following is an explanation of some concepts and / or terms involved in the video processing method provided in the embodiments of the present application.

[0019] 1. Motion Estimation and Motion Compensation (MEMC) interpolation

[0020] With the popularity of high frame rate electronic devices, users' perception and demand for high frame rate experience are getting stronger and stronger. At present, although high frame rate electronic devices support 120 / 90Hz, the actual displayed content does not achieve a true high frame rate. It only relies on the graphics processing unit (GPU) or the display driver integrated circuit (IC) to perform simple picture repetition. The actual experience is still a low frame rate, such as the frame rate of movies is 24 frames per second, and the frame rate of TV series is 30 frames per second. MEMC interpolation technology can use the data of the previous and next two frames to calculate the motion characteristics of the picture, simulate the middle picture, and realize dynamic frame filling. In this way, the original 24 frames per second or 30 frames per second video can be rendered into 60 frames per second or 90 frames per second, or even 120 frames per second, so that the content displayed by the electronic device can achieve a true high frame rate, greatly improving the user's visual experience.

[0021] 2. User Interface (UI) Layer

[0022] Refers to the UI elements floating above the video, including:

[0023] General UI: menu controls, pause controls, play controls, video information, etc.

[0024] Advertising UI: barrage information, etc.

[0025] Logo UI: a semi-transparent watermark printed on the video, etc.

[0026] 3. Long videos and short videos

[0027] Long videos: The viewing time is generally more than one hour. Long videos will provide social communication methods at the UI layer (such as bullet comments) to facilitate strangers to exchange viewing experience. The source of long videos is generally played at 30 frames / second or 24 frames / second, and the bullet comments will scroll and display in the upper half of the long video at 60 frames / second.

[0028] Short videos: The viewing time is generally about 1 minute. Short videos are generally played at 30 frames per second, with UI information provided below the video (the name of the blogger of the video is displayed in a scrolling manner at 60 frames per second), and UI information (such as controls such as likes) is provided on the right side of the video. Users can interact with electronic devices at any time through these elements.

[0029] 4. Independent graphics chip

[0030] The independent display chip is a dedicated frame insertion chip that integrates the MEMC algorithm. It generates intermediate frames through the MEMC frame insertion algorithm, and inserts low frame rate video sources such as 24 frames / second or 30 frames / second into high frame rates such as 60 frames / second, 90 frames / second or 120 frames / second, thereby improving the smoothness of the video picture.

[0031] The video processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0032] When a user is watching a video, the electronic device can play the video at a frame rate of 24 frames per second (such as a movie) or 30 frames per second (such as a TV series). In order to improve the visual effect of the user watching the video, the electronic device can use MEMC interpolation technology to dynamically add frames to process the 24 frames per second or 30 frames per second video into 60 frames per second, 90 frames per second or 120 frames per second video, thereby improving the smoothness of the picture.

[0033] However, since there may be a UI layer (such as barrage, control area, movie information, watermark, etc.) in the played video, MEMC interpolation technology cannot be applied to the UI layer, that is, video processing (such as interpolation processing) can only be performed on videos that do not have a UI layer. For example, for local videos, if the entire video is forcibly interpolated, there will be visual freezes and delays in the UI layer. For example, the scrolling barrage will have ghosting, and the static controls will freeze when touched, making the video picture less smooth and the user's visual effect of watching the video is poor, which leads to poor efficiency in playing videos on electronic devices.

[0034] In an embodiment of the present application, during the process of playing a certain video (i.e., the first video in the following embodiment), the electronic device can detect whether there is a UI layer in the video, and if there is a UI layer in the video, obtain a first video object (i.e., the video layer in the video or a video screen in the video that does not overlap with the UI layer) and the UI layer from the video. Then, the electronic device can perform video processing on the first video object to obtain a second video object, and overlay the second video object and the UI layer to obtain and play the overlay processed video (i.e., the second video in the following embodiment).

[0035] Through this solution, since the electronic device can obtain the first video object and the UI layer from the first video, and perform video processing on the first video object separately without affecting the display effect of the UI layer, this avoids the phenomenon of visual freezes and delays in the UI layer caused by processing the entire video, improves the smoothness of the video displayed by the electronic device, improves the visual effect of the user watching the video, and thus improves the efficiency of the electronic device in playing videos.

[0036] It should be noted that the video processing method provided in the embodiment of the present application can also be applied to other screens displayed by electronic devices, such as game screens, etc. The specific method can be determined according to actual use requirements, and the embodiment of the present application does not limit it.

[0037] The present application embodiment provides a video processing method. Figure 1 FIG. 1 is a flow chart of a video processing method provided by an embodiment of the present application, which can be applied to electronic devices. Figure 1 As shown, the video processing method provided in the embodiment of the present application may include the following steps 201 to 203.

[0038] Step 201: When playing a first video, the electronic device obtains a first video object and a user interface layer from the first video.

[0039] In the embodiment of the present application, the first video object is any one of the following: a video layer in the first video, or a video screen in the first video that does not overlap with the user interface layer.

[0040] In an embodiment of the present application, during the process of an electronic device playing a first video, in order to improve the smoothness of the picture of the first video, the electronic device can obtain a first video object (i.e., a video layer in the first video or a video picture in the first video that does not overlap with the user interface layer) and a user interface layer from the first video, and then, the electronic device can perform video processing on the first video object to obtain a second video object, and finally, the electronic device can obtain and play the second video based on the second video object and the user interface layer.

[0041] Optionally, in the embodiment of the present application, the electronic device playing the first video can be understood as the electronic device displaying the video picture of the first video on the screen. Moreover, the electronic device can display the video picture of the first video in full screen or in split screen.

[0042] Optionally, in the embodiment of the present application, the electronic device can play the first video through an application in the electronic device. Moreover, the application can be a video application or an application with a video playing function.

[0043] Optionally, in the embodiment of the present application, the electronic device may directly obtain the play status information of the first video through a processor in the electronic device, or may obtain the play status information of the first video from an application that plays the first video. If the first video is in the play state, the electronic device may execute the video processing method in the embodiment of the present application; if the first video is in the pause state, the electronic device may not execute the video processing method in the embodiment of the present application at this time, so as to achieve the purpose of reducing the power consumption of the electronic device.

[0044] Optionally, in the embodiment of the present application, the first video may be a video existing in the network, or a video downloaded by the electronic device from a server, or a video sent by other electronic devices to the electronic device, etc. The specific video may be determined according to actual use requirements, and the embodiment of the present application does not limit the video.

[0045] Optionally, in the embodiment of the present application, the first video object may be a video layer in the first video, or may be a video screen in the first video that does not overlap with the user interface layer.

[0046] It should be noted that the method for the electronic device to obtain the first video object and the user interface layer from the first video will be described in the following embodiments and will not be described in detail here.

[0047] Optionally, in the embodiment of the present application, before the step 201 of “obtaining the first video object and the user interface layer from the first video”, the video processing method provided in the embodiment of the present application further includes the following step 301. Furthermore, the step 201 of “obtaining the first video object and the user interface layer from the first video” can be specifically implemented by the following step 201a.

[0048] Step 301: When playing a first video, the electronic device determines whether there is a user interface layer in the first video.

[0049] Step 201a: When it is determined that a user interface layer exists in the first video, the electronic device obtains a first video object and a user interface layer from the first video.

[0050] It can be understood that the electronic device can first determine whether there is a user interface layer in the first video, so as to obtain the first video object and the user interface layer from the first video when the user interface layer exists in the first video, thereby performing dual-channel interpolation; when there is no user interface layer in the first video, the electronic device can perform single-channel interpolation, that is, directly perform interpolation processing on the first video.

[0051] Optionally, in an embodiment of the present application, in a single-channel interpolation mode, a processor in an electronic device may directly perform interpolation processing on the first video and output it to a screen; or, a processor in an electronic device may send the first video to an independent display chip in the electronic device, and then the independent display chip may perform interpolation processing on the first video and output it to a screen.

[0052] It should be noted that since some videos include two layers (i.e., a video layer and a user interface layer) and some videos include only one layer (i.e., only one layer of video screen, and there are user interface elements in the video screen), when the first video includes two layers, the above-mentioned user interface layer is the user interface layer in the first video; when the first video includes only one layer, the above-mentioned user interface layer is the user interface element in the video screen of the first video.

[0053] In an embodiment of the present application, the electronic device can detect whether there is a user interface layer in the first video, so that when the user interface layer exists in the first video, the first video object and the user interface layer are obtained from the first video, thereby performing dual-channel interpolation. In this way, the electronic device can switch between single-channel interpolation and dual-channel interpolation according to whether there is a user interface layer in the first video, thereby broadening the scenes covered by the video interpolation, such as barrage information, control area, scrolling character information, pop-up box information, etc., avoiding the phenomenon of visual freeze and delay in the UI layer caused by directly processing the entire video, improving the smoothness of the video displayed by the electronic device, and improving the visual effect of the user watching the video, thereby improving the efficiency of the electronic device in playing videos.

[0054] Optionally, in the embodiment of the present application, the above step 301 can be specifically implemented by the following step 301a (or step 301b or step 301c).

[0055] Step 301a: The electronic device determines whether there is a user interface layer in the first video according to the target instruction.

[0056] In an embodiment of the present application, the above-mentioned target instruction is used to indicate video information of the first video, and the above-mentioned video information includes at least one of the following: video layer information of the first video, and user interface layer information of the first video.

[0057] Optionally, in an embodiment of the present application, the target instruction may be a dumpsys surfaceflinger instruction.

[0058] It can be understood that the processor in the electronic device can obtain the video information of the first video through the dumpsys surfaceflinger instruction to determine whether there is a user interface layer in the first video.

[0059] Optionally, in an embodiment of the present application, the above-mentioned video information may include only the video layer information of the first video, or may include both the video layer information of the first video and the user interface layer information of the first video.

[0060] It can be understood that when the video information only includes the video layer information of the first video, the electronic device can determine that there is no user interface layer in the first video; when the video information includes both the video layer information of the first video and the user interface layer information of the first video, the electronic device can determine that there is a user interface layer in the first video.

[0061] Step 301b: The electronic device detects whether a user input is received through the screen of the electronic device to determine whether a user interface layer exists in the first video.

[0062] Optionally, in an embodiment of the present application, if the electronic device receives user input, it determines that a user interface layer exists in the first video; if the electronic device does not receive user input, it determines that no user interface layer exists in the first video.

[0063] It can be understood that, since the user interface layer exists in the first video, the user can input certain elements of the user interface layer to enable the electronic device to perform related operations; or, if the electronic device detects the user input to the first video, it means that the electronic device is about to display the user interface elements (such as certain buttons). Therefore, the electronic device can determine whether the user interface layer exists in the first video according to whether the user input is received.

[0064] Step 301c: The electronic device obtains video information from an application program that plays the first video, and determines whether a user interface layer exists in the first video based on the video information.

[0065] In an embodiment of the present application, the above-mentioned video information includes at least one of the following: video screen information of the first video, and user interface element information of the first video.

[0066] It should be noted that the electronic device obtaining the video information from the application that plays the first video can be understood as: the application that plays the first video can report the video information of the first video to the processor in the electronic device, and then the processor can read the video information.

[0067] Optionally, in an embodiment of the present application, the above-mentioned video information may include only the video picture information of the first video, or may include both the video picture information of the first video and the user interface element information of the first video.

[0068] It can be understood that when the video information only includes the video picture information of the first video, the electronic device can determine that there is no user interface layer in the first video; when the video information includes both the video layer information of the first video and the user interface element information of the first video, the electronic device can determine that there is a user interface layer (which can be understood as a user interface element) in the first video.

[0069] Optionally, in the embodiment of the present application, the video screen information may include size information and position coordinate information of the video screen, etc. The user interface element information may include size information and position coordinate information of the user interface element in the video screen.

[0070] It should be noted that compared to the solution of determining whether there is a user interface layer in the first video based on target instructions or by detecting whether user input is received, the electronic device obtains video information from the application that plays the first video to determine whether there is a user interface layer in the first video based on the video information, which can better reduce the power consumption of the electronic device.

[0071] In an embodiment of the present application, the electronic device can determine whether there is a user interface layer in the first video according to a target instruction, or by detecting whether a user input is received, or by obtaining video information of the first video from an application that plays the first video, and if there is a user interface layer in the first video, obtain the first video object and the user interface layer from the first video, thereby performing video processing on the first video object, avoiding the phenomenon of visual freeze and delay in the UI layer caused by directly processing the entire video, improving the smoothness of the video picture displayed by the electronic device, and enhancing the visual effect of the user watching the video, thereby improving the efficiency of the electronic device in playing videos.

[0072] Optionally, in the embodiment of the present application, the first video object is a video layer in the first video. The step 201 can be implemented by the following step 201b.

[0073] Step 201b: When playing the first video, the electronic device performs separation processing on the first video to separate the first video into a video layer and a user interface layer.

[0074] Optionally, in the embodiment of the present application, the above step 201b can be specifically implemented by the following step 201b1.

[0075] Step 201b1: When playing the first video, the electronic device uses a processor in the electronic device to separate the first video into a video layer and a user interface layer.

[0076] Optionally, in an embodiment of the present application, a processor in the electronic device may perform separate processing on the first video to separately read the video layer and the user interface layer in the first video, so that the electronic device performs video processing on the video layer alone.

[0077] In the embodiment of the present application, since the electronic device can separate the first video into a video layer and a user interface layer, and perform video processing on the video layer separately without affecting the display effect of the UI layer, this avoids the phenomenon of visual freezes and delays in the UI layer caused by processing the entire video, improves the smoothness of the video picture displayed by the electronic device, improves the visual effect of the user watching the video, and thus improves the efficiency of the electronic device in playing videos.

[0078] Optionally, in the embodiment of the present application, the first video object is a video screen in the first video that does not overlap with the user interface layer. The step 201 can be specifically implemented by the following step 201c.

[0079] Step 201c: When playing the first video, the electronic device removes the video screen overlapping with the user interface layer from the video screen of the first video to obtain the first video object and the user interface layer.

[0080] Optionally, in an embodiment of the present application, the electronic device may first determine the video screen in the video screen of the first video that overlaps with the user interface layer (which can be understood as a user interface element), and then remove the video screen that overlaps with the user interface layer from the video screen of the first video, retaining the non-overlapping video screen.

[0081] In the embodiment of the present application, since the electronic device can remove the video screen overlapping with the user interface layer from the first video to obtain non-overlapping video screen and user interface layer, and perform video processing on the non-overlapping video screen separately without affecting the display effect of the UI layer, this avoids the phenomenon of visual freezes and delays in the UI layer caused by processing the entire video, improves the smoothness of the video screen displayed by the electronic device, enhances the visual effect of the user watching the video, and thus improves the efficiency of the electronic device in playing videos.

[0082] Optionally, in the embodiment of the present application, before the above step 201c, the video processing method provided in the embodiment of the present application further includes the following step 401. Furthermore, the above step 201c can be specifically implemented by the following step 201c1.

[0083] Step 401: The electronic device obtains video picture information and user interface information of the first video from an application program that plays the first video through a processor in the electronic device.

[0084] In an embodiment of the present application, the above-mentioned video screen information includes size information and position information of the video screen in the first video, and the above-mentioned user interface information includes size information and position information of the user interface elements in the first video.

[0085] It should be noted that since some videos have only one layer and do not distinguish between the video layer and the user interface layer, the electronic device can obtain the video picture information and user interface element information of the video from the application that plays the video, so as to process the video according to this information, thereby achieving the effect of dual-channel interpolation through single-channel interpolation.

[0086] Optionally, in an embodiment of the present application, for internal user interface elements in the application that plays the first video, the electronic device can directly obtain size information and position coordinate information of these user interface elements through the application; for external notifications of the application that plays the first video (such as system notifications), the electronic device can obtain the size information and position coordinate information of the external notification through a reflection calling interface provided by the framework.

[0087] Step 201c1: Using a processor, based on the video picture information and the user interface information, remove the video picture overlapping with the user interface element from the video picture of the first video to obtain a first video object and a user interface layer.

[0088] In an embodiment of the present application, since the electronic device can obtain the video screen information and user interface information of the first video from the application that plays the first video, it can determine the position of the user interface element in the video screen of the first video based on this information, so as to remove the screen overlapping with the user interface element from the video screen of the first video, and finally obtain a video screen that does not overlap with the user interface element, and perform video processing on the non-overlapping video screen separately without affecting the display effect of the UI layer. In this way, the phenomenon of visual freezes and delays in the UI layer caused by processing the entire video is avoided, the smoothness of the video screen displayed by the electronic device is improved, the visual effect of the user watching the video is improved, and the efficiency of the electronic device in playing videos is improved.

[0089] Step 202: The electronic device performs video processing on the first video object to obtain a second video object.

[0090] Optionally, in an embodiment of the present application, in a first implementation, a processor in an electronic device may process a first video object to obtain a second video object. In a second implementation, a processor in an electronic device may send the first video object to a discrete graphics chip in the electronic device, and then the discrete graphics chip processes the first video object (for example, inserting 30 frames into 60 frames) to obtain a second video object, and sends the second video object to the processor.

[0091] It should be noted that, compared with the first implementation, the second implementation can better reduce the power consumption of the electronic device.

[0092] Optionally, in the embodiment of the present application, the above video processing may include frame insertion processing, frame reduction processing, super-resolution processing, noise reduction processing, color enhancement processing and high dynamic range (HDR) processing, etc. The specific processing can be determined according to actual use requirements, and the embodiment of the present application does not limit it.

[0093] Optionally, in the embodiment of the present application, the above step 202 can be specifically implemented by the following steps 202a and 202b.

[0094] Step 202a: The electronic device sends a first video object to a discrete graphics chip in the electronic device via a processor.

[0095] Step 202b: The electronic device performs video processing on the first video object through the independent display chip to obtain a second video object, and sends the second video object to the processor through the independent display chip.

[0096] In an embodiment of the present application, the electronic device can perform video processing on the first video object separately through an independent display chip without affecting the display effect of the UI layer. In this way, the phenomenon of visual freezes and delays in the UI layer caused by processing the entire video is avoided, the smoothness of the video displayed by the electronic device is improved, and the visual effect of the user watching the video is enhanced, thereby improving the efficiency of the electronic device in playing videos.

[0097] Optionally, in the embodiment of the present application, the above step 202 can be specifically implemented by the following step 202c.

[0098] Step 202c: the electronic device performs frame reduction processing on the first video object, and performs frame insertion processing on the first video object after the frame reduction processing to obtain a second video object.

[0099] Specifically, when playing the first video, after the electronic device obtains the video data of the first video object, it can unpack the video data and then perform frame reduction processing on the unpacked video data. After the frame reduction processing, the electronic device can decode it and then perform frame insertion processing on the decoded video data to obtain the interpolated video data (i.e., the video data of the second video object).

[0100] In an embodiment of the present application, for high frame rate (for example, 120 frames per second) videos, due to performance limitations, many electronic devices are unable to play the high frame rate videos or there are serious freezes during playback, that is, the mid-level processors in the electronic devices do not support the playback of high frame rate videos. Therefore, the electronic device can first reduce the frames and then insert frames for the first video object. In this way, the number of frames of the high frame rate video is reduced to reduce the decoding pressure of the native high frame rate video, and through subsequent frame insertion processing, the mid-level processor can also play the high frame rate video.

[0101] Step 203: The electronic device obtains and plays the second video based on the second video object and the user interface layer.

[0102] Optionally, in an embodiment of the present application, the electronic device may overlay the second video object and the user interface layer (i.e., the user interface layer in the first video or the user interface elements in the video screen of the first video) to obtain and play the second video, or may perform any other possible processing on the second video object and the user interface layer to obtain and play the second video.

[0103] Optionally, in the embodiment of the present application, the above step 203 can be specifically implemented by the following step 203a.

[0104] Step 203a: The electronic device performs superposition processing on the second video object and the user interface layer to obtain a superimposed second video, and plays the second video.

[0105] In the embodiment of the present application, since the electronic device can perform video processing on the first video object separately to obtain the second video object, and then overlay the second video object and the UI layer to obtain the second video after overlay processing, this avoids the phenomenon of visual freezes and delays in the UI layer caused by processing the entire video, improves the smoothness of the video picture displayed by the electronic device, enhances the visual effect of the user watching the video, and thus improves the efficiency of the electronic device in playing videos.

[0106] It should be noted that the electronic device may repeatedly perform the method from step 201 to step 203 for multiple times to achieve the best interpolation effect and reduce the power consumption of the electronic device as much as possible.

[0107] The embodiment of the present application provides a video processing method. During the process of an electronic device playing a first video, in order to improve the smoothness of the picture of the first video, the electronic device can obtain a first video object (i.e., a video layer in the first video or a video picture in the first video that does not overlap with the user interface layer) and a user interface layer from the first video. Then, the electronic device can perform video processing on the first video object to obtain a second video object. Finally, the electronic device can obtain and play the second video based on the second video object and the user interface layer. In this solution, since the electronic device can obtain the first video object and the UI layer from the first video, and perform video processing on the first video object separately without affecting the display effect of the UI layer, the phenomenon of visual freeze and delay in the UI layer caused by processing the entire video is avoided, the smoothness of the video picture displayed by the electronic device is improved, and the visual effect of the user watching the video is improved, thereby improving the efficiency of the electronic device in playing videos.

[0108] The video processing method provided in the embodiment of the present application can be executed by a video processing device. In the embodiment of the present application, the video processing device provided in the embodiment of the present application is described by taking the video processing method executed by the video processing device as an example.

[0109] Figure 2 A possible structural diagram of a video processing device involved in an embodiment of the present application is shown. Figure 2 As shown, the video processing device 70 may include: an acquisition module 71 , a processing module 72 and a playback module 73 .

[0110] The acquisition module 71 is used to acquire a first video object and a user interface layer from the first video when playing the first video, wherein the first video object is any one of the following: a video layer in the first video, and a video screen in the first video that does not overlap with the user interface layer. The processing module 72 is used to perform video processing on the first video object acquired by the acquisition module 71 to obtain a second video object. The playback module 73 is used to acquire and play the second video based on the second video object acquired by the processing module 72 and the user interface layer acquired by the acquisition module 71.

[0111] An embodiment of the present application provides a video processing device. Since a first video object and a UI layer can be obtained from a first video, and video processing can be performed on the first video object alone without affecting the display effect of the UI layer, thereby avoiding the phenomenon of visual freezes and delays in the UI layer caused by processing the entire video, the smoothness of the displayed video picture is improved, the visual effect of the user watching the video is enhanced, and the efficiency of playing the video is improved.

[0112] In a possible implementation, the video processing device 70 further includes: a determination module. The determination module is used to determine whether there is a user interface layer in the first video before the acquisition module 71 acquires the first video object and the user interface layer from the first video. The acquisition module 71 is specifically used to acquire the first video object and the user interface layer from the first video when it is determined that there is a user interface layer in the first video.

[0113] In a possible implementation, the above-mentioned determination module is specifically used to determine whether there is a user interface layer in the first video according to a target instruction, and the target instruction is used to indicate the video information of the first video, and the video information includes at least one of the following: video layer information of the first video, user interface layer information of the first video. Alternatively, the above-mentioned determination module is specifically used to detect whether user input is received through the screen of the electronic device to determine whether there is a user interface layer in the first video. Alternatively, the above-mentioned determination module is specifically used to obtain video information from an application that plays the first video, and determine whether there is a user interface layer in the first video according to the video information, and the video information includes at least one of the following: video screen information of the first video, user interface element information of the first video.

[0114] In a possible implementation, the first video object is a video layer in the first video. The acquisition module 71 is specifically configured to perform separation processing on the first video to separate the first video into a video layer and a user interface layer.

[0115] In a possible implementation, the acquisition module 71 is specifically configured to perform separation processing on the first video through a processor in the electronic device, so as to separate the first video into a video layer and a user interface layer.

[0116] In a possible implementation, the first video object is a video screen in the first video that does not overlap with the user interface layer. The acquisition module 71 is specifically configured to remove the video screen that overlaps with the user interface layer from the video screen of the first video to obtain the first video object and the user interface layer.

[0117] In a possible implementation, the acquisition module 71 is also used to obtain the video screen information and user interface information of the first video from the application playing the first video through the processor in the electronic device before removing the video screen overlapping with the user interface layer from the video screen of the first video to obtain the first video object and the user interface layer. The video screen information includes the size information and position information of the video screen in the first video, and the user interface information includes the size information and position information of the user interface elements in the first video. The acquisition module 71 is specifically used to remove the video screen overlapping with the user interface elements from the video screen of the first video through the processor according to the video screen information and the user interface information to obtain the first video object and the user interface layer.

[0118] In a possible implementation, the processing module 72 is specifically used to send a first video object to an independent display chip in an electronic device through a processor; perform video processing on the first video object through the independent display chip to obtain a second video object; and send the second video object to the processor through the independent display chip.

[0119] In a possible implementation, the processing module 72 is specifically configured to perform frame reduction processing on the first video object, and perform frame insertion processing on the first video object after the frame reduction processing to obtain the second video object.

[0120] In a possible implementation, the playing module 73 is specifically configured to perform superposition processing on the second video object and the user interface layer to obtain the superimposed second video, and play the second video.

[0121] The video processing device in the embodiment of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtualreality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., which is not specifically limited in the embodiment of the present application.

[0122] The video processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0123] The video processing device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0124] Alternatively, if Figure 3 As shown, an embodiment of the present application also provides an electronic device 800, including a processor 801, a memory 802, and a program or instruction stored in the memory 802 and executable on the processor 801. When the program or instruction is executed by the processor 801, the various steps of the above-mentioned video processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0125] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0126] Figure 4 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0127] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.

[0128] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 4 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0129] Among them, processor 1010 is used to obtain a first video object and a user interface layer from the first video when playing the first video, where the first video object is any one of the following: a video layer in the first video, a video screen in the first video that does not overlap with the user interface layer; and perform video processing on the first video object to obtain a second video object; and obtain and play the second video based on the second video object and the user interface layer.

[0130] An embodiment of the present application provides an electronic device. Since the electronic device can obtain a first video object and a UI layer from a first video, and perform video processing on the first video object separately without affecting the display effect of the UI layer, this avoids the phenomenon of visual freezes and delays in the UI layer caused by processing the entire video, improves the smoothness of the video picture displayed by the electronic device, enhances the visual effect of the user watching the video, and thus improves the efficiency of the electronic device in playing videos.

[0131] Optionally, in the embodiment of the present application, the processor 1010 is further configured to determine whether a user interface layer exists in the first video before obtaining the first video object and the user interface layer from the first video. The processor 1010 is specifically configured to obtain the first video object and the user interface layer from the first video if it is determined that the user interface layer exists in the first video.

[0132] Optionally, in an embodiment of the present application, the processor 1010 is specifically used to determine whether there is a user interface layer in the first video according to a target instruction, and the target instruction is used to indicate video information of the first video, and the video information includes at least one of the following: video layer information of the first video, user interface layer information of the first video. Alternatively, the processor 1010 is specifically used to detect whether user input is received through the screen of the electronic device to determine whether there is a user interface layer in the first video. Alternatively, the processor 1010 is specifically used to obtain video information from an application that plays the first video, and determine whether there is a user interface layer in the first video according to the video information, and the video information includes at least one of the following: video screen information of the first video, user interface element information of the first video.

[0133] Optionally, in the embodiment of the present application, the first video object is a video layer in the first video. The processor 1010 is specifically configured to perform separation processing on the first video to separate the first video into a video layer and a user interface layer.

[0134] Optionally, in the embodiment of the present application, the first video object is a video screen in the first video that does not overlap with the user interface layer. The processor 1010 is specifically configured to remove the video screen that overlaps with the user interface layer from the video screen of the first video to obtain the first video object and the user interface layer.

[0135] Optionally, in an embodiment of the present application, the processor 1010 is further used to obtain video screen information and user interface information of the first video from an application that plays the first video before removing the video screen that overlaps with the user interface layer from the video screen of the first video to obtain the first video object and the user interface layer. The video screen information includes size information and position information of the video screen in the first video, and the user interface information includes size information and position information of the user interface elements in the first video. The processor 1010 is specifically used to remove the video screen that overlaps with the user interface element from the video screen of the first video according to the video screen information and the user interface information to obtain the first video object and the user interface layer.

[0136] Optionally, in the embodiment of the present application, the processor 1010 is specifically configured to send a first video object to an independent display chip in the electronic device, and receive a second video object sent by the independent display chip.

[0137] Optionally, in the embodiment of the present application, the processor 1010 is specifically configured to perform frame reduction processing on the first video object, and perform frame insertion processing on the first video object after the frame reduction processing to obtain a second video object.

[0138] Optionally, in the embodiment of the present application, the processor 1010 is specifically configured to perform superposition processing on the second video object and the user interface layer to obtain the superimposed second video, and play the second video.

[0139] The electronic device provided in the embodiment of the present application can implement each process implemented in the above method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described here.

[0140] The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above method embodiment. To avoid repetition, they will not be described again here.

[0141] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0142] The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0143] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.

[0144] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the electronic device implements the various processes of the above-mentioned video processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0145] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0146] An embodiment of the present application also provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to enable an electronic device to implement the various processes of the above-mentioned video processing method embodiment and achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0147] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction so that the electronic device implements each process of the above-mentioned video processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0148] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0149] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0150] 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 computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0151] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A video processing method, characterized in that: The method comprises: When a first video is played and it is determined that a user interface layer exists in the first video, a first video object and the user interface layer are obtained from the first video, wherein the first video object is any one of the following: a video layer in the first video, and a video screen in the first video that does not overlap with the user interface layer; Performing video processing on the first video object to obtain a second video object; Based on the second video object and the user interface layer, obtaining and playing a second video; Before acquiring the first video object and the user interface layer from the first video, the method further includes: Determining whether the user interface layer exists in the first video; The determining whether the user interface layer exists in the first video includes: Determine, according to a target instruction, whether the user interface layer exists in the first video, wherein the target instruction is used to indicate video information of the first video, and the video information includes at least one of the following: video layer information of the first video and user interface layer information of the first video; or, Detecting whether a user input is received through a screen of the electronic device to determine whether the user interface layer exists in the first video; or, Video information is obtained from an application that plays the first video, and it is determined whether the user interface layer exists in the first video based on the video information, wherein the video information includes at least one of the following: video screen information of the first video and user interface element information of the first video.

2. The method according to claim 1, characterized in that The first video object is a video layer in the first video; The obtaining the first video object and the user interface layer from the first video includes: The first video is subjected to separation processing to separate the first video into the video layer and the user interface layer.

3. The method according to claim 2, characterized in that The separating process of the first video to separate the first video into the video layer and the user interface layer includes: The first video is separated by a processor in the electronic device to separate the first video into the video layer and the user interface layer.

4. The method according to claim 1, characterized in that The first video object is a video screen in the first video that does not overlap with the user interface layer; and obtaining the first video object and the user interface layer from the first video includes: The video frame overlapping with the user interface layer is removed from the video frame of the first video to obtain the first video object and the user interface layer.

5. The method according to claim 4, characterized in that Before removing the video picture overlapping the user interface layer from the video picture of the first video to obtain the first video object and the user interface layer, the method further includes: Acquire, by a processor in the electronic device, video screen information and user interface information of the first video from an application program that plays the first video, the video screen information including size information and position information of the video screen in the first video, and the user interface information including size information and position information of user interface elements in the first video; The removing the video picture overlapping the user interface layer from the video picture of the first video to obtain the first video object and the user interface layer includes: The processor removes the video frame overlapping with the user interface element from the video frame of the first video according to the video frame information and the user interface information, so as to obtain the first video object and the user interface layer.

6. The method according to claim 3 or 5, characterized in that: The performing video processing on the first video object to obtain a second video object includes: Sending the first video object to a discrete graphics chip in the electronic device by the processor; The first video object is subjected to video processing by the independent graphics chip to obtain the second video object, and the second video object is sent to the processor by the independent graphics chip.

7. The method according to claim 1, characterized in that The performing video processing on the first video object to obtain a second video object includes: The first video object is subjected to frame reduction processing, and the first video object after the frame reduction processing is subjected to frame insertion processing to obtain the second video object.

8. The method according to claim 1, characterized in that The obtaining and playing the second video based on the second video object and the user interface layer includes: The second video object and the user interface layer are overlaid to obtain the second video after overlay processing, and the second video is played.

9. A video processing device, characterized in that: The video processing device comprises: an acquisition module, a processing module and a playback module; The acquisition module is used to acquire a first video object and the user interface layer from the first video when the first video is played and it is determined that the first video has a user interface layer, wherein the first video object is any one of the following: a video layer in the first video, and a video screen in the first video that does not overlap with the user interface layer; The processing module is used to perform video processing on the first video object acquired by the acquisition module to obtain a second video object; The playing module is used to obtain and play the second video based on the second video object obtained by the processing module and the user interface layer obtained by the obtaining module; The device further comprises: a determination module; The determining module is used to determine whether the user interface layer exists in the first video before the acquiring module acquires the first video object and the user interface layer from the first video; The determination module is specifically used to determine whether the user interface layer exists in the first video according to a target instruction, wherein the target instruction is used to indicate video information of the first video, and the video information includes at least one of the following: video layer information of the first video and user interface layer information of the first video; or, The determination module is specifically configured to detect whether a user input is received through a screen of the electronic device, so as to determine whether the user interface layer exists in the first video; or, The determination module is specifically used to obtain video information from an application that plays the first video, and determine whether the user interface layer exists in the first video based on the video information, and the video information includes at least one of the following: video screen information of the first video and user interface element information of the first video.

10. The device according to claim 9, characterized in that The first video object is a video layer in the first video; the acquisition module is specifically used to perform separation processing on the first video to separate the first video into the video layer and the user interface layer.

11. The device according to claim 10, characterized in that The acquisition module is specifically used to perform separation processing on the first video through a processor in the electronic device, so as to separate the first video into the video layer and the user interface layer.

12. The device according to claim 9, characterized in that The first video object is a video picture in the first video that does not overlap with the user interface layer; the acquisition module is specifically used to remove the video picture overlapping with the user interface layer from the video picture of the first video to obtain the first video object and the user interface layer.

13. The device according to claim 12, characterized in that The acquisition module is further used to obtain video screen information and user interface information of the first video from an application playing the first video through a processor in the electronic device before removing the video screen overlapping with the user interface layer from the video screen of the first video to obtain the first video object and the user interface layer, wherein the video screen information includes size information and position information of the video screen in the first video, and the user interface information includes size information and position information of user interface elements in the first video; The acquisition module is specifically used to remove the video picture overlapping with the user interface element from the video picture of the first video through the processor according to the video picture information and the user interface information, so as to obtain the first video object and the user interface layer.

14. The device according to claim 11 or 13, characterized in that The processing module is specifically used to send the first video object to the independent display chip in the electronic device through the processor; and perform video processing on the first video object through the independent display chip to obtain the second video object; and send the second video object to the processor through the independent display chip.

15. The device according to claim 9, characterized in that The processing module is specifically configured to perform frame reduction processing on the first video object, and perform frame insertion processing on the first video object after the frame reduction processing to obtain the second video object.

16. The device according to claim 9, characterized in that The playing module is specifically used to perform superposition processing on the second video object and the user interface layer to obtain the second video after superposition processing, and play the second video.

17. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the electronic device implements the steps of the video processing method as described in any one of claims 1 to 8.

18. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the electronic device implements the steps of the video processing method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Video frame insertion method and related devices

    CN111327959A