A video processing method and computing device
By using video processing function packages in computing devices, analyzing and automated processing of audio and video events and functions, the cross-platform problem of audio and video processing under traditional development methods is solved, and efficient video processing effects and cross-dual compatibility is achieved.
Patent Information
- Application Number
- CN202011399513.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-02
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2040-12-02
AI Technical Summary
The development of the existing audio and video processing field mainly relies on traditional native methods, resulting in the need of manual development of object creation and environment initialization, and lack of unified development capabilities across dual-ends, making it impossible to effectively achieve efficient video effect processing.
A video processing method is proposed, by using video processing function packages in computing devices, including configuration files and resource files, parsing standard events and functions, automating the initialization and function calls of events and functions, and using unified format content standards to ensure that Compatibility and functional consistency of the same video function package on Android and IOS.
It realizes local rapid development and dynamic loading and update of audio and video processing functions, reduces project maintenance costs, provides unified cross-dual development capabilities, and ensures consistency and timeliness of video processing effects.
Smart Images

Figure CN112463250B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video technology, and in particular to a video processing method and a computing device. Background Art
[0002] Video is a common form of information content presentation, and it plays an increasingly important role in today's life. With the popularity and development of DSL (domain-specific language) technology, the application of mature cross-platform solutions such as RN and Flutter has brought a simpler and more flexible way to mobile development, and has become the current development trend of front-end development. However, in the current field of audio and video processing, the development of audio and video processing functions is still mainly based on traditional native development. In particular, a large number of object creation initialization and environment initialization work need to be manually developed, and the existing development model cannot provide a unified cross-end development capability. Therefore, it is necessary to provide a more efficient video effect processing method. Summary of the invention
[0003] In view of the above problems, the present invention proposes a video processing method and a computing device to try to solve or at least resolve the above problems.
[0004] According to one aspect of the present invention, there is provided a video processing method suitable for execution in a computing device, wherein one or more video processing function packages are stored in the computing device, each video processing function package has a configuration file, the configuration file includes a data binding relationship between a standard event and a standard function, and initialization parameters and function parameters of the standard function, for achieving a specific video processing effect, the method comprising the steps of: obtaining a corresponding video processing function package according to a preset video processing requirement; parsing each standard event, standard function and corresponding initialization parameter from the configuration file of the video processing function package; executing the parsed standard event on each frame of video image to determine whether an expected execution result is obtained; if so, extracting the function function parameter value of the corresponding standard function from the current video image; and executing the corresponding standard function on the current video image based on the initialization parameter and the function function parameter value to achieve the corresponding video processing effect.
[0005] Optionally, in the video processing method according to the present invention, the video processing function package also includes resource files required to execute the processing function; the resource files include at least one of texture resources, audio and video resources, shader files, script files, and model files.
[0006] Optionally, in the video processing method according to the present invention, the video processing function package also includes resource files required to execute the processing function; the resource files include at least one of texture resources, audio and video resources, shader files, script files, and model files.
[0007] Optionally, in the video processing method according to the present invention, the initialization parameters are preset fixed parameter values, which include the resource path of the resource file, the color and granularity of the mosaic function, and the text content, font and color of the text rendering function; the function function parameters are dynamic parameter values, including the coordinate value, width and height of the recognized object.
[0008] Optionally, in the video processing method according to the present invention, the configuration file includes a standard event type description, a standard function type description, and trigger conditions and calling parameters of standard functions, and the data binding relationship includes function function parameters that the standard event needs to pass to the standard function.
[0009] Optionally, in the video processing method according to the present invention, the step of executing the corresponding standard function on the current video image based on the initialization parameter value and the function function parameter value includes: determining whether the function function parameter value meets the trigger condition of the standard function; if so, executing the corresponding standard function on the current video image based on the initialization parameter value and the function function parameter value.
[0010] Optionally, the video processing method according to the present invention also includes the step of generating the video file function package: according to preset video processing requirements, selecting corresponding standard event arrays and standard function arrays from the standard event library and the standard function library respectively; establishing a data binding relationship between the standard event array and the standard function array, and configuring the initialization parameters, function function parameters, trigger conditions, and calling parameters of the standard functions; and searching and downloading the corresponding resource files according to the initialization parameters.
[0011] Optionally, in the video processing method according to the present invention, standard events include at least one of recognition events, user events, time events, hardware events, and model events; standard functions include at least one of rendering functions, application functions, shooting functions, and audio and video editing functions.
[0012] Optionally, in the video processing method according to the present invention, the recognition event includes at least one of license plate recognition, face recognition, vehicle model recognition, vehicle face recognition, and gesture recognition; the user event includes voice recognition and / or user interface gestures, and the time event includes preview time and / or recording time; the hardware event includes at least one of GPS acquisition event, gyroscope data acquisition event, and interrupt event, and the model event includes AR model and / or 3D model.
[0013] Optionally, in the video processing method according to the present invention, the rendering function includes at least one of static stickers, text rendering, video watermarks, label rendering, animated stickers, time rendering, particle effects, video effects, and mosaic rendering; the application function includes at least one of audio and video playback, jumping to H5 pages, and business broadcasting; the shooting function includes at least one of video screenshot, start recording, and pause recording; the audio and video editing function includes at least one of time effects, audio effects, speed change effects, and background music.
[0014] Optionally, in the video processing method according to the present invention, the video processing function package has a unified content format, and the configuration file is a JSON format file.
[0015] Optionally, in the video processing method according to the present invention, the step of executing the parsed standard event on each frame of video image includes: after identifying the target object in a frame of video image, tracking the target object in subsequent video image frames according to an image tracking algorithm, so as to quickly execute the standard event on other frames of video image.
[0016] According to another aspect of the present invention, a computing device is provided, comprising: one or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and when the one or more programs are executed by the processors, the steps of the video processing method described above are implemented.
[0017] According to another aspect of the present invention, there is provided a readable storage medium storing one or more programs, the one or more programs comprising instructions, which implement the steps of the video processing method described above when executed by a computing device.
[0018] According to the technical solution of the present invention, based on the existing video processing functions, standard events and function definitions are abstractly extracted, and standardized initialization parameters and input and output parameters of events and functions are defined. Each package content can fully describe a video processing effect, so that by parsing the parameters in the function configuration package, the function call of event and function initialization can be automatically completed. Moreover, the present invention adopts a content standard in a unified format to ensure that the same video function package is available on both the Android side and the IOS side and has the same functional effect. By configuring the video processing description package, the present invention can realize local rapid development of audio and video processing functions, and dynamic loading and updating of audio and video processing functions in the form of a standard definition format.
[0019] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] To achieve the above and related purposes, certain illustrative aspects are described herein in conjunction with the following description and accompanying drawings, which indicate various ways in which the principles disclosed herein can be practiced, and all aspects and their equivalents are intended to fall within the scope of the claimed subject matter. The above and other purposes, features and advantages of the present disclosure will become more apparent by reading the following detailed description in conjunction with the accompanying drawings. Throughout the present disclosure, the same reference numerals generally refer to the same parts or elements.
[0021] Figure 1 A structural block diagram of a computing device 100 according to an embodiment of the present invention is shown;
[0022] Figure 2 A schematic diagram showing the generation of a video processing function package according to an embodiment of the present invention
[0023] Figure 3 A schematic diagram showing a configuration file of a video processing function package according to an embodiment of the present invention is shown;
[0024] Figures 4A-4D A schematic diagram showing various configuration contents in a configuration file according to an embodiment of the present invention; and
[0025] Figure 5 FIG. 5 is a flowchart of a video processing method 500 according to an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0027] Figure 1 is a block diagram of a computing device 100 according to one embodiment of the present invention. In a basic configuration 102, computing device 100 typically includes a system memory 106 and one or more processors 104. A memory bus 108 may be used for communication between processor 104 and system memory 106.
[0028] Depending on the desired configuration, the processor 104 can be any type of processor, including but not limited to: a microprocessor (μP), a microcontroller (μC), a digital information processor (DSP), or any combination thereof. The processor 104 can include one or more levels of cache such as a first-level cache 110 and a second-level cache 112, a processor core 114, and registers 116. An example processor core 114 can include an arithmetic logic unit (ALU), a floating point unit (FPU), a digital signal processing core (DSP core), or any combination thereof. An example memory controller 118 can be used with the processor 104, or in some implementations, the memory controller 118 can be an internal part of the processor 104.
[0029] Depending on the desired configuration, the system memory 106 can be any type of memory, including but not limited to: volatile memory (such as RAM), non-volatile memory (such as ROM, flash memory, etc.), or any combination thereof. The system memory 106 can include an operating system 120, one or more applications 122, and program data 124. In some embodiments, the application 122 can be arranged to operate on the operating system using the program data 124. The program data 124 includes instructions, and in the computing device 100 according to the present invention, the program data 124 includes instructions for executing the video processing method 200.
[0030] The computing device 100 may also include an interface bus 140 that facilitates communication from various interface devices (e.g., output devices 142, peripheral interfaces 144, and communication devices 146) to the basic configuration 102 via the bus / interface controller 130. Example output devices 142 include a graphics processing unit 148 and an audio processing unit 150. They can be configured to facilitate communication with various external devices such as a display or speakers via one or more A / V ports 152. Example peripheral interfaces 144 may include a serial interface controller 154 and a parallel interface controller 156, which may be configured to facilitate communication with external devices such as input devices (e.g., keyboards, mice, pens, voice input devices, touch input devices) or other peripherals (e.g., printers, scanners, etc.) via one or more I / O ports 158. Example communication devices 146 may include a network controller 160, which may be arranged to facilitate communication with one or more other computing devices 162 via a network communication link via one or more communication ports 164.
[0031] A network communication link can be an example of a communication medium. Communication media can generally be embodied as computer-readable instructions, data structures, program modules in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium. A "modulated data signal" can be a signal in which one or more of its data sets or its changes can be carried out in a manner that encodes information in the signal. As non-limiting examples, communication media can include wired media such as a wired network or a dedicated line network, and various wireless media such as sound, radio frequency (RF), microwave, infrared (IR) or other wireless media. The term computer-readable medium used herein can include both storage media and communication media.
[0032] The computing device 100 can be implemented as a server, such as a file server, a database server, an application server, and a WEB server, etc., and can also be implemented as a part of a small-sized portable (or mobile) electronic device, such as a cellular phone, a personal digital assistant (PDA), a personal media player device, a wireless network browsing device, a personal head-mounted device, an application-specific device, or a hybrid device that can include any of the above functions. The computing device 100 can also be implemented as a personal computer including a desktop computer and a notebook computer configuration. In some embodiments, the computing device 100 is configured to execute the video processing method 200.
[0033] According to one embodiment of the present invention, one or more video processing function packages may also be stored in the computing device 100, each of which may be a compressed package file having a configuration file and a resource file, wherein the configuration file includes a data binding relationship between standard events and standard functions, and initialization parameters and function function parameters of the standard function, for achieving a specific video processing effect.
[0034] Figure 2 The schematic diagram of generating a video processing function package according to an embodiment of the present invention is shown, which is assembled from a standard event library and a standard function library. The standard event library has multiple standard events, and the standard function library has multiple standard functions. Standard events are all events that can trigger video processing. The present invention uniformly standardizes input events into unified standard format events. Standard functions are all audio and video special effects, software and hardware processing capabilities packaged into unified standard function descriptions.
[0035] Specifically, standard events include at least one of recognition events, user events, time events, hardware events, and model events. Specifically, recognition events include at least one of license plate recognition, face recognition, vehicle model recognition, vehicle face recognition, and gesture recognition; user events include voice recognition and / or user interface gestures, and the time events include preview time and / or recording time; hardware events include at least one of GPS acquisition events, gyroscope data acquisition events, and interruption events, and the model events include AR models and / or 3D models.
[0036] Standard functions are the ability to edit the structure or content of video files, including at least one of rendering, application, shooting, and audio and video editing functions. Specifically, the rendering function includes at least one of static stickers, text rendering, video watermarks, label rendering, animated stickers, time rendering, particle effects, video effects, and mosaic rendering; the application function includes at least one of audio and video playback, jump to H5 page, and business broadcast; the shooting function includes at least one of video screenshots, start recording, and pause recording; the audio and video editing function includes at least one of time effects, audio effects, speed effects, and background music.
[0037] The video processing function package has a unified content format, provides standard resources, data, and logical organization forms, and the content of a single package can fully describe a video processing function. A function package can contain one or more video processing functions. For example, a function package can realize license plate mosaic and display text label functions at the same time. A function package can arbitrarily select a combination of multiple events and multiple functions to realize a complete video processing function. For example, it can recognize license plate events and vehicle face events at the same time, add a mosaic function to the license plate, and add a decoration function to the vehicle face. The function package supports local loading and network loading, and supports dynamic updating of video processing functions. Here, the computing device can communicate with the server to obtain the latest version of the video processing function package, or update the video processing function package locally.
[0038] Generally, the configuration file is in JSON format and is used to describe specific behavioral characteristics of the overall video processing function. Figure 3 This is an example of a configuration file according to an embodiment of the present invention, which includes a standard event type description, a standard function type description, a data binding relationship between a standard event and a standard function, initialization parameters, and trigger conditions and call parameters for the standard function. The data binding relationship includes function function parameters that the standard event needs to pass to the standard function, for example, the license plate area information output by the license plate recognition is passed to the mosaic rendering function to render the current area).
[0039] Specifically, the initialization parameters are preset fixed parameter values, including the resource path of the resource file (such as the image resource path, script path, etc.), the color and granularity of the mosaic function, and the text content, font and color of the text rendering function. Function function parameters are dynamic parameter values that change dynamically in real time, including the coordinate value, width and height of the recognized object, such as the license plate position information and vehicle face information recognized from the video.
[0040] Figures 4A-4D They are respectively the event / function structure description, data binding relationship field description, initialization parameter description, and calling condition / parameter description of a configuration file according to an embodiment of the present invention. The field descriptions of these four descriptions are as follows:
[0041]
[0042]
[0043] Resource files are various resources required by functions. By configuring initialization parameters or function parameters, the resource file path is passed to specific functions for use. Resource files include at least one of texture resources, audio and video resources, shader files, script files, and model files. Texture resources include texture images, audio and video files include playing music after recognizing an object, shader files color the target object, script files include calculating special effect coordinate values based on the coordinate values of the recognized object, and model files include 3D models or AR models.
[0044] Based on this, the present invention can generate a video file function package according to the following steps:
[0045] First, according to the preset video processing requirements, select the corresponding standard event array and standard function array from the standard event library and the standard function library respectively. Figure 3 As shown, for example, if the target requirement is to mosaic the recognized number, the license plate recognition event is selected from the standard event library, and the mosaic rendering function is selected from the standard function library.
[0046] After that, establish the data binding relationship between the standard event array and the standard function array, and configure the initialization parameters, function parameters, trigger conditions, and call parameters of the standard function. For example, the user describes the data binding relationship between "license plate recognition" and "mosaic rendering" in the configuration, binds the license plate recognition result to the mosaic function for drawing the mosaic area, and thus determines the location where the license plate appears and adds the logic of the mosaic effect. Here, only the logical relationship of displaying the mosaic at the location of the license plate is determined. Only after the video is collected and the location of the license plate is identified in a specific frame of data, the mosaic effect will be drawn.
[0047] Finally, the corresponding resource files are searched and downloaded according to the initialization parameters. The present invention downloads the resource files required by each video processing function package in advance, so that they can be used directly when video processing is required, thereby improving the video processing speed and meeting the timeliness of video processing.
[0048] After configuring each video processing function package, you can perform special effects processing on the video according to the function package. Figure 5 FIG. 5 is a flow chart of a video processing method 500 according to an embodiment of the present invention. The method 500 is executed in a computing device (such as computing device 100). Figure 5 As shown, the method starts at step S510.
[0049] In step S510, the corresponding video processing function package is obtained according to the preset video processing requirements. For example, if the target requirement is to mosaic the recognized number, then the pre-processed video processing function package for mosaicing the license plate is obtained, which includes the standard event for recognizing the license plate, the standard function for mosaic rendering, the initialization parameters of mosaic rendering (mosaic color, granularity, etc.), and the data binding relationship between the two (such as the license plate coordinate parameters to be transmitted).
[0050] Then, in step S520, each standard event, standard function and corresponding initialization parameter are parsed from the configuration file of the video processing function package.
[0051] Then, in step S530, the parsed standard events are executed on each frame of the video image to determine whether an expected execution result is obtained.
[0052] The expected execution result is a positive execution result. For example, the expected result of license plate recognition is to recognize the license plate and obtain the license plate coordinates. The expected result of face recognition is to recognize the face and obtain the facial features and feature point coordinates.
[0053] According to one embodiment, the step of executing the parsed standard event on each frame of video image includes: after identifying the target object in a frame of video image, tracking the target object in subsequent video image frames according to an image tracking algorithm, so as to quickly execute the standard event on other frames of video image.
[0054] Here, a standard event is executed for each frame of image, such as identifying whether there is a license plate in each frame of image. If the target object is not recognized in the current image, the processing of the current frame of image is skipped and the standard event is continued for the next frame of image. If a target object is recognized in a certain frame of image, such as the position of the license plate, the target tracking algorithm can be used to continuously track whether the license plate appears in subsequent image frames and the position where it appears. This tracking algorithm can improve the efficiency of image recognition and the execution speed of standard events.
[0055] Then, in step S540, if the expected execution result is obtained, the function parameter value of the corresponding standard function is extracted from the current video image.
[0056] Here, the program parses the user configuration data, extracts the event and function binding relationship, initializes the event and function, and connects the standard event and standard function specified in the configuration file to open up the data transmission relationship.
[0057] Then, in step S550, a corresponding standard function is performed on the current video image based on the initialization parameters and the function parameter values to achieve a corresponding video processing effect.
[0058] For example, in the data processing function package for mosaicking of license plates, the parameters that need to be passed include the coordinates of the upper left vertex of the license plate and the width and height of the license plate. After the license plate recognition event is successfully completed, these parameters are obtained from the license plate recognition event and passed to the standard function. At the same time, according to the parsed initialization parameters, the standard function performs mosaic rendering on the license plate area at the corresponding position to achieve the license plate occlusion effect.
[0059] Furthermore, after obtaining the function parameter value from the standard event, the present invention can also determine whether the function parameter value meets the triggering condition of the standard function; if it meets the condition, the corresponding standard function is executed on the current video image based on the initialization parameter value and the function parameter value. If it does not meet the condition, the standard function is not executed. For example, the triggering condition for mosaic of the license plate is that the license plate is in the predetermined position of the image. If the license plate is relatively remote and not within the predetermined range, the mosaic rendering function will not be triggered.
[0060] Optionally, method 500 may further include a step of generating each event processing function package, the specific generation process of which has been described in detail above and will not be elaborated here.
[0061] According to the technical solution of the present invention, standard event and function definitions are abstracted and extracted, and standardized initialization parameters and input and output parameters of events and functions are defined. After standardizing events and functions, the project maintenance cost is reduced, resources, data and logic packaging are unified, and unified cross-duplex development capabilities are provided to ensure that the same video function package is available on both ends and has the same functional effects. The dynamic update capability of video processing functions is supported. In this way, by parsing the parameters in the function configuration package, the automation of event and function initialization and function calls can be completed.
[0062] A9. A method as described in A7, wherein the rendering function includes at least one of static stickers, text rendering, video watermarks, label rendering, animated stickers, time rendering, particle effects, video effects, and mosaic rendering; the application function includes at least one of audio and video playback, jumping to H5 pages, and business broadcasting; the shooting function includes at least one of video screenshot, start recording, and pause recording; the audio and video editing function includes at least one of time effects, audio effects, speed change effects, and background music.
[0063] A10. A method as described in any one of A1-A9, wherein the video processing function package has a unified content format, and the configuration file is a JSON format file. A11. A method as described in any one of A1-A10, wherein the step of executing the parsed standard event on each frame of video image comprises: after identifying a target object in a certain frame of video image, tracking the target object in subsequent video image frames according to an image tracking algorithm, so as to quickly execute the standard event on other frames of video image.
[0064] The various techniques described herein may be implemented in combination with hardware or software, or a combination thereof. Thus, the method and apparatus of the present invention, or some aspects or parts of the method and apparatus of the present invention may be in the form of program codes (i.e., instructions) embedded in a tangible medium, such as a removable hard disk, a USB flash drive, a floppy disk, a CD-ROM, or any other machine-readable storage medium, wherein when the program is loaded into a machine such as a computer and executed by the machine, the machine becomes a device for practicing the present invention.
[0065] In the case where the program code is executed on a programmable computer, the computing device generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device. The memory is configured to store the program code; the processor is configured to execute the video processing method of the present invention according to the instructions in the program code stored in the memory.
[0066] By way of example and not limitation, readable media include readable storage media and communication media. Readable storage media stores information such as computer readable instructions, data structures, program modules or other data. Communication media generally embody computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and include any information transfer medium. Any combination of the above is also included within the scope of readable media.
[0067] In the description provided herein, algorithms and displays are not inherently related to any particular computer, virtual system or other device. Various general purpose systems can also be used together with the examples of the present invention. According to the above description, it is obvious that the structure required for constructing such systems. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages can be utilized to implement the content of the present invention described herein, and the above description of specific languages is for the purpose of disclosing the best mode of the present invention.
[0068] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0069] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0070] Those skilled in the art will appreciate that the modules or units or components of the devices in the examples disclosed herein may be arranged in the devices described in the embodiment, or alternatively may be located in one or more devices different from the devices in the examples. The modules in the foregoing examples may be combined into one module or may be divided into multiple submodules.
[0071] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0072] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0073] In addition, some of the embodiments are described herein as methods or combinations of method elements that can be implemented by a processor of a computer system or by other devices that perform the functions. Therefore, a processor with necessary instructions for implementing the method or method elements forms a device for implementing the method or method elements. In addition, the elements described herein of the device embodiments are examples of devices for implementing the functions performed by the elements for the purpose of implementing the invention.
[0074] As used herein, unless otherwise specified, the use of ordinal numbers "first," "second," "third," etc. to describe common objects merely indicates that different instances of similar objects are involved, and is not intended to imply that the objects so described must have a given order in time, space, order, or in any other manner.
[0075] Although the present invention has been described according to a limited number of embodiments, it will be apparent to those skilled in the art, with the benefit of the above description, that other embodiments may be envisioned within the scope of the invention thus described. In addition, it should be noted that the language used in this specification is selected primarily for readability and teaching purposes, rather than for explaining or defining the subject matter of the present invention. Therefore, many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the appended claims. The disclosure of the present invention is illustrative and not restrictive with respect to the scope of the present invention, and the scope of the present invention is defined by the appended claims.
Claims
1. A video processing method, suitable for execution in a computing device, wherein one or more video processing function packages are stored in the computing device, each video processing function package has a configuration file, wherein the configuration file includes a data binding relationship between a standard event and a standard function, and initialization parameters and function parameters of the standard function, for achieving a specific video processing effect, wherein the standard event is all events that can trigger video processing, and the standard function is all audio and video special effects, software and hardware processing capabilities packaged into a unified standard function description, wherein the method includes the steps of: According to the preset video processing requirements, obtain the corresponding video processing function package; Parsing each standard event, standard function and corresponding initialization parameters from the configuration file of the video processing function package; Execute the parsed standard events for each frame of video image to determine whether the expected execution result is obtained; If yes, extract the function parameter value of the corresponding standard function from the current video image, wherein the function parameter is a dynamic parameter value, including the coordinate value, width and height of the recognition object; Based on the initialization parameters and the function parameter values, a corresponding standard function is performed on the current video image to achieve a corresponding video processing effect, including: Determine whether the function parameter value satisfies the triggering condition of the standard function; If satisfied, the corresponding standard function is executed on the current video image based on the initialization parameter value and the function parameter value.
2. The method of claim 1, wherein: The video processing function package also includes resource files required for executing the processing function; The resource files include texture resources, audio and video resources, shader files, script files, and model files.
3. The method of claim 2, wherein: The initialization parameters are preset fixed parameter values, which include the resource path of the resource file, the color and granularity of the mosaic function, and the text content, font and color of the text rendering function.
4. The method according to any one of claims 1 to 3, wherein: The configuration file includes a standard event type description, a standard function type description, and trigger conditions and call parameters of a standard function, and the data binding relationship includes function function parameters that the standard event needs to pass to the standard function.
5. The method according to claim 4, further comprising the step of generating the video processing function package: According to the preset video processing requirements, corresponding standard event arrays and standard function arrays are selected from the standard event library and the standard function library respectively; Establishing a data binding relationship between the standard event array and the standard function array, and configuring initialization parameters, function parameters, trigger conditions, and call parameters of the standard function; and The corresponding resource file is searched and downloaded according to the initialization parameters.
6. The method according to any one of claims 1 to 5, wherein: The standard events include identification events, user events, time events, hardware events, and model events; The standard functions include rendering function, application function, shooting function, and audio and video editing function.
7. The method of claim 6, wherein: The recognition events include license plate recognition, face recognition, vehicle model recognition, vehicle face recognition, and gesture recognition; The user event includes voice recognition and / or user interface gesture, and the time event includes preview time and / or recording time; The hardware events include GPS acquisition events, gyroscope data acquisition events, and interruption events, and the model events include AR models and / or 3D models.
8. The method of claim 6, wherein: The rendering functions include static stickers, text rendering, video watermarks, label rendering, animated stickers, time rendering, particle effects, video effects, and mosaic rendering; the application functions include audio and video playback, jumping to H5 pages, and business broadcasting; the shooting functions include video screenshots, starting recording, and pausing recording; The audio and video editing functions include time effects, audio effects, speed effects, and background music.
9. The method according to any one of claims 1 to 8, wherein: The video processing function package has a unified content format, and the configuration file is a JSON format file.
10. A computing device comprising: at least one processor; as well as at least one memory including computer program instructions; The at least one memory and the computer program instructions are configured to, together with the at least one processor, cause the computing device to perform the method of any one of claims 1-9.
11. A readable storage medium storing one or more programs, wherein the one or more programs include instructions, which when executed by a computing device, cause the computing device to perform the method according to any one of claims 1 to 9.
