CN112714357B - Video playing method, video playing device, electronic equipment and storage medium - Google Patents

Video playing method, video playing device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112714357B
CN112714357B CN202011522819.6A CN202011522819A CN112714357B CN 112714357 B CN112714357 B CN 112714357B CN 202011522819 A CN202011522819 A CN 202011522819A CN 112714357 B CN112714357 B CN 112714357B
Authority
CN
China
Prior art keywords
pixel point
frame
video
material video
transparency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011522819.6A
Other languages
Chinese (zh)
Other versions
CN112714357A (en
Inventor
于博洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202011522819.6A priority Critical patent/CN112714357B/en
Publication of CN112714357A publication Critical patent/CN112714357A/en
Application granted granted Critical
Publication of CN112714357B publication Critical patent/CN112714357B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/44012Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/265Mixing

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Image Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application discloses a video playing method, a video playing device, electronic equipment and a storage medium, and relates to the field of computer vision. The specific implementation scheme is as follows: receiving a material video sent by a server; wherein, each frame in the material video comprises a first image part and a second image part; image synthesis is carried out on each frame in the material video according to the transparency value carried by each first pixel point in the first image part and the color value carried by each second pixel point in the second image part, so that a synthesized frame corresponding to each frame in the material video is obtained; and sequentially rendering and displaying the corresponding synthesized frames according to the sequence of each frame in the material video. Therefore, the method can greatly reduce the resource volume, improve the GPU performance and improve the playing experience.

Description

Video playing method, video playing device, electronic equipment and storage medium
Technical Field
The present application relates to the field of image processing, and in particular, to the field of computer vision, and more particularly, to a video playing method, a video playing device, an electronic apparatus, and a storage medium.
Background
The video itself is made up of a set of encoded sequential frame pictures. When the sequential frame pictures are played each time, the pictures need to be parsed again, the consumption GPU (Graphics Processing Unit, graphics processor) performance is relatively large, and the sequential frame picture material resource volume is relatively large.
Therefore, how to improve GPU performance and reduce resource size is a current urgent problem to be solved.
Disclosure of Invention
The application provides a video playing method, a video playing device, electronic equipment and a storage medium.
According to an aspect of the present application, there is provided a video playing method, including:
receiving a material video sent by a server; wherein, each frame in the material video comprises a first image part and a second image part;
image synthesis is carried out on each frame in the material video according to the transparency value carried by each first pixel point in the first image part and the color value carried by each second pixel point in the second image part, so that a synthesized frame corresponding to each frame in the material video is obtained;
and sequentially rendering and displaying the corresponding synthesized frames according to the sequence of each frame in the material video.
According to another aspect of the present application, there is provided a video playing device including:
the receiving module is used for receiving the material video sent by the server; wherein, each frame in the material video comprises a first image part and a second image part;
the acquisition module is used for carrying out image synthesis on each frame in the material video according to the transparency value carried by each first pixel point in the first image part and the color value carried by each second pixel point in the second image part to obtain a synthesized frame corresponding to each frame in the material video;
and the control module is used for sequentially rendering and displaying the corresponding synthesized frames according to the sequence of the frames in the material video.
According to another aspect of the present application, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described above.
According to another aspect of the present application there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the above-described method.
According to another aspect of the application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method described above.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
The drawings are included to provide a better understanding of the present application and are not to be construed as limiting the application. Wherein:
fig. 1 is a flowchart of a video playing method according to an embodiment of the present application;
fig. 2 is a flowchart of another video playing method according to an embodiment of the present application;
fig. 3 is a block diagram of a video playing device according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device provided according to an embodiment of the present application.
Detailed Description
Exemplary embodiments of the present application will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present application are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
A video playing method, a video playing apparatus, an electronic device, and a storage medium according to embodiments of the present application are described below with reference to the accompanying drawings.
Before describing the video playing method according to the embodiment of the present application, a lower alpha channel will be described.
The Alpha Channel (Alpha Channel or Alpha Channel) refers to the transparency and translucency of a picture. For example, a bitmap stored using 16 bits per pixel may represent the red channel (R channel), 5 bits represent the green channel (G channel), 5 bits represent the blue channel (B channel), and the last 1 bit is the alpha channel for each pixel in the graphic. In this case it is either transparent or not, since the alpha bit has the possibility of only two different representations of 0 or 1. As another example, a bitmap stored using 32 bits, each 8 bits representing red, green, blue (RGB) and alpha channels. In this case, it is possible to represent not only transparency or opacity, but also 256 levels of translucency for the alpha channel, since the alpha channel has 8 bits, and 256 different data representation possibilities are possible.
Fig. 1 is a flowchart of a video playing method according to an embodiment of the present application.
The video playing method of the embodiment of the application can be executed by the video playing device provided by the embodiment of the application, and the device can be configured in electronic equipment.
As shown in fig. 1, a video playing method according to an embodiment of the present application includes:
step S101, receiving a material video sent by a server; wherein each frame in the material video comprises a first image part and a second image part.
In this step, each pixel point in the material video carries four channels, which are RGB and alpha channels, and the first image portion and the second image portion have the same picture size, and each first pixel point in the first image portion corresponds to each second pixel point in the second image portion one by one. Wherein, each first pixel point in the first image portion stores only the original content of the video (color value of RGB channel), does not store transparency (transparency value of alpha channel is set to be 0), or stores only transparency value (transparency value of alpha channel), does not store one of the original content of the video (color value of RGB channel is set to be 0), and each second pixel point in the second image portion stores only the original content of the video, does not store transparency, or stores only transparency, and does not store the other one of the original content of the video.
It is assumed that the terminal receives the material video transmitted from the server, the material video is like a mirror image video, and color information without RGB channels is played from the middle of the material video, for example, on one side, transparency information without alpha channels is played from the other side, for example, transparency information without alpha channels is played from the right side, and color information with RGB channels is played from the other side. That is, one side of the material video is transparent, and the other side is not transparent.
It should be noted that, in order to reduce the resource volume, the server may not store so many pictures, and store MP4 material videos, so that each picture only records the difference between the front and rear of the picture through the compression logic relationship in MP4, if a 200M material video is replaced by an MP4 format, even 1M may not be reached, so that the resource volume can be greatly reduced.
Step S102, image synthesis is carried out on each frame in the material video according to the transparency value carried by each first pixel point in the first image part and the color value carried by each second pixel point in the second image part, so as to obtain a synthesized frame corresponding to each frame in the material video.
Generally, when a sequence frame picture of a video is played, the sequence frame picture itself contains information of an alpha channel, so that color can be seen, but the information of the alpha channel is lost after the sequence frame picture is converted into the video.
And particularly judging whether the transparency value carried by each first pixel point in the first image part is transparent or non-transparent for any frame in the material video. If the transparency value carried by the first pixel point is transparent, indicating that the synthesized pixel point of the synthesized frame corresponding to the first pixel point of the frame is transparent; if the transparency value carried by the first pixel point is non-transparent, a second pixel point corresponding to the first pixel point is found from the second image part according to the first pixel point, and according to the relation between the first pixel point and the second pixel point, for example, the transparency value of an alpha channel of the first pixel point is multiplied by the color value of an RGB channel of the second pixel point, so as to obtain the value of a synthesized pixel point of a synthesized frame corresponding to the first pixel point of the frame.
It should be noted that each frame obtained by synthesis may not be a complete block, and there may be a partially missing pixel in the middle, and the missing pixel may achieve a hollowed-out effect, and a transparent effect is shown in the live video.
Step S103, sequentially rendering and displaying the corresponding synthesized frames according to the sequence of the frames in the material video.
In the step, after the synthesized frame corresponding to each frame in the material video is obtained, according to the sequence of each frame in the material video, the Metal color is used for mixing and rendering, after rendering, the screen function is realized, and the animation is displayed, and is played transparently.
For example, the terminal plays the material video as a transparent video. It is assumed that the video has some elements below, through which the following elements can be seen, and in particular can be used in live broadcast, such as playing gifts.
Therefore, in the video playing method of the embodiment of the application, firstly, receiving the material video of which each frame comprises the first image part and the second image part and is sent by the server, and carrying out image synthesis on each frame in the material video according to the transparency value carried by each first pixel point in the first image part and the color value carried by each second pixel point in the second image part to obtain the corresponding synthetic frame of each frame in the material video, and sequentially rendering and displaying the corresponding synthetic frame according to the sequence of each frame in the material video. Therefore, the method can greatly reduce the resource volume, improve the GPU performance, restore the alpha channel of the picture when playing the video, and improve the playing experience.
Fig. 2 is a flowchart of another video playing method according to an embodiment of the present application.
As shown in fig. 2, the video playing method according to the embodiment of the present application includes:
step S201, a compressed file of a material video transmitted by a server is received.
In order to further reduce the resource volume of the material video, the material video is stored in a server in a compressed file form in advance, so that the compressed file of the material video is directly called when needed.
Step S202, decompressing the compressed file to obtain a material video; the pixel points of each frame in the material video comprise a transparency channel for carrying a transparency value and a color channel for carrying a color value.
After obtaining the compressed file, the terminal starts decompression to obtain the material video.
The content of the material video is referred to step S101, which is not described in detail in this embodiment.
Step S203, for any frame in the material video, determining a first target pixel point from the first image part according to the transparency value carried by each first pixel point in the first image part; the transparency value carried by the first target pixel point represents non-transparency.
In this step, for any frame in the material video, it is determined whether the transparency value carried by each first pixel point in the first image portion is transparent or non-transparent, and the transparency value carried by the first pixel point is a non-transparent pixel point, which is used as the first target pixel point.
Step S204, determining a second target pixel point corresponding to the first target pixel point from the second image portion.
That is, according to the first target pixel point, the pixel point corresponding to the arrangement position is found in the second image portion and is used as the second target pixel point.
Step S205, generating a composite frame according to the second target pixel point; the composite frame comprises a plurality of composite pixel points, each composite pixel point is provided with a corresponding second target pixel point, and the color value carried by the color channel of each composite pixel point is determined according to the color value carried by the color channel of the corresponding second target pixel point.
The synthesized pixel points are in one-to-one correspondence with the second target pixel points; the arrangement position of each synthesized pixel point in the synthesized frame is the same as the arrangement position of each second target pixel point in the second image portion.
In this step, after the first target pixel point and the second target pixel point are obtained, the value of the synthesized pixel point of the synthesized frame corresponding to the first pixel point of the frame is obtained according to the relationship between the first target pixel point and the second pixel point, for example, by multiplying the transparency value of the alpha channel of the first pixel point by the color value of the RGB channel of the second pixel point.
Step S206, sequentially rendering and displaying the corresponding synthesized frames according to the sequence of the frames in the material video.
The specific process is referred to step S103, which is not described in detail in this embodiment.
After the video material is obtained, the terminal records the transparency information of the alpha channel when analyzing the video material, removes the transparency information when playing the video, is in a buffer form, and finally converts the transparency information into textures by using the Metal to play the texture.
Specifically, when playing video, transparency information recorded by an alpha channel of a left picture is found first, which pixel needs to be displayed according to the transparency information, which pixel does not need to be displayed (transparency is 0 information and display is not needed), according to the arrangement position of pixel points needing to be displayed, pixel points corresponding to the arrangement position of the transparency information recorded by an RGB channel of a right picture are copied, if found, the pixel points of the right picture are calculated to obtain a synthesized pixel point, and finally the finally played effect is that if the information of the alpha channel is transparent, the pixel point is not played, then the video is finally displayed with a transparent effect, namely, the material video supports the alpha channel, alpha information can be restored when played, the playing experience is improved, the resource volume is greatly reduced, and the GPU performance is improved.
In summary, in the video playing method of the embodiment of the present application, a compressed file of a material video sent by a server is received, the compressed file is decompressed to obtain a material video in which each frame includes a first image portion and a second image portion, then, for any frame in the material video, according to a transparency value carried by each first pixel point in the first image portion, a first non-transparent target pixel point represented by the carried transparency value is determined from the first image portion, a second target pixel point corresponding to the first target pixel point is determined from the second image portion, a composite frame is generated according to the second target pixel point, and corresponding composite frames are sequentially rendered and displayed according to the sequence of each frame in the material video. Therefore, by the method, some complex animations such as spring effect, 3D deformation, light shadow, particle special effects and the like can be realized, development cost is reduced, resource volume can be greatly reduced, GPU performance is improved, an alpha channel of a picture can be restored when video is played, playing experience is improved, the problem of platform compatibility is solved, and good performance can be realized on different systems.
In order to achieve the above embodiments, the embodiments of the present application further provide a video playing device.
Fig. 3 is a schematic structural diagram of a video playing device according to an embodiment of the present application.
As shown in fig. 3, a video playing device 300 according to an embodiment of the present application includes: a receiving module 310, an obtaining module 320 and a control module 330.
The receiving module 310 is configured to receive a material video sent by the server; each frame in the material video comprises a first image part and a second image part;
the obtaining module 320 is configured to perform image synthesis on each frame in the material video according to the transparency value carried by each first pixel point in the first image portion and the color value carried by each second pixel point in the second image portion, so as to obtain a synthesized frame corresponding to each frame in the material video;
the control module 320 is configured to sequentially render and display the corresponding synthesized frames according to the sequence of frames in the material video.
In one possible implementation manner of the embodiment of the present application, the obtaining module 320 includes:
the first determining unit is used for determining a first target pixel point from the first image part according to the transparency value carried by each first pixel point in the first image part for any frame in the material video; the transparency value carried by the first target pixel point represents non-transparency;
a second determining unit, configured to determine a second target pixel point corresponding to the first target pixel point from the second image portion;
the generating unit is used for generating a composite frame according to the second target pixel point;
the composite frame comprises a plurality of composite pixel points, each composite pixel point is provided with a corresponding second target pixel point, and the color value carried by the color channel of each composite pixel point is determined according to the color value carried by the color channel of the corresponding second target pixel point.
The synthesized pixel points are in one-to-one correspondence with the second target pixel points; the arrangement position of each synthesized pixel point in the synthesized frame is the same as the arrangement position of each second target pixel point in the second image portion.
Wherein each frame of the material video contains a first image portion and a second image portion of the same picture size; each first pixel point in the first image part corresponds to each second pixel point in the second image part one by one.
In one possible implementation manner of the embodiment of the present application, the receiving module 310 includes:
the receiving unit is used for receiving the compressed file of the material video sent by the server;
the acquisition unit is used for decompressing the compressed file to obtain a material video; the pixel points of each frame in the material video comprise a transparency channel for carrying a transparency value and a color channel for carrying a color value.
It should be noted that the explanation of the foregoing embodiment of the video playing method is also applicable to the video playing device of this embodiment, so that the explanation is omitted here.
According to the video playing device provided by the embodiment of the application, the receiving module is used for receiving the material video, which is sent by the server, of each frame comprising the first image part and the second image part, the obtaining module is used for carrying out image synthesis on each frame in the material video according to the transparency value carried by each first pixel point in the first image part and the color value carried by each second pixel point in the second image part, so as to obtain a synthesis frame corresponding to each frame in the material video, and the control module is used for sequentially rendering and displaying the corresponding synthesis frame according to the sequence of each frame in the material video. Therefore, the device can greatly reduce the resource volume, improve the GPU performance, restore the alpha channel of the picture when playing the video, improve the playing experience, solve the problem of platform compatibility and have good performance on different systems. In addition, some complex animations can be realized, such as the realization of spring effect, 3D deformation, light shadow, particle special effects and the like, and the development cost is reduced.
According to embodiments of the present application, the present application also provides an electronic device, a readable storage medium and a computer program product.
Fig. 4 shows a schematic block diagram of an example electronic device 400 that may be used to implement an embodiment of the application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 4, the apparatus 400 includes a computing unit 401 that can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 402 or a computer program loaded from a storage unit 408 into a RAM (Random Access Memory ) 403. In RAM 403, various programs and data required for the operation of device 400 may also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An I/O (Input/Output) interface 405 is also connected to bus 404.
Various components in device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, etc.; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 401 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 401 include, but are not limited to, a CPU (Central Processing Unit ), a GPU (Graphic Processing Units, graphics processing unit), various dedicated AI (Artificial Intelligence ) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor ), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the respective methods and processes described above, for example, a video playback method. For example, in some embodiments, the video playback method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 400 via the ROM 402 and/or the communication unit 409. When a computer program is loaded into RAM 403 and executed by computing unit 401, one or more steps of the video playback method described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the video playback method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit System, FPGA (Field Programmable Gate Array ), ASIC (Application-Specific Integrated Circuit, application-specific integrated circuit), ASSP (Application Specific Standard Product, special-purpose standard product), SOC (System On Chip ), CPLD (Complex Programmable Logic Device, complex programmable logic device), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory, erasable programmable read-Only Memory) or flash Memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display ) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network ), WAN (Wide Area Network, wide area network), internet and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service ("Virtual Private Server" or simply "VPS") are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present disclosure may be performed in parallel, sequentially, or in a different order, so long as the desired result of the technical solution of the present disclosure is achieved, and the present disclosure is not limited herein.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.

Claims (10)

1. A video playing method, comprising:
receiving a material video sent by a server; wherein, each frame in the material video comprises a first image part and a second image part;
image synthesis is carried out on each frame in the material video according to the transparency value carried by each first pixel point in the first image part and the color value carried by each second pixel point in the second image part, so that a synthesized frame corresponding to each frame in the material video is obtained;
sequentially rendering and displaying the corresponding synthesized frames according to the sequence of each frame in the material video;
the image synthesis according to the transparency value carried by each first pixel point in the first image portion and the color value carried by each second pixel point in the second image portion includes:
determining a first target pixel point from the first image part according to the transparency value carried by each first pixel point in the first image part for any frame in the material video; the transparency value carried by the first target pixel point represents non-transparency;
determining a second target pixel point corresponding to the first target pixel point from the second image part;
generating the synthesized frame according to the second target pixel point;
the composite frame comprises a plurality of composite pixel points, each composite pixel point is provided with a corresponding second target pixel point, the color value carried by the color channel of each composite pixel point is determined according to the color value carried by the color channel of the corresponding second target pixel point, the plurality of composite pixel points are obtained by multiplying the transparency value of the transparency channel of the first pixel point by the color value of the color channel of the second pixel point, and the value of the composite pixel point of the composite frame corresponding to the first pixel point is obtained, wherein the pixel points of each frame in the material video comprise the transparency channel for carrying the transparency value and the color channel for carrying the color value.
2. The video playing method according to claim 1, wherein the synthesized pixel points are in one-to-one correspondence with the second target pixel points; the arrangement position of each of the synthesized pixel points in the synthesized frame is the same as the arrangement position of each of the second target pixel points in the second image portion.
3. The video playback method according to any one of claims 1 to 2, wherein each frame of the material video contains a first image portion and the second image portion of the same picture size; each first pixel point in the first image part corresponds to each second pixel point in the second image part one by one.
4. The video playing method according to claim 1, wherein the receiving the material video sent by the server includes:
receiving a compressed file of the material video sent by the server;
decompressing the compressed file to obtain the material video.
5. A video playback device comprising:
the receiving module is used for receiving the material video sent by the server; wherein, each frame in the material video comprises a first image part and a second image part;
the acquisition module is used for carrying out image synthesis on each frame in the material video according to the transparency value carried by each first pixel point in the first image part and the color value carried by each second pixel point in the second image part to obtain a synthesized frame corresponding to each frame in the material video;
the control module is used for sequentially rendering and displaying the corresponding synthesized frames according to the sequence of each frame in the material video;
the acquisition module comprises:
a first determining unit, configured to determine, for any frame in the material video, a first target pixel point from the first image portion according to a transparency value carried by each first pixel point in the first image portion; the transparency value carried by the first target pixel point represents non-transparency;
a second determining unit, configured to determine a second target pixel point corresponding to the first target pixel point from the second image portion;
the generating unit is used for generating the synthesized frame according to the second target pixel point;
the composite frame comprises a plurality of composite pixel points, each composite pixel point is provided with a corresponding second target pixel point, the color value carried by the color channel of each composite pixel point is determined according to the color value carried by the color channel of the corresponding second target pixel point, and the plurality of composite pixel points are obtained by multiplying the transparency value of the transparency channel of the first pixel point by the color value of the color channel of the second pixel point; the pixel points of each frame in the material video comprise a transparency channel for carrying a transparency value and a color channel for carrying a color value.
6. The video playback device of claim 5, wherein the synthesized pixel points are in one-to-one correspondence with the second target pixel points; the arrangement position of each of the synthesized pixel points in the synthesized frame is the same as the arrangement position of each of the second target pixel points in the second image portion.
7. The video playback device according to any one of claims 5 to 6, wherein each frame of the material video contains a first image portion and the second image portion of the same picture size; each first pixel point in the first image part corresponds to each second pixel point in the second image part one by one.
8. The video playback device of claim 5, wherein the receiving module comprises:
the receiving unit is used for receiving the compressed file of the material video sent by the server;
and the acquisition unit is used for decompressing the compressed file to obtain the material video.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-4.
CN202011522819.6A 2020-12-21 2020-12-21 Video playing method, video playing device, electronic equipment and storage medium Active CN112714357B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011522819.6A CN112714357B (en) 2020-12-21 2020-12-21 Video playing method, video playing device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011522819.6A CN112714357B (en) 2020-12-21 2020-12-21 Video playing method, video playing device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112714357A CN112714357A (en) 2021-04-27
CN112714357B true CN112714357B (en) 2023-10-13

Family

ID=75544955

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011522819.6A Active CN112714357B (en) 2020-12-21 2020-12-21 Video playing method, video playing device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112714357B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114173157B (en) * 2021-12-10 2022-12-16 广州博冠信息科技有限公司 Video stream transmission method and device, electronic equipment and storage medium
CN114679620A (en) * 2022-03-25 2022-06-28 湖南快乐阳光互动娱乐传媒有限公司 Video playing method and device with alpha channel and electronic equipment
CN114915839B (en) * 2022-04-07 2024-04-16 广州方硅信息技术有限公司 Rendering processing method for inserting video support element, electronic terminal and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1556835A1 (en) * 2002-10-30 2005-07-27 Canon Kabushiki Kaisha Method of background colour removal for porter and duff compositing
WO2013108493A1 (en) * 2012-01-17 2013-07-25 本田技研工業株式会社 Image processing device
CN107818548A (en) * 2017-10-27 2018-03-20 上海京颐科技股份有限公司 A kind of image processing method, device, equipment and computer-readable medium
CN108295467A (en) * 2018-02-06 2018-07-20 网易(杭州)网络有限公司 Rendering method, device and the storage medium of image, processor and terminal
CN109272565A (en) * 2017-07-18 2019-01-25 腾讯科技(深圳)有限公司 Animation playing method, device, storage medium and terminal
CN111968214A (en) * 2020-07-29 2020-11-20 完美世界(北京)软件科技发展有限公司 Volume cloud rendering method and device, electronic equipment and storage medium
CN112070863A (en) * 2019-06-11 2020-12-11 腾讯科技(深圳)有限公司 Animation file processing method and device, computer readable storage medium and computer equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AUPQ593100A0 (en) * 2000-02-29 2000-03-23 Canon Kabushiki Kaisha Alpha-channel compositing system
US10290134B2 (en) * 2016-06-01 2019-05-14 Adobe Inc. Coverage based approach to image rendering using opacity values
CN106331850B (en) * 2016-09-18 2020-01-24 上海幻电信息科技有限公司 Browser live broadcast client, browser live broadcast system and browser live broadcast method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1556835A1 (en) * 2002-10-30 2005-07-27 Canon Kabushiki Kaisha Method of background colour removal for porter and duff compositing
WO2013108493A1 (en) * 2012-01-17 2013-07-25 本田技研工業株式会社 Image processing device
CN109272565A (en) * 2017-07-18 2019-01-25 腾讯科技(深圳)有限公司 Animation playing method, device, storage medium and terminal
CN107818548A (en) * 2017-10-27 2018-03-20 上海京颐科技股份有限公司 A kind of image processing method, device, equipment and computer-readable medium
CN108295467A (en) * 2018-02-06 2018-07-20 网易(杭州)网络有限公司 Rendering method, device and the storage medium of image, processor and terminal
CN112070863A (en) * 2019-06-11 2020-12-11 腾讯科技(深圳)有限公司 Animation file processing method and device, computer readable storage medium and computer equipment
CN111968214A (en) * 2020-07-29 2020-11-20 完美世界(北京)软件科技发展有限公司 Volume cloud rendering method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112714357A (en) 2021-04-27

Similar Documents

Publication Publication Date Title
CN112714357B (en) Video playing method, video playing device, electronic equipment and storage medium
US10110936B2 (en) Web-based live broadcast
JP6504212B2 (en) Device, method and system
CN103688240B (en) For sending method and the transmitters and receivers scene process equipment of numeral scene description data
CN113946402A (en) Cloud mobile phone acceleration method, system, equipment and storage medium based on rendering separation
CN108235055B (en) Method and device for realizing transparent video in AR scene
US10440360B2 (en) Video processing system
US11882297B2 (en) Image rendering and coding method and related apparatus
US9251731B2 (en) Multi-sampling anti-aliasing compression by use of unreachable bit combinations
US8988434B1 (en) Text rendering for browsers and mobile based applications
US9721359B2 (en) Apparatus and method of decompressing rendering data and recording medium thereof
CN113655975B (en) Image display method, image display device, electronic apparatus, and medium
CN112991412B (en) Liquid crystal instrument sequence frame animation performance optimization method and liquid crystal instrument
CN110782387B (en) Image processing method and device, image processor and electronic equipment
CN114356868A (en) Three-dimensional model file processing method and related equipment thereof
CN111614906B (en) Image preprocessing method and device, electronic equipment and storage medium
CN115988265A (en) Rendering method and device of display picture and terminal equipment
CN115861510A (en) Object rendering method, device, electronic equipment, storage medium and program product
CN114760526A (en) Video rendering method and device, electronic equipment and storage medium
CN113836455A (en) Special effect rendering method, device, equipment, storage medium and computer program product
CN114979541A (en) Video display system
CN114904274A (en) Picture rendering method and device of cloud game, electronic equipment and storage medium
CN113160377B (en) Method, apparatus, device and storage medium for processing image
CN113542620B (en) Special effect processing method and device and electronic equipment
CN115205176A (en) Image storage method, device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant