CN108632540B - Video processing method and device - Google Patents

Video processing method and device Download PDF

Info

Publication number
CN108632540B
CN108632540B CN201710179798.4A CN201710179798A CN108632540B CN 108632540 B CN108632540 B CN 108632540B CN 201710179798 A CN201710179798 A CN 201710179798A CN 108632540 B CN108632540 B CN 108632540B
Authority
CN
China
Prior art keywords
video
special effect
video frame
opengl
texture
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
CN201710179798.4A
Other languages
Chinese (zh)
Other versions
CN108632540A (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 Xiaochang Technology Co ltd
Original Assignee
Beijing Xiaochang 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 Xiaochang Technology Co ltd filed Critical Beijing Xiaochang Technology Co ltd
Priority to CN201710179798.4A priority Critical patent/CN108632540B/en
Publication of CN108632540A publication Critical patent/CN108632540A/en
Application granted granted Critical
Publication of CN108632540B publication Critical patent/CN108632540B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention provides a video processing method and a video processing device, wherein the method comprises the following steps: according to the downloaded configuration file of the video special effects, special effect material information of the video special effects used for the OpenGL ES platform and a corresponding relation between the configuration information of each video special effect and a timestamp of a video frame are constructed; if the OpenGL ES platform receives a video frame, searching configuration information of at least one target video special effect corresponding to the timestamp of the received video frame in the corresponding relation; determining target special effect materials of at least one target video special effect in the special effect material information; and adding at least one target video special effect to the received video frame and playing the video frame according to the configuration information of the at least one target video special effect and the target special effect material. The invention can reduce the development cost and improve the development efficiency, and the problem of different video special effect of the two system platforms can be avoided, thereby improving the user experience.

Description

Video processing method and device
Technical Field
The present invention relates to the field of video processing technologies, and in particular, to a video processing method and apparatus.
Background
In current video applications, video special effects functions (e.g., stickers, video themes, etc.) are already a common and mandatory function.
However, in the current opening of video special effect functions, the respective platforms generally have the effect of the respective platforms. Specifically, the android system and the IOS system are used as two major systems of the mobile terminal, and are incompatible in terms of source code opening, so that when the two platforms are opened for video special effects, developers of each platform need to be in butt joint with designers of the video special effects, then the developers need to see which video effects can be made and which video special effects cannot be made according to an API interface provided by the platform, and finally the developers need to adjust UI effects. That is, when the same video special effect is opened, two groups of manpower and material resources need to be mobilized to process the same thing facing two terminal systems, and the whole process is time-consuming and labor-consuming; in addition, because the API interfaces of the two system platforms are different, the effect of the same special effect displayed on the two systems is not uniform, and the user experience is reduced.
Therefore, in the prior art, when the video is subjected to special effect increasing processing, the problems of higher development time cost, higher labor cost and non-uniform video special effect effects of different system platforms generally exist.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide a video processing method and apparatus, so as to solve the problems of high development time cost, high labor cost and non-uniform video special effect effects of different system platforms when a video is processed to increase a special effect in the prior art.
In order to solve the above problem, according to an aspect of the present invention, there is disclosed a video processing method including:
according to the downloaded configuration file of the video special effects, special effect material information of the video special effects used for the OpenGL ES platform and a corresponding relation between the configuration information of each video special effect and a timestamp of a video frame are constructed;
if the OpenGL ES platform receives a video frame, searching configuration information of at least one target video special effect corresponding to the timestamp of the received video frame in the corresponding relation;
determining a target special effect material of the at least one target video special effect in the special effect material information;
and adding at least one target video special effect to the received video frame and playing the video frame according to the configuration information of the at least one target video special effect and the target special effect material.
According to another aspect of the present invention, the present invention also discloses a video processing apparatus, comprising:
the construction module is used for constructing special effect material information of the video special effects used for the OpenGL ES platform and a corresponding relation between the configuration information of each video special effect and a timestamp of a video frame according to the downloaded configuration file of the video special effects;
the search module is used for searching the configuration information of at least one target video special effect corresponding to the timestamp of the received video frame in the corresponding relation if the OpenGL ES platform receives one video frame;
a determining material module, configured to determine a target special effect material of the at least one target video special effect in the special effect material information;
and the special effect adding module is used for adding at least one target video special effect to the received video frame and playing the video frame according to the configuration information of the at least one target video special effect and the target special effect material.
Compared with the prior art, the embodiment of the invention has the following advantages:
the embodiment of the invention can utilize OpenGL ES platforms of an android system and an IOS system to develop video special effects, so that only one set of codes is developed for two platform systems, and two-part code and two-part butting work can be changed into one-part code and one-part butting work, thereby greatly reducing the cost and increasing the efficiency; and because the two system platforms develop and utilize OpenGL ES, and the used API interfaces are the same, the problem of different video special effect of the two system platforms can be solved, and the user experience is improved.
Drawings
FIG. 1 is a flow chart of the steps of one embodiment of a video processing method of the present invention;
fig. 2 is a block diagram of a video processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Referring to fig. 1, a flowchart illustrating steps of an embodiment of a video processing method according to the present invention is shown, and before describing specific steps of the video processing method according to the embodiment of the present invention, first, the following description is made on an OpenGL ES (OpenGL for embedded Systems) platform used in the present invention:
the OpenGL ES platform is used in embedded equipment and is a set of protocols for drawing graphic images; OpenGL ES is a subset of OpenGL three-dimensional graphics APIs, and is specifically designed for embedded devices such as mobile phones, PDAs, and game hosts. Moreover, OpenGL ES is a cross-platform, well-functioning 2D and 3D graphics application program interface API, designed specifically for a variety of embedded systems-including consoles, mobile phones, handheld devices, home appliances, and automobiles. The system consists of well-defined desktop OpenGL subsets, and creates a flexible and powerful bottom layer interactive interface between software and graphics acceleration. OpenGL ES contains floating point and fixed point arithmetic system descriptions and EGL local window system specifications for portable devices.
In the process of implementing the invention, the inventor finds that the bottom layer of the android system and the iOS system supports OpenGL ES. Therefore, the problems of high development time cost, high labor cost and non-uniform video special effect of different system platforms in the process of respectively developing the video special effects of the two system platforms are solved. Here, the embodiment of the present invention is based on c and c + + languages, and utilizes the OpenGL technology, so as to design and implement a set of video special effect framework that can be operated on two system platforms of Android and iOS, and implement a function of adding special effects (such as stickers, video themes, etc.) to a video. In the development process, only developers developing OpenGL ES need to go to designers of video special effects, UI designers and later-stage UI detail adjustment work to serve as interface users, therefore, communication at different levels of the system is unified to one developer, the workload and the cost are saved, and the development efficiency is improved.
The steps of the embodiment of the method for processing the video by using the OpenGL ES platform are as follows:
step 101, constructing special effect material information of video effects used for an OpenGL ES platform and a corresponding relation between configuration information of each video effect and a timestamp of a video frame according to a downloaded configuration file of the video effects;
the user can manually download the configuration file of the hot updated video special effect from the video special effect application store, and then after downloading the compressed package of the configuration file, the decompressed configuration file (namely, a plurality of file directories and information in the file directories) can be obtained through decompression;
then, according to the decompressed configuration file, the embodiment of the present invention can construct special effect material information (which may relate to multiple special effects) of video special effects for the OpenGL ES platform and a corresponding relationship between configuration information of each video special effect and a timestamp of a video frame.
For example: the special film leader effect has a corresponding relation between the configuration information of the special film leader effect and the time stamp of the video frame; the special effects in the slices have a corresponding relation between configuration information of the special effects in the slices and a time stamp of a video frame; the film trailer effect has a corresponding relation between configuration information of the film trailer effect and a time stamp of a video frame.
Step 102, if the OpenGL ES platform receives a video frame, searching configuration information of at least one target video special effect corresponding to a timestamp of the received video frame in the corresponding relationship;
then, when the OpenGL ES platform receives a video frame, it may search, in the constructed correspondence, whether there is configuration information of a video special effect corresponding to a timestamp of the received video frame; if the corresponding configuration information exists, the received video frame is determined to need special effect processing, and the corresponding special effect can be added.
103, determining a target special effect material of the at least one target video special effect in the special effect material information;
when adding a special effect to the video frame, not only configuration information of the video special effect but also materials used for the video special effect, such as static images, dynamic images and the like, are required. The constructed special effect material information includes all available materials in the downloaded video special effect compression package and information of which special effect the materials correspond to, so that the target special effect material corresponding to the at least one target video special effect can be determined in the special effect material information.
And 104, adding at least one target video special effect to the received video frame and playing the video frame according to the configuration information of the at least one target video special effect and the target special effect material.
And finally, drawing at least one target video special effect on the received video frame according to the configuration information of the at least one target video special effect and the target special effect material, and playing the video frame with the drawn video special effect.
By means of the technical scheme of the embodiment of the invention, the embodiment of the invention can utilize OpenGL ES platforms of both an android system and an IOS system to develop video special effects, so that only one set of codes needs to be developed for two platform systems, and two codes and two butt joint work can be changed into one code and one butt joint work, thereby greatly reducing the cost and increasing the efficiency; and because the two system platforms develop and utilize OpenGL ES, and the used API interfaces are the same, the problem of different video special effect of the two system platforms can be solved, and the user experience is improved.
On the basis of the above embodiments, the present embodiment further discusses the video processing method according to the embodiments of the present invention, and the specific steps are as follows:
first, a Frame Buffer Object (FBO) is created;
where FBO is analogous to a block of storage area.
Then, binding the FBO into the OpenGL ES platform;
then, according to the downloaded configuration file of the video special effect, constructing special effect material information and a filter set (filter) for the OpenGL ES platform;
each filter contains the corresponding relation between the configuration information of one video special effect and the time stamp of the video frame, and different filters correspond to different video special effects.
Specifically, after a user downloads a hot-update video special effect compression package (for example, including N special effects) to, for example, a mobile terminal in a video special effect store, the embodiment of the present invention may automatically decompress the video special effect compression package, so as to obtain a file directory of a configuration file, and specific configuration information and material information in the directory;
here, the embodiment of the present invention may use the decompressed configuration file to construct special effect material information (for example, various pictures, various decorations, etc.) and a filter set for an OpenGL ES platform (that is, the information can be used in an OpenGL ES), where the filter set is referred to as a Model, where each filter corresponds to a video special effect, and the video special effects corresponding to different filters are different. For example, filter1 corresponds to effect 1, filter2 corresponds to effect 2; and each filter contains such a kind of customization information: i.e. the customized information on which frame of the video frame this special effect should be displayed, and how it should be displayed. Specifically, the filter1 contains the corresponding relationship between the configuration information of the special effect 1 and 0s to 3s, that is, the special effect 1 is applied to the video frame with the timestamp of 0s to 3 s; the filter2 contains the correspondence between the configuration information of the special effect 2 and 0s to 5s, i.e., the special effect 2 is applied to the video frames with timestamps of 0s to 5 s.
After the above construction steps are completed, if the OpenGL ES platform receives a video frame, the corresponding relationship between the configuration information of each video special effect and the timestamp of the video frame is converted into vertex coordinates that can be identified by the OpenGL ES platform.
That is, each filter in the set of filters is converted into vertex coordinates that the OpenGL ES platform can recognize.
It should be noted that the video frames received by the OpenGL ES platform may be video frames captured from a camera or from a video decoder, i.e. the source of the video frames is not particularly limited in the present invention.
And when the OpenGL ES platform receives a video frame, obtaining a texture ID of the video frame, and drawing the texture ID on the FBO.
The texture ID indicates the received video frame, and only in the OpenGL ES platform, the texture ID is used to distinguish the video frame.
Then after the texture ID is rendered on the FBO, the configuration information of at least one target video effect corresponding to the timestamp of the received video frame can be looked up in said correspondence;
that is, first, it is determined that the timestamp of the received video frame is 2s, for example, then the filter set may be traversed to find a filter whose timestamp contains 2s, where both filter1 and filter2 contain 2s, so that both special effects corresponding to filter1 and filter2 may be applied to the received video frame.
Then, determining a target special effect material of the at least one target video special effect in the special effect material information;
that is, the target video effect here includes effect 1 and effect 2, and then the effect material used for effect 1 and effect 2 is searched in the effect material information.
And finally, adding at least one target video special effect to the received video frame and playing the video frame according to the configuration information of the at least one target video special effect and the target special effect material.
In one embodiment, OpenGL ES switches the texture ID on the FBO to a null texture ID when this step is implemented; drawing the at least one target video special effect on the empty texture ID of the FBO according to the configuration information of the at least one target video special effect and the target special effect material to obtain a processed empty texture ID; releasing the binding relationship between the FBO and the OpenGL ES platform; and outputting the processed empty texture ID to the received video frame for playing.
Specifically, OpenGL ES creates an effect object and switches the texture ID on the FBO to a null texture ID; then controlling an effect object to execute a step of drawing the at least one target video special effect on the empty texture ID of the FBO according to the configuration information of the at least one target video special effect and the target special effect material to obtain a processed empty texture ID;
during the specific execution process of the effect object, the effect object draws the special effect on the empty texture ID on the FBO according to the information (here, the converted vertex coordinates) of the filter1 and the filter2 and the special effect materials used by the special effects 1 and 2, so as to obtain the empty texture ID with the special effects 1 and 2.
It should be noted that creating an effect object requires compiling two shaders, which is time-consuming, so that the embodiment of the present invention designs a Cache buffer area for caching the established effect object, and the Cache is finally emptied after completing the special effect processing of all the frames of video.
Therefore, when the video of the next frame is received, when the effect is used for drawing the special effect of the video frame, the effect object does not need to be repeatedly created, and only the created effect object needs to be taken out from the Cache, so that the processing time of the special effect of the video is reduced.
Then, the OpenGL ES platform releases the binding relationship between the FBO and the OpenGL ES platform;
and finally, the OpenGL ES platform outputs the empty texture ID drawn with the special effects 1 and 2 to the received video frame for playing, so that the scheme of adding the special effects to the video frame is realized.
However, the embodiment of the present invention will continuously receive the next video frame, and the processing method is similar to the above technical solution, and thus the process is repeated, which is not described herein again.
In addition, it should be noted that, in the embodiment of the present invention, if the OpenGL ES platform receives another video frame, the FBO is not switched continuously, but the same FBO created in advance is used to circularly switch the texture ID of the received video frame.
That is, when the OpenGL ES platform receives a different video frame, the texture ID drawn in the FBO is switched to the texture ID of the received video frame.
Therefore, the processing interval of different video frames can be reduced, the special effect increasing processing of each video frame is enabled to be seamlessly linked, and the watching experience of a user is improved.
The video processing method provided by the embodiment of the invention can run on two platforms in a cross-platform mode (Android and iOS), so that the time cost and the labor cost of development are greatly reduced, and the whole development efficiency is improved; and hot update of video effects can be supported (after a new effect is developed, a user can download the new effect, and the latest effect can be used without upgrading a client).
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Corresponding to the method provided by the embodiment of the present invention, referring to fig. 2, a block diagram of a video processing apparatus according to an embodiment of the present invention is shown, and the block diagram may specifically include the following modules:
a constructing module 21, configured to construct, according to the downloaded configuration file of the video special effects, special effect material information of the video special effects used for the OpenGL ES platform and a corresponding relationship between configuration information of each video special effect and a timestamp of a video frame;
a search module 22, configured to search, if the OpenGL ES platform receives a video frame, configuration information of at least one target video special effect corresponding to a timestamp of the received video frame in the correspondence relationship;
a determining material module 23, configured to determine a target special effect material of the at least one target video special effect in the special effect material information;
and an add special effect module 24, configured to add at least one target video special effect to the received video frame and play the video frame according to the configuration information of the at least one target video special effect and the target special effect material.
By means of the technical scheme of the embodiment of the invention, the embodiment of the invention can utilize OpenGL ES platforms of both an android system and an IOS system to develop video special effects, so that only one set of codes needs to be developed for two platform systems, and two codes and two butt joint work can be changed into one code and one butt joint work, thereby greatly reducing the cost and increasing the efficiency; and because the two system platforms develop and utilize OpenGL ES, and the used API interfaces are the same, the problem of different video special effect of the two system platforms can be solved, and the user experience is improved.
Wherein, in one embodiment, the construction module 21 comprises:
a constructing submodule (not shown) configured to construct, according to the downloaded configuration file of the video effects, effect material information and a filter set for the OpenGL ES platform, where each filter includes a correspondence between configuration information of a video effect and a timestamp of a video frame, and different filters correspond to different video effects.
Optionally, in an embodiment, the apparatus further comprises the following modules not shown:
a conversion module, configured to convert, if the OpenGL ES platform receives a video frame, a correspondence between configuration information of each video special effect and a timestamp of the video frame into a vertex coordinate that can be identified by the OpenGL ES platform.
Optionally, in an embodiment, the apparatus further comprises the following modules not shown:
a creation module for creating an FBO;
a binding module, configured to bind the FBO to the OpenGL ES platform.
Optionally, in an embodiment, the apparatus further comprises the following modules not shown:
the texture obtaining module is used for obtaining a texture ID of a video frame if the OpenGL ES platform receives the video frame;
a rendering module to render the texture ID on the FBO.
Optionally, in one embodiment, the add special effects module includes the following sub-modules, not shown:
a switch texture sub-module for switching the texture ID on the FBO to a null texture ID;
the drawing submodule is used for drawing at least one target video special effect on the empty texture ID of the FBO according to the special effect material of the at least one target video special effect to obtain a processed empty texture ID;
a unbinding submodule, configured to unbind the binding relationship between the FBO and the OpenGL ES platform;
and the playing sub-module is used for outputting the processed empty texture ID to the received video frame for playing.
Optionally, the texture switching sub-module is further configured to switch the texture ID drawn by the FBO to the texture ID of the received video frame when the OpenGL ES platform receives a different video frame.
The video processing method provided by the embodiment of the invention can run on two platforms in a cross-platform mode (Android and iOS), so that the time cost and the labor cost of development are greatly reduced, and the whole development efficiency is improved; and hot update of video effects can be supported (after a new effect is developed, a user can download the new effect, and the latest effect can be used without upgrading a client).
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The foregoing detailed description of a video processing method and a video processing apparatus according to the present invention has been presented, and the principles and embodiments of the present invention are explained herein by using specific examples, which are only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (14)

1. A video processing method, comprising:
according to the downloaded configuration file of the video special effects, special effect material information of the video special effects used for the OpenGL ES platform and a corresponding relation between the configuration information of each video special effect and a timestamp of a video frame are constructed;
if the OpenGL ES platform receives a video frame, acquiring a texture ID of the video frame, and searching configuration information of at least one target video special effect corresponding to a timestamp of the received video frame in the corresponding relation through the texture ID;
determining a target special effect material of the at least one target video special effect in the special effect material information;
and adding at least one target video special effect to the received video frame and playing the video frame according to the configuration information of the at least one target video special effect and the target special effect material.
2. The method of claim 1, wherein the step of constructing, from the downloaded configuration file of video effects, effect material information for the video effects of OpenGL ES and a correspondence between the configuration information of each video effect and a timestamp of a video frame comprises:
and constructing special effect material information and a filter set for the OpenGL ES platform according to the downloaded configuration file of the video special effects, wherein each filter comprises a corresponding relation between the configuration information of the video special effects and the time stamps of the video frames, and different filters correspond to different video special effects.
3. The method according to claim 1, wherein before the step of searching the correspondence for configuration information of at least one target video effect corresponding to a timestamp of the received video frame, the method further comprises:
if the OpenGL ES platform receives a video frame, converting the correspondence between the configuration information of each video special effect and the timestamp of the video frame into vertex coordinates that can be identified by the OpenGL ES platform.
4. The method of claim 1, wherein before the step of constructing, from the downloaded configuration file of video effects, effect material information for video effects of an OpenGL ES platform and a correspondence between configuration information of each video effect and a timestamp of a video frame, the method further comprises:
creating a frame buffer object FBO;
binding the FBO into the OpenGL ES platform.
5. The method of claim 4, further comprising;
the texture ID is rendered on the FBO.
6. The method of claim 5, wherein the step of adding at least one target video effect to the received video frame and playing the video frame according to the configuration information of the at least one target video effect and the target effect material comprises:
switching the texture ID on the FBO to a null texture ID;
drawing the at least one target video special effect on the empty texture ID of the FBO according to the configuration information of the at least one target video special effect and the target special effect material to obtain a processed empty texture ID;
releasing the binding relationship between the FBO and the OpenGL ES platform;
and outputting the processed empty texture ID to the received video frame for playing.
7. The method of claim 6, wherein when the OpenGL ES platform receives a different video frame, then switching a texture ID drawn on the FBO to a texture ID of the received video frame.
8. A video processing apparatus, comprising:
the construction module is used for constructing special effect material information of the video special effects used for the OpenGL ES platform and a corresponding relation between the configuration information of each video special effect and a timestamp of a video frame according to the downloaded configuration file of the video special effects;
the search module is used for acquiring a texture ID of a video frame if the OpenGL ES platform receives the video frame, and further searching configuration information of at least one target video special effect corresponding to a timestamp of the received video frame in the corresponding relation through the texture ID;
a determining material module, configured to determine a target special effect material of the at least one target video special effect in the special effect material information;
and the special effect adding module is used for adding at least one target video special effect to the received video frame and playing the video frame according to the configuration information of the at least one target video special effect and the target special effect material.
9. The apparatus of claim 8, wherein the configuration module comprises:
and the construction submodule is used for constructing special effect material information and a filter set for the OpenGL ES platform according to the downloaded configuration file of the video special effects, wherein each filter contains the corresponding relation between the configuration information of one video special effect and the time stamp of a video frame, and different filters correspond to different video special effects.
10. The apparatus of claim 8, further comprising:
a conversion module, configured to convert, if the OpenGL ES platform receives a video frame, a correspondence between configuration information of each video special effect and a timestamp of the video frame into a vertex coordinate that can be identified by the OpenGL ES platform.
11. The apparatus of claim 8, further comprising:
a creation module for creating an FBO;
a binding module, configured to bind the FBO to the OpenGL ES platform.
12. The apparatus of claim 11, further comprising;
a rendering module to render the texture ID on the FBO.
13. The apparatus of claim 12, wherein the add special effects module comprises:
a switch texture sub-module for switching the texture ID on the FBO to a null texture ID;
the drawing submodule is used for drawing at least one target video special effect on the empty texture ID of the FBO according to the special effect material of the at least one target video special effect to obtain a processed empty texture ID;
a unbinding submodule, configured to unbind the binding relationship between the FBO and the OpenGL ES platform;
and the playing sub-module is used for outputting the processed empty texture ID to the received video frame for playing.
14. The apparatus of claim 13, wherein the switch texture sub-module is further configured to switch a texture ID drawn by the FBO to a texture ID of a received video frame when a different video frame is received by the OpenGL ES platform.
CN201710179798.4A 2017-03-23 2017-03-23 Video processing method and device Active CN108632540B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710179798.4A CN108632540B (en) 2017-03-23 2017-03-23 Video processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710179798.4A CN108632540B (en) 2017-03-23 2017-03-23 Video processing method and device

Publications (2)

Publication Number Publication Date
CN108632540A CN108632540A (en) 2018-10-09
CN108632540B true CN108632540B (en) 2020-07-03

Family

ID=63707574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710179798.4A Active CN108632540B (en) 2017-03-23 2017-03-23 Video processing method and device

Country Status (1)

Country Link
CN (1) CN108632540B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109598774B (en) * 2018-11-30 2023-08-29 长沙神漫文化科技有限公司 Special effect data rendering method and device
CN110045958B (en) * 2019-04-17 2021-09-28 腾讯科技(深圳)有限公司 Texture data generation method, device, storage medium and equipment
CN110445954B (en) * 2019-07-26 2022-04-26 腾讯医疗健康(深圳)有限公司 Image acquisition method and device and electronic equipment
CN110769313B (en) * 2019-11-19 2022-02-22 广州酷狗计算机科技有限公司 Video processing method and device and storage medium
CN111556363B (en) * 2020-05-21 2021-09-28 腾讯科技(深圳)有限公司 Video special effect processing method, device and equipment and computer readable storage medium
CN111669623B (en) * 2020-06-28 2023-10-13 腾讯科技(深圳)有限公司 Video special effect processing method and device and electronic equipment
CN112738624B (en) * 2020-12-23 2022-10-25 北京达佳互联信息技术有限公司 Method and device for special effect rendering of video
CN115801975A (en) * 2021-09-10 2023-03-14 北京字跳网络技术有限公司 Video processing method, device, equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814024A (en) * 2009-10-23 2010-08-25 深圳创维-Rgb电子有限公司 Framework and tool for designing cross-platform 3D interface
CN103037165A (en) * 2012-12-21 2013-04-10 厦门美图网科技有限公司 Photographing method of immediate-collaging and real-time filter
CN103391414A (en) * 2013-07-24 2013-11-13 杭州趣维科技有限公司 Video processing device and processing method applied to mobile phone platform
CN103971713A (en) * 2014-05-07 2014-08-06 厦门美图之家科技有限公司 Video file filter processing method
WO2016034089A1 (en) * 2014-09-03 2016-03-10 优视科技有限公司 Image rendering method and apparatus, mobile terminal and machine-readable storage medium
CN105681891A (en) * 2016-01-28 2016-06-15 杭州秀娱科技有限公司 Mobile terminal used method for embedding user video in scene
CN105933724A (en) * 2016-05-23 2016-09-07 福建星网视易信息***有限公司 Video producing method, device and system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101814024A (en) * 2009-10-23 2010-08-25 深圳创维-Rgb电子有限公司 Framework and tool for designing cross-platform 3D interface
CN103037165A (en) * 2012-12-21 2013-04-10 厦门美图网科技有限公司 Photographing method of immediate-collaging and real-time filter
CN103391414A (en) * 2013-07-24 2013-11-13 杭州趣维科技有限公司 Video processing device and processing method applied to mobile phone platform
CN103971713A (en) * 2014-05-07 2014-08-06 厦门美图之家科技有限公司 Video file filter processing method
WO2016034089A1 (en) * 2014-09-03 2016-03-10 优视科技有限公司 Image rendering method and apparatus, mobile terminal and machine-readable storage medium
CN105681891A (en) * 2016-01-28 2016-06-15 杭州秀娱科技有限公司 Mobile terminal used method for embedding user video in scene
CN105933724A (en) * 2016-05-23 2016-09-07 福建星网视易信息***有限公司 Video producing method, device and system

Also Published As

Publication number Publication date
CN108632540A (en) 2018-10-09

Similar Documents

Publication Publication Date Title
CN108632540B (en) Video processing method and device
CN107393013B (en) Virtual roaming file generation and display method, device, medium, equipment and system
US20140337414A1 (en) Dynamic rendering for software applications
CN111722885B (en) Program running method and device and electronic equipment
CN111408138B (en) Rendering method and device based on game engine and electronic equipment
CN107305553B (en) Method and system for dynamically jumping Hybrid page based on Hybrid App
CN103713891A (en) Method and device for graphic rendering on mobile device
WO2012000879A1 (en) Hypervisor selection for hosting a virtual machine image
KR20230016049A (en) Video processing method and device, electronic device, and computer readable storage medium
CN110519638A (en) Processing method, processing unit, electronic device and storage medium
CN110231945A (en) Method, apparatus, electronic equipment and the computer storage medium of code downloading
CN109002320A (en) For the update method of software development kit, system, electronic equipment and storage medium
CN113900721A (en) Operating system starting method and device and electronic equipment
CN104778075A (en) Method and device for calling Java layer API (Application Program Interface) by native layer in Android system
CN106775720B (en) Method and device for integrating player SDK (software development kit) and method and device for setting player SDK
CN109886861B (en) High-efficiency image file format HEIF image loading method and device
CN112947905A (en) Picture loading method and device
CN110659024B (en) Graphics resource conversion method and device, electronic equipment and storage medium
CN108876925B (en) Virtual reality scene processing method and device
CN112703484A (en) Connected application experience
CN112882685A (en) Object extension method and device of object-oriented programming language
CN115878115A (en) Page rendering method, device, medium and electronic equipment
CN112367399B (en) Filter effect generation method and device, electronic device and storage medium
CN117065357A (en) Media data processing method, device, computer equipment and storage medium
JP2023544513A (en) Method and apparatus for media scene description

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