Video display method and device, medium and electronic equipment

By encoding and decoding the target video stream and synthesizing transparent and non-transparent video frames, the problem that video clips in the prior art is difficult to achieve transparent effects, and high-quality video display effects are achieved.

CN119653129AActive Publication Date: 2025-03-18BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311199560.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2025-03-18
Estimated Expiration
2043-09-15

AI Technical Summary

Technical Problem

The prior art is difficult to implement encoding, decoding and rendering with transparent effects in video clips, resulting in poor video display effects.

Method used

By encoding the target video stream, the transparent channel video stream and the non-transparent channel video stream are obtained, and the transparent video frame and the non-transparent video frame are decoded respectively, and the video frame in the target video stream is reconstructed, and the reconstructed video frame is finally rendered.

Benefits of technology

It realizes the transparent effect of video clips when displaying, improving the quality and effect of video display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119653129A_ABST
    Figure CN119653129A_ABST
Patent Text Reader

Abstract

The invention relates to a video display method and device, a medium and electronic equipment, and the method comprises the steps: obtaining a transparent channel video stream and a non-transparent channel video stream which are obtained by coding a target video stream, the target video stream is obtained by at least superposing the image contents of a plurality of image layers in a preset canvas region, and the non-transparent channel video stream is a non-transparent channel video stream; the transparent channel video stream is used for reflecting transparency information of video frames in the target video stream, and the non-transparent channel video stream is used for reflecting color information of the video frames in the target video stream; respectively decoding the transparent channel video stream and the non-transparent channel video stream to respectively obtain a transparent video frame and a non-transparent video frame which belong to the same moment; synthesizing the transparent video frame and the non-transparent video frame to obtain a video frame in the reconstructed target video stream; and the reconstructed video frame is rendered, and the rendering result is displayed, so that the transparent video is used as the mask of the non-transparent video for consumption, and the transparent effect required when the target video stream is displayed can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing, and in particular, to a video display method, device, medium and electronic device. Background Art

[0002] In the related art, there is an application scenario in which videos of multiple tracks are superimposed on a canvas to obtain a video clip containing multiple layers, and usually each layer is used to accommodate a video corresponding to a track.

[0003] The size of the canvas may be larger than the size of the video, and the generated video clip is based on the size of the entire canvas. Therefore, in order to improve the display effect of the video clip, the other parts except the picture in the canvas can maintain a transparent effect when rendering. Therefore, how to implement video clips to support encoding, decoding and rendering with transparent effects to ensure their display effect is a technical problem that needs to be solved urgently. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a video display method, comprising:

[0006] In response to a rendering operation on a target video stream, a transparent channel video stream and a non-transparent channel video stream obtained by encoding the target video stream are obtained, wherein the target video stream is obtained by superimposing at least a plurality of layers of picture contents in a preset canvas area, the transparent channel video stream is used to reflect transparency information of a video frame in the target video stream, and the non-transparent channel video stream is used to reflect color information of a video frame in the target video stream;

[0007] Decoding the transparent channel video stream and the non-transparent channel video stream respectively to obtain transparent video frames and non-transparent video frames belonging to the same moment;

[0008] Synthesizing the transparent video frame and the non-transparent video frame to obtain a reconstructed video frame in the target video stream;

[0009] Render the reconstructed video frame and display the rendering result.

[0010] In a second aspect, the present disclosure provides a video display device, comprising:

[0011] A first acquisition module is used to respond to a rendering operation on a target video stream, and acquire a transparent channel video stream and a non-transparent channel video stream obtained by encoding the target video stream, wherein the target video stream is obtained by superimposing at least a plurality of layers of picture contents in a preset canvas area, the transparent channel video stream is used to reflect transparency information of a video frame in the target video stream, and the non-transparent channel video stream is used to reflect color information of a video frame in the target video stream;

[0012] A decoding module, used for respectively decoding the transparent channel video stream and the non-transparent channel video stream to respectively obtain a transparent video frame and a non-transparent video frame belonging to the same moment;

[0013] A synthesis module, used for synthesizing the transparent video frame and the non-transparent video frame to obtain a reconstructed video frame in the target video stream;

[0014] The first display module is used to render the reconstructed video frame and display the rendering result.

[0015] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the program is executed by a processing device.

[0016] In a fourth aspect, the present disclosure provides an electronic device, including:

[0017] a storage device having a computer program stored thereon;

[0018] A processing device is used to execute the computer program in the storage device to implement the steps of the method in the first aspect.

[0019] Through the above technical scheme, the target video stream is obtained by superimposing the picture contents of at least multiple layers in a preset canvas area, and the target video stream is encoded to obtain a transparent channel video stream and a non-transparent channel video stream. The transparent channel video stream is used to reflect the transparency information of the video frames in the target video stream, and the non-transparent channel video stream is used to reflect the color information of the video frames in the target video stream. On this basis, in response to the rendering operation on the target video stream, the transparent channel video stream and the non-transparent channel video stream are decoded respectively to obtain transparent video frames and non-transparent video frames belonging to the same moment respectively, and the transparent video frames and the non-transparent video frames are synthesized to realize the consumption of transparent video as a mask of non-transparent video, thereby obtaining the video frames in the reconstructed target video stream, and then ensuring the required transparency effect of the target video stream when it is displayed.

[0020] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0022] Figure 1 It is a schematic diagram showing a video frame in a target video stream according to an exemplary embodiment of the present disclosure.

[0023] Figure 2 The figure is a flowchart of a video display method according to an exemplary embodiment of the present disclosure.

[0024] Figure 3 It is a block diagram of a video display device according to an exemplary embodiment of the present disclosure.

[0025] Figure 4 It is a schematic structural diagram of an electronic device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0028] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0029] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0030] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0032] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0033] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0034] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0035] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0036] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0037] Figure 1 FIG. 1 is a schematic diagram showing a video frame in a target video stream according to an exemplary embodiment of the present disclosure. Figure 1 , content 1 and content 2 correspond to a track respectively. Tracks can also be understood as layers. Figure 1 In the canvas shown, content 1 and content 2 are superimposed to obtain Figure 1 The video frame shown, and in the video frame, the transparent area is the area that requires a transparent effect when displaying the video frame.

[0038] Depend on Figure 1It can be seen that the size of the canvas is larger than the size of content 1 and content 2, and the generated video clip is based on the size of the entire canvas. Therefore, it is necessary to ensure that the other parts except the picture in the canvas can maintain a transparent effect when rendering. Therefore, if the video clip supports encoding, decoding and rendering with transparent effects to ensure its display effect, it is a technical problem that needs to be solved urgently.

[0039] In view of this, the embodiments of the present disclosure provide a video display method, device, medium and electronic device. The embodiments of the present disclosure are further explained and illustrated in conjunction with the accompanying drawings.

[0040] Figure 2 is a flowchart of a video display method according to an exemplary embodiment of the present disclosure, referring to Figure 2 The steps of the method can be performed by an electronic device, specifically by a GPU (graphics processing unit) mounted in the electronic device. The GPU can implement image rendering under the control of a CPU (Central Processing Unit). Figure 2 , the video display method may include the following steps:

[0041] Step 210, in response to the rendering operation on the target video stream, a transparent channel video stream and a non-transparent channel video stream obtained by encoding the target video stream are obtained, the target video stream is obtained by superimposing at least a plurality of layers of picture contents in a preset canvas area, the transparent channel video stream is used to reflect the transparency information of the video frame in the target video stream, and the non-transparent channel video stream is used to reflect the color information of the video frame in the target video stream;

[0042] Step 220, respectively decoding the transparent channel video stream and the non-transparent channel video stream to obtain transparent video frames and non-transparent video frames belonging to the same moment;

[0043] Step 230, synthesizing the transparent video frame and the non-transparent video frame to obtain a video frame in a reconstructed target video stream;

[0044] Step 240: Render the reconstructed video frame and display the rendering result.

[0045] The target video stream may be a composite clip generated by superimposing at least multiple layers of screen content in a preset canvas area in a video editing scenario. The composite clip may treat the screen content of multiple layers as a whole and perform a unified editing operation, such as adding music and configuring the video format. The video frames in the composite clip may refer to Figure 1 The video frame shown.

[0046] It is worth noting that the target video stream, transparent channel video stream and non-transparent channel video stream are all a kind of streaming data. Streaming data is a new data type, which is an ordered data sequence item. Streaming data can be transmitted through the Internet. Streaming data can include multimedia content such as audio and video. Different from the traditional downloading method, streaming data can be downloaded and played at the same time, and users can start watching without waiting for the complete file to be downloaded. In this embodiment, the target video stream, transparent channel video stream and non-transparent channel video stream are an ordered image data sequence item.

[0047] In a possible manner, the user may trigger a rendering operation for a target video stream based on an application with a video editing function and / or a video playing function installed in the electronic device. The rendering operation may be understood as an operation for playing the target video stream.

[0048] Among possible ways, the screen content can be stickers, videos, images, etc.

[0049] The video frames in the non-transparent channel video stream can be in RGB format or YUV format, and the non-transparent channel video stream includes color information for reflecting the video frames in the target video stream, and the color information can usually be represented by RGB information. RGB information represents red, green and blue color information, and adding them in different proportions can represent multiple colors; color information can be represented by YUV information, and the Y component in the YUV information represents brightness, and the U component and the V component represent chrominance, wherein the Y component can be separated and is independent of the U component and the V component.

[0050] The transparent channel video stream is used to reflect the transparency information of the video frame in the target video stream, and the transparency information is used to indicate the transparency of the pixel. For example, the transparency can be 0 or 1. In an image, if the pixel value is P1 and the transparency is 0, then when the image is displayed, the pixel point needs to be displayed transparently; if the pixel value is P1 and the transparency is 1, then when the image is displayed, the pixel point is displayed in the color corresponding to P1.

[0051] It is worth noting that the transparent video frame reflects the color information of each pixel of the corresponding video frame in the target video stream, and the non-transparent video frame reflects the transparency information of each pixel of the corresponding video frame in the target video stream. By synthesizing the transparent video frame and the non-transparent video frame, the video frame in the reconstructed target video stream can be obtained.

[0052] The image rendering process may refer to related technologies, and will not be described in detail in this embodiment.

[0053] Through the above technical scheme, the target video is obtained by superimposing the picture contents of at least multiple layers in a preset canvas area, and the target video stream is encoded to obtain a transparent channel video stream and a non-transparent channel video stream. The transparent channel video stream is used to reflect the transparency information of the video frame in the target video stream, and the non-transparent channel video stream is used to reflect the color information of the video frame in the target video stream. On this basis, in response to the rendering operation on the target video stream, the transparent channel video stream and the non-transparent channel video stream are decoded respectively to obtain transparent video frames and non-transparent video frames belonging to the same moment respectively, and the transparent video frames and the non-transparent video frames are synthesized to realize the consumption of transparent video as a mask of non-transparent video, thereby obtaining the video frames in the reconstructed target video stream, and then ensuring the required transparency effect of the target video stream when it is displayed.

[0054] In addition, this method can also support mainstream media formats such as RGB format or YUV format, and most hardware supports the above encoding and decoding.

[0055] In a possible manner, the above-mentioned video display method may further include the following steps: in response to the encoding operation, obtaining a target video stream; encoding the target video stream to obtain a transparent channel video stream and a non-transparent channel video stream.

[0056] For example, when a user uses an application with a video editing function to create a target video stream, after the creation is completed, the encoding of the target video stream can be triggered by the application with a video editing function, thereby obtaining a transparent channel video stream and a non-transparent channel video stream of the target video stream. In this way, it is convenient to render the target video stream in other applications or other electronic devices.

[0057] In a possible manner, the color information can be represented by the first RGB information, and the above-mentioned step of synthesizing the transparent video frame and the non-transparent video frame to obtain the video frame in the reconstructed target video stream can be implemented in the following manner: perform premultiplication processing on the first RGB information of the non-transparent video frame and the transparency information of the transparent video frame, and obtain the video frame in the reconstructed target video stream according to the result of the premultiplication processing.

[0058] The expression of the pixel pre-multiplication processing in this embodiment can be represented by the following formula (1):

[0059] NewR1=OldR1*Alpha1 (1)

[0060] In the above formula (1), NewR1 represents the RGB value of the pixel when it is displayed, OldR1 represents the RGB value without integrating the transparency information, Alpha1 represents the transparency information, and the value of Alpha1 is (0,1).

[0061] Thus, the first RGB information of each pixel in the non-transparent video frame and the transparency information of the corresponding pixel in the transparent video frame are pre-multiplied to obtain the pre-multiplied result of each pixel, where the pre-multiplied result is the above-mentioned NewR1.

[0062] In a possible manner, color information can be represented by YUV information, and the above-mentioned step of synthesizing the transparent video frame and the non-transparent video frame to obtain the video frame in the reconstructed target video stream can be implemented in the following manner: converting the YUV information of the non-transparent video frame into second RGB information; performing premultiplication processing on the second RGB information and the transparency information of the transparent video frame, and obtaining the video frame in the reconstructed target video stream according to the result of the premultiplication processing, and the transparency information of the transparent video frame is represented by the Y component of the transparent video frame.

[0063] The process of converting YUV information into RGB information may refer to the relevant technology, which will not be described in detail in this embodiment.

[0064] The premultiplication process in this embodiment is similar to the premultiplication process in the above embodiment. The expression of the premultiplication process of the pixel in this embodiment can be represented by the following formula (2):

[0065] NewR2=OldR2*Alpha2 (2)

[0066] Among them, NewR2 represents the RGB value of the pixel when it is displayed, OldR2 represents the RGB value without transparency information, Alpha2 represents transparency information, and the value of Alpha2 is (0,1).

[0067] It is worth noting that the pre-multiplied result is rendered and the corresponding rendering result is displayed.

[0068] In a possible manner, the preset video parameters of the transparent channel video stream and the non-transparent channel video stream are the same, and the preset video parameters may include resolution, display timestamp, and GOP structure. Among them, the display timestamp and GOP structure can ensure that the transparent video frame and the non-transparent video frame are aligned during decoding and display, and the consistent resolution can improve the display effect of the video frames in the reconstructed target video stream during display.

[0069] In a possible manner, transparent video frames and non-transparent video frames can be transmitted through the same pipeline. The pipeline is also called a rendering pipeline, which is a parallel processing unit that processes graphics signals independently inside a display chip. The transparent video frames and non-transparent video frames at the same time are transmitted to the rendering unit through the same pipeline for rendering, so that the rendering results are displayed.

[0070] In a possible manner, the above method may further include the following steps: when there is no corresponding transparent video frame for the non-transparent video frame, rendering the non-transparent video frame and displaying the rendering result.

[0071] It is understandable that at certain moments, the picture content can fill the entire preset canvas area. At this time, there is no need for a display area with a transparent effect, and therefore, there is no need to encode the corresponding transparency information.

[0072] Therefore, when there is no corresponding transparent video frame for a non-transparent video frame, no synthesis operation is required, and the non-transparent video frame is directly rendered and the rendering result is displayed.

[0073] Based on the same inventive concept, the embodiment of the present disclosure provides a video display device, Figure 3 is a block diagram of a video display device according to an exemplary embodiment of the present disclosure, referring to Figure 3 , the device 300 comprises:

[0074] A first acquisition module 301 is used to respond to a rendering operation on a target video stream, and acquire a transparent channel video stream and a non-transparent channel video stream obtained by encoding the target video stream, wherein the target video stream is obtained by superimposing at least a plurality of layers of picture contents in a preset canvas area, the transparent channel video stream is used to reflect transparency information of a video frame in the target video stream, and the non-transparent channel video stream is used to reflect color information of a video frame in the target video stream;

[0075] A decoding module 302, configured to decode the transparent channel video stream and the non-transparent channel video stream respectively, so as to obtain a transparent video frame and a non-transparent video frame belonging to the same moment respectively;

[0076] A synthesis module 303, used for synthesizing the transparent video frame and the non-transparent video frame to obtain a reconstructed video frame in the target video stream;

[0077] The first display module 304 is used to render the reconstructed video frame and display the rendering result.

[0078] In a possible manner, the device 300 further includes:

[0079] A second acquisition module, used for responding to the encoding operation and acquiring the target video stream;

[0080] The encoding module is used to encode the target video stream to obtain the transparent channel video stream and the non-transparent channel video stream.

[0081] In a possible manner, the color information is represented by first RGB information, and the synthesis module 303 is specifically used for:

[0082] Premultiplication processing is performed on the first RGB information of the non-transparent video frame and the transparency information of the transparent video frame, and a reconstructed video frame in the target video stream is obtained according to the result of the premultiplication processing.

[0083] In a possible manner, the color information is represented by YUV information, and the synthesis module 303 is specifically used for:

[0084] Converting the YUV information of the non-transparent video frame into second RGB information;

[0085] Premultiplication processing is performed on the second RGB information and the transparency information of the transparent video frame, and a video frame in the reconstructed target video stream is obtained according to the result of the premultiplication processing, and the transparency information of the transparent video frame is represented by the Y component of the transparent video frame.

[0086] In a possible manner, preset video parameters of the transparent channel video stream and the non-transparent channel video stream are the same, and the preset video parameters include resolution, display timestamp and GOP structure.

[0087] In a possible manner, the transparent video frame and the non-transparent video frame are transmitted through the same pipeline.

[0088] In a possible manner, the device 300 further includes:

[0089] The second display module is used to render the non-transparent video frame and display the rendering result when there is no corresponding transparent video frame for the non-transparent video frame.

[0090] Among them, the implementation methods of each module in the above-mentioned device 300 can refer to the above-mentioned related embodiments, and this embodiment will not be described in detail here.

[0091] Based on the same inventive concept, an embodiment of the present disclosure further provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processing device, the steps of the above-mentioned video display method are implemented.

[0092] Based on the same inventive concept, the present disclosure also provides an electronic device, including:

[0093] a storage device having a computer program stored thereon;

[0094] A processing device is used to execute the computer program in the storage device to implement the steps of the above-mentioned video display method.

[0095] Reference below Figure 4, which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0096] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0097] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0098] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0099] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0100] In some embodiments, the electronic device can communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0101] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0102] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: responds to a rendering operation on a target video stream, obtains a transparent channel video stream and a non-transparent channel video stream obtained by encoding the target video stream, wherein the target video stream is obtained by superimposing at least multiple layers of picture content in a preset canvas area, the transparent channel video stream is used to reflect the transparency information of the video frame in the target video stream, and the non-transparent channel video stream is used to reflect the color information of the video frame in the target video stream; decodes the transparent channel video stream and the non-transparent channel video stream respectively to obtain transparent video frames and non-transparent video frames belonging to the same moment respectively; synthesizes the transparent video frame and the non-transparent video frame to obtain a reconstructed video frame in the target video stream; renders the reconstructed video frame and displays the rendering result.

[0103] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0104] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0105] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a module does not, in some cases, limit the module itself.

[0106] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0107] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0108] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0109] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0110] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A video display method, characterized in that: include: In response to a rendering operation on a target video stream, a transparent channel video stream and a non-transparent channel video stream obtained by encoding the target video stream are obtained, wherein the target video stream is obtained by superimposing picture contents of at least a plurality of layers in a preset canvas area, the transparent channel video stream is used to reflect transparency information of a video frame in the target video stream, and the non-transparent channel video stream is used to reflect color information of a video frame in the target video stream; Decoding the transparent channel video stream and the non-transparent channel video stream respectively to obtain transparent video frames and non-transparent video frames belonging to the same moment respectively; Synthesizing the transparent video frame and the non-transparent video frame to obtain a reconstructed video frame in the target video stream; Render the reconstructed video frame and display the rendering result.

2. The method according to claim 1, characterized in that: The method further comprises: In response to the encoding operation, obtaining the target video stream; The target video stream is encoded to obtain the transparent channel video stream and the non-transparent channel video stream.

3. The method according to claim 1, characterized in that The color information is represented by first RGB information, and the transparent video frame and the non-transparent video frame are synthesized to obtain a reconstructed video frame in the target video stream, including: Premultiplication processing is performed on the first RGB information of the non-transparent video frame and the transparency information of the transparent video frame, and a reconstructed video frame in the target video stream is obtained according to the result of the premultiplication processing.

4. The method according to claim 1, characterized in that: The color information is represented by YUV information, and the transparent video frame and the non-transparent video frame are synthesized to obtain a video frame in the reconstructed target video stream, including: Converting the YUV information of the non-transparent video frame into second RGB information; Premultiplication processing is performed on the second RGB information and the transparency information of the transparent video frame, and a video frame in the reconstructed target video stream is obtained according to the result of the premultiplication processing, and the transparency information of the transparent video frame is represented by the Y component of the transparent video frame.

5. The method according to claim 1, characterized in that The preset video parameters of the transparent channel video stream and the non-transparent channel video stream are the same, and the preset video parameters include resolution, display timestamp and GOP structure.

6. The method according to claim 1, characterized in that The transparent video frame and the non-transparent video frame are transmitted through the same pipeline.

7. The method according to claim 1, characterized in that The method further comprises: In the case that the non-transparent video frame does not have a corresponding transparent video frame, the non-transparent video frame is rendered and the rendering result is displayed.

8. A video display device, characterized in that: A first acquisition module is used to respond to a rendering operation on a target video stream, and acquire a transparent channel video stream and a non-transparent channel video stream obtained by encoding the target video stream, wherein the target video stream is obtained by superimposing picture contents of at least a plurality of layers in a preset canvas area, the transparent channel video stream is used to reflect transparency information of a video frame in the target video stream, and the non-transparent channel video stream is used to reflect color information of a video frame in the target video stream; A decoding module, used for respectively decoding the transparent channel video stream and the non-transparent channel video stream to respectively obtain a transparent video frame and a non-transparent video frame belonging to the same moment; A synthesis module, used for synthesizing the transparent video frame and the non-transparent video frame to obtain a reconstructed video frame in the target video stream; The first display module is used to render the reconstructed video frame and display the rendering result.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Video generation and playing method and device, equipment and medium

    CN114760525A

  • Video image processing method, computer equipment and storage medium

    CN115396730A

  • Page display method and device, equipment, storage medium and product

    CN116527983A

  • Method for supporting H.264 coded video to play transparent channel content

    CN116582678A

  • Image file processing method, device and storage medium

    WO2018184468A1