Video editing method and device

By caching the layout information of the source material, the layout information of the target material can be read directly from the cache, which solves the problem of increased rendering time in video editing and improves editing efficiency.

CN121644907APending Publication Date: 2026-03-10BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies increase the time required to render the material operation box when quickly switching editing windows during video editing, leading to stuttering.

Method used

By caching the layout information of the footage, the layout information of the target footage can be read directly from the cache to reduce the retrieval time and avoid the step of retrieving the footage layout information based on the editing information of the video frames.

Benefits of technology

It reduces the time required to obtain material layout information, avoids stuttering during video editing, and improves editing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121644907A_ABST
    Figure CN121644907A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a video editing method and device, and relates to the technical field of video editing. Comprising the steps that first editing operation input by a user is received, and the first editing operation is used for switching a video frame displayed in an editing window into a first video frame; determining whether the first video frame comprises a target material, wherein the target material is a material currently selected by a user; under the condition that the first video frame comprises the target material, determining whether layout information of the target material is stored in a cache or not; under the condition that the layout information of the target material is stored in a cache, reading the layout information of the target material from the cache; and displaying the first video frame in the editing window, and adding an operation box of the target material in the first video frame according to the layout information of the target material. The embodiment of the invention is used for reducing the time consumed for obtaining the material layout information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of video editing technology, and in particular to a video editing method and apparatus. Background Technology

[0002] With the development of digitalization and networking, video has become an important way for people to obtain information, entertainment and communication, which makes the application of video editing in today's society increasingly widespread and important.

[0003] During video editing, to facilitate user operations, once a user selects a clip to add to a video frame displayed in the editing window, the clip's operation box will appear on the video frame. Furthermore, when switching to other video frames containing the same clip in the editing window, the operation box will still appear on the new video frame. Existing technology achieves this by obtaining the clip's layout information (position, size, etc.) based on the editing information of the video frame to be displayed, and then rendering the clip's operation box on the video frame to be displayed and displaying it in the editing window. While obtaining the clip's layout information from the editing information of the video frame to be displayed achieves the goal of displaying the operation box while other video frames are displayed in the editing window, this method adds the time spent obtaining the layout information to the video frame's rendering time. In scenarios involving rapid switching of video frames in the editing window, such as playback preview or dragging the progress bar, this may cause stuttering. Summary of the Invention

[0004] In view of this, embodiments of this application provide a video editing method and apparatus for reducing the time spent acquiring material layout information.

[0005] To achieve the above objectives, the technical solutions provided in this application are as follows:

[0006] In a first aspect, embodiments of this application provide a video editing method, including:

[0007] The system receives a first editing operation input from the user, which is used to switch the video frame displayed in the editing window to the first video frame.

[0008] Determine whether the first video frame includes the target material, wherein the target material is the material currently selected by the user;

[0009] If the target material is included in the first video frame, determine whether the layout information of the target material is stored in the cache;

[0010] If the layout information of the target material is stored in the cache, the layout information of the target material is read from the cache;

[0011] The first video frame is displayed in the editing window, and an operation box for the target material is added to the first video frame according to the layout information of the target material.

[0012] As an optional implementation of this application, the method further includes:

[0013] If the layout information of the target material is not saved in the cache, the layout information of the target material is obtained based on the editing information of the first video frame.

[0014] As an optional implementation of this application, the method further includes:

[0015] After obtaining the layout information of the target material based on the editing information of the first video frame, the layout information of the target material is saved to the cache.

[0016] As an optional implementation of this application, after saving the layout information of the target material to the cache, the method further includes:

[0017] The system receives a second editing operation from the user, which is used to switch the video frame displayed in the editing window to a second video frame.

[0018] Determine whether the target material is included in the second video frame;

[0019] If the target material is not included in the second video frame, the layout information of the target material is deleted from the cache.

[0020] As an optional implementation of this application, the method further includes:

[0021] After adding the operation box of the target material to the first video frame according to the layout information of the target material, the user's third editing operation on the operation box of the target material is received;

[0022] The target material is edited according to the third editing operation, and the layout information of the target material is iteratively updated according to the third editing operation.

[0023] As an optional implementation of this application, the method further includes:

[0024] After editing the target material according to the third editing operation and iteratively updating the layout information of the target material according to the third editing operation, the method further includes:

[0025] Remove the layout information of the target material from the cache.

[0026] As an optional implementation of this application, the first editing operation of receiving user input includes:

[0027] It can receive user input for playback preview, or receive user dragging of the video timeline pointer, or receive user positioning of the video timeline pointer.

[0028] Secondly, embodiments of this application provide a video editing apparatus, including:

[0029] The user input unit is used to receive a first editing operation input by the user, wherein the first editing operation is used to switch the video frame displayed in the editing window to the first video frame.

[0030] The processing unit is configured to determine whether the first video frame includes target material, wherein the target material is the material currently selected by the user;

[0031] The processing unit is further configured to determine whether the layout information of the target material is stored in the cache when the first video frame includes the target material;

[0032] The acquisition unit is used to read the layout information of the target material from the cache when the layout information of the target material is stored in the cache;

[0033] An editing unit is used to display the first video frame in the editing window and add an operation box for the target material in the first video frame according to the layout information of the target material.

[0034] As an optional implementation of this application, the acquisition unit is further configured to acquire the layout information of the target material based on the editing information of the first video frame when the layout information of the target material is not saved in the cache.

[0035] As an optional implementation of this application, the processing unit is further configured to save the layout information of the target material to a cache after obtaining the layout information of the target material based on the editing information of the first video frame.

[0036] As an optional implementation of this application, the user input unit is further configured to receive a second editing operation input by the user after saving the layout information of the target material to the cache. The second editing operation is configured to switch the video frame displayed in the editing window to a second video frame.

[0037] The processing unit is further configured to determine whether the target material is included in the second video frame, and if the target material is not included in the second video frame, to delete the layout information of the target material from the cache.

[0038] As an optional implementation of this application, the user input unit is further configured to receive a third editing operation of the user on the operation box of the target material after adding the operation box of the target material in the first video frame according to the layout information of the target material;

[0039] The editing unit is also used to edit the target material according to the third editing operation, and to iteratively update the layout information of the target material according to the third editing operation.

[0040] As an optional implementation of this application, the processing unit is further configured to delete the layout information of the target material from the cache after editing the target material according to the third editing operation and iteratively updating the layout information of the target material according to the third editing operation.

[0041] As an optional implementation of this application, the user input unit is specifically used to receive user input for playback preview, or to receive user dragging operation of the video timeline position pointer, or to receive user positioning operation of the video timeline position pointer.

[0042] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor, wherein the memory is used to store a computer program and the processor is used to cause the electronic device to implement the video editing method described in any of the above embodiments when executing the computer program.

[0043] Fourthly, embodiments of this application provide a computer-readable storage medium that, when executed by a computing device, causes the computing device to implement the video editing method described in any of the above embodiments.

[0044] Fifthly, embodiments of this application provide a computer program product that, when run on a computer, enables the computer to implement the video editing method described in any of the above embodiments.

[0045] The video editing method provided in this application, upon receiving a user's first editing operation to switch the video frame displayed in the editing window to a first video frame, first determines whether the first video frame includes the target material currently selected by the user. If the first video frame includes the target material, it determines whether the layout information of the target material is stored in the cache. If the layout information of the target material is stored in the cache, it reads the layout information of the target material from the cache, then displays the first video frame in the editing window, and adds an operation box for the target material to the first video frame according to the layout information of the target material. Compared to obtaining the layout information of the target material based on the editing information of the first video frame, since the video editing method provided in this application includes the target material currently selected by the user in the first video frame and the layout information of the target material is stored in the cache, it directly reads the layout information of the target material from the cache. Therefore, the video editing method provided in this application can reduce the time spent obtaining the material layout information. Attached Figure Description

[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0047] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings that need to be called in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0048] Figure 1 This is one of the flowcharts of the video editing method provided in the embodiments of this application;

[0049] Figure 2 One of the schematic diagrams of a video editing interface provided in the embodiments of this application;

[0050] Figure 3 A second schematic diagram of a video editing interface provided in an embodiment of this application;

[0051] Figure 4 The second flowchart of the video editing method provided in the embodiments of this application;

[0052] Figure 5 A flowchart illustrating the steps of the layout information acquisition method provided in this application embodiment;

[0053] Figure 6 A schematic diagram of a material operation box provided in an embodiment of this application;

[0054] Figure 7 This is a schematic diagram of the structure of the video editing device provided in the embodiments of this application;

[0055] Figure 8 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0056] To better understand the above-mentioned objectives, features, and advantages of this application, the solution of this application will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.

[0057] Many specific details are set forth in the following description in order to provide a full understanding of this application, but this application may also be implemented in other ways different from those described herein. Obviously, the embodiments in the specification are only some embodiments of this application, and not all embodiments.

[0058] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a specific manner. Furthermore, in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0059] This application provides a video editing method, referring to... Figure 1 As shown, this video editing method includes the following steps:

[0060] S101, Receive the first editing operation input by the user.

[0061] The first editing operation is used to switch the video frame displayed in the editing window to the first video frame.

[0062] In some embodiments, receiving a first editing operation from user input includes receiving a playback preview operation from user input.

[0063] When the first editing operation is a playback preview operation, the first video frame is the next video frame after the currently displayed video frame in the editing window.

[0064] For example, refer to Figure 2 As shown, the video editing interface 200 includes a playback preview control 21 for triggering video playback preview. When a user's operation on the playback preview control 21 is received, the video editing device determines that an operation has been received to switch the video frame displayed in the editing window 22 to the next video frame of the currently displayed video frame.

[0065] In some embodiments, receiving a first editing operation from user input includes receiving a drag operation by the user on the position pointer of the video timeline.

[0066] When the first editing operation is a drag operation on the position pointer of the video timeline, the first video frame is the video frame adjacent to the currently displayed video frame in the editing window in the drag direction. When the user drags the position pointer backward, the first video frame is the next video frame after the currently displayed video frame in the editing window; when the user drags the position pointer forward, the first video frame is the previous video frame of the currently displayed video frame in the editing window.

[0067] For example, refer to Figure 3 As shown, the video editing interface 200 includes a video timeline 300; the video timeline 300 is provided with a position pointer 31 that indicates the position information of the video frames displayed in the editing window 22. When a user drags the position pointer 31, the video editing device determines that it has received a video frame that is adjacent to the currently displayed video frame in the editing window 22 in the drag direction of the position pointer 31.

[0068] In some embodiments, receiving a first editing operation from user input includes: receiving a positioning operation by the user on the position pointer of the video timeline.

[0069] When the first editing operation is a positioning operation of the position pointer of the video timeline, the first video frame is the video frame indicated by the positioned position pointer.

[0070] In some embodiments, a user can position the location pointer to the click location by inputting a click action on the video timeline.

[0071] S102. Determine whether the first video frame includes the target material.

[0072] The target material is the material currently selected by the user.

[0073] During video editing, footage may be inserted into a continuous sequence of video frames. When a user selects a piece of footage in the current video frame, they may want to see how that footage is inserted in other video frames and make further edits. Therefore, if a user selects a piece of footage to be added to a video frame in the editing window, the editing window should still display the operation box for that piece of footage when switching to other video frames containing that footage so that the user can make further edits.

[0074] In step S102 above, if the first video frame includes the target material, then step S103 is executed as follows:

[0075] S103. Determine whether the layout information of the target material is stored in the cache.

[0076] In some embodiments, the layout information of the target material may include at least one of the following: the position coordinates of the target material, the size of the target material, and the orientation of the target material.

[0077] In some embodiments, the layout information of the material can be stored in a specified location in the cache. Determining whether the layout information of the target material is stored in the cache includes: determining whether the layout information of the target material is stored in a specified location in the cache.

[0078] In some embodiments, the layout information of the material can be stored in the cache through a correspondence with the material identifier. Determining whether the layout information of the target material is stored in the cache includes: determining whether the cache contains a correspondence including the identifier of the target material.

[0079] In step S103 above, if the layout information of the target material is stored in the cache, then steps S104 and S105 are executed as follows:

[0080] S104. Read the layout information of the target material from the cache.

[0081] Compared to obtaining the layout information of the target material through the editing information of the first video frame, directly reading the layout information of the target material from the cache can reduce the time spent obtaining the layout information of the target material.

[0082] S105. Display the first video frame in the editing window, and add the operation box of the target material in the first video frame according to the layout information of the target material.

[0083] In some embodiments, displaying the first video frame in the editing window and adding the operation box of the target material in the first video frame according to the layout information of the target material includes: first rendering the first video frame on the rendering canvas of the editing window, and then rendering the operation box of the target material on the rendering canvas of the editing window according to the layout information of the target material.

[0084] The video editing method provided in this application, upon receiving a user's first editing operation to switch the video frame displayed in the editing window to a first video frame, first determines whether the first video frame includes the target material currently selected by the user. If the first video frame includes the target material, it determines whether the layout information of the target material is stored in the cache. If the layout information of the target material is stored in the cache, it reads the layout information of the target material from the cache, then displays the first video frame in the editing window, and adds an operation box for the target material to the first video frame according to the layout information of the target material. Compared to obtaining the layout information of the target material based on the editing information of the first video frame, since the video editing method provided in this application includes the target material currently selected by the user in the first video frame and the layout information of the target material is stored in the cache, it directly reads the layout information of the target material from the cache. Therefore, the video editing method provided in this application can reduce the time spent obtaining the material layout information.

[0085] As an extension and refinement of the above embodiments, this application provides another video editing method, referring to... Figure 4 As shown, this video editing method includes the following steps:

[0086] S401, Receive the first editing operation input by the user.

[0087] The first editing operation is used to switch the video frame displayed in the editing window to the first video frame.

[0088] S402. Determine whether the first video frame includes the target material.

[0089] The target material is the material currently selected by the user.

[0090] In step S402 above, if the first video frame includes the target material, then step S403 is executed as follows:

[0091] S403. Determine whether the layout information of the target material is stored in the cache.

[0092] In step S403 above, if the layout information of the target material is stored in the cache, then step S404 is executed as follows:

[0093] S404. Read the layout information of the target material from the cache.

[0094] In step S403 above, if the layout information of the target material is not saved in the cache, then the following steps S405 and S406 are executed:

[0095] S405. Obtain the layout information of the target material based on the editing information of the first video frame.

[0096] In some embodiments, the video editing software used for video editing is software developed based on web technology, and the business layer uses JavaScript to implement interaction and function expansion. The underlying software development kit (SDK) adopts WASM (WebAssembly, a new binary format). Figure 5 As shown, step S405 (obtaining the layout information of the target material based on the editing information of the first video frame) can be implemented as follows:

[0097] S51. The business layer sends a request to the browser to request the layout information of the target material.

[0098] S52, The browser converts the request information from JavaScript to WASM.

[0099] S53, The browser sends the converted request information to the underlying layer.

[0100] S54. The underlying layer performs an SDK query based on the request information to obtain the layout information of the target material.

[0101] S55, The underlying layer sends the layout information of the target material to the browser.

[0102] S56. The browser converts the layout information of the target material from WASM to JavaScript.

[0103] S57. The browser sends the layout information of the converted target material to the business layer.

[0104] S406. Save the layout information of the target material to the cache.

[0105] Since the above embodiments also save the layout information of the target material to the cache, the above embodiments can directly read the layout information of the target material from the cache when switching to display video frames including the target material, thereby reducing the time spent obtaining the layout information of the target material.

[0106] After obtaining the layout information of the target material through the above steps S404 or S405, the following step S407 is further executed:

[0107] S407. Display the first video frame in the editing window, and add the operation box of the target material in the first video frame according to the layout information of the target material.

[0108] In some embodiments, after step S406 (saving the layout information of the target material to the cache) described above, the video editing method further includes the following steps a to c:

[0109] Step a: Receive the second editing operation input from the user.

[0110] The second editing operation is used to switch the video frame displayed in the editing window to the second video frame.

[0111] In some embodiments, the second editing operation of receiving user input includes:

[0112] It can receive user input for playback preview, or receive user dragging of the video timeline pointer, or receive user positioning of the video timeline pointer.

[0113] Step b: Determine whether the target material is included in the second video frame.

[0114] In step b above, if the target material is not included in the second video frame, then step c is performed as follows:

[0115] Step c: Delete the layout information of the target material from the cache.

[0116] Since the target material is only added to consecutive video frames, if the target material is not included in the second video frame, it will not be included in subsequent video frames either. Therefore, the layout information of the target material can be deleted from the cache, thereby releasing the cache occupied by the layout information of the target material.

[0117] In step b above, if the first video frame does not include the target material, then... Figure 1 The situation is the same in the illustrated embodiment (the video frame includes the target material, and the layout information of the target material is stored in the cache). Therefore, the layout information of the target material is read from the cache; the second video frame is displayed in the editing window, and the operation box of the target material is added to the second video frame according to the layout information of the target material.

[0118] In some embodiments, after step S105 (adding the operation box of the target material in the first video frame according to the layout information of the target material), the video editing method further includes the following steps 1 to 3:

[0119] Step 1: Receive the user's third editing operation on the target material's operation box.

[0120] Reference Figure 6As shown, the operation box 600 for the target material includes: a first control point 61 located at the upper left corner, a second control point 62 located at the lower left corner, a third control point 63 located at the upper right corner, and a fourth control point 64 located at the lower right corner. Dragging the first control point 61 adjusts the position of the target material without changing its size; dragging the second control point 62 scales the target material without changing its upper right corner position; dragging the third control point 63 scales the target material without changing its lower left corner position; and dragging the fourth control point 64 scales the target material without changing its upper left corner position. The third editing operation can be an operation on at least one of the first control point 61, the second control point 62, the third control point 63, and the fourth control point 64.

[0121] Step 2: Edit the target material according to the third editing operation, and iteratively update the layout information of the target material according to the third editing operation.

[0122] Step 3: Delete the layout information of the target material from the cache.

[0123] Since the layout information of the target material has changed, the layout information of the target material stored in the cache has become invalid. Therefore, the layout information of the target material is deleted from the cache, thereby releasing the cache occupied by the layout information of the target material.

[0124] Based on the same inventive concept, as an implementation of the above method, this application also provides a video editing device. This embodiment corresponds to the aforementioned method embodiment. For ease of reading, this embodiment will not repeat the details of the aforementioned method embodiment one by one, but it should be clear that the video editing device in this embodiment can implement all the contents of the aforementioned method embodiment.

[0125] This application provides a video editing device. Figure 7 This is a schematic diagram of the video editing device, as shown below. Figure 7 As shown, the video editing device 700 includes:

[0126] User input unit 71 is used to receive a first editing operation input by the user, the first editing operation being used to switch the video frame displayed in the editing window to the first video frame;

[0127] Processing unit 72 is used to determine whether the first video frame includes target material, wherein the target material is the material currently selected by the user;

[0128] The processing unit 72 is further configured to determine whether the layout information of the target material is stored in the cache when the first video frame includes the target material;

[0129] The acquisition unit 73 is used to read the layout information of the target material from the cache when the layout information of the target material is stored in the cache;

[0130] The editing unit 74 is used to display the first video frame in the editing window and add the operation box of the target material in the first video frame according to the layout information of the target material.

[0131] As an optional implementation of this application, the acquisition unit 73 is further configured to acquire the layout information of the target material based on the editing information of the first video frame when the layout information of the target material is not saved in the cache.

[0132] As an optional implementation of this application, the processing unit 72 is further configured to save the layout information of the target material to a cache after obtaining the layout information of the target material based on the editing information of the first video frame.

[0133] As an optional implementation of this application, the user input unit 71 is further configured to receive a second editing operation input by the user after saving the layout information of the target material to the cache. The second editing operation is used to switch the video frame displayed in the editing window to a second video frame.

[0134] The processing unit 72 is further configured to determine whether the second video frame includes the target material, and if the second video frame does not include the target material, to delete the layout information of the target material from the cache.

[0135] As an optional implementation of this application, the user input unit 71 is further configured to receive a third editing operation of the user on the operation box of the target material after adding the operation box of the target material in the first video frame according to the layout information of the target material;

[0136] The editing unit 74 is further configured to edit the target material according to the third editing operation, and to iteratively update the layout information of the target material according to the third editing operation.

[0137] As an optional implementation of this application, the processing unit 72 is further configured to delete the layout information of the target material from the cache after editing the target material according to the third editing operation and iteratively updating the layout information of the target material according to the third editing operation.

[0138] As an optional implementation of this application, the user input unit 71 is specifically used to receive user input for playback preview, or to receive user drag operation of the position pointer of the video timeline, or to receive user positioning operation of the position pointer of the video timeline.

[0139] The video editing device provided in this application embodiment can execute the video editing method provided in any of the above embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0140] Based on the same inventive concept, embodiments of this application also provide an electronic device. Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 8 As shown, the electronic device provided in this embodiment includes a memory 801 and a processor 802. The memory 801 is used to store computer programs, and the processor 802 is used to execute the video editing method provided in the above embodiment when executing the computer programs.

[0141] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, enables the computing device to implement the video editing method provided in the above embodiments.

[0142] Based on the same inventive concept, this application also provides a computer program product that, when run on a computer, enables the computing device to implement the video editing method provided in the above embodiments.

[0143] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0144] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0145] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0146] Computer-readable media include both permanent and non-permanent, removable and non-removable storage media. Storage media can store information using any method or technology; the information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media do not include transient computer-readable media, such as modulated data signals and carrier waves.

[0147] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some or all of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A video editing method characterized by, The method comprises: receiving a first editing operation input by a user, the first editing operation being used to switch a video frame displayed in an editing window to a first video frame; determining whether the target material is included in the first video frame, the target material being a material currently selected by the user; in a case where the target material is included in the first video frame, determining whether layout information of the target material is saved in a cache; in a case where the layout information of the target material is saved in the cache, reading the layout information of the target material from the cache; displaying the first video frame in the editing window and adding an operation box of the target material in the first video frame according to the layout information of the target material.

2. The method of claim 1, wherein, The method further comprises: in a case where the layout information of the target material is not saved in the cache, obtaining the layout information of the target material according to editing information of the first video frame.

3. The method of claim 2, wherein, The method further comprises: after obtaining the layout information of the target material according to the editing information of the first video frame, saving the layout information of the target material into the cache.

4. The method of claim 2, wherein, After saving the layout information of the target material into the cache, the method further comprises: receiving a second editing operation input by a user, the second editing operation being used to switch a video frame displayed in an editing window to a second video frame; determining whether the target material is included in the second video frame; in a case where the target material is not included in the second video frame, deleting the layout information of the target material from the cache.

5. The method of claim 1, wherein, The method further comprises: after adding the operation box of the target material in the first video frame according to the layout information of the target material, receiving a third editing operation of the operation box of the target material input by the user; editing the target material according to the third editing operation and iteratively updating the layout information of the target material according to the third editing operation.

6. The method of claim 5, wherein, The method further comprises: after editing the target material according to the third editing operation and iteratively updating the layout information of the target material according to the third editing operation, the method further comprises: deleting the layout information of the target material from the cache.

7. The method according to any one of claims 1 to 6, characterized in that, The receiving of the first editing operation input by the user comprises: receiving a play preview operation input by the user, or receiving a drag operation of a position pointer of a video timeline input by the user, or receiving a positioning operation of the position pointer of the video timeline input by the user.

8. A video editing apparatus characterized by comprising: The method comprises: a user input unit configured to receive a first editing operation input by a user, the first editing operation being used to switch a video frame displayed in an editing window to a first video frame; a processing unit configured to determine whether a target material is included in the first video frame, the target material being a material currently selected by the user; the processing unit is further configured to, in a case where the target material is included in the first video frame, determine whether layout information of the target material is saved in a cache; an obtaining unit configured to, in a case where the layout information of the target material is saved in the cache, read the layout information of the target material from the cache; an adding unit configured to display the first video frame in the editing window and add an operation box of the target material in the first video frame according to the layout information of the target material. An editing unit is configured to display the first video frame in the editing window and add an operation box of the target material in the first video frame according to layout information of the target material.

9. An electronic device, comprising: The application provides a video editing method and device, a computer readable storage medium, and a computer program product. The memory is configured to store a computer program, and the processor is configured to cause the electronic device to implement the video editing method according to any one of claims 1-7 when executing the computer program.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program causes the computer device to implement the video editing method according to any one of claims 1-7 when the computer program is executed by the computer device.

11. A computer program product, characterised in that, The computer program product causes the computer to implement the video editing method according to any one of claims 1-7 when the computer program product is executed on the computer.