Video template editing method and device, computer equipment and storage medium

By extracting video clips of panoramic videos and processing and editing them according to template videos, the problem of manual operation of panoramic video editing is solved, and the rapid and automatic video mirror editing effect is achieved.

CN119562130APending Publication Date: 2025-03-04SHENZHEN LABPANO ARTIFICIAL INTELLIGENCE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411520042.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-29
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The existing technology lacks automatic template editing methods for panoramic videos. Users need to manually edit the mirror for editing, which is troublesome and time-consuming.

Method used

Provide a video template editing method, by obtaining the panoramic video to be edited, randomly extracting n video clips, obtaining template videos, determining the relationship between the total video clip duration and the template video duration, performing video processing and editing, and generating the edited target flat video.

Benefits of technology

It realizes fast automatic video editing of panoramic videos, without the need for manual user touching, and automatically generates the edited target flat video for easy and quick sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119562130A_ABST
    Figure CN119562130A_ABST
Patent Text Reader

Abstract

The invention provides a video template editing method and device, computer equipment and a storage medium. The method comprises the steps that a panoramic video to be edited is acquired, n video clips to be edited are randomly extracted from the panoramic video to be edited, and n is a positive integer; acquiring a template video; judging the size relationship between the total duration of the n to-be-edited video clips and the duration of the template video, and performing video processing on the to-be-edited video clips according to a judgment result; and according to the template video, carrying out video editing on the n to-be-edited video clips after video processing to obtain an edited target plane video. According to the method, the edited target plane video can be automatically, simply and quickly generated according to the video module without manual dotting of a user for mirror operation, and quick sharing of the user is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of video editing technology, and specifically to a video template editing method, apparatus, computer equipment and storage medium. Background Art

[0002] Panoramic videos are becoming more and more popular among users due to their 360° all-round field of view. More and more users like to use panoramic videos to record their lives. However, since panoramic videos contain too much content, users need to edit panoramic videos in order to obtain better visual viewing effects. This requires users to have a certain foundation in video editing and a certain amount of video editing time. Some video editing applications provide users with video editing templates, but they are usually only applicable to flat videos, and require a lot of AI analysis to process the edited videos. The amount of calculation is large and the effect is often unsatisfactory. For panoramic videos, there is currently no good method for users to quickly complete panoramic video editing. Summary of the invention

[0003] The embodiments of the present application provide a video template editing method, device, computer equipment and storage medium. The technical problem to be solved is that, in view of the defects of the prior art, there is no automatic editing method for panoramic video templates in the existing video editing template solutions. Users mainly need to rely on manual dot-and-move camera movements to edit panoramic videos, which is cumbersome and time-consuming.

[0004] In order to solve the above technical problems, a technical solution adopted by the present application is: to provide a video template editing method, device, computer equipment and storage medium, the video template editing method comprising:

[0005] Obtain a panoramic video to be edited, and randomly extract n video segments to be edited from the panoramic video to be edited, where n is a positive integer;

[0006] Get the template video;

[0007] Determine the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the determination result;

[0008] According to the template video, the n video clips to be edited after video processing are edited to obtain an edited target plane video.

[0009] In a specific implementation, the randomly extracting n video segments to be edited from the panoramic video to be edited includes:

[0010] The beginning and the end of the panoramic video to be edited are removed, and the middle part of the panoramic video to be edited is divided into a video segment at set intervals to obtain n video segments to be edited.

[0011] In a specific implementation, the performing video processing on the video segment to be edited according to the judgment result includes:

[0012] When the judgment result is that the total duration of the n video clips to be edited is less than the duration of the template video, a video effect clip is added to the n video clips to be edited so that the total duration of the added n video clips to be edited is equal to the duration of the template video.

[0013] In a specific implementation, the step of adding a video effect segment to the n video segments to be edited includes:

[0014] Add a transition effect segment between the n video segments to be edited, or add a static picture segment between the n video segments to be edited, or add a repeated video segment between the n video segments to be edited, or select any video segment between the n video segments to be edited for slow motion processing.

[0015] In a specific implementation, the performing video processing on the video segment to be edited according to the judgment result includes:

[0016] When the judgment result is that the total duration of the n video clips to be edited is greater than the duration of the template video, a set number of the video clips to be edited are selected from the n video clips to be edited for acceleration effect processing, so that the total duration of the n video clips to be edited after processing is equal to the duration of the template video.

[0017] In a specific implementation, the performing video processing on the video segment to be edited according to the judgment result includes:

[0018] When the judgment result is that the total duration of the n video clips to be edited is greater than the duration of the template video, a set number of the video clips to be edited are deleted from the n video clips to be edited so that the total duration of the remaining video clips to be edited is equal to the duration of the template video.

[0019] In a specific implementation, the step of performing video editing on the n video segments to be edited after video processing according to the template video to obtain the edited target plane video includes:

[0020] Aligning the timestamps of the template video with the n video clips to be edited after video processing, and performing video editing on the n video clips to be edited according to the camera movement effect in the template video to obtain a fused edited video;

[0021] A beginning template segment is added to the beginning of the fused edited video, and an ending template segment is added to the end of the fused edited video to obtain an edited target plane video.

[0022] In a specific embodiment, a video template editing device is also provided, and the video template editing device includes:

[0023] A first acquisition module, wherein the first acquisition module is used to acquire a panoramic video to be edited, and randomly extract n video segments to be edited from the panoramic video to be edited, where n is a positive integer;

[0024] A second acquisition module, the second acquisition module is used to acquire a template video;

[0025] A video processing module, the video processing module is used to determine the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the determination result;

[0026] A video editing module is used to perform video editing on the n video clips to be edited after video processing according to the template video to obtain a target plane video after editing.

[0027] In a specific embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the video template editing method described in any of the above specific embodiments are implemented.

[0028] In a specific embodiment, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the video template editing method described in any of the above specific embodiments are implemented.

[0029] The beneficial effect of the present application is that, different from the prior art, the embodiment of the present application provides a video template editing method, device, computer equipment and storage medium, the video template editing method comprising:

[0030] Obtain a panoramic video to be edited, and randomly extract n video segments to be edited from the panoramic video to be edited, where n is a positive integer;

[0031] Get the template video;

[0032] Determine the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the determination result;

[0033] According to the template video, the n video clips to be edited after video processing are edited to obtain an edited target plane video.

[0034] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0035] By randomly dividing the panoramic video to be edited into n video clips to be edited, the complex AI analysis of the panoramic video to be edited is omitted, and complex algorithm processing is saved. Then, according to the obtained template video, by judging the size relationship between the total length of the n video clips to be edited and the length of the template video, the video clips to be edited are processed according to the size comparison of the total length of the n video clips to be edited and the length of the template video. According to the camera effect of the template video, the n video clips to be edited after video processing are edited by video camera operation to obtain the edited target plane video. In this way, fast and automatic video camera operation editing of the panoramic video is realized, and the edited target plane video can be automatically generated without the user manually marking the camera operation, which is convenient for users to share quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the implementation modes of the present application, the drawings required for use in the description of the implementation modes will be briefly introduced below. Obviously, the drawings described below are only some implementation modes of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0037] Figure 1 This is a schematic diagram of the implementation process of a video template editing method provided in Example 1 of the present application;

[0038] Figure 2 This is a schematic diagram of the module composition of a video template editing device provided in the second embodiment of the present application;

[0039] Figure 3 It is a schematic diagram of the internal structure of a computer device provided in Example 3 of the present application. DETAILED DESCRIPTION

[0040] The present application is further described in detail below in conjunction with the accompanying drawings and implementation methods. It is particularly noted that the following implementation methods are only used to illustrate the present application, but do not limit the scope of the present application. Similarly, the following implementation methods are only some implementation methods of the present application rather than all implementation methods. All other implementation methods obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0041] The terms "including" and "having" and any variations thereof in this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or modules is not limited to the listed steps or modules, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to these processes, methods, products or devices.

[0042] The above terms are only for the convenience of description and should not be construed as limitations on the present technical solution.

[0043] Reference to "embodiment" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiment may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0044] The specific implementation of the present application is described in detail below in conjunction with specific embodiments.

[0045] Embodiment 1.

[0046] Figure 1 The implementation process of a video template editing method provided in Example 1 of the present application is shown. For the sake of convenience of explanation, only the part related to the embodiment of the present application is shown, which is described in detail as follows.

[0047] A panoramic video to be edited is obtained, and n video segments to be edited are randomly extracted from the panoramic video to be edited, where n is a positive integer.

[0048] It should be noted that the panoramic video to be edited is a panoramic video that needs to be automatically edited. It can be a panoramic video with a certain length shot by a user through a panoramic device such as a panoramic camera. The length can range from a few seconds to more than ten minutes. It can be one panoramic video or multiple panoramic videos.

[0049] By randomly extracting n video clips to be edited from the panoramic video to be edited, and randomly dividing a complete or multiple complete panoramic videos to extract n video clips to be edited, the complex AI analysis and processing of the panoramic video to be edited is omitted, and the n video clips to be edited can be obtained simply, quickly and efficiently. By video editing each of the video clips to be edited, the video editing of the panoramic video to be edited can be completed more efficiently.

[0050] One specific implementation manner is that the randomly extracting n video segments to be edited from the panoramic video to be edited includes:

[0051] The beginning and the end of the panoramic video to be edited are removed, and the middle part of the panoramic video to be edited is divided into a video segment at set intervals to obtain n video segments to be edited.

[0052] It should be noted that usually the beginning and ending parts of the panoramic video shot by the user have certain empty shots. Therefore, the empty shots can be removed to obtain a better video editing effect. One feasible specific implementation method is that the beginning part is the first 2 seconds of the panoramic video to be edited, and the ending part is the last 2 seconds of the panoramic video to be edited.

[0053] In addition, one specific implementation method is that the removed beginning part and the removed ending part can be automatically supplemented with the set beginning template fragment and the ending template fragment to form a complete visual effect.

[0054] After removing the beginning and ending parts of the panoramic video to be edited, the remaining middle part is divided into a video segment every set time according to the video time sequence. The set time is determined according to the length of the panoramic video to be edited. It can usually be selected to split every 3s-10s to obtain n video segments to be edited, and n is usually selected as 5-8. Specifically, the set time can be automatically adjusted according to the acquired template video and the panoramic video to be edited.

[0055] If the panoramic video to be edited is a plurality of panoramic videos, after removing the beginning and the end of each panoramic video, the panoramic video is divided into a video segment at set time intervals according to the duration of each panoramic video. The set time can be longer for the panoramic video with a long duration, and the set time can be shorter for the panoramic video with a short duration. Subsequently, the plurality of video segments divided into the plurality of panoramic videos are sorted by time according to the order in which the plurality of panoramic videos are added, or are only randomly sorted, and only the time sequence between the plurality of video segments divided into each panoramic video is retained.

[0056] Get the template video.

[0057] It should be noted that the template video is a template video with a variety of camera movement effects. The template video may be a template video manually selected by a user, or may be a template video automatically selected by the system according to the type of panoramic video to be edited.

[0058] The relationship between the total duration of the n video segments to be edited and the duration of the template video is determined, and video processing is performed on the video segments to be edited according to the determination result.

[0059] It should be noted that the total duration of the n video clips to be edited is often inconsistent with the duration of the template video, or is greater than the duration of the template video, or is less than the duration of the template video. If the total duration of the n video clips to be edited is inconsistent with the duration of the template video, it is impossible to match and align the template video with the n video clips to be edited, so as to achieve video editing of the n video clips to be edited according to the camera movement effect of the template video. Therefore, it is necessary to judge the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the judgment result, so that the total duration of the n video clips to be edited is equal to the duration of the template video.

[0060] One specific implementation method is that the video processing of the video segment to be edited according to the judgment result includes:

[0061] When the judgment result is that the total duration of the n video clips to be edited is less than the duration of the template video, a video effect clip is added to the n video clips to be edited so that the total duration of the added n video clips to be edited is equal to the duration of the template video.

[0062] It should be noted that if the panoramic video to be edited provided by the user is shorter, and the total duration of the n video clips to be edited obtained through random extraction is less than the duration of the template video, it is necessary to add a video effect clip to the n video clips to be edited, so that the total duration of the added n video clips to be edited is equal to the duration of the template video, and the video effect clip is a video clip with special effects.

[0063] One specific implementation method is that adding a video effect segment to the n video segments to be edited includes:

[0064] Add a transition effect segment between the n video segments to be edited, or add a static picture segment between the n video segments to be edited, or add a repeated video segment between the n video segments to be edited, or select any video segment between the n video segments to be edited for slow motion processing.

[0065] It should be noted that adding a video effect clip to the n video clips to be edited may be adding a transition effect clip between the n video clips to be edited, and by adding the transition effect clip, the total duration of the n video clips to be edited is increased, and the transition effect clip includes fade-in, fade-out, blur gradient, etc.;

[0066] Alternatively, a static picture segment may be added between the n video segments to be edited, wherein a feasible specific implementation method is that the static picture segment may be a frozen picture of a wonderful moment in any of the video segments to be edited;

[0067] Alternatively, a repeated video segment may be added between the n video segments to be edited, and the total duration of the n video segments to be edited may be increased by adding the repeated video segment, and the repeated video segment may be any small video segment in any of the video segments to be edited, or may be any complete video segment to be edited;

[0068] Alternatively, any video clip may be selected from the n video clips to be edited for slow motion processing, and the total duration of the n video clips to be edited may be increased through slow motion processing. The any video clip may be any small segment of any video clip to be edited, or may be any complete video clip to be edited.

[0069] One specific implementation method is that the video processing of the video segment to be edited according to the judgment result includes:

[0070] When the judgment result is that the total duration of the n video clips to be edited is greater than the duration of the template video, a set number of the video clips to be edited are selected from the n video clips to be edited for acceleration effect processing, so that the total duration of the n video clips to be edited after processing is equal to the duration of the template video.

[0071] It should be noted that the duration of the panoramic video to be edited provided by the user is usually greater than the duration of the template video, that is, the total duration of the n video clips to be edited obtained through random extraction is greater than the duration of the template video. Therefore, it is necessary to shorten the total duration of the n video clips to be edited so that the shortened total duration of the n video clips to be edited is equal to the duration of the template video. One feasible specific implementation method is to select a set number of the video clips to be edited from the n video clips to be edited for acceleration effect processing, thereby reducing the playback duration of the video clips to be edited so that the total duration of the processed n video clips to be edited is equal to the duration of the template video.

[0072] Another feasible specific implementation is that the video processing of the video segment to be edited according to the judgment result includes:

[0073] When the judgment result is that the total duration of the n video clips to be edited is greater than the duration of the template video, a set number of the video clips to be edited are deleted from the n video clips to be edited so that the total duration of the remaining video clips to be edited is equal to the duration of the template video.

[0074] One specific implementation method is that, according to the template video, the n video clips to be edited after video processing are edited to obtain the edited target plane video, including:

[0075] Aligning the timestamps of the template video with the n video clips to be edited after video processing, and performing video editing on the n video clips to be edited according to the camera movement effect in the template video to obtain a fused edited video;

[0076] A beginning template segment is added to the beginning of the fused edited video, and an ending template segment is added to the end of the fused edited video to obtain an edited target plane video.

[0077] It should be noted that the template video has multiple camera movement effects of panoramic videos, such as slow push camera effect, slow pull camera effect, surround camera effect, asteroid camera effect, sky flip camera effect, etc. The template video is timestamped with the n video clips to be edited after video processing, and the n video clips to be edited are edited in chronological order according to the camera movement effects in the template video to obtain a fused edited video.

[0078] Since the beginning and the end of the panoramic video to be edited have been removed, in order to achieve a complete video effect, an beginning template segment is added to the beginning of the fused edited video, and an ending template segment is added to the end of the fused edited video. After merging, the edited target plane video is obtained. The target plane video is a plane video with a complete video camera effect obtained through automatic video editing. Users can directly share the target plane video on social media.

[0079] Embodiment 2.

[0080] Figure 2 A schematic diagram of the module composition of a video template editing device provided in the second embodiment of the present application is shown. For the sake of ease of explanation, only the parts related to the embodiment of the present application are shown.

[0081] A video template editing device according to an embodiment of the present application includes:

[0082] A first acquisition module, wherein the first acquisition module is used to acquire a panoramic video to be edited, and randomly extract n video segments to be edited from the panoramic video to be edited, where n is a positive integer;

[0083] A second acquisition module, the second acquisition module is used to acquire a template video;

[0084] A video processing module, the video processing module is used to determine the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the determination result;

[0085] A video editing module is used to perform video editing on the n video clips to be edited after video processing according to the template video to obtain a target plane video after editing.

[0086] A video template editing device of an embodiment of the present application is used to implement a video template editing method provided in any specific implementation manner of the first embodiment of the present application:

[0087] Obtain a panoramic video to be edited, and randomly extract n video segments to be edited from the panoramic video to be edited, where n is a positive integer;

[0088] Get the template video;

[0089] Determine the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the determination result;

[0090] According to the template video, the n video clips to be edited after video processing are edited to obtain an edited target plane video.

[0091] It should be noted that each module in the above video template editing device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0092] It should be noted that, for technical details that are not described in detail in this embodiment, reference can be made to the video template editing method provided in any specific implementation manner in the above-mentioned embodiment 1, and will not be repeated here.

[0093] Embodiment three.

[0094] In an embodiment of the present application, a computer device is provided. Figure 3 A schematic diagram of the internal structure of a computer device.

[0095] The computer device includes a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the video template editing method provided by any specific implementation method in the first embodiment of the present application, specifically including:

[0096] Obtain a panoramic video to be edited, and randomly extract n video segments to be edited from the panoramic video to be edited, where n is a positive integer;

[0097] Get the template video;

[0098] Determine the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the determination result;

[0099] According to the template video, the n video clips to be edited after video processing are edited to obtain an edited target plane video.

[0100] It should be noted that the computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a video generation method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0101] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0102] It should be noted that, for technical details that are not described in detail in this embodiment, reference can be made to the video template editing method provided in any specific implementation manner in the above-mentioned embodiment 1, and will not be repeated here.

[0103] Embodiment 4.

[0104] In an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the video template editing method provided by any specific implementation method in the first embodiment of the present application is implemented, specifically including:

[0105] Obtain a panoramic video to be edited, and randomly extract n video segments to be edited from the panoramic video to be edited, where n is a positive integer;

[0106] Get the template video;

[0107] Determine the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the determination result;

[0108] According to the template video, the n video clips to be edited after video processing are edited to obtain an edited target plane video.

[0109] It should be noted that, for technical details that are not described in detail in this embodiment, reference can be made to the video template editing method provided in any specific implementation manner in the above-mentioned embodiment 1, and will not be repeated here.

[0110] Different from the prior art, the embodiments of the present application provide a video template editing method, device, computer equipment and storage medium, wherein the video template editing method includes:

[0111] Obtain a panoramic video to be edited, and randomly extract n video segments to be edited from the panoramic video to be edited, where n is a positive integer;

[0112] Get the template video;

[0113] Determine the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the determination result;

[0114] According to the template video, the n video clips to be edited after video processing are edited to obtain an edited target plane video.

[0115] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:

[0116] By randomly dividing the panoramic video to be edited into n video clips to be edited, the complex AI analysis of the panoramic video to be edited is omitted, and complex algorithm processing is saved. Then, according to the obtained template video, by judging the size relationship between the total length of the n video clips to be edited and the length of the template video, the video clips to be edited are processed according to the size comparison of the total length of the n video clips to be edited and the length of the template video. According to the camera effect of the template video, the n video clips to be edited after video processing are edited by video camera operation to obtain the edited target plane video. In this way, fast and automatic video camera operation editing of the panoramic video is realized, and the edited target plane video can be automatically generated without the user manually marking the camera operation, which is convenient for users to share quickly.

[0117] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0118] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0119] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a terminal device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

[0120] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A video template editing method, characterized in that: The video template editing method comprises: Obtain a panoramic video to be edited, and randomly extract n video segments to be edited from the panoramic video to be edited, where n is a positive integer; Get the template video; Determine the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the determination result; According to the template video, the n video clips to be edited after video processing are edited to obtain an edited target plane video.

2. A video template editing method according to claim 1, characterized in that: The randomly extracting n video segments to be edited from the panoramic video to be edited comprises: The beginning and the end of the panoramic video to be edited are removed, and the middle part of the panoramic video to be edited is divided into a video segment at set intervals to obtain n video segments to be edited.

3. A video template editing method according to claim 2, characterized in that: The performing video processing on the video segment to be edited according to the judgment result includes: When the judgment result is that the total duration of the n video clips to be edited is less than the duration of the template video, a video effect clip is added to the n video clips to be edited so that the total duration of the added n video clips to be edited is equal to the duration of the template video.

4. A video template editing method according to claim 3, characterized in that: The step of adding a video effect clip to the n video clips to be edited comprises: Add a transition effect segment between the n video segments to be edited, or add a static picture segment between the n video segments to be edited, or add a repeated video segment between the n video segments to be edited, or select any video segment between the n video segments to be edited for slow motion processing.

5. A video template editing method according to claim 2, characterized in that: The performing video processing on the video segment to be edited according to the judgment result includes: When the judgment result is that the total duration of the n video clips to be edited is greater than the duration of the template video, a set number of the video clips to be edited are selected from the n video clips to be edited for acceleration effect processing, so that the total duration of the n video clips to be edited after processing is equal to the duration of the template video.

6. A video template editing method according to claim 2, characterized in that: The performing video processing on the video segment to be edited according to the judgment result includes: When the judgment result is that the total duration of the n video clips to be edited is greater than the duration of the template video, a set number of the video clips to be edited are deleted from the n video clips to be edited so that the total duration of the remaining video clips to be edited is equal to the duration of the template video.

7. The video template editing method according to any one of claims 1 to 6, wherein the step of performing video editing on the n video clips to be edited after video processing according to the template video to obtain the edited target plane video comprises: Aligning the timestamps of the template video with the n video clips to be edited after video processing, and performing video editing on the n video clips to be edited according to the camera movement effect in the template video to obtain a fused edited video; A beginning template segment is added to the beginning of the fused edited video, and an ending template segment is added to the end of the fused edited video to obtain an edited target plane video.

8. A video template editing device, characterized in that: The video template editing device comprises: A first acquisition module, wherein the first acquisition module is used to acquire a panoramic video to be edited, and randomly extract n video segments to be edited from the panoramic video to be edited, where n is a positive integer; A second acquisition module, the second acquisition module is used to acquire a template video; A video processing module, the video processing module is used to determine the relationship between the total duration of the n video clips to be edited and the duration of the template video, and perform video processing on the video clips to be edited according to the determination result; A video editing module is used to perform video editing on the n video clips to be edited after video processing according to the template video to obtain a target plane video after editing.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the video template editing method described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the video template editing method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Panoramic video-based live image generation method and electronic device thereof

    CN121665063A

  • Method and device for generating multimedia editing template and computing equipment

    CN122457861A