Video editing method, apparatus, device, and medium

By combining preset and custom scripts in video editing, this method addresses the lack of flexibility in existing video editing software, enabling diverse editing and efficient batch video processing.

CN118102018BActive Publication Date: 2026-02-10BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211435280.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-16
Publication Date
2026-02-10
Estimated Expiration
2042-11-16

AI Technical Summary

Technical Problem

Existing video editing software has fixed functions and poor flexibility, making it difficult to meet the diverse video editing needs of users. Furthermore, the existing methods are cumbersome and complicated when adjusting the timing and appearance of materials, and are inefficient in processing batches of videos.

Method used

This invention provides a video editing method that combines preset scripts and custom scripts. Users can use the preset scripts in the first editing tool for quick editing, triggering the script editing interface of the second editing tool, where they can input the target script themselves to achieve diverse editing capabilities.

Benefits of technology

It enhances the flexibility of video editing, allowing users to customize scripts to meet diverse editing needs, simplifying the adjustment of material timing and appearance methods, and improving the efficiency of batch video processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118102018B_ABST
    Figure CN118102018B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure relate to a video editing method, device, equipment and medium, wherein the method comprises: presenting an editing object and an editing tool on a video editing interface; in response to triggering a first editing tool in the editing tool for a first editing object in the editing object, implementing editing processing on the first editing object by executing a preset script corresponding to the first editing tool to obtain a second editing object; in response to triggering a second editing tool in the editing tool for a third editing object in the editing object, presenting a script editing interface of the third editing object, obtaining a target script input in the script editing interface, and implementing editing processing on the third editing object by executing the target script to obtain a fourth editing object; and generating a target video based on the second editing object and / or the fourth editing object. Embodiments of the present disclosure can meet the diversified editing needs of users and greatly improve the flexibility of video editing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of video processing, and particularly relates to a video editing method, device, equipment and medium. BACKGROUND

[0002] Existing video editing software provides users with multiple functions for editing videos, but these editing functions are fixed, that is, users can only use one or more of the fixed functions provided by the software to complete video editing operations, which has poor flexibility and cannot meet the diversified video editing needs of users. SUMMARY

[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a video editing method, device, equipment and medium.

[0004] The present disclosure provides a video editing method, which comprises: presenting an editing object and an editing tool on a video editing interface, the editing tool being used to trigger an editing operation on the editing object; in response to triggering a first editing tool in the editing tool for a first editing object in the editing object, implementing editing processing on the first editing object by executing a preset script corresponding to the first editing tool to obtain a second editing object; in response to triggering a second editing tool in the editing tool for a third editing object in the editing object, presenting a script editing interface of the third editing object, obtaining a target script input in the script editing interface, and implementing editing processing on the third editing object by executing the target script to obtain a fourth editing object; and generating a target video based on the second editing object and / or the fourth editing object.

[0005] Optionally, the video editing interface displays a video editing track, and the editing object comprises an element on the video editing track and / or an attribute of a target video.

[0006] Optionally, the script editing interface displays a script editing window in which script code can be input; and the step of obtaining the target script input in the script editing interface comprises: obtaining script code input by a user through the script editing window; and obtaining the target script based on the script code input by the user.

[0007] Optionally, the script editing interface displays a script obtaining link; and the step of obtaining the target script input in the script editing interface comprises: in response to the script obtaining link being triggered, jumping to a script library; wherein the script library comprises a personal script library and / or a public script library; obtaining a script selected by the user from the script library; and obtaining the target script based on the script selected by the user.

[0008] Optionally, the step of obtaining the target script based on the user-selected script comprises: in the case that the user edits the selected script, taking the edited script as the target script.

[0009] Optionally, the number of the third editing objects is multiple, and the step of implementing the editing processing on the third editing objects by executing the target script comprises: sorting the target scripts corresponding to the multiple third editing objects in ascending order of time based on the start times indicated in the target scripts; for the third editing object ranked first, when the current time reaches the start time corresponding to the third editing object, implementing the editing processing on the third editing object by executing the target script corresponding to the third editing object; for the third editing object ranked other than first, when the target script corresponding to the previous third editing object of the third editing object has been executed and the current time reaches the start time corresponding to the third editing object, implementing the editing processing on the third editing object by executing the target script corresponding to the third editing object.

[0010] Optionally, the method further comprises: if the start time corresponding to the third editing object is modified in the target script corresponding to the third editing object, re-sorting the target scripts corresponding to the multiple third editing objects in ascending order of time.

[0011] Optionally, the method further comprises: constructing a tree diagram based on the hierarchical relationship among the multiple third editing objects; determining a script initialization order of the multiple third editing objects according to the tree diagram and a preset traversal algorithm; and performing an initialization operation on the target scripts of the multiple third editing objects based on the script initialization order.

[0012] Optionally, the video clip interface further presents a preview player; and the method further comprises: displaying the editing effect corresponding to the target script on the preview player.

[0013] Optionally, the method further comprises: in the case that it is monitored that the user edits the fourth editing object by using the first editing tool, modifying the target script used for generating the fourth editing object based on the editing processing manner corresponding to the first editing tool.

[0014] Optionally, the method further comprises: providing a usage instruction of the editing tool at a specified position of the video editing interface; and the usage instruction comprises a script language instruction and a script function instruction corresponding to the editing object.

[0015] The embodiment of the present disclosure further provides a video editing device, comprising: a presentation module configured to present an editing object and an editing tool on a video editing interface, wherein the editing tool is configured to trigger an editing operation on the editing object; a first editing module configured to, in response to triggering a first editing tool in the editing tool for a first editing object in the editing object, implement editing processing on the first editing object by executing a preset script corresponding to the first editing tool, to obtain a second editing object; a second editing module configured to, in response to triggering a second editing tool in the editing tool for a third editing object in the editing object, present a script editing interface of the third editing object, acquire a target script input in the script editing interface, and implement editing processing on the third editing object by executing the target script, to obtain a fourth editing object; and a video generation module configured to generate a target video based on the second editing object and / or the fourth editing object.

[0016] The embodiment of the present disclosure further provides an electronic device, comprising: a processor; a memory configured to store executable instructions of the processor; and the processor configured to read the executable instructions from the memory and execute the instructions to implement the video editing method provided by the embodiment of the present disclosure.

[0017] The embodiment of the present disclosure further provides a computer readable storage medium, which stores a computer program configured to execute the video editing method provided by the embodiment of the present disclosure.

[0018] The embodiment of the present disclosure further provides a computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements any of the video editing methods.

[0019] The above technical solution provided by the embodiment of the present disclosure can not only enable the user to directly utilize the preset script corresponding to the first editing tool to perform editing processing, which is convenient and fast, but also can present the script editing interface when the user triggers the second editing tool, so that the user can input the target script required by the user in the script editing interface according to the requirement, and utilize the target script to perform editing processing, that is, the user is granted the script adding permission, thereby meeting the diversified editing requirement of the user and greatly improving the flexibility of video editing.

[0020] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0021] The accompanying drawings, which are incorporated herein and constitute part of the specification, illustrate embodiments consistent with the present disclosure and serve to explain the principles of the present disclosure together with the specification.

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the accompanying drawings required by the embodiments or the prior art description will be briefly introduced as follows. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative labor.

[0023] Figure 1 A flowchart of a video editing method provided by an embodiment of the present disclosure is shown in FIG. 1.

[0024] Figure 2 A schematic diagram of a video editing interface provided by an embodiment of the present disclosure is shown in FIG. 2.

[0025] Figure 3 A schematic diagram of a video editing interface provided by an embodiment of the present disclosure is shown in FIG. 3.

[0026] Figure 4 A schematic diagram of a video editing interface provided by an embodiment of the present disclosure is shown in FIG. 4.

[0027] Figure 5 A schematic diagram of an element hierarchical relationship tree provided by an embodiment of the present disclosure is shown in FIG. 5.

[0028] Figure 6 A schematic diagram of script initialization sequencing provided by an embodiment of the present disclosure is shown in FIG. 6.

[0029] Figure 7 A schematic diagram of start and end times of an editing object provided by an embodiment of the present disclosure is shown in FIG. 7.

[0030] Figure 8 A schematic diagram of a script execution flow provided by an embodiment of the present disclosure is shown in FIG. 8.

[0031] Figure 9 A schematic diagram of a structure of a video editing device provided by an embodiment of the present disclosure is shown in FIG. 9.

[0032] Figure 10 A schematic diagram of a structure of an electronic device provided by an embodiment of the present disclosure is shown in FIG. 10. DETAILED DESCRIPTION

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the accompanying drawings required by the embodiments or the prior art description will be briefly introduced as follows. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative labor.

[0034] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, the present disclosure can be practiced without the specific details. In other instances, well-known methods, procedures, components, and circuits have not been elaborated in detail so as not to obscure the present disclosure.

[0035] The existing video editing software provides users with editing functions, which are fixed functions. Users can only use one or more fixed functions provided by the software to complete video editing operations. The way in which users use the fixed functions to edit videos is mainly a visual video editing way. For example, the video editing software directly provides function control keys for users to edit videos on the interface. Users control the effect of the editing object on the video through the function control keys.

[0036] For example, users can also directly adjust the appearance time / position of the material through the dragging method.

[0037] The inventor found through research that the above-mentioned video editing method can only enable users to use one or more fixed functions provided by the software to complete video editing operations, which has poor flexibility and cannot meet the diversified needs of users. For example, the existing software only provides several appearance ways of the material in the video. Users can only choose from the existing several appearance ways, which has certain limitations and cannot meet their personalized needs. In addition, the above-mentioned video editing method also brings inconvenience to users to a certain extent. For example, users need to drag the material track to adjust the appearance time of the material in the video. However, in many cases, the appearance of the material cannot be accurately adjusted to the time point expected by the user. It may need to be adjusted repeatedly, and therefore, it is inconvenient. In addition, for users who need to process videos in batches, the existing video editing method is more complicated. For example, if the editing methods of multiple videos are mostly consistent, such as using the same material, the appearance time / way of the material in the video is consistent, users need to adjust the appearance time of the material through the dragging method for each video respectively, and find the required appearance way, which is more complicated and inefficient for processing videos in batches.

[0038] The above-mentioned defects of the related art video editing scheme are the result of the applicant after practice and careful research. Therefore, the discovery process of the above-mentioned defects and the solutions proposed by the embodiments of the present disclosure to the above-mentioned defects in the following should be recognized as the contribution of the applicant to the present application.

[0039] In order to improve one or more of the above problems, the embodiments of the present disclosure provide a video editing method, device, equipment and medium, which are described in detail below.

[0040] Figure 1A flowchart of a video editing method provided by an embodiment of the present disclosure is shown in FIG. 1. The method can be executed by a video editing device, which can be implemented by software and / or hardware and can be integrated in an electronic device such as a mobile phone, a computer, a portable wearable device, etc. The video editing method can also be applied to a client (e.g., a video editing software) with a video editing function, as shown in FIG. 2. The method mainly includes the following steps S102-S108. Figure 1

[0041] In step S102, an editing object and an editing tool are presented on a video editing interface, and the editing tool is used to trigger an editing operation on the editing object.

[0042] In some specific embodiments, a video editing track is displayed on the video editing interface, and the editing object includes an element on the editing track and / or a property of a target video. The element on the editing track includes but is not limited to a track segment, and the property of the target video can be, for example, a length of the target video corresponding to a total length of a time axis, a resolution of the target video, etc. The present disclosure does not limit the editing object, and any object involved in the video editing process can be used as the editing object. That is, the editing object is an object required for editing a video, such as a material, a track corresponding to the material, and a time axis, etc. It can be understood that various elements capable of editing (i.e., changing the effect of) a video can be displayed on the video editing interface, and the element on the editing track in the editing object includes a track segment, which can correspond to a material such as a text track segment, a sticker track segment, an effect track segment, etc. The material includes but is not limited to a sticker, a text, an effect, a filter, a transition animation, a video, a picture, etc. Specifically, the sticker is a static picture or a dynamic picture that can be attached to a video, the text is a word that can be attached to a video, the effect is an effect that can act on a video picture and can be rendered by a renderer for secondary processing and rendering of the video picture, the filter is a color effect that can act on a video picture, and the transition animation is an animation for switching between two segments in a video to increase the coherence and transition effect of the segment switching. Generally, the above-mentioned materials can be provided in a video editing software for a user to edit a video according to the needs.

[0043] ​In addition, the video editing interface can include a preview player that displays some of the editable objects (such as stickers and text). Furthermore, the interface can include an object selection area, allowing users to choose which objects to add to the timeline. It can also feature an area showcasing editing tools, allowing users to select the specific type of tool they need. In some implementation examples, the editing tools include a first editing tool and a second editing tool. The first tool is a preset operation tool that the user can automatically trigger, primarily used for editing according to the software's default settings. The second tool is a custom operation tool that requires user input, allowing users to customize editing according to their needs. In practical applications, the video editing interface can display controls for each editing tool in the designated tool area. Different tools offer different editing functions, allowing users to select the appropriate tool based on their requirements and invoke it by triggering the controls.

[0044] Step S104: In response to triggering the first editing tool in the editing tools for the first editing object in the editing objects, the first editing object is edited by executing the preset script corresponding to the first editing tool to obtain the second editing object.

[0045] As mentioned earlier, the first editing tool is a preset operation tool that can be automatically triggered by the user. In its implementation, the software system pre-stores the preset script corresponding to the first editing tool. When the user triggers the first editing tool, they can directly execute the preset script corresponding to the first editing tool to perform editing processing on the first editing object. The edited first editing object can be called the second editing object. It can be understood that the script is essentially a code snippet that can implement certain functional logic. The preset script corresponding to the first editing tool can be used to indicate the specific way to edit the first editing object, such as setting the style, content, and time period of the text material in the video.

[0046] Step S106: In response to triggering the second editing tool in the editing tools for the third editing object in the editing objects, the script editing interface of the third editing object is presented, the target script input in the script editing interface is obtained, and the third editing object is edited by executing the target script to obtain the fourth editing object.

[0047] As described above, the second editing tool is a custom operation tool requiring user input of a script. In actual applications, a script adding port corresponding to the second editing tool can be displayed on a video editing interface. When the user triggers the script adding port, it can be considered that the user triggers the second editing tool. The script adding port provides a path for the user to add a script. The user can add a target script corresponding to a third editing object through the script adding port. The target script can also be understood as a custom script, which can be used to indicate a specific manner of editing the third editing object, and the manner is set by the user according to needs. The above manner provided by the embodiments of the present disclosure is equivalent to providing a path for the user to implant a code fragment according to needs by exposing an interface, so that the user can perform video editing without being limited to the fixed functions of the video editing software, but can perform editing according to own needs, thereby meeting the diversified editing needs of the user.

[0048] The script input in the script editing interface is the target script (custom script). The user can directly write a script code in the script editing interface according to needs, or can select a required script from a script library and input into the script editing interface. The embodiments of the present disclosure do not limit the source of the script. The target script obtained from the script editing interface is executed to implement editing of the third editing object. The third editing object after editing can be referred to as a fourth editing object. It should be noted that the third editing object can be the same as or different from the first editing object or the second editing object. It should be noted that in this document, relationship terms such as "first" and "second" are only used to distinguish entities, and do not necessarily require or imply any actual relationship or order between the entities.

[0049] In step S108, a target video is generated based on the second editing object and / or the fourth editing object.

[0050] In actual applications, in the case where only the second editing object exists, that is, in the case where the user only uses the first editing tool, video editing is performed based on the second editing object to obtain a target video. In the case where only the fourth editing object exists, that is, in the case where the user only uses the second editing tool, video editing is performed based on the fourth editing object to obtain a target video. In the case where both the second editing object and the fourth editing object exist, that is, in the case where the user uses both the first editing tool and the second editing tool, a target video is obtained based on the second editing object and the fourth editing object. In actual applications, the original video can be edited into a target video according to the second editing object and / or the fourth editing object.

[0051] The above technical solution provided by the embodiments of the present disclosure can not only enable the user to directly edit a preset script corresponding to the first editing tool, which is convenient and fast, but also present a script editing interface when the user triggers the second editing tool, so that the user can input a target script as needed in the script editing interface and edit the target script, that is, the user is granted a script adding permission, thereby meeting the diversified editing needs of the user and greatly improving the flexibility of video editing.

[0052] In some embodiments, the script editing interface is displayed on the video editing interface, and two implementation manners of obtaining the target script input in the script editing interface are described as follows:

[0053] In the first implementation manner, the script editing interface displays a script editing window in which a script code can be input; based on this, the step of obtaining the target script input in the script editing interface includes: obtaining the script code input by the user through the script editing window; and obtaining the target script based on the script code input by the user. In actual application, the script editing window can be displayed in the form of a floating window or an interface embedded window, so that the user can write the target script in the script editing window as needed.

[0054] By directly displaying the script editing window, the user can directly write the required script in the script editing window as needed, so as to achieve the diversified video editing needs of the user, which is very flexible.

[0055] In the second implementation manner, the script editing interface displays a script obtaining link; based on this, the step of obtaining the target script input in the script editing interface includes: jumping to a script library in response to the script obtaining link being triggered; the script library includes a personal script library and / or a public script library; then obtaining the script selected by the user from the script library; and obtaining the target script based on the script selected by the user.

[0056] The personal script library is used to store private scripts pre-written by the user, such as storing multiple scripts with common functions in the personal script library of the user for direct calling when used later; and the public script library is used to store public scripts pre-written by the public, such as uploading the script written by the user to the public script library for public use, which can also be referred to as a script mall, and the user can download the required script through the public script library. On this basis, the script convenient interface displays a script obtaining link that can jump to the script library, and the user clicks the script obtaining link, and the interface automatically jumps to the personal script library or the public script library selected by the user, so as to facilitate the user to select the required script from the script library. In actual application, the user can directly use the selected script as the target script, or can further edit the selected script, and in the case that the user edits the selected script, the edited script is used as the target script.

[0057] Through the above script acquisition link display script, the user can conveniently and quickly select the required script from the script library, which can be a script previously written by the user, or a script shared by the public, and can further reduce the video editing time and improve the convenience of video editing on the basis of breaking the inherent function of the video editing software.

[0058] In actual application, the above embodiment one and / or embodiment two can be flexibly selected according to the needs, such as the script acquisition link can be displayed at the same time as the script editing window, so as to facilitate the user to select the required script adding mode.

[0059] In summary, after the user selects the third editing object, the user can be provided with a corresponding script editing interface, and the added script can be a script written by the user in the script editing window, or a historical script previously written by the user through the personal script library, or a script downloaded by the user from a public script library and the like, so that the script adding mode is various, and great convenience is provided for the user to add a corresponding script to the third editing object.

[0060] In actual application, considering that the user has input the target script corresponding to the third editing object in the script editing interface during the historical editing process, when the user triggers the second editing tool again for the third editing object, the historical script of the third editing object can be directly displayed in the script editing interface, which can be a script saved by the user for the third editing object the last time or a script added by the user through the script library the last time, and the user can directly modify the historical script according to the needs. In specific implementation, a script editing button can be arranged on the script editing interface, and when the user triggers the script editing button, the current script displayed on the interface can be modified and adjusted, which provides a flexible and convenient script modification approach for the user, and facilitates the user to modify the script according to the needs to adjust the function that can be realized by the script. In addition, a script deletion button can be arranged on the script editing interface, and when the user triggers the script deletion button, a deletion operation can be performed on the current script displayed on the interface. The user can further add a new script on the basis of deleting the script, or can no longer add a new script, at this time, it indicates that the user can not need to use the third editing object of the deleted script, or the user no longer needs to edit the third editing object in the form of a custom script, and instead uses the preset script in the form of the first editing tool to edit the third editing object.

[0061] For the convenience of understanding the above content, please refer to Figure 2Fig. 1 shows a schematic diagram of a video editing interface, in which a track segment of text, sticker and other elements on a video editing track is displayed, and trigger buttons of editing objects such as video, audio, text and sticker are also displayed, and a script adding button (the "add script" button in the diagram) for initiating a script adding request, a script deleting button (the "delete script" button in the diagram) for initiating a script deleting request, and a script editing button (the "edit script" button in the diagram) for initiating a script editing request are also shown. The buttons can be used to trigger editing tools by the user. The user can select the desired editing object, Figure 2 In the case where the video trigger button is selected, the script adding button is in a selectable state (i.e., can be triggered). Figure 2 The diagram is only a schematic diagram and not a real picture, in which the buttons with shading represent buttons in a selectable state (i.e., can be clicked by the user), and the bolded text represents buttons in a triggered state (i.e., have been selected). The user can call the editing tools in the embodiments of the present disclosure by triggering the buttons.

[0062] On the basis of Figure 2 , reference can also be made to Figure 3 Fig. 2 shows a schematic diagram of a video editing interface, indicating that after the user has added a script for the selected editing object, the script deleting button and the script editing button are in a selectable state, i.e., the user can further edit or delete the added script. When the user triggers the script editing button, a script editing interface in the form of a floating window can also appear on the video editing interface, as shown in Figure 4 Fig. 3. The script editing interface includes a script program editing box, in which the user can enter the desired script code according to the needs. It should be noted that, Figure 4 This is only an example, and in actual applications, the script editing interface can also appear in the form of being embedded on the video editing interface.

[0063] The above Figures 2 to 4The above are all exemplary illustrations, which show the corresponding trigger buttons of each material, script adding / editing / deleting buttons, and also show attributes area (which can represent material attributes such as added text font size, text font style, etc.), material track, time axis, etc. In actual application, the video editing interface can simultaneously show the rendering effect of the editing object on the video (video clip effect), traditional buttons for visual operation and function control, and ports for setting parameters; that is, the video editing method using user-defined scripts can be added on the basis of the original visual video clip method, so that the user can flexibly select the required method for video editing. For example, the user wants to select five editing objects to clip the video, and can use the custom script method for video editing for three of the editing objects, so as to realize the function not provided in the video editing software; for the other two editing objects, the function provided by the video editing software can meet the user's needs, so the visual clip method can be directly used. That is, in actual application, each editing object in the video editing software can correspond to a script, and for each editing object, the user can use the custom script to control the editing object, or use the preset script corresponding to the existing function button to control the editing object, which is not limited here.

[0064] In summary, through the above method, the user can flexibly select the required editing tool to clip the video according to the needs, and add, edit and delete the corresponding script for the editing object of the required clip video, so as to meet the user's diversified video clip needs.

[0065] In order to make the user clearly know the specific operation method of video clip based on the script, the above method provided by the embodiment of the disclosure further includes: providing usage instructions of the editing tool at a specified position of the video editing interface; the usage instructions include script language instructions and script function instructions corresponding to the editing object. The specified position can be, for example, a software introduction page, a function page, etc., which is not limited here. That is, in actual application, the user can be provided with a description document for controlling video editing by script at a specified position in the video editing software, which includes but is not limited to introduction of script editing language, function description of script, specific method of video clip using script, etc., so that the user can clearly know how to use the script to edit the editing object through the description document, thereby realizing video editing.

[0066] This disclosure does not limit the language of the script. In some specific implementation examples, the script can be implemented using a custom DSL (domain-specific language), which can also be called a dynamic scripting language. Syntactically, it can use language styles similar to JavaScript, Lua, KotlinScript, etc., without limitation. The script program can include the following: 1) Basic control flow: such as conditional statements like `if`, loop control statements like `for` and `while`; 2) Functions: can include built-in functions and user-defined functions. Built-in functions can be inherent functions provided by the video editing software, such as `getCurrentTime` to get the current timeline duration, and `getBeginTime` to get the start time of an element. User-defined functions can be functions written by the user according to their needs to implement user-defined logic. 3) Triggers. Triggers are essentially a type of function, but they are executed and called back by the script control program. Users do not need to actively call them; they are passively triggered. Triggers may include functions such as `onStart` to trigger script execution and `onEnd` to trigger the end of script execution. The above function names are for illustrative purposes only and should not be considered as limitations. In this embodiment of the disclosure, all types of editing objects mentioned above (such as elements on the track, video attributes, etc.) can be scripted. Different editing objects can also be called different types of scriptable entity objects, that is, corresponding scripts can be added to them. Based on the scripts, the editing objects can be controlled to edit the video in a way that enables more functions.

[0067] Scripts typically have some basic functions and triggers, for example, including but not limited to: getCurrentTime function for getting the current timeline duration, getCurrentInnerTime function for getting the current inner duration of the edited object, getBeginTime function for getting the start time of the edited object, getEndTime function for getting the end time of the edited object, onStart function for being called back when the script of the edited object is executed, onEnd function for being called back when the edited object's trigger ends, and onTimeChanged function for being triggered when the time of the edited object is modified, etc.

[0068] Building upon the basic functionalities described above, each different type of edit object can also possess different script functionalities. These script functionalities can be fixed or extended (e.g., updated through application upgrades or defined by the application user). For example, the following provides illustrations of the basic functionalities of the scripts corresponding to each edit object. The content within parentheses following the basic functionalities represents the function name that implements that function. It should be noted that the function names are merely illustrative and can be set according to actual circumstances; they should not be considered as limitations.

[0069] For scripts corresponding to time, basic functions include, but are not limited to: getting the total length of the timeline (getTimelineDuration), getting all tracks under the timeline (getAllTracks), and getting track information by track identifier (getTrackById). For scripts corresponding to tracks, basic functions include, but are not limited to: getting all materials on the track (getAllElements), getting material information by material identifier (getElementById), setting track visibility (setTrackVisibility), deleting a track (deleteTrack), adding a track (addTrack), and copying a track (copyTrack). For scripts corresponding to stickers, their basic functions include, but are not limited to: scaling the sticker (scaleSticker), moving the sticker (translateSticker), rotating the sticker (rotateSticker), setting the transparency (setStickerAlpha), deleting the sticker (deleteSticker), adding the sticker (addSticker), and copying the sticker (copySticker). For scripts corresponding to text, their basic functions include, but are not limited to: modifying the text content (editTextContent), modifying the text style (editTextStyle), scaling the text (scaleText), moving the sticker (translateText), rotating the text (rotateText), setting the transparency (setTextAlpha), deleting the text (deleteText), adding the text (addText), and copying the text (copyText). For scripts corresponding to effects, their basic functions include, but are not limited to: deleting the effect (deleteEffect), adding the effect (addEffect), and editing the effect information (editEffect).For scripts corresponding to filters, basic functions include, but are not limited to: deleting a filter (deleteFilter), adding a filter (addFilter), and editing filter information (editFilter). For scripts corresponding to transition animations, basic functions include, but are not limited to: deleting a transition animation (deleteTransferAnimation), adding a transition animation (addTransferAnimation), editing transition animation information (editTransferAnimation), and setting the animation interpolator (setInterpolator). For scripts corresponding to audio, basic functions include, but are not limited to: deleting audio (deleteAudio), adding audio (addAudio), splitting audio (splitAudio), and setting audio information (setAudioInfo). The above are all illustrative examples. In actual applications, other functions can also be implemented. The function names and specific code logic of these functions can also be adjusted, and there are no restrictions here.

[0070] In practical applications, there are multiple third-party editing objects. That is, a user can control multiple editing objects using custom scripts during a single video editing task. Each third-party editing object can have a corresponding script added. For example, if a video editing task involves five third-party editing objects: a timeline, a video, two stickers, and an audio track, and each third-party editing object has a corresponding custom script added, then there are five scripts to be executed in this video editing task. In other words, the video editing task can be performed based on these five scripts. When editing the video based on the scripts corresponding to the third-party editing objects, the scripts can be initialized first, that is, the scripts required for video editing can be preloaded. In some implementation examples, the initialization order of the scripts can be determined based on the hierarchical relationship between the third-party editing objects. Specifically, this can be achieved by referring to steps A through C below:

[0071] Step A: Construct a tree diagram based on the hierarchical relationship between multiple third-party editing objects.

[0072] See Figure 5 The diagram shown illustrates a hierarchical tree structure of editable objects, representing the timeline, tracks corresponding to each material, and the hierarchical relationships between them. It can be understood that tracks are members of the timeline, and materials are members of the material tracks. Based on the hierarchical relationships between multiple editable objects, a tree structure can be formed from top to bottom, presenting... Figure 5 The tree diagram shown is illustrated below. It should be noted that... Figure 5 This is for illustrative purposes only and should not be considered a limitation.

[0073] Step B: Determine the script initialization order of multiple third-party editing objects based on the tree diagram and the preset traversal algorithm.

[0074] In some implementations, the traversal algorithm can be a tree-based preorder traversal algorithm, which, along with the tree diagram, can determine the script initialization order (i.e., preloading order) of each target element. For example, see [link to relevant documentation]. Figure 6 The script initialization sorting diagram shown illustrates the execution order of script initialization for each editable object, obtained using a preorder traversal algorithm based on the tree structure. Specifically, the timeline script is initialized first, followed by the video track script. See the attached diagram for details. Figure 6 The initialization order of the identifiers. It should be noted that... Figure 6 This is just an example. In practical applications, other traversal algorithms can be used, such as level-order traversal, and there are no restrictions here.

[0075] Step C involves performing initialization operations on the target scripts of multiple third-party editing objects based on the script initialization order.

[0076] The above method can be used to initialize multiple target scripts in sequence so that they can be executed directly later.

[0077] Each editable object's script exhibits both spatial and temporal characteristics during execution. Spatially, this is reflected in the script initialization order determined by the hierarchical relationship between the editable objects, as mentioned above. Temporally, each editable object has its own start and end times, such as... Figure 7 The diagram illustrating the start and end times of editable objects uses the length of the footage track to represent these times. The actual execution order of each script depends on the start and end times of the corresponding editable object; for example, the script corresponding to the editable object that appears first in the video executes first. Triggers can be set within the scripts. When the current time reaches the start time of an editable object, the `onStart` trigger in the script is automatically called, triggering the execution of the script corresponding to that editable object. When the current time reaches the end time of an editable object, the `onEnd` trigger in the script is automatically called, triggering the termination of the script corresponding to that editable object. Multiple scripts need to be executed in the order of the timeline. A linked list can be used to record the execution order of the scripts. During script execution, trigger functions are called according to the timeline, ensuring that multiple scripts execute sequentially in chronological order.

[0078] It should be noted that the script initialization order differs from the actual execution order. The script initialization order is primarily determined by the hierarchy between editing objects, while the actual execution order is primarily determined by the chronological order in which the editing objects appear. For example, although the sticker track script is initialized earlier than the text track script in the initialization order, if the sticker appears in the video later than the text appears in the video editing, then the sticker track script will be executed later than the text track script.

[0079] This disclosure further provides a specific method for editing a third editing object by executing a target script. For example, the target scripts corresponding to multiple third editing objects can be sorted in ascending order of time based on the start time indicated in their respective scripts. For the first third editing object, when the current time reaches its corresponding start time, the target script corresponding to that third editing object is executed to perform editing. For a third editing object that is not first, when the target script corresponding to the preceding third editing object has been executed and the current time reaches its corresponding start time, the target script corresponding to that third editing object is executed to perform editing. It should be noted that the script execution order refers to the start time of the script execution. A linked list can be used to record the execution order. The phrase "the target script corresponding to the preceding third editing object has been executed" means that the target script corresponding to the preceding third editing object has started execution, not that it has finished. In reality, although the target scripts corresponding to different third-party editing objects may start executing at different times, their execution times can overlap. This means the target scripts can run simultaneously; for example, while the video track script is running, the timeline script can also be continuously running. Through this method, even with multiple third-party editing objects, video editing based on their respective target scripts can still be performed in an orderly and reliable manner, preventing confusion and ensuring the accuracy of video editing.

[0080] Furthermore, considering that users might modify the start time of the third-edit object appearing in the video, the method also includes: if the target script corresponding to a third-edit object indicates that the start time of the third-edit object has been modified, then the target scripts corresponding to multiple third-edit objects are reordered in ascending order of time. That is, whenever the start time of a target script is modified, the target scripts of multiple third-edit objects must be reordered to promptly correct the execution order of the scripts, thereby ensuring that the appearance time of each third-edit object in the video meets the user's needs and achieves the desired video editing effect.

[0081] In practical applications, for scripts involved in video editing, whether it's a preset script triggered by the user in the first editing tool or a target script entered by the user in the second editing tool, they can all be processed according to the following... Figure 8 The diagram illustrates a script execution flow, which mainly includes the following steps:

[0082] Step S802: Iterate through the start and end times indicated in the script corresponding to each edit object.

[0083] Step S804: Sort the scripts corresponding to each edit object in ascending order of time, and record the sorting results of each script using a linked list. Specifically, the linked list is generated by the script execution system after determining the execution order of the scripts. The linked list can contain the scripts corresponding to each element, and the scripts in the linked list are sorted in ascending order of time.

[0084] Step S806: Retrieve the script to be processed from the linked list. In practical applications, the scripts can be sorted and processed one at a time until step S816 is reached. If step S816 determines that not all scripts have been executed, then return to step S806, that is, retrieve the next script from the linked list and process it according to the following steps.

[0085] Step S808: Determine whether the current time type in the script to be processed is a start time. If yes, proceed to step S810; otherwise, proceed to step S812.

[0086] Step S810: Start executing the script. Triggers can be set in the script. If the start time is obtained from the script to be processed, that is, if the current time reaches the start time, the onStart trigger in the script can be automatically called, thus triggering the execution of the script corresponding to that element. At this point, it is equivalent to the script officially starting.

[0087] Step S812: End execution of the script. If the current time type in the script to be processed is not the start time, it means that the end time has been obtained from the script to be processed, that is, the current time has reached the end time. Therefore, the trigger onEnd in the script can be automatically called, that is, the script corresponding to the element is triggered to end execution.

[0088] Step S814: Determine if the time in the script has changed. If yes, proceed to step S802; otherwise, proceed to step S816. Specifically, since a change in the time at which the elements in the script begin to act on the video will affect the execution order of multiple scripts, it is necessary to determine if the start time in the script has changed. If it has changed, a readjustment of the order of multiple element scripts is triggered.

[0089] Step S816: Determine whether all scripts have been executed. If yes, end; if no, proceed to step S806.

[0090] By using the above methods, we can ensure that multiple scripts can reliably and orderly perform video editing, and guarantee that the video editing effect meets the user's needs.

[0091] To facilitate a clear and intuitive understanding of the video editing effects for users, a preview player is also displayed on the video editing interface. The method provided in this embodiment further includes displaying the editing effects corresponding to the target script on the preview player. For example, for a sticker script, if sticker transparency is set in the script, the preview player will synchronously display the effect of the sticker on the video based on that sticker transparency. Similarly, for a text script, if a text style is set in the script, the preview player will synchronously display the effect of the text on the video using that text style. Through these methods, users can clearly and intuitively understand the effects of video editing controlled by element scripts, and it also helps users determine whether script modifications are necessary based on the intuitive video editing effects.

[0092] In this embodiment, not only can a first editing tool be provided to the user to provide convenient and quick editing functions, the first editing tool can be presented on the video editing interface in the form of function trigger buttons, adjustment bars, etc., to provide the user with a visual interactive method, but a second editing tool can also be provided to the user so that the user can use custom scripts to achieve video editing. The user can flexibly choose the required method to perform video editing according to their needs. Furthermore, if users are dissatisfied with the video rendering effect of the edited object processed based on the custom script, they can flexibly call the first editing tool to modify it again. Based on this, the method also includes: when it detects that the user is editing the fourth edited object using the first editing tool, modifying the target script used to generate the fourth edited object based on the editing method corresponding to the first editing tool, so that the video editing effect corresponding to the modified target script is consistent with the video editing effect adjusted by the first editing tool. That is, when the user performs a visual operation on a certain fourth edited object, the script can also be adjusted accordingly. For example, if the user sets the start time of the fourth edited object to A in the script, and then adjusts the start time of the fourth edited object using the first editing tool, changing the start time A to start time B, the start time of the fourth edited object in the script will also be changed to B accordingly. In this way, the consistency between the final script and the editing effect can be better guaranteed.

[0093] In this embodiment, the first editing tool provides users with visual function buttons. Users can trigger preset scripts for editing by activating these buttons; this can be referred to as visual-based video editing. The second editing tool provides users with a script editing interface where they can input custom scripts for editing; this can be referred to as custom script-based video editing. Both visual-based and custom script-based video editing essentially involve adjusting relevant data (such as start and end times, element presentation, etc.) corresponding to the edited object. Through the examples provided in this embodiment, custom script-based and visual-based video editing operations can achieve bidirectional synchronization, resulting in consistent video editing effects and allowing users to flexibly select / switch between desired video editing methods. Furthermore, the script-based video editing method provided in this embodiment allows users to achieve effects not present in the original video editing software, such as customizing more complex entrance animations as needed, rather than being limited to the limited entrance animations provided by the video editing software. Therefore, it provides users with more diverse video editing methods, making video editing more flexible and free.

[0094] In summary, the video editing method provided in this disclosure has, but is not limited to, the following beneficial effects:

[0095] (1) By providing users with a path to embed code snippets (enter scripts) as needed, users can easily write scripts according to their requirements and use them for video editing, thereby achieving the functions they need. In other words, users are not limited to the fixed functions of video editing software, but can edit according to their own needs, thus meeting the diverse editing needs of users.

[0096] (2) Improved video editing convenience. In related technologies, when users edit videos using source material, they may need to set various parameters, such as the start time, end time, or other fine-tuning parameters. If fine-tuning is performed on each source material sequentially, the user needs to operate one by one, which is very time-consuming and laborious. Moreover, operations such as adjusting the start and end times by dragging the track are prone to errors and cannot fully achieve the user's desired timing. However, if a script is used for editing, it is very convenient. The desired effect can be achieved simply by setting the relevant code parameters in the script, without the need for repeated adjustments.

[0097] (3) Scripts are reusable, which can effectively improve the efficiency of batch video processing. Scripts can also be used in batches. Users can write multiple scripts in advance, such as pre-editing and saving frequently used scripts for each editing object. When applying the script, they can be called directly by the script name, thereby further improving the efficiency of video editing. Moreover, there is no need to edit each video individually in a visual way, which greatly shortens the time spent on batch video processing.

[0098] (4) Users can flexibly choose the required editing method according to their needs, such as choosing video editing operation based on visualization or video editing operation based on custom script, which further enhances the video editing experience.

[0099] Corresponding to the aforementioned video editing method provided in the embodiments of this disclosure, the embodiments of this disclosure further provide a video editing apparatus. Figure 9 This is a schematic diagram of a video editing device provided in an embodiment of the present disclosure. The device can be implemented by software and / or hardware, and is generally integrated into an electronic device, such as... Figure 9 As shown, it includes:

[0100] The presentation module 902 is used to present the editing object and editing tools on the video editing interface, and the editing tools are used to trigger editing operations on the editing object;

[0101] The first editing module 904 is used to respond to the triggering of the first editing tool in the editing tools for the first editing object in the editing object, and to perform editing processing on the first editing object by executing the preset script corresponding to the first editing tool to obtain the second editing object;

[0102] The second editing module 906 is used to respond to the triggering of the second editing tool in the editing tool for the third editing object in the editing object, to present the script editing interface of the third editing object, to obtain the target script input in the script editing interface, and to perform editing processing on the third editing object by executing the target script to obtain the fourth editing object;

[0103] The video generation module 908 is used to generate a target video based on a second editing object and / or a fourth editing object.

[0104] The technical solutions provided in this disclosure can both allow users to directly use the preset scripts corresponding to the first editing tool for editing, which is convenient and quick, and present a script editing interface when the user triggers the second editing tool, so that the user can input the target script they need according to their needs in the script editing interface and use the target script for editing, which grants the user script adding permissions, thereby meeting the diverse editing needs of users and greatly improving the flexibility of video editing.

[0105] In some implementations, the video editing interface displays a video editing track, and the editing object includes elements on the video editing track and / or attributes of the target video.

[0106] In some implementations, the script editing interface displays a script editing window where script code can be entered; the second editing module 906 is specifically used to: obtain the script code entered by the user through the script editing window; and obtain the target script based on the script code entered by the user.

[0107] In some implementations, the script editing interface displays a script retrieval link; the second editing module 906 is specifically used to: in response to the script retrieval link being triggered, jump to the script library; wherein, the script library includes a personal script library and / or a public script library; retrieve the script selected by the user from the script library; and obtain the target script based on the script selected by the user.

[0108] In some implementations, the second editing module 906 is specifically used to: when the user edits the selected script, use the edited script as the target script.

[0109] In some embodiments, there are multiple third editing objects, and the second editing module 906 is specifically used to: sort the target scripts corresponding to the multiple third editing objects in ascending order of time based on the start time indicated in the target scripts corresponding to each of the multiple third editing objects; for the third editing object that is ranked first, when the current time reaches the start time corresponding to the third editing object, to perform editing processing on the third editing object by executing the target script corresponding to the third editing object; for the third editing object that is not ranked first, when the target script corresponding to the previous third editing object has been executed and the current time reaches the start time corresponding to the third editing object, to perform editing processing on the third editing object by executing the target script corresponding to the third editing object.

[0110] In some embodiments, the apparatus further includes a reordering module for: if a target script corresponding to the third edit object indicates that the start time corresponding to the third edit object has been modified, then reordering the target scripts corresponding to the multiple third edit objects in ascending order of time.

[0111] In some embodiments, the apparatus further includes an initialization module, configured to: construct a tree diagram based on the hierarchical relationship between the plurality of third editing objects; determine the script initialization order of the plurality of third editing objects according to the tree diagram and a preset traversal algorithm; and perform initialization operations on the target scripts of the plurality of third editing objects based on the script initialization order.

[0112] In some embodiments, the video editing interface also displays a preview player; the device further includes an effect display module, used to display the editing effect corresponding to the target script on the preview player.

[0113] In some embodiments, the apparatus further includes a modification module, configured to modify the target script used to generate the fourth edit object based on the editing method corresponding to the first editing tool when it is detected that a user is editing the fourth edit object using the first editing tool.

[0114] In some embodiments, the device further includes an instruction providing module for providing instructions for using the editing tool at a designated location on the video editing interface; the instructions for use include a scripting language description and a description of the script functions corresponding to the editing object.

[0115] The video editing apparatus provided in this disclosure can execute the video editing method provided in any embodiment of this disclosure, and has the corresponding functional modules and beneficial effects of executing the method.

[0116] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device embodiments can be referred to the corresponding process in the method embodiments, and will not be repeated here.

[0117] This disclosure provides an electronic device, which includes: a processor; a memory for storing processor-executable instructions; and a processor for reading executable instructions from the memory and executing the instructions to implement the video editing method described above.

[0118] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Figure 10 As shown, the electronic device 1000 includes one or more processors 1001 and memory 1002.

[0119] The processor 1001 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 1000 to perform desired functions.

[0120] The memory 1002 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 1001 may execute the program instructions to implement the video editing method of the embodiments of this disclosure described above and / or other desired functions. Various contents such as input signals, signal components, and noise components may also be stored in the computer-readable storage medium.

[0121] In one example, the electronic device 1000 may also include an input device 1003 and an output device 1004, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).

[0122] In addition, the input device 1003 may also include, for example, a keyboard, a mouse, etc.

[0123] The output device 1004 can output various information to the outside, including determined distance information, direction information, etc. The output device 1004 may include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, etc.

[0124] Of course, for the sake of simplicity, Figure 10 Only some of the components of the electronic device 1000 relevant to this disclosure are shown, omitting components such as buses, input / output interfaces, etc. In addition, the electronic device 1000 may include any other suitable components depending on the specific application.

[0125] In addition to the methods and devices described above, embodiments of this disclosure may also be computer program products, including computer program instructions that, when executed by a processor, cause the processor to perform the video editing methods provided in the embodiments of this disclosure.

[0126] The computer program product can be written in any combination of one or more programming languages ​​to perform the operations of the embodiments of this disclosure. The programming languages ​​include object-oriented programming languages ​​such as Java and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on a user's computing device, partially on a user's computing device, as a standalone software package, partially on a user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0127] Furthermore, embodiments of this disclosure may also be computer-readable storage media storing computer program instructions that, when executed by a processor, cause the processor to perform the video editing method provided in embodiments of this disclosure.

[0128] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0129] This disclosure also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the video editing method of this disclosure.

[0130] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0131] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily 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 this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A video editing method, characterized in that, include: The video editing interface displays an editing object and editing tools, wherein the editing tools are used to trigger editing operations on the editing object; In response to triggering the first editing tool in the editing tools for the first editing object in the editing objects, the first editing object is edited by executing the preset script corresponding to the first editing tool to obtain the second editing object; In response to triggering the second editing tool in the editing tools for the third editing object, the script editing interface of the third editing object is presented, the target script input in the script editing interface is obtained, and the third editing object is edited by executing the target script to obtain the fourth editing object; Generate the target video based on the second editing object and / or the fourth editing object; If it is detected that a user is editing the fourth edit object using the first editing tool, the target script used to generate the fourth edit object is modified based on the editing method corresponding to the first editing tool.

2. The method according to claim 1, characterized in that, The video editing interface displays a video editing track, and the editing objects include elements on the video editing track and / or attributes of the target video.

3. The method according to claim 1, characterized in that, The script editing interface displays a script editing window where script code can be entered; The steps for obtaining the target script input in the script editing interface include: The script code entered by the user is obtained through the script editing window; The target script is obtained based on the script code entered by the user.

4. The method according to claim 1, characterized in that, The script editing interface displays a link to obtain the script; The steps for obtaining the target script input in the script editing interface include: In response to the script retrieval link being triggered, the user is redirected to a script library; wherein, the script library includes personal script libraries and / or public script libraries; Obtain the script selected by the user from the script library; The target script is obtained based on the script selected by the user.

5. The method according to claim 4, characterized in that, The step of obtaining the target script based on the script selected by the user includes: if the user edits the selected script, the edited script is used as the target script.

6. The method according to claim 1, characterized in that, The number of third editable objects is multiple, and the steps of editing the third editable objects by executing the target script include: Based on the start time indicated in the target script corresponding to each of the multiple third editing objects, the target scripts corresponding to the multiple third editing objects are sorted in ascending order of time; For the third editable object that is ranked first, when the current time reaches the start time corresponding to the third editable object, the target script corresponding to the third editable object is executed to perform editing processing on the third editable object. For a third editable object that is not the first one, if the target script corresponding to the previous third editable object has been executed and the current time reaches the start time corresponding to the third editable object, the third editable object will be edited by executing the target script corresponding to the third editable object.

7. The method according to claim 6, characterized in that, The method further includes: If a target script corresponding to the third edit object indicates that the start time of the third edit object has been modified, then the target scripts corresponding to the multiple third edit objects are reordered in ascending order of time.

8. The method according to claim 6, characterized in that, The method further includes: A tree diagram is constructed based on the hierarchical relationship between the multiple third editing objects; The script initialization order of the multiple third editing objects is determined based on the tree diagram and the preset traversal algorithm; Initialization operations are performed on the target scripts of multiple third-edit objects based on the script initialization order.

9. The method according to claim 1, characterized in that, The video editing interface also displays a preview player; the method further includes: The editing effect corresponding to the target script is displayed on the preview player.

10. The method according to claim 1, characterized in that, The method further includes: The video editing interface provides instructions for using the editing tool at a designated location; these instructions include a description of the scripting language and a description of the script functions corresponding to the editing object.

11. A video editing device, characterized in that, include: The presentation module is used to present the editing object and editing tools on the video editing interface, wherein the editing tools are used to trigger editing operations on the editing object; The first editing module is configured to respond to triggering the first editing tool in the editing tools for the first editing object in the editing objects, and to perform editing processing on the first editing object by executing the preset script corresponding to the first editing tool to obtain the second editing object; The second editing module is used to respond to the triggering of the second editing tool in the editing tool for the third editing object in the editing object, to present the script editing interface of the third editing object, to obtain the target script input in the script editing interface, and to perform editing processing on the third editing object by executing the target script to obtain the fourth editing object; A video generation module is used to generate a target video based on the second editing object and / or the fourth editing object; The modification module is used to modify the target script used to generate the fourth edit object based on the editing method corresponding to the first editing tool when it detects that the user has edited the fourth edit object through the first editing tool.

12. An electronic device, characterized in that, The electronic device includes: processor; Memory used to store the processor's executable instructions; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the video editing method according to any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the video editing method according to any one of claims 1-10.

14. A computer program product, characterized in that, Includes a computer program, wherein the computer program, when executed by a processor, implements the video editing method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Visual and user-defined panoramic editing method and system, storage medium and equipment

    CN110633436A