Video processing method and device, equipment and medium
By obtaining the target parameter value of the video and dynamically determining the special effect parameter value, special effect processing is solved, the problem of poor special effect processing in the existing technology is solved, the dynamic adaptation of special effects and video is achieved, and the special effect processing effect is improved and User experience.
Patent Information
- Application Number
- CN202411641990.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-18
AI Technical Summary
The existing multimedia editing software has poor effect on special effects processing, resulting in poor results in some video special effects processing, especially in different light/color environments, where the special effects performance varies greatly.
By obtaining the target parameter values of the video to be processed, the special effect parameter values are dynamically determined, and the video is processed based on these parameter values, thereby achieving dynamic adaptation of special effects and video.
This method can perform targeted special effects processing based on the specific visual attributes of the video, improve the special effects processing effect, and ensure the user's visual perception and special effects usage experience.
Smart Images

Figure CN119484936A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of multimedia technology, and in particular to a video processing method, device, equipment and medium. Background Art
[0002] Nowadays, more and more ordinary users, professional editors and other people need to use multimedia editing software to edit original multimedia materials such as images and videos. Most of the existing multimedia editing software can provide special effects processing functions, such as adding special effects to videos uploaded by users, thereby enhancing the appeal and fun of the videos. However, the inventors have found through research that the existing special effects processing effect is not good and still needs to be improved. Summary of the invention
[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a video processing method, device, equipment and medium.
[0004] An embodiment of the present disclosure provides a video processing method, which includes: obtaining a first video to be processed, and determining a target special effect to be adopted for the first video; obtaining a target parameter value corresponding to the first video; wherein the target parameter value is a parameter value corresponding to a target visual attribute related to the target special effect; based on the target parameter value corresponding to the first video, determining a special effect parameter value of the target special effect; based on the special effect parameter value of the target special effect, performing special effect processing on the first video to obtain a second video.
[0005] Optionally, the target parameter value corresponding to the first video includes the target parameter value corresponding to the video clip in the first video; the special effect parameter value of the target special effect includes the special effect parameter value corresponding to the video clip.
[0006] Optionally, obtaining the target parameter value corresponding to the first video includes: obtaining pixel differences between adjacent video frame images in the first video; performing transition recognition processing on the first video based on the pixel differences to obtain video segments contained in the first video; and obtaining the target parameter value corresponding to the video segments in the first video.
[0007] Optionally, obtaining the target parameter value corresponding to the video clip in the first video includes: obtaining the target parameter value of the first frame image of the video clip in the first video, and using the target parameter value of the first frame image of the video clip as the target parameter value corresponding to the video clip in the first video; or, obtaining the target parameter value of each frame image of the video clip in the first video, and using the average value of the target parameter values of the each frame image as the target parameter value corresponding to the video clip in the first video.
[0008] Optionally, determining the special effect parameter value of the target special effect based on the target parameter value corresponding to the first video includes: determining the special effect parameter value of the target special effect corresponding to the video clip based on the target parameter value corresponding to the video clip in the first video and a preset mapping relationship; wherein the preset mapping relationship is used to indicate the association relationship between the target parameter value and the special effect parameter value.
[0009] Optionally, the special effects processing is performed on the first video based on the special effects parameter values of the target special effects to obtain a second video, including: based on the special effects parameter values corresponding to the video clips in the first video, the special effects processing is performed on the video clips to obtain special effects clips corresponding to the video clips; and splicing processing is performed based on the special effects clips to obtain a second video.
[0010] Optionally, performing special effects processing on the video clip based on the special effects parameter values corresponding to the video clip in the first video includes: obtaining user adjustment parameters corresponding to the target special effects; and performing special effects processing on the video clip based on the user adjustment parameters and the special effects parameter values corresponding to the video clip in the first video.
[0011] The disclosed embodiment also provides a video processing device, including: a first video acquisition module, used to acquire a first video to be processed and determine a target special effect to be adopted for the first video; a target parameter value acquisition module, used to acquire a target parameter value corresponding to the first video; wherein the target parameter value is a parameter value corresponding to a target visual attribute related to the target special effect; a special effect parameter value determination module, used to determine a special effect parameter value of the target special effect based on the target parameter value corresponding to the first video; and a special effect processing module, used to perform special effect processing on the first video based on the special effect parameter value of the target special effect to obtain a second video.
[0012] An embodiment of the present disclosure also provides an electronic device, which includes: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the video processing method provided by the embodiment of the present disclosure.
[0013] The embodiment of the present disclosure further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute the video processing method provided by the embodiment of the present disclosure.
[0014] The embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the video processing method provided in the embodiments of the present disclosure when executed by a processor.
[0015] The above technical solution provided by the embodiment of the present disclosure fully takes into account that the special effects in the related technology uniformly use the same special effect parameters to process all videos indiscriminately, which will lead to poor special effect processing results for some videos. Therefore, when the embodiment of the present disclosure uses the target special effect to process the first video, it can obtain the target parameter value corresponding to the first video, and the target parameter value is the parameter value corresponding to the target visual attribute related to the target special effect, and further determine the special effect parameter value of the target special effect based on the target parameter value, so as to perform special effect processing on the first video based on the special effect parameter value of the target special effect to obtain the second video. The above method can obtain the parameter value corresponding to the target visual attribute related to the target special effect in the first video, and dynamically determine the special effect parameter value based on the target parameter value, so as to perform special effect processing on the first video in a targeted manner based on the special effect parameter value, and fully guarantee the effect of the target special effect on the first video, so as to better guarantee the user's visual perception and special effect usage experience.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 A schematic diagram of a flow chart of a video processing method provided by an embodiment of the present disclosure;
[0020] Figure 2 A schematic diagram of a user interaction interface provided by an embodiment of the present disclosure;
[0021] Figure 3 A schematic diagram of a flow chart of a video processing method provided by an embodiment of the present disclosure;
[0022] Figure 4 A schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure;
[0023] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0025] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0026] The existing special effects processing is not good. For example, some special effects are difficult to show obvious effects on certain videos, or such videos may be overexposed and have poor viewing experience. The inventor found that the main reason is that the parameters used by the existing special effects are all preset fixed parameters, and the special effects processing method is undifferentiated for all videos. However, different videos have different acquisition devices, acquisition environments, video editing and other factors, so most videos generally have certain differences in visual attribute information such as brightness, exposure, contrast, etc., and the effects obtained by applying the same special effect will also be different, especially for luminous / color-changing special effects, which have great differences in performance under different light / color environments. For example, such special effects are prone to overexposure when applied to video frames with high exposure, while the effect is almost not shown when applied to video frames with low exposure. Only when applied to video frames with moderate exposure can the special effects be better presented. For example, for line light speed change special effects, it can present the effect of luminous lines on the image, mainly by identifying the highlight area on the image, and applying luminous lines of varying lengths based on the highlight area to present the line light speed change effect. However, for videos shot in darker environments, it is difficult to identify the highlight area on the video frame image. Therefore, it is difficult to present the line light speed change effect when processing such videos based on the line light speed change special effects. The above are all examples and should not be regarded as limitations. They will not be listed one by one here.
[0027] To improve the above problems, the embodiments of the present disclosure provide a video processing method, device, equipment and medium, which can perform special effects processing on the video in a targeted manner based on the video's own parameters, that is, to achieve dynamic adaptation of special effects and video, thereby ensuring the special effects processing effect. For ease of understanding, the following is a detailed explanation.
[0028] Figure 1 The flowchart of a video processing method provided by an embodiment of the present disclosure is shown in FIG. 1 , which can be executed by a video processing device, wherein the device can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1As shown, the method mainly includes the following steps S102 to S108:
[0029] Step S102, obtaining a first video to be processed, and determining a target special effect to be adopted for the first video.
[0030] Any video that needs to be processed with special effects can be used as the first video. The disclosed embodiment does not limit the type of the first video and the content it contains. Any special effect can be used as a target special effect. The target special effect can be a static special effect such as a filter, or a dynamic special effect, such as creating a rich visual experience by adding visual elements such as animation, lines, particles, halos, shadows, and deformations. The disclosed embodiment does not limit the specific type of the target special effect. In actual applications, when the user edits the first video, a special effect trigger item can be provided to the user. After the user triggers the special effect trigger item, multiple special effect selection items are displayed to the user, and the special effect selected by the user is used as the target special effect to be adopted for the first video.
[0031] Step S104, obtaining a target parameter value corresponding to the first video; wherein the target parameter value is a parameter value corresponding to a target visual attribute related to a target special effect. Visual attributes include but are not limited to any image effects such as brightness, exposure, saturation, contrast, etc., which are not listed one by one here. In practical applications, visual attributes related to various special effects can be pre-set, such as target visual attributes related to luminous special effects, including but not limited to brightness.
[0032] It is understandable that the first video contains multiple video frame images, and the video frame images themselves have multiple visual attributes. When the embodiment of the present disclosure uses the target special effect to process the first video, it can mainly obtain the parameter values corresponding to the target visual attributes related to the target special effect, so as to facilitate subsequent analysis and processing. Optionally, the parameter values corresponding to the target visual attributes can be represented by means, such as brightness mean, saturation mean, etc. The number of target parameter values corresponding to the first video can be one or more groups, and each group of target parameter values includes at least one parameter value corresponding to the target visual attribute. In other words, all parameter values corresponding to the target visual attributes related to the target special effect can be combined and regarded as a group. In some implementation examples, the first video as a whole may correspond to a set of target parameter values. Specifically, the target parameter values corresponding to the first video may be comprehensively determined based on the target parameter values corresponding to each of the video frame images contained in the first video. Considering that the first video to be processed may have transitions, that is, the first video may be spliced together from multiple video clips, and different video clips may correspond to different target parameter values, respectively, in some specific implementation examples, the target parameter values corresponding to the first video include the target parameter values corresponding to the video clips in the first video, that is, a set of target parameter values corresponding to each of the video clips in the first video. In this case, the first video corresponds to multiple sets of target parameter values.
[0033] Step S106, based on the target parameter value corresponding to the first video, determine the special effect parameter value of the target special effect. The disclosed embodiment does not limit the parameters required for the target special effect, which depends on the type of the target special effect. For example, when the target special effect is a line light speed change special effect, the corresponding special effect parameters include luminous intensity parameters, line light length parameters, zoom parameters, etc., which are not listed one by one in the disclosed embodiment.
[0034] In the related art, the special effect parameter value of the target special effect is preset and unchanged, but in the embodiment of the present disclosure, the special effect parameter value of the target special effect can be dynamically determined according to the target parameter value corresponding to the first video, and can be specifically determined based on the mapping relationship between the preset target parameter value and the special effect parameter value. Each group of target parameter values corresponds to a special effect parameter value of the target special effect, and in the case where the target parameter value corresponding to the first video includes the target parameter value corresponding to the video clip in the first video, the special effect parameter value of the target special effect includes the special effect parameter value corresponding to the video clip, that is, each video clip in the first video has a corresponding special effect parameter value of the target special effect.
[0035] Step S108, based on the special effect parameter value of the target special effect, the first video is processed with special effects to obtain a second video. In some implementation examples, if the first video corresponds to only one set of special effect parameter values, the first video as a whole can be processed with special effects based on the special effect parameter values; in other implementation examples, if the first video contains multiple video clips, each of which has a corresponding special effect parameter value, then for each video clip, the special effect can be processed based on the special effect parameter value corresponding to the video clip, and then spliced together to obtain the second video.
[0036] Compared with the method in the related art of uniformly using the same special effect parameters to process all videos indiscriminately, the above method provided by the embodiment of the present disclosure can obtain the parameter value corresponding to the target visual attribute related to the target special effect in the first video, and dynamically determine the special effect parameter value based on the target parameter value, so as to perform special effect processing on the first video in a targeted manner based on the special effect parameter value, fully ensuring the effect of the target special effect on the first video, thereby better ensuring the user's visual perception and special effect usage experience.
[0037] On the basis that the target parameter value corresponding to the first video includes the target parameter value corresponding to the video segment in the first video, the above step S104, i.e., the step of obtaining the target parameter value corresponding to the first video, can be performed with reference to the following steps a to c:
[0038] Step a, obtaining pixel differences between adjacent video frame images in the first video. Exemplarily, the pixel differences can be characterized based on an average value of pixel differences between adjacent video frame images. The disclosed embodiment can effectively and reliably evaluate pixel changes of adjacent video frame images by obtaining pixel differences between two adjacent video frame images in the first video.
[0039] Step b, based on the pixel difference, the first video is subjected to transition recognition processing to obtain the video clips contained in the first video. It is understandable that the pixel difference between the video frame images obtained by shooting in the same scene is usually small, and the pixel difference between the video frame images obtained by shooting in different scenes is large. The pixel difference can be used to measure whether there is a transition in the first video, that is, whether there are multiple video clips. In practical applications, a difference threshold can be preset. When the pixel difference between adjacent video frame images is greater than the difference threshold, it is regarded that the first video has a transition, and the subsequent frame image in the adjacent video frame images is the first frame image after the transition, that is, the first frame image of the new video clip. When the pixel difference between adjacent video frame images is not greater than the difference threshold, it is regarded that no transition occurs, and the adjacent video frame images belong to the same scene. By analyzing the adjacent video frame images in the first video one by one in the above manner, the video clips contained in the first video can be determined. The above method provided by the embodiment of the present disclosure is not only convenient and fast, but also can accurately and reliably obtain all the video clips contained in the first video.
[0040] Step c, obtaining the target parameter value corresponding to the video segment in the first video. In some specific implementation examples, step c can be performed with reference to (1) or (2) as follows:
[0041] (1) Obtain the target parameter value of the first frame image of the video segment in the first video, and use the target parameter value of the first frame image of the video segment as the target parameter value corresponding to the video segment in the first video. It is understandable that, under normal circumstances, the parameters of the various video frame images in the same video segment are not much different, so the target parameter value of the first frame image of each video segment can be directly used as the target parameter value of the video segment. This method of obtaining the target parameter value corresponding to the video segment is more efficient and convenient, and requires less computing resources.
[0042] (2) Obtain the target parameter value of each frame image of the video segment in the first video, and take the average value of the target parameter value of each frame image as the target parameter value corresponding to the video segment in the first video. The target parameter value corresponding to the video segment obtained in this way is obtained by integrating the target parameter values of each frame image, and is more representative. In practical applications, the above (1) or (2) can be flexibly selected according to needs, and is not limited here.
[0043] On the basis of the above, the above step S106, i.e., the step of determining the special effect parameter value of the target special effect based on the target parameter value corresponding to the first video, can be specifically implemented by determining the special effect parameter value of the target special effect corresponding to the video clip based on the target parameter value corresponding to the video clip in the first video and the preset mapping relationship; wherein the preset mapping relationship is used to indicate the association relationship between the target parameter value and the special effect parameter value, such as the target parameter value is the brightness value, the special effect parameter value is the exposure value, and the relationship between the brightness value and the exposure value can be preset, which can be flexibly set and is not limited here. In the above manner, the special effect parameter value of the target special effect corresponding to the video clip can be obtained efficiently and accurately.
[0044] On the basis of the above, the above step S108, i.e., the step of performing special effect processing on the first video based on the special effect parameter value of the target special effect to obtain the second video, can be performed with reference to the following steps A and B:
[0045] Step A, based on the special effect parameter value corresponding to the video segment in the first video, performs special effect processing on the video segment to obtain a special effect segment corresponding to the video segment. In order to further meet user needs, in some specific implementation examples, step A can be performed with reference to the following steps A1 to A2:
[0046] Step A1, obtaining the user adjustment parameter corresponding to the target special effect. The user adjustment parameter can be used to indicate the intensity corresponding to the special effect parameter of the target special effect. In practical applications, a parameter adjustment control of the target special effect can be provided to the user, and the user can use the parameter adjustment control to set the intensity of the special effect parameter of the target special effect. For ease of understanding, please refer to Figure 2 A schematic diagram of a user interaction interface is shown, taking a parameter adjustment control as a slider control as an example, taking a target special effect as a special effect that can present a thermal imaging effect as an example, and the corresponding special effect parameters are speed, size, luminescence and other parameters. In the embodiment of the disclosure, a corresponding slider control is set for each adjustable special effect parameter on the interface, and the user can set the intensity of each special effect parameter through the slider control. In actual applications, the default intensity of the slider control corresponding to each special effect parameter can be pre-set, and the user can also adjust the intensity through the slider control. The intensity adjustment range can be flexibly set, such as 0 to 100%.
[0047] Step A2, based on the special effect parameter value corresponding to the user-adjusted parameter and the video clip in the first video, the video clip is processed with special effects. Specifically, the special effect parameter value corresponding to the video clip in the first video can be adjusted based on the user-adjusted parameter, and the video clip is processed with special effects based on the adjusted special effect parameter value. For ease of understanding, assuming that the first video includes video clip 1 and video clip 2, the target parameter value corresponding to video clip 1 is a brightness value of 255, and the special effect parameter value corresponding to the target special effect can be obtained by the above method. Exposure -10; the target parameter value corresponding to video clip 2 is a brightness value of 100, and the special effect parameter value corresponding to the target special effect can be obtained by the above method. Exposure -3; assuming that the exposure slider corresponding to the target special effect is set to 80% exposure intensity by default, at this time, the special effect parameter value corresponding to video clip 1 is exposure -8, and the special effect parameter value corresponding to video clip 2 is exposure -2.4. Assuming that the user adjusts the exposure intensity to 100% through the exposure slider, the special effect parameter value corresponding to video clip 1 is exposure -10, and the special effect parameter value corresponding to video clip 2 is exposure -3. Assuming that the user adjusts the exposure intensity to 50% through the exposure slider, the special effect parameter value corresponding to the video clip 1 is exposure -5, and the special effect parameter value corresponding to the video clip 2 is exposure -1.5.
[0048] Through the above method, the user-adjusted parameters can be combined with the special effect parameter values obtained based on the video clip, thereby ensuring that the special effect processing results corresponding to the video clip both meet the user's needs and match the video clip.
[0049] Step B: performing splicing processing based on the special effect clips to obtain a second video.
[0050] Specifically, based on the order of each video clip in the first video, the special effects clips corresponding to each video clip can be spliced together to obtain a second video. Through the above-mentioned method, the target special effects can be dynamically matched with the visual attribute information of each video clip, and the second video finally obtained can present a harmonious and stable visual experience to the user as a whole.
[0051] Based on the foregoing, the present disclosure further provides Figure 3 The schematic flow chart of a video processing method shown mainly includes the following steps S302 to S316:
[0052] Step S302, obtaining a first video to be processed, and determining a target special effect to be adopted for the first video.
[0053] Step S304, obtaining pixel differences between adjacent video frame images in the first video;
[0054] Step S306, performing transition recognition processing on the first video based on pixel differences to obtain video segments included in the first video;
[0055] Step S308: Obtain the target parameter value corresponding to each video segment in the first video.
[0056] Step S310, based on the target parameter value corresponding to each video clip in the first video and a preset mapping relationship, determine the special effect parameter value of the target special effect corresponding to each video clip; wherein the preset mapping relationship is used to indicate the association relationship between the target parameter value and the special effect parameter value.
[0057] Step S312, obtaining user adjustment parameters corresponding to the target special effect;
[0058] Step S314: performing special effect processing on each video segment based on the user-adjusted parameters and the special effect parameter values corresponding to each video segment in the first video.
[0059] Step S316, performing splicing processing based on each special effect clip to obtain a second video.
[0060] The above method provided by the embodiment of the present disclosure fully takes into account that the related technology uniformly adopts the same special effect parameters to perform indiscriminate processing on all videos, which may easily lead to poor special effect processing results for some videos. Through the aforementioned method, the special effect parameters can be affected based on the parameter values of the target visual attributes related to the target special effect in the first video, and the special effect processing can be performed on the first video in a targeted manner. Furthermore, the various video clips in the first video can be processed differently to ensure the special effect processing effect of each video clip, realize dynamic adaptation between video and special effects, and fully guarantee the user's visual perception and special effect usage experience.
[0061] Corresponding to the aforementioned video processing method, the embodiment of the present disclosure further provides a video processing device, Figure 4 FIG. 1 is a schematic diagram of a video processing device provided in an embodiment of the present disclosure. The device can be implemented by software and / or hardware and can generally be integrated in an electronic device, such as Figure 4 As shown, the video processing device includes:
[0062] A first video acquisition module 402, used to acquire a first video to be processed and determine a target special effect to be adopted for the first video;
[0063] The target parameter value acquisition module 404 is used to acquire the target parameter value corresponding to the first video; wherein the target parameter value is a parameter value corresponding to a target visual attribute related to a target special effect;
[0064] A special effect parameter value determination module 406, configured to determine a special effect parameter value of a target special effect based on a target parameter value corresponding to the first video;
[0065] The special effect processing module 408 is used to perform special effect processing on the first video based on the special effect parameter value of the target special effect to obtain the second video.
[0066] The above-mentioned device provided by the embodiment of the present disclosure is capable of obtaining parameter values corresponding to target visual attributes related to target special effects in the first video, and dynamically determining special effect parameter values based on the target parameter values, so as to perform special effect processing on the first video in a targeted manner based on the special effect parameter values, and fully ensure the effect of the target special effects on the first video, thereby better ensuring the user's visual perception and special effects usage experience.
[0067] In some embodiments, the target parameter value corresponding to the first video includes the target parameter value corresponding to the video segment in the first video; and the special effect parameter value of the target special effect includes the special effect parameter value corresponding to the video segment.
[0068] In some embodiments, the target parameter value acquisition module 404 is specifically used to: obtain pixel differences between adjacent video frame images in the first video; perform transition recognition processing on the first video based on the pixel differences to obtain video segments contained in the first video; and obtain target parameter values corresponding to the video segments in the first video.
[0069] In some embodiments, the target parameter value acquisition module 404 is specifically used to: obtain the target parameter value of the first frame image of the video clip in the first video, and use the target parameter value of the first frame image of the video clip as the target parameter value corresponding to the video clip in the first video; or, obtain the target parameter value of each frame image of the video clip in the first video, and use the average value of the target parameter values of the each frame image as the target parameter value corresponding to the video clip in the first video.
[0070] In some embodiments, the special effect parameter value determination module 406 is specifically used to: determine the special effect parameter value of the target special effect corresponding to the video clip in the first video based on the target parameter value corresponding to the video clip in the first video and a preset mapping relationship; wherein the preset mapping relationship is used to indicate the association relationship between the target parameter value and the special effect parameter value.
[0071] In some embodiments, the special effects processing module 408 is specifically used to: perform special effects processing on the video clip in the first video based on the special effects parameter value corresponding to the video clip to obtain a special effects clip corresponding to the video clip; and perform splicing processing based on the special effects clip to obtain a second video.
[0072] In some implementations, the special effects processing module 408 is specifically used to: obtain user adjustment parameters corresponding to the target special effects; and perform special effects processing on the video clip based on the user adjustment parameters and special effects parameter values corresponding to the video clip in the first video.
[0073] The video processing device provided in the embodiments of the present disclosure can execute the video processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0074] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device embodiment can refer to the corresponding process in the method embodiment, and will not be repeated here.
[0075] An embodiment of the present disclosure provides an electronic device, which includes: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of any method in the present disclosure.
[0076] Reference below Figure 5 , which shows a schematic diagram of the structure of an electronic device 500 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0077] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0078] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0079] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0080] In addition to the above-mentioned methods and devices, the embodiments of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, cause the processor to perform the method provided by the embodiments of the present disclosure. The computer program product may be written in any combination of one or more programming languages to write program codes for performing the operations of the embodiments of the present disclosure, the programming languages including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as "C" language or similar programming languages. The program code may be executed entirely on a user computing device, partially on a user device, as an independent software package, partially on a user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0081] In addition, the embodiment of the present disclosure may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the video processing method provided by the embodiment of the present disclosure.
[0082] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0083] The embodiments of the present disclosure further provide a computer program product, including a computer program / instruction, which implements the video processing method in the embodiments of the present disclosure when executed by a processor.
[0084] It is understandable that before using the technical solutions disclosed in the various embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0085] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0086] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0087] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0088] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0089] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A video processing method, characterized in that: include: Acquire a first video to be processed, and determine a target special effect to be adopted for the first video; Obtaining a target parameter value corresponding to the first video; wherein the target parameter value is a parameter value corresponding to a target visual attribute related to the target special effect; Determining a special effect parameter value of the target special effect based on a target parameter value corresponding to the first video; Based on the special effect parameter value of the target special effect, the first video is processed with special effects to obtain a second video.
2. The method according to claim 1, characterized in that The target parameter values corresponding to the first video include target parameter values corresponding to the video clips in the first video; and the special effect parameter values of the target special effect include special effect parameter values corresponding to the video clips.
3. The method according to claim 2, characterized in that The obtaining a target parameter value corresponding to the first video includes: Obtaining pixel differences between adjacent video frame images in the first video; Performing transition recognition processing on the first video based on the pixel difference to obtain video segments included in the first video; Obtain target parameter values corresponding to the video clips in the first video.
4. The method according to claim 3, characterized in that The obtaining a target parameter value corresponding to the video segment in the first video includes: Obtaining a target parameter value of a first frame image of a video segment in the first video, and using the target parameter value of the first frame image of the video segment as a target parameter value corresponding to the video segment in the first video; or, The target parameter value of each frame image of the video segment in the first video is obtained, and an average value of the target parameter values of the each frame image is used as the target parameter value corresponding to the video segment in the first video.
5. The method according to claim 2, characterized in that: The determining, based on the target parameter value corresponding to the first video, the special effect parameter value of the target special effect includes: Based on the target parameter value corresponding to the video clip in the first video and a preset mapping relationship, the special effect parameter value of the target special effect corresponding to the video clip is determined; wherein the preset mapping relationship is used to indicate the association relationship between the target parameter value and the special effect parameter value.
6. The method according to claim 2, characterized in that The step of performing special effect processing on the first video based on the special effect parameter value of the target special effect to obtain a second video includes: Based on the special effect parameter value corresponding to the video segment in the first video, performing special effect processing on the video segment to obtain a special effect segment corresponding to the video segment; The special effect clips are spliced together to obtain a second video.
7. The method according to claim 6, characterized in that The performing special effect processing on the video segment based on the special effect parameter value corresponding to the video segment in the first video includes: Obtaining user adjustment parameters corresponding to the target special effect; Based on the user-adjusted parameters and the special effect parameter values corresponding to the video clip in the first video, special effect processing is performed on the video clip.
8. A video processing device, characterized in that: include: A first video acquisition module, used to acquire a first video to be processed and determine a target special effect to be adopted for the first video; A target parameter value acquisition module, used to acquire a target parameter value corresponding to the first video; wherein the target parameter value is a parameter value corresponding to a target visual attribute related to the target special effect; A special effect parameter value determination module, used to determine a special effect parameter value of the target special effect based on a target parameter value corresponding to the first video; The special effect processing module is used to perform special effect processing on the first video based on the special effect parameter value of the target special effect to obtain a second video.
9. An electronic device, characterized in that: The electronic device comprises: a storage device having a computer program stored thereon; A processing device, used to execute the computer program in the storage device to implement the steps of the video processing method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the video processing method described in any one of claims 1 to 7.
11. A computer program product, characterized in that The invention comprises a computer program, which implements the video processing method according to any one of claims 1 to 7 when being executed by a processor.