Video editing method and device, electronic equipment and computer readable storage medium
By obtaining video materials and target video copy, determining editing templates and generating new materials, the cumbersome problems of the video editing process are solved, automated processing is realized, and efficiency is improved.
Patent Information
- Application Number
- CN202311865439.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-07-01
AI Technical Summary
The video editing process is cumbersome, and users need to select and match appropriate materials from a huge library of materials to perform style design, add and adjust operations.
By obtaining the video material and the corresponding target video copy, determine the target video editing template, intercept the video material clip, and generate new video material based on the template, and finally splicing it into the original video material to generate the target video.
It realizes the automated processing of video editing, reduces the steps of manual operation by users, simplifies the operation process, reduces time-consuming and improves processing efficiency.
Smart Images

Figure CN120238698A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of video processing, and particularly to a video editing method, apparatus, electronic device, and computer-readable storage medium. Background Art
[0002] In the video creation link of users, video editing is a very crucial link. By combining and matching materials such as text, music, sound effects, stickers, and special effects, the visual and auditory effects of the video are enriched, making the transmission of information and emotions more prominent. However, video editing is often time-consuming and laborious. Users need to select and match appropriate materials from a huge material library, and perform style design, addition, adjustment, etc. of video editing, and the process is relatively cumbersome. Summary of the Invention
[0003] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a video editing method, apparatus, electronic device, storage medium, and program product.
[0004] In a first aspect of an embodiment of the present disclosure, a video editing method is provided. The method includes: obtaining a first video material and a target video copy corresponding to the first video material; determining a target video editing template based on the target video copy, where the target video editing template is used to indicate filling slots of at least one video segment and editing effects applied to the at least one video segment; intercepting at least one material segment from the first video material; the at least one material segment corresponding to the filling slots of the at least one video segment and being used to fill the target video editing template to form the at least one video segment; generating a second video material according to the at least one material segment and the target video editing template; where the second video material is used to present the editing effects applied to the at least one material segment; generating a target video by splicing the second video material in front of the first video material.
[0005] In some embodiments of the present disclosure, the obtaining of the first video material and the target video copy corresponding to the first video material includes: obtaining the target video copy of the video material to be processed; based on the target video copy, dividing the video material to be processed into a plurality of video materials, each of the plurality of video materials being a first video material; or, the obtaining of the first video material and the video copy corresponding to the first video material includes: obtaining the video copy of the video material to be processed of the video material to be processed; based on the video copy of the video material to be processed, dividing the video material to be processed into a plurality of video materials, each of the plurality of video materials being a first video material; obtaining the target video copy of the first video material; the generating of the target video by splicing a second video material in front of the first video material includes: generating an edited video corresponding to the first video material by splicing a second video material in front of the first video material to generate an edited video corresponding to each video material; splicing the edited videos corresponding to each video material to obtain the target video.
[0006] In some embodiments of the present disclosure, the target video editing template is further used to indicate a video title filling slot; the method further includes: generating a video title of the first video material according to the video copy of the first video material, the video title being used to fill the video title filling slot; the generating of the second video material according to the at least one material segment and the target video editing template includes: generating the second video material according to the at least one material segment, the video title and the target video editing template; wherein, the second video material is used to present the editing effect applied to the at least one material segment and the video title.
[0007] In some embodiments of the present disclosure, the determining of the target video editing template based on the target video copy includes: determining a category label of the category to which the target video copy belongs; determining, from a plurality of video editing templates, a target video editing template corresponding to the category label, different category labels corresponding to different video editing templates.
[0008] In some embodiments of the present disclosure, the filling slot of each video clip is also used to indicate the duration of the corresponding video clip; the at least one material clip is intercepted from the first video material, including: slicing the first video material to obtain at least one slice; performing highlight clip extraction processing on the at least one slice to obtain at least one highlight clip, and the at least one slice corresponds to the at least one highlight clip one by one; from the at least one highlight clip, N first material clips are determined, the duration of each first material clip is the duration of a video clip, each first material clip corresponds to a highlight clip, and N is a natural number; when N is less than M, MN second material clips are determined from the first video material, the duration of each second material clip is the duration of a video clip other than the video clip corresponding to the N first material clips, M is the number of the at least one material clip, and M is a positive integer; the N first material clips and the MN second material clips are determined as the at least one material clip; when N is equal to M, the N first material clips are determined as the at least one material clip.
[0009] In some embodiments of the present disclosure, when N is less than M, MN second material segments are determined from the first video material, including: when the video duration of the remaining video excluding the N first material segments in the first video material is greater than the target duration, determining the MN second material segments from the remaining video, the target duration being the sum of the durations of the video segments in the at least one video segment excluding the video segments corresponding to the N first material segments; when the video duration of the remaining video is less than or equal to the target duration, determining K second material segments from the remaining video, K being a natural number less than or equal to MN; and determining MNK second material segments from the first video material.
[0010] In some embodiments of the present disclosure, the filling slot of each video clip is also used to indicate the arrangement order of the corresponding video clips. The second video material is generated according to the at least one material clip and the target video editing template, including: based on the target video editing template, the at least one material clip is synthesized according to the arrangement order of the corresponding video clips to generate the second video material.
[0011] In a second aspect of the embodiments of the present disclosure, a video editing device is provided. The device includes: an acquisition module configured to acquire a first video material and a target video copy corresponding to the first video material; a determination module configured to determine a target video editing template based on the target video copy, where the target video editing template is used to indicate filling slots of at least one video segment and editing effects applied to the at least one video segment; a clipping module configured to clip at least one material segment from the first video material; the at least one material segment corresponding to the filling slots of the at least one video segment and being used to fill the target video editing template to form the at least one video segment; a generation module configured to generate a second video material according to the at least one material segment and the target video editing template; where the second video material is used to present the editing effects applied to the at least one material segment; and a target video is generated by splicing the second video material in front of the first video material.
[0012] In some embodiments of the present disclosure, the acquisition module is specifically configured to acquire the target video copy of the video material to be processed; divide the video material to be processed into multiple video materials based on the target video copy, where each of the multiple video materials is a first video material; or, acquiring the first video material and the video copy corresponding to the first video material includes: acquiring the video copy of the video material to be processed of the video material to be processed; dividing the video material to be processed into multiple video materials based on the video copy of the video material to be processed, where each of the multiple video materials is a first video material; acquiring the target video copy of the first video material; the generation module is specifically configured to generate an edited video corresponding to the first video material by splicing the second video material in front of the first video material to generate an edited video corresponding to each video material; and splicing the edited videos corresponding to each video material to obtain the target video.
[0013] In some embodiments of the present disclosure, the target video editing template is further used to indicate a video title filling slot; the generation module is further configured to generate a video title of the first video material according to the video copy of the first video material, where the video title is used to fill the video title filling slot; the generation module is specifically configured to generate a second video material according to the at least one material segment, the video title, and the target video editing template; where the second video material is used to present the editing effects applied to the at least one material segment and the video title.
[0014] In some embodiments of the present disclosure, the determination module is specifically configured to determine a category label of the category to which the target video copy belongs; and determine a target video editing template corresponding to the category label from multiple video editing templates, where different category labels correspond to different video editing templates.
[0015] In some embodiments of the present disclosure, the padding slot of each video segment is further used to indicate the duration of the corresponding video segment; the intercepting module is specifically configured to perform slicing processing on the first video material to obtain at least one slice; perform highlight segment extraction processing on each of the at least one slice to obtain at least one highlight segment, and the at least one slice corresponds to the at least one highlight segment one by one; determine N first material segments from the at least one highlight segment, the duration of each first material segment is the duration of a video segment, each first material segment corresponds to a highlight segment, and N is a natural number; in the case where N is less than M, determine M - N second material segments from the first video material, the duration of each second material segment is the duration of a video segment other than the video segments corresponding to the N first material segments, M is the number of the at least one material segment, and M is a positive integer; determine the N first material segments and the M - N second material segments as the at least one material segment; in the case where N is equal to M, determine the N first material segments as the at least one material segment.
[0016] In some embodiments of the present disclosure, the intercepting module is specifically configured to, in the case where the video duration of the remaining video in the first video material other than the N first material segments is greater than the target duration, determine the M - N second material segments from the remaining video, where the target duration is the sum of the durations of the video segments other than the video segments corresponding to the N first material segments among the at least one video segment; in the case where the video duration of the remaining video is less than or equal to the target duration, determine K second material segments from the remaining video, where K is a natural number less than or equal to M - N; determine M - N - K second material segments from the first video material.
[0017] In some embodiments of the present disclosure, the padding slot of each video segment is further used to indicate the arrangement order of the corresponding video segment, and the generating module is specifically configured to synthesize the at least one material segment in accordance with the arrangement order of the corresponding video segment based on the target video editing template to generate a second video material.
[0018] In a third aspect of the embodiments of the present disclosure, there is provided an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor. When the computer program is executed by the processor, the video editing method described in the first aspect is implemented.
[0019] In a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the video editing method described in the first aspect is implemented.
[0020] In a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, where the computer program product includes a computer program. When the computer program product runs on a processor, the processor is caused to execute the computer program to implement the video editing method as described in the first aspect.
[0021] In a sixth aspect of the embodiments of the present disclosure, there is provided a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is configured to run program instructions to implement the video editing method as described in the first aspect.
[0022] The technical solutions provided by the embodiments of the present disclosure have the following advantages compared with the prior art: In the embodiments of the present disclosure, a first video material and a target video copy corresponding to the first video material are obtained; a target video editing template is determined based on the target video copy, and the target video editing template is used to indicate the filling slots of at least one video segment and the editing effects applied to the at least one video segment; at least one material segment is intercepted from the first video material; the at least one material segment corresponds to the filling slots of the at least one video segment and is used to fill the target video editing template to form the at least one video segment; a second video material is generated according to the at least one material segment and the target video editing template; wherein the second video material is used to present the editing effects applied to the at least one material segment; the target video is generated by splicing the second video material in front of the first video material. In this way, by designing a video editing template, which is used to indicate the filling slots of at least one video segment and the editing effects applied to the at least one video segment, and then by obtaining the target video copy corresponding to the first video material; determining the target video editing template based on the target video copy, and further generating the second video material corresponding to the first video material according to the target video editing template, and generating the target video by splicing the second video material in front of the first video material, the automatic video editing process of the first video material is realized. There is no need for the user to manually operate to clip the first video material, nor to manually operate to splice the video segments obtained by clipping, and there is no need for the user to manually operate to add editing effects to the video segments obtained by clipping to generate the second video material, and there is also no need for the user to manually splice the second video material in front of the first video material to generate the target video. Therefore, the solution of the present disclosure simplifies the operation process of the user for video editing of the first video material, reduces the time consumption of video editing, and improves the processing efficiency of video editing. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The accompanying drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure and used together with the specification to explain the principles of the present disclosure.
[0024] To more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0025] Figure 1 Schematic flowchart of a video editing method provided by an embodiment of the present disclosure;
[0026] Figure 2 One of the interface schematic diagrams of the video editing method provided by an embodiment of the present disclosure;
[0027] Figure 3 Another interface schematic diagram of the video editing method provided by an embodiment of the present disclosure;
[0028] Figure 4 Another interface schematic diagram of the video editing method provided by an embodiment of the present disclosure;
[0029] Figure 5 Another interface schematic diagram of the video editing method provided by an embodiment of the present disclosure;
[0030] Figure 6 Structural block diagram of a video editing device provided by an embodiment of the present disclosure;
[0031] Figure 7 Structural block diagram of an electronic device provided by an embodiment of the present disclosure. Detailed implementation manners
[0032] In order to better understand the above-mentioned objects, features, and advantages of the present disclosure, the following will further describe the solutions of the present disclosure. It should be noted that, without conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.
[0033] Many specific details are set forth in the following description in order to fully understand the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present disclosure, rather than all the embodiments.
[0034] The terms "first", "second", etc. in the description and claims of the present disclosure are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and do not limit the number of objects. For example, the first object can be one or more. In addition, "and / or" in the description and claims means at least one of the connected objects, and the character " / " generally indicates an "or" relationship between the associated objects before and after.
[0035] The electronic device in the embodiments of the present disclosure can be a mobile electronic device or a non-mobile electronic device. The mobile electronic device can be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc.; the non-mobile electronic device can be a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc.; the embodiments of the present disclosure do not make specific limitations.
[0036] The execution subject of the video editing method provided by the embodiments of the present disclosure can be the above-mentioned electronic device (including mobile electronic devices and non-mobile electronic devices), or a functional module and / or functional entity in the electronic device that can implement the video editing method, which can be specifically determined according to actual usage requirements, and the embodiments of the present disclosure do not make limitations.
[0037] Next, with reference to the accompanying drawings, the video editing method provided by the embodiments of the present disclosure will be described in detail through specific embodiments and their application scenarios.
[0038] As Figure 1 shown, the embodiments of the present disclosure provide a video editing method, which may include the following steps 101 to 105.
[0039] 101. Obtain a first video material and a target video copy corresponding to the first video material.
[0040] Among them, the target video copy is the text content corresponding to the audio information in the first video material. The target video copy can be the existing subtitle text in the first video material, or the text content obtained by recognizing the audio information of the first video material, which can be specifically determined according to the actual situation and is not limited here.
[0041] 102. Determine a target video editing template based on the target video copywriting.
[0042] Among them, the target video editing template is used to indicate the filling slots of at least one video segment and the editing effects applied to the at least one video segment.
[0043] Among them, the target video editing template is determined from multiple video editing templates based on the target video copywriting.
[0044] 103. Intercept at least one material segment from the first video material.
[0045] The at least one material segment corresponds to the filling slots of the at least one video segment and is used to fill the target video editing template to form the at least one video segment.
[0046] It can be understood that since the target video editing template is used to indicate the filling slots of at least one video segment, it is necessary to intercept at least one material segment from the first video material, and the at least one material segment corresponds one-to-one to the filling slots of the at least one video segment.
[0047] 104. Generate a second video material according to the at least one material segment and the target video editing template.
[0048] Among them, the second video material is used to present the editing effects applied to the at least one material segment.
[0049] It can be understood that filling the at least one material segment into the filling slots of the at least one video segment to generate a second material video, or splicing the at least one material segment according to the target video editing template and applying editing effects to the at least one material segment to obtain a second video material.
[0050] 105. Generate a target video by splicing the second video material in front of the first video material.
[0051] In the embodiments of the present disclosure, by designing a video editing template, the video editing template is used to indicate the filling slots of at least one video segment and the editing effects applied to the at least one video segment. Then, by obtaining the target video copy corresponding to the first video material; determining the target video editing template based on the target video copy, and further generating the second video material corresponding to the first video material according to the target video editing template. And by splicing the second video material in front of the first video material to generate the target video, the automatic video editing process of the first video material is realized, without the user manually operating to clip the first video material, nor the user manually operating to splice the video segments obtained by clipping, and without the user manually operating to add editing effects to the video segments obtained by clipping to generate the second video material. At the same time, it is also not necessary for the user to manually splice the second video material in front of the first video material to generate the target video. Therefore, the solution of the present disclosure simplifies the operation process of the user for video editing of the first video material, reduces the time-consuming of video editing, and improves the processing efficiency of video editing.
[0052] In some embodiments of the present disclosure, steps 101 to 105 can be used to generate the title of the video material to be processed (hereinafter referred to as the title video editing process). Among them, the first video material is the video material to be processed, the second video material is the title of the first video material, and the target video is the first video material including the title.
[0053] In some embodiments of the present disclosure, steps 101 to 105 can be used to generate the chapters of the video material to be processed (hereinafter referred to as the chapter video editing process). Among them, the first video material is one of the multiple chapters included in the video material to be processed, the second video material is the chapter introduction of the first video material, and the target video is the video material to be processed including multiple chapters. At this time, in step 101 above, it is necessary to first divide the video material to be processed into multiple chapters, and in step 105 above, it is necessary to splice the multiple chapters with chapter introductions added respectively to obtain the target video.
[0054] In some embodiments of the present disclosure, step 101 above can be specifically implemented through the following steps 101a to 101b, or step 101 above can be specifically implemented through the following steps 101c to 101e; step 105 above can be specifically implemented through the following steps 105a to 105b.
[0055] 101a. Obtain the target video copy of the video material to be processed.
[0056] 101b. Based on the target video copy, divide the video material to be processed into multiple video materials, and each of the multiple video materials is a first video material respectively.
[0057] It can be understood that the target video copy is the video copy of the video material to be processed. Then, in combination with step 102, for the chapter video editing and processing, the video editing template for the chapter is determined based on the video copy of the video material to be processed, that is, the video editing templates corresponding to multiple video materials are the same.
[0058] 101c. Obtain the video copy of the video material to be processed.
[0059] 101d. Based on the video copy of the video material to be processed, divide the video material to be processed into multiple video materials.
[0060] Among them, each of the multiple video materials is a first video material.
[0061] 101e. Obtain the target video copy of the first video material.
[0062] It can be understood that the target video copy is the video copy of the first video material. Then, in combination with step 102, for the chapter video editing and processing, the video editing template for the chapter is determined based on the video copy of the first video material, that is, the video editing templates corresponding to multiple video materials are determined respectively according to the video copy of each video material. Therefore, the video editing templates corresponding to multiple video materials may be the same or may not be the same, which can be determined according to the actual situation and is not limited here.
[0063] Among them, each of the multiple video materials is a chapter of the video material to be processed. The video material to be processed can be divided into multiple video materials based on the voice information of the target video copy, and each video material is a part of the video material to be processed that describes different things or events.
[0064] Among them, the multiple video materials are respectively a first video material, and the above steps 102 to 104 are executed for each of the multiple video materials to obtain the second video material corresponding to each video material.
[0065] 105a. Generate the edited video corresponding to the first video material by splicing the second video material in front of the first video material, so as to generate the edited video corresponding to each video material.
[0066] The edited video corresponding to the first video material is the video material after adding the chapter introduction to the first video material.
[0067] 105b. Splice the edited videos corresponding to each video material to obtain the target video.
[0068] In the embodiments of the present disclosure, the target video is obtained by splicing the edited videos corresponding to multiple video materials respectively, that is, the video material after adding chapters to the video material to be processed is obtained.
[0069] In the embodiments of the present disclosure, during the process of adding chapters to the video material to be processed, the same video editing template can be determined for multiple chapters according to the video copywriting of the video material to be processed, or the video editing template can be determined for different chapters according to the video copywriting of the chapters. Specifically, it can be determined according to the actual situation and is not limited here.
[0070] In some embodiments of the present disclosure, the target video editing template is further used to indicate the video title filling slot; the video editing method provided by the embodiments of the present disclosure may further include step 106 below, and step 104 above may be specifically implemented by the following step 104a.
[0071] 106. Generate the video title of the first video material according to the video copywriting of the first video material, and the video title is used to fill the video title filling slot.
[0072] Among them, the video title is used to summarize the main information expressed by the first video material.
[0073] 104a. Generate the second video material according to the at least one material segment, the video title, and the target video editing template.
[0074] Among them, the second video material is used to present the editing effect applied to the at least one material segment and the video title.
[0075] In the embodiments of the present disclosure, the video editing template includes a video title filling slot, which can make the generated second video material include the main information expressed by the first video material, and it is more convenient for users to understand what the first video material wants to express.
[0076] In some embodiments of the present disclosure, step 102 above may be specifically implemented by the following step 102a and step 102b.
[0077] 102a. Determine the category label of the category to which the target video copywriting belongs.
[0078] Among them, the category label may include video blog, technology, fashion, film and television, animation, news, etc. If the video copywriting has no obvious category characteristics, a general label is assigned to the video copywriting.
[0079] It can be understood that the category to which the video copywriting belongs is the category to which the video material belongs.
[0080] In some embodiments of the present disclosure, step 102a above may also be replaced by determining a category label for the category to which the first video material belongs. The category to which the first video material belongs can be determined by extracting a preset number of video frames of the first video material and then performing content recognition on the preset number of video frames, that is, obtaining the category label for the category to which the first video material belongs.
[0081] 102b. Determine a target video editing template corresponding to the category label from multiple video editing templates. Different category labels correspond to different video editing templates.
[0082] Among them, different category labels correspond to different video editing templates. The target video editing template includes a video title filling slot and filling slots for at least one video segment. The video title filling slot is used to indicate the video title of the first video material, and each filling slot for a video segment is used to indicate a video segment of the first video material.
[0083] It can be understood that multiple corresponding relationships are stored in the electronic device. Each corresponding relationship is used to indicate a category label and at least one video editing template corresponding to the category label; each corresponding relationship can also be used to indicate a video editing template and a category label corresponding to the video editing template.
[0084] In some embodiments of the present disclosure, one category label may correspond to at least one video editing template, and one video editing template may also correspond to one or more category labels.
[0085] The multiple video editing templates in step 102b above respectively correspond to different category labels. If there is only one video editing template corresponding to the category label among the multiple video editing templates, then the one video editing template is the target video editing template. If there are multiple editing templates corresponding to the category label among the multiple video editing templates, then any one video editing template can be selected from the multiple editing templates as the target video editing template; it is also possible to display multiple template identifiers corresponding to the multiple editing templates to the user (the difference introductions of different template identifiers can also be included), and then determine the video editing template corresponding to the template identifier selected by the user from the multiple template identifiers as the target video editing template; specifically, it can be determined according to the actual situation and is not limited here.
[0086] In the embodiments of the present disclosure, determining a video editing template according to the category label of the category to which the video copy belongs can increase the diversity of video editing and improve the user experience.
[0087] It can be understood that in the case where the video editing process is the title video editing process, the target video editing template is the title video editing template. The title video editing template includes a title slot and filling slots for at least one video segment. The video title of the first video material is the title of the video head. The specific content of step 104 is to fill the title of the video head into the title slot based on the title video editing template, and fill at least one material segment into the filling slots of the at least one video segment to generate the target video head. The specific content of step 105 is to synthesize the target video head and the first video material into the target video.
[0088] It can be understood that in the case where the video editing process is the chapter video editing process, the target video editing template is the chapter video editing template. The chapter video editing template includes a chapter title slot and filling slots for at least one video segment. The video title of the first video material is the chapter title. The specific content of step 104 is to fill the chapter title into the chapter title slot based on the chapter video editing template, and fill at least one material segment into the filling slots of the at least one video segment to generate the target chapter introduction. The specific content of step 105 is to splice the chapter introduction before the first video material to obtain the edited video corresponding to the first video material (a chapter including the chapter introduction), and then splice the edited videos corresponding to each video material to obtain the target video.
[0089] In the embodiments of the present disclosure, the category label of the video copy of the video material to be processed is used to determine the target video editing template that matches the category label. Then, at least one material segment required by the target video editing template is extracted from the first video material, and the video title of the first video material required by the target video editing template is obtained according to the video copy of the first video material. Furthermore, the video title and at least one material segment of the first video material are filled into the target video editing template to generate the second video material corresponding to the first video material, so as to synthesize the target video based on the second video material and the first video material. In this way, by setting different video editing templates for different categories of video materials to be processed, and then performing video editing on the video materials to be processed according to the video editing template that matches the category of the video materials to be processed, the automatic video editing process of the video materials to be processed is realized, and the video editing efficiency of the video materials to be processed can be improved.
[0090] In some embodiments of the present disclosure, the filling slot of each video segment is also used to indicate the duration of the corresponding video segment; step 103 can be specifically implemented through the following steps 103a to 103f.
[0091] 103a. Perform slicing processing on the first video material to obtain at least one slice.
[0092] In some embodiments of the present disclosure, the first video material may be sliced according to the continuity of the video frames. For example, the positions where scene switching or camera switching is identified in the first video material are used as slicing points to cut the first video material, obtaining at least one slice.
[0093] In some embodiments of the present disclosure, the first video material may also be sliced according to a preset duration (which can be determined according to the actual situation and is not limited herein).
[0094] 103b. Perform high - light segment extraction processing on each of the at least one slice to obtain at least one high - light segment.
[0095] Among them, each of the at least one slice corresponds to one of the at least one high - light segment.
[0096] In the embodiments of the present disclosure, the specific process of extracting high - light segments is not limited and can be determined according to the actual situation.
[0097] Exemplarily, high - light segments can be extracted from slices through relevant high - light segment extraction methods, or high - light segments can be extracted from slices through a high - light segment extraction model.
[0098] In some embodiments of the present application, extracting a high - light segment for a slice (hereinafter referred to as the target slice) may be: scoring each frame in the target slice respectively, determining the frame with the highest score as the high - light frame, and then extending based on this high - light frame (extracting consecutive video frames with a preset number of frames forward and / or backward) to obtain the high - light segment corresponding to the target slice.
[0099] Among them, the scoring combines dimensions such as the composition, color, and aesthetic feeling of the video frame.
[0100] Exemplarily, for example, if a 1 - second high - light segment is required, video frames can be taken 0.5 seconds forward and 0.5 seconds backward based on the high - light frame with the highest score to obtain a 1 - second high - light segment.
[0101] In some embodiments of the present disclosure, a high - light segment is a video segment including a high - light event. A high - light event is a special plot such as a person, thing, action, story, and / or sound effect in the video that attracts the audience. In different types of videos, different high - light events can be defined. For example, in a football game video, goals, tackles, and saves are defined as high - light events; in a combat - type action game video, the release actions of each skill are defined as high - light events; compared with the relatively plain parts of the video, high - light events can arouse people's interest and attention more.
[0102] In some embodiments of the present disclosure, a highlight segment refers to a segment of video in the video material to be processed that includes a highlight event, and has relatively vivid picture colors and high picture quality.
[0103] Exemplarily, for a slice (hereinafter referred to as the target slice), the extraction of the highlight segment may be as follows: according to the category label of the first video material, determine multiple highlight events that match the category label, and determine the segment in the target slice where the highlight events in the multiple identified highlight events exist as the highlight segment.
[0104] 103c. Determine N first material segments from the at least one highlight segment.
[0105] Wherein, the duration of each first material segment is the duration of a video segment, each of the first material segments corresponds to a highlight segment, and N is a natural number;
[0106] Wherein, each first material segment is obtained by processing a highlight segment in the at least one highlight segment according to the duration of a video segment, and N is a natural number.
[0107] It can be understood that the N first material segments are denoted as N in the at least one material segment.
[0108] In some embodiments of the present disclosure, each highlight segment in the at least one highlight segment is scored. In the process of determining N first material segments from the at least one highlight segment, first obtain the first material segments from the highlight segment with the highest score and the highlight segments whose durations meet the duration of the corresponding video segment. Discard the highlight segments with durations less than the duration of any video segment, and select the segments that meet the duration of the corresponding video segment from the highlight segments with durations greater than or equal to the duration of the corresponding video segment and have the highest score as the first material segments.
[0109] Example 1. For the process of obtaining a first material segment, from the highlight segments other than the ones from which the first material segment has already been obtained among at least one highlight segment, select the highlight segment with a duration greater than or equal to the corresponding duration and the highest score, and obtain a first material segment. For example, at least one highlight segment includes three highlight segments: a 10s highlight segment 1, a 15s highlight segment 2, an 8s highlight segment 3, and a 6s highlight segment 4. The scores of the 4 highlight segments from high to low are highlight segment 3, highlight segment 2, highlight segment 4, and highlight segment 1 in sequence. Among at least one video segment (hereinafter denoted as M video segments), there are a material segment a with a duration of 10s, a material segment b with a duration of 6s, and a material segment c with a duration of 8s. Then, extract material segment a from highlight segment 2 first, then extract material segment b from highlight segment 3, and finally extract material segment c from highlight segment 1. The extracted material segment a, material segment b, and material segment c are 3 first material segments.
[0110] 103d. When N is less than M, determine M - N second material segments from the first video material.
[0111] Among them, the duration of each second material segment is the duration of a video segment other than the video segments corresponding to the N first material segments. M is the number of the at least one material segment, and M is a positive integer.
[0112] Among them, each second material segment is obtained by processing the first video material according to the duration of a video segment other than the duration of the video segments corresponding to the N first material segments among the durations of the at least one video segment.
[0113] It can be understood that the M - N second material segments are the remaining M - N material segments (except the N first material segments) among the at least one material segment.
[0114] 103e. Determine the N first material segments and the M - N second material segments as the at least one material segment.
[0115] The above - extracted N first material segments are the optimal material segments selected from the first video material. When N is less than M, it is necessary to select the sub - optimal material segments from the first video material again.
[0116] Example 2. Regarding the above steps 103d and 103e, continuing from the above Example 1, where M is 5, at least one video clip (M video clips) further includes a material clip d with a duration of 9 s and a material clip e with a duration of 12 s. Then, 2 more second material clips need to be determined from the first video material as material clip d and material clip e, where one second material clip has a duration of 9 s and the other second material clip has a duration of 12 s. The highlight clip 4 (with a duration of 6 s) does not meet the condition for extracting the second material clip. Therefore, 2 second material clips need to be determined from the first video material. Then, the above-extracted 3 first material clips and 2 second material clips are the 5 material clips required for the target video editing template.
[0117] 103f. When N is equal to M, determine the N first material clips as the at least one material clip.
[0118] Example 3. Continuing from the above Example 1, where M is 3, then the above-extracted 3 first material clips are the 3 material clips required for the target video editing template.
[0119] In the embodiments of the present disclosure, through the above steps 103a to 103f, based on the duration of each video clip, at least one material clip (at least one video clip) that meets the requirements of the target video editing template can be obtained. Furthermore, a second video material can be generated based on the target video editing template and the at least one material clip, and then a target video that meets the requirements can be obtained, which can improve the processing efficiency of video editing.
[0120] In some embodiments of the present disclosure, it is preferably ensured that each second material clip does not overlap with any one of the first material clips, and there is no overlap between each second material clip. When this cannot be guaranteed, every effort is made to ensure that each second material clip is not exactly the same as any one of the first material clips, and each second material clip is not exactly the same as each other. Exemplarily, the above step 103d can be specifically implemented through the following steps 103d1 to 103d3.
[0121] 103d1. When the video duration of the remaining video in the first video material except for the N first material clips is greater than the target duration, determine the M - N second material clips from the remaining video.
[0122] Wherein, the target duration is the sum of the durations of the video clips in the at least one video clip except for the video clips corresponding to the N first material clips. That is to say, the target duration is the sum of the durations of the M - N video clips in the M material clips except for the video clips corresponding to the N first material clips.
[0123] 103d2. When the video duration of the remaining video is less than or equal to the target duration, determine K second material segments from the remaining video.
[0124] Wherein, K is a natural number less than or equal to MN. K can be equal to 0 or a positive integer less than or equal to MN.
[0125] 103d3. Determine MNK second material segments from the first video material.
[0126] In the disclosed embodiment, the logic for determining MN second material segments is to preferentially select suboptimal video segments from the remaining videos of the first video material except the N first material segments as the second material segments. When the duration of the remaining video is greater than the target duration, MN second material segments are selected from the remaining video, and at least one video segment (at least one material segment) obtained does not overlap with each other. When the duration of the remaining video is less than or equal to the target duration, K second material segments are preferentially determined from the remaining video, and there is no overlap between the K second material segments, and the K second material segments do not overlap with the above-mentioned N first material segments, and then MNK second material segments are determined from the first video material, and each of the MNK second material segments may overlap with one or more material segments among the N first material segments and the K second material segments.
[0127] Exemplarily, assuming that the duration of the first video material is 20 seconds, the first video material needs to be processed for title video editing, and the matched title video editing template requires 4 (M) video clips, each of which has a duration of 6 seconds. The first video material is sliced to obtain 2 slices, and 2 (N) first material clips (6s*2=12s) are obtained based on the 2 slices. Then, the remaining video of the first video material except the 2 first material clips is extracted to obtain 1 (K) second material clip (6s). Because the remaining video of the first video material except the 2 first material clips and 1 second material clip that have been obtained is only 2s, which is not enough for extracting another second material clip, therefore, it is necessary to extract 1 (MNK) second material clip from the first video material that has repeated content with at least one of the 2 first material clips and 1 second material clip that have been extracted before, so that the title video editing template requires 4 video clips.
[0128] In the embodiments of the present disclosure, by using the method provided in step 103d1 to step 103d3 above to extract M - N second material segments, second material segments that better meet the requirements can be obtained. Finally, the number of repeated frames of the second video material synthesized based on at least one video segment (i.e., N first material segments and M - N second material segments) is minimized, which can improve the user experience.
[0129] In some embodiments of the present disclosure, the filling slots of each video segment are also used to indicate the arrangement order of the corresponding video segment. Step 104 above can be specifically implemented by the following step 104b.
[0130] 104b. Based on the target video editing template, synthesize the at least one material segment in the arrangement order of the corresponding video segment respectively to generate a second video material.
[0131] In the embodiments of the present disclosure, if there is an order in the filling slots of at least one video segment in the target video editing template, the arrangement order is determined according to the order of the filling slots of at least one video segment, and the order of extracting at least one material segment is also determined according to the order of the filling slots of at least one video segment. Filling the at least one material segment into the filling slots of the at least one video segment respectively according to the arrangement order of the corresponding material segments can obtain a second video material that better meets the requirements.
[0132] In some embodiments of the present disclosure, if there is no order in the filling slots of each video segment, the at least one material segment and the video title of the first video material can be synthesized into a second video material according to the timestamps of the first frames of each material segment in the at least one extracted material segment.
[0133] In some embodiments of the present disclosure, step 101 above may further include the following step 101f, and after step 105, the following step 107 may also be included.
[0134] 101f. In response to a trigger operation on a video editing control in the video editing panel, obtain the first video material and the target video copy corresponding to the first video material to enter the video editing process;
[0135] 107. Display the target video.
[0136] In the embodiments of the present disclosure, by displaying the target video, it is convenient for the user to view the video editing effect.
[0137] In some embodiments of the present disclosure, before the above 101f, the video editing method provided in the embodiments of the present application may further include the following step 108.
[0138] 108. In response to a trigger operation on a video processing control displayed in a video editing interface, a video editing panel is displayed.
[0139] Among them, video editing controls are displayed in the video editing panel. The video editing controls include a title editing control or a chapter editing control. The title editing control is used to indicate title video editing processing, and the chapter editing control is used to indicate chapter video editing processing.
[0140] In some embodiments of the present disclosure, only the title editing control may be displayed in the video editing panel, only the chapter editing control may be displayed, or both the title editing control and the chapter editing control may be displayed at the same time. Other editing controls may also be displayed in the video editing panel, which can be determined according to the actual situation and are not limited here.
[0141] In some embodiments of the present disclosure, one or more video editing controls may be displayed in the video editing panel. One or more title editing controls may be displayed in the video editing panel, or one or more chapter editing controls may be displayed, which can be determined according to the actual situation and are not limited here. The logic of the title video editing processing corresponding to different title editing controls is different. The logic of the chapter video editing processing corresponding to different chapter editing controls is different.
[0142] In some embodiments of the present disclosure, the video editing control (title editing control and / or chapter editing control) may be a control with a switch. When the video editing function is used for the first time, the switch of the video editing control (hereinafter referred to as the video editing switch) is default closed. When the video editing function is used subsequently, it is displayed according to the recorded state of the video editing switch, that is, if the recorded state of the previous video editing switch is open, it is default open this time, and if the recorded state of the previous video editing switch is closed, it is default closed this time.
[0143] In some embodiments of the present disclosure, the video editing control can also be set according to whether the video editing interface is displayed in landscape or portrait. For example, when the video editing interface is displayed in portrait, the video editing control is grayed out (that is, the video editing processing cannot be performed on the video material to be processed based on the video editing control). At this time, clicking the switch will pop up a prompt "Currently only landscape video editing is supported".
[0144] It can be understood that if the video editing control is a title editing control, in response to a trigger operation on the title editing control, based on the title video editing processing indicated by the title editing control, the video material to be processed is subjected to video editing processing to generate a target video, and the target video includes a synthesized title montage segment.
[0145] It can be understood that if the video editing control is a chapter editing control, in response to a trigger operation on the chapter editing control, based on the chapter video editing process indicated by the chapter editing control, video editing is performed on the video material to be processed to generate a target video. The target video includes multiple chapters, and each chapter includes a synthesized chapter montage segment.
[0146] In this way, in this solution, a video processing control is displayed on the video editing interface, and then the video editing panel is triggered through the video processing control. By triggering the video editing control displayed in the video editing panel, automatic video editing can be triggered for the video material to be processed. There is no need for the user to select and match suitable materials from a large material library and adjust styles, etc., to perform video editing on the video material to be processed, which simplifies the operation process of the user for video editing of the video material to be processed (title video editing or chapter video editing), reduces the time-consuming for video editing of the video material to be processed, and improves the processing efficiency of video editing of the video material to be processed.
[0147] In some embodiments of the present disclosure, a commercial material screening option is also displayed in the video editing panel, which is not selected by default (that is, the commercial material screening function is turned off by default). After the commercial material screening function is turned on, only commercial materials can be returned for video editing.
[0148] In some embodiments of the present disclosure, when the video editing panel is first displayed, the commercial material screening option is not selected by default. When the video editing panel is displayed later, it is displayed according to the status of the commercial material screening option recorded last time. That is, if the status of the commercial material screening option recorded last time is not selected, it is not selected by default this time. If the status of the commercial material screening option recorded last time is selected, it is selected by default this time.
[0149] In some embodiments of the present disclosure, a text editing control (for video editing of text in subtitles, picture-in-picture, etc.) and a sound effect video editing control (when there are keywords in the subtitles that match the sound effects, adding the corresponding sound effects when the keywords are displayed) may also be displayed in the video editing panel. Specifically, it can be determined according to the actual situation and is not limited here.
[0150] In some embodiments of the present disclosure, when a text editing control is displayed in the video editing panel, a delete existing subtitle option is also displayed in the video editing panel for the text editing control (default selected, that is, the function of deleting existing subtitles is default enabled). Among them, the delete existing subtitle option in the selected state is used to indicate deleting the existing subtitles of the to-be-processed video material before performing text editing processing on the to-be-processed video material, and the delete existing subtitle option in the unselected state is used to indicate using the existing subtitles of the to-be-processed video material for video editing processing when performing text editing processing on the to-be-processed video material.
[0151] In some embodiments of the present disclosure, a function introduction icon corresponding to each video editing control is also displayed in the video editing panel. The function introduction icon is used to trigger the display of the function introduction of the video editing mode indicated by the corresponding video editing control. The function introduction includes an introduction in text form and / or an introduction in the form of a moving picture. In this way, when the user does not understand the video editing mode corresponding to each video editing control, by triggering the operation on the function introduction icon corresponding to the video editing control, the function introduction of the video editing mode indicated by the video editing control can be triggered to be displayed, which is convenient for the user to understand and use and can improve the user experience.
[0152] In some embodiments of the present disclosure, the function introduction interface corresponding to the function introduction icon is floatingly displayed in the video editing panel. The function introduction interface can be in the form of a pop-up window display or the following function introduction floating layer, which is not limited here.
[0153] In some embodiments of the present disclosure, the above step 108 can be specifically implemented by the following steps 108a and 108b.
[0154] 108a. In response to the trigger operation on the video processing control displayed in the video editing interface, display a function introduction floating layer.
[0155] Among them, the function introduction floating layer is used to display the entry control of the video editing panel and the function introduction of the video editing processing indicated by the video editing control. The function introduction includes an introduction in text form and / or an introduction in the form of a moving picture.
[0156] In some embodiments of the present disclosure, when the video editing panel includes multiple video editing controls, the function introductions corresponding to each video editing control in the function introduction floating layer can be displayed separately (by switching operations to switch and display the function introductions corresponding to different video editing controls), and the function introductions corresponding to each video editing control in the function introduction floating layer can also be displayed simultaneously, which can be specifically determined according to the actual situation and is not limited here.
[0157] Among them, the specific function introduction can be set according to the corresponding video editing control and is not limited here.
[0158] Exemplarily, the function introduction floating layer is a semi-screen function introduction floating layer. Specifically, a gif-form introduction corresponding to a video editing control is displayed above the function introduction floating layer, and a text-form introduction corresponding to the video editing control is displayed below. The user can switch the gif-form introductions corresponding to different video editing controls by swiping left and right, and the text-form introduction below is updated synchronously after the gif-form introduction is switched.
[0159] 108b. In response to a trigger operation on the entry control, display the video editing panel.
[0160] Exemplarily, the entry control can be a "Give it a try" control.
[0161] In some embodiments of the present disclosure, it can be set that when a new user (after downloading and installing) uses the video editing function for the first time, step 108 includes step 108a and step 108b. When an old user uses the video editing function, the video editing panel is directly displayed by a trigger operation on the video processing control, and the above function introduction floating layer is not displayed.
[0162] In the embodiments of the present disclosure, before displaying the video editing panel, displaying the function introduction floating layer is beneficial for the user to understand and compare the video editing processes corresponding to each video editing control, and then it is convenient to select which video editing control to use for video editing the video material to be processed later, which can improve the user experience.
[0163] In some embodiments of the present disclosure, step 101f can be specifically implemented through the following steps 201 to 205.
[0164] 201. In response to a trigger operation on the video editing control, determine whether the video editing function has been authorized.
[0165] In the case where it is determined that the video editing function has not been authorized, execute the following steps 202 to 205; in the case where it is determined that the video editing function has been authorized, execute the following step 204.
[0166] 202. In the case where the video editing function has not been authorized, display an authorization pop-up window, which displays authorization options and non-authorization options.
[0167] Among them, the authorization option is used to indicate authorizing the video editing function, and the non-authorization option is used to indicate not authorizing the video editing function.
[0168] Exemplarily, the authorization pop-up window can include text-form introduction information about the video editing function, and also include an "Allow" option and a "Deny" option. Among them, the "Allow" option corresponds to the authorization option, and the "Deny" option corresponds to the non-authorization option.
[0169] 203. In response to a triggering operation on the authorization option, determine to authorize the video editing function.
[0170] In response to a triggering operation on the authorization option, authorize the video editing function for the electronic device, and perform the following step 204.
[0171] 204. In the case where the video editing function has been authorized, based on the video editing control, perform video editing processing on the video material to be processed to generate the target video.
[0172] 205. In response to a triggering operation on the non-authorization option, prohibit video editing processing on the video material to be processed.
[0173] It can be understood that in response to a triggering operation on the non-authorization option, the electronic device may not perform video editing processing on the video material to be processed, and may also display a prompt message for prompting that the video editing function cannot be used without authorization.
[0174] It can be understood that when clicking on the video editing control, if it is detected that the electronic device has not authorized the video editing function, an authorization pop-up window will be displayed. Select the authorization option, and then start video editing processing on the video material to be processed. Select the non-authorization option to close the authorization pop-up window and do not start (prohibit) video editing processing on the video material to be processed.
[0175] In some embodiments of the present disclosure, if the authorization option is selected this time, when using the video editing function next time, there is no need to pop up the authorization pop-up window again; if the non-authorization option is selected this time, when using the video editing function next time, the authorization pop-up window will still be popped up, and the video editing function can be used only after the user selects the authorization option.
[0176] In the embodiments of the present disclosure, by setting to allow the use of the video editing function when the video editing function is authorized, and prohibiting the use of the video editing function when the video editing function is not authorized, the user's use safety can be guaranteed, and user misoperations can be avoided, thereby improving the user experience.
[0177] In some embodiments of the present disclosure, it is also possible to determine whether the video editing function has been authorized in response to a triggering operation of the video processing control. In the case where the video editing function has not been authorized, an authorization pop-up window is displayed, and the authorization pop-up window displays an authorization option and a non-authorization option. In the case where the video editing function has been authorized, a video editing panel is displayed, which can be specifically determined according to the actual situation and is not limited here.
[0178] In some embodiments of the present disclosure, the video editing method provided by the embodiments of the present disclosure may further include at least one of the following steps 109 to step 111.
[0179] 109. In response to a triggering operation on a cancellation control, stop the video editing process and clear the video editing results that have been performed.
[0180] It can be understood that during the process of video editing and processing the to-be-processed video material, in response to a triggering operation on the cancellation control, stop the process of video editing and processing the to-be-processed video material, and clear the video editing and processing results that have been performed.
[0181] Among them, the cancellation control is a control used to end the video editing process.
[0182] It can be understood that the video editing method provided by the embodiments of the present disclosure supports ending the video editing process during the video editing and processing. In this way, when the user suddenly does not want to perform video editing and processing anymore, the current video editing process can be ended by triggering the cancellation control, which can improve the user experience.
[0183] 110. In response to a triggering operation on a target control, switch the video editing process to run in the background and display the progress of the video editing process at the target location.
[0184] It can be understood that during the process of video editing and processing the to-be-processed video material, in response to a triggering operation on the target control, switch the process of video editing and processing the to-be-processed video material to run in the background, and display the progress of the process of video editing and processing the to-be-processed video material at a preset location.
[0185] Among them, the process progress can be a progress percentage or process description information of the current processing stage in the video editing process.
[0186] Among them, the target control is a control used to switch the video editing process to run in the background. Exemplarily, the target control can be a control to switch to the tool home page of an application with video editing functions, the target control can also be a control to switch to the home page of the electronic device, or other types of controls, which can be specifically determined according to the actual situation and are not limited here.
[0187] It can be understood that the video editing method provided by the embodiments of the present disclosure supports switching the video editing process to run in the background during the video editing and processing. For example, during the video editing and processing, by triggering the operation to exit to the tool home page, display the tool home page and keep the video editing process running in the background.
[0188] Among them, the preset location can be the draft cover of the tool home page, or a floating window control displayed in an application with video editing functions, or a floating window control displayed on the electronic device, or other locations or areas, which can be specifically determined according to the actual situation and are not limited here.
[0189] Exemplarily, in response to a trigger operation to exit to the tool home page, when the video editing process is kept running in the background, the progress is displayed on the draft cover of the tool home page.
[0190] Embodiments of the present disclosure support switching the video editing process to be executed in the background, so that during the process of performing video editing processing on the video material to be processed, the user can also perform other operations, which can improve the user experience.
[0191] 111. During the process of performing video editing processing on the video material to be processed, a loading animation is displayed, and the loading animation includes process description information for performing video editing processing on the video material to be processed.
[0192] In some embodiments of the present disclosure, the loading animation can scroll the process description information (i.e., switch to display the process description information) every preset duration (such as 5 seconds).
[0193] In some embodiments of the present disclosure, the loading animation can also display the process description information in real time according to the actual video editing process, that is, display the process description information of the stage where the current video editing process is located.
[0194] Exemplarily, the process description information can be "obtaining video copywriting...", "determining category labels of the video category...", "matching video editing templates corresponding to the category labels...", "extracting highlight segments...", etc., which can be determined according to the actual situation and are not limited herein.
[0195] In the embodiments of the present disclosure, during the video editing process, displaying the loading animation can help the user understand the general process of video editing processing and can improve the user experience.
[0196] In some embodiments of the present disclosure, in some embodiments of the present disclosure, the video editing method provided by the embodiments of the present disclosure may further include at least one of the following step 112 and step 113.
[0197] 112. Display target prompt information.
[0198] Wherein, in the case that the video editing processing on the video material to be processed is successful, the target prompt information is used to prompt that the video editing processing on the video material to be processed is successful; in the case that the video editing processing on the video material to be processed fails, the target prompt information is used to prompt that the video editing processing on the video material to be processed fails, and / or the reason for the failure of the video editing processing on the video material to be processed.
[0199] In an embodiment of the present disclosure, after successfully performing video editing processing (successfully adding materials) on the video material to be processed, a prompt message such as "Video editing successful" or "Video editing processing successful" can be popped up for prompting.
[0200] In an embodiment of the present disclosure, after the video editing processing on the video material to be processed fails (adding materials fails), a prompt message such as "Video editing failed" or "Video editing processing failed" can be popped up for prompting.
[0201] In some embodiments of the present disclosure, in the case of video editing failure, the reason for the failure can also be prompted. For example, if no audio content results in the inability to return the second video material (the title or chapter segment), a prompt message "No speech content recognized, unable to add title and chapter temporarily" can be popped up; if the recognition fails due to a network problem, a prompt message "Network error, please try again" can be popped up.
[0202] In an embodiment of the present disclosure, by displaying the target prompt message, the result of the video editing processing can be promptly prompted to the user, facilitating the user's subsequent operations and improving the user experience.
[0203] 113. Display the target status information.
[0204] Among them, in the case of successfully performing video editing processing on the video material to be processed, the target status information is used to indicate the success of the video editing processing on the video material to be processed; in the case of the video editing processing on the video material to be processed failing, the target status information is used to indicate the failure of the video editing processing on the video material to be processed.
[0205] The embodiment of the present disclosure supports displaying the target status information corresponding to the success or failure of the video editing processing at a preset position (refer to the above description of the preset position, which will not be elaborated here). In this way, the user can be prompted whether the video editing processing on the video material to be processed is successful or failed. Furthermore, in the case where the user cannot pay attention to the video editing process of the video material to be processed in real time, the result of the video editing processing on the video material to be processed can be understood according to the target status information, improving the user experience.
[0206] In an embodiment of the present disclosure, the target status information can be kept displayed at the preset position for a certain period of time. Exemplarily, the target status information can be kept displayed at the preset position during the life cycle of the corresponding application program. After restarting the application program, the target status information is no longer displayed. The target status information can also be cancelled from display after entering the timeline editing panel.
[0207] In the embodiments of the present disclosure, for the target status information indicating the failure of video editing processing, it can also be cancelled from display after the user triggers a process of re-performing video editing processing on the video material to be processed through a triggering operation (such as clicking a retry control, clicking a redo control, or clicking any video editing processing control).
[0208] In some embodiments of the present disclosure, after step 113 above, the video editing method provided by the embodiments of the present disclosure may further include any one of the following steps 114 to step 117.
[0209] 114. When it is detected that the application corresponding to the video editing function is closed, clear the target status information.
[0210] 115. When it is detected that the timeline clip panel of the video editing interface is displayed, clear the target status information and position the timeline preview axis to the first position on the timeline where video editing processing has been performed.
[0211] Among them, positioning the timeline preview axis to the first position on the timeline where video editing processing has been performed can facilitate the user to determine at which position video editing processing has started and can improve the user experience.
[0212] 116. When it is detected that video editing processing is performed again on the video material to be processed, clear the target status information and the target video.
[0213] Among them, performing video editing processing again on the video material to be processed may be, after successfully adding materials for video editing, performing video editing again; or it may be clicking the redo control, which is not limited here.
[0214] Clearing the target status information and the target video means automatically clearing the result of the previous video editing processing, which is equivalent to overwriting the old result with the new result of performing video editing processing again. In this way, it is possible to avoid the mixing of the results of two video editing processes, resulting in the final video editing processing result including different video editing styles and reducing the user experience.
[0215] 117. When it is detected that the video editing processing performed on the video material to be processed is cancelled, clear the target video.
[0216] The embodiments of the present disclosure support performing an operation of cancelling the previous video editing processing.
[0217] It can be understood that using video editing to add materials is an entire operation step. When the user clicks the cancel control, all the video editing materials generated in the previous video editing processing process need to be completely removed.
[0218] In some embodiments of the present disclosure, according to actual requirements, a free-of-charge icon can also be displayed at the video processing control, and the function can be used normally after clicking.
[0219] Exemplarily, as Figure 2 shown, the area indicated by the label "21" is the area for displaying the video material to be processed, the area indicated by the label "22" is the timeline editing panel, and the area indicated by the label "23" is the toolbar area for editing and processing. Among them, the toolbar area includes a "video processing" control. Click Figure 2 the "video processing" control shown as Figure 3 to display a function introduction floating layer indicated by the label "31" in Figure 3 . Among them, the function introduction floating layer includes an introduction area in the form of a moving picture for the video editing control 1 indicated by the label "311", a text form introduction area for the video editing control 1 indicated by the label "312", and a "give it a try" control indicated by the label "313". Click Figure 3 the "give it a try" control shown as Figure 4 to display a video editing panel indicated by the label "41" in Figure 4 . The video editing panel includes a title editing control 1 (the switch of the current title editing control 1 is in the on state, that is, the title editing control 1 is in the selected state), a function introduction icon 1 corresponding to the title editing control 1, a chapter editing control 2 (the switch of the current chapter editing control 2 is in the off state, that is, the chapter editing control 2 is in the unselected state), a function introduction icon 2 corresponding to the chapter editing control 2, and a "start" control. Click Figure 4 the "start" control shown as Figure 5 to display a video editing loading animation area indicated by the label "51" in
[0220] Figure 6 is a structural block diagram of a video editing device shown in an embodiment of the present disclosure. As Figure 6As shown, it includes: an acquisition module 601, configured to acquire a first video material and a target video copy corresponding to the first video material; a determination module 602, configured to determine a target video editing template based on the target video copy, where the target video editing template is used to indicate filling slots of at least one video segment and editing effects applied to the at least one video segment; a clipping module 603, configured to clip at least one material segment from the first video material; the at least one material segment corresponding to the filling slots of the at least one video segment and being used to fill the target video editing template to form the at least one video segment; a generation module 604, configured to generate a second video material according to the at least one material segment and the target video editing template; where the second video material is used to present the editing effects applied to the at least one material segment; and a target video is generated by splicing the second video material in front of the first video material.
[0221] In some embodiments of the present disclosure, the acquisition module 601 is specifically configured to acquire the target video copy of the video material to be processed; based on the target video copy, divide the video material to be processed into multiple video materials, and each of the multiple video materials is a first video material; or, acquiring the first video material and the video copy corresponding to the first video material includes: acquiring the video copy of the video material to be processed of the video material to be processed; based on the video copy of the video material to be processed, divide the video material to be processed into multiple video materials, and each of the multiple video materials is a first video material; acquiring the target video copy of the first video material; the generation module 604 is specifically configured to generate an edited video corresponding to the first video material by splicing the second video material in front of the first video material, so as to generate an edited video corresponding to each video material; and splice the edited videos corresponding to each video material to obtain the target video.
[0222] In some embodiments of the present disclosure, the target video editing template is further used to indicate a video title filling slot; the generation module 604 is further configured to generate a video title of the first video material according to the video copy of the first video material, where the video title is used to fill the video title filling slot; the generation module 604 is specifically configured to generate a second video material according to the at least one material segment, the video title, and the target video editing template; where the second video material is used to present the editing effects applied to the at least one material segment and the video title.
[0223] In some embodiments of the present disclosure, the determination module 602 is specifically configured to determine a category label of the category to which the target video copy belongs; and determine a target video editing template corresponding to the category label from multiple video editing templates, where different category labels correspond to different video editing templates.
[0224] In some embodiments of the present disclosure, the padding slot of each video segment is further used to indicate the duration of the corresponding video segment; the intercepting module 603 is specifically configured to perform slicing processing on the first video material to obtain at least one slice; perform highlight segment extraction processing on each of the at least one slice to obtain at least one highlight segment, where the at least one slice corresponds to the at least one highlight segment one by one; determine N first material segments from the at least one highlight segment, the duration of each first material segment is the duration of a video segment, each of the first material segments corresponds to a highlight segment, and N is a natural number; in the case where N is less than M, determine M-N second material segments from the first video material, the duration of each second material segment is the duration of a video segment other than the video segments corresponding to the N first material segments, M is the number of the at least one material segment, and M is a positive integer; determine the N first material segments and the M-N second material segments as the at least one material segment; in the case where N is equal to M, determine the N first material segments as the at least one material segment.
[0225] In some embodiments of the present disclosure, the intercepting module 603 is specifically configured to, in the case where the video duration of the remaining video in the first video material except the N first material segments is greater than the target duration, determine the M-N second material segments from the remaining video, where the target duration is the sum of the durations of the video segments other than the video segments corresponding to the N first material segments in the at least one video segment; in the case where the video duration of the remaining video is less than or equal to the target duration, determine K second material segments from the remaining video, where K is a natural number less than or equal to M-N; determine M-N-K second material segments from the first video material.
[0226] In some embodiments of the present disclosure, the padding slot of each video segment is further used to indicate the arrangement order of the corresponding video segment, and the generating module 604 is specifically configured to synthesize the at least one material segment in accordance with the arrangement order of the corresponding video segment based on the target video editing template to generate a second video material.
[0227] In the embodiments of the present disclosure, each module can implement the video editing method provided in the above method embodiments and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.
[0228] Figure 7 It is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure, which is used to exemplarily illustrate the electronic device for implementing any video editing method in the embodiments of the present disclosure and should not be construed as a specific limitation to the embodiments of the present disclosure.
[0229] As Figure 7As shown, the electronic device 700 may include a processor (such as a central processing unit, a graphics processing unit, etc.) 701, which may perform various appropriate actions and processes according to a program stored in the read-only memory (ROM) 702 or a program loaded from the storage device 708 into the random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processor 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. The input / output (I / O) interface 705 is also connected to the bus 704.
[0230] Generally, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or wiredly to exchange data. Although the electronic device 700 with various devices is shown, it should be understood that it is not required to implement or have all the shown devices. More or fewer devices may be implemented or had alternatively.
[0231] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart may be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program codes for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processor 701, the functions defined in any video editing method provided by the embodiments of the present disclosure may be executed.
[0232] It should be noted that the computer-readable medium described above can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and this computer-readable signal medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0233] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0234] The above computer-readable medium can be included in the above electronic device; or it can exist separately and not be assembled into the electronic device.
[0235] The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device is caused to execute the above video editing method.
[0236] In the embodiments of the present disclosure, computer program code for performing the operations of the present disclosure may be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on a computer, partially on a computer, executed as a stand-alone software package, partially on a computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0237] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0238] The units involved in the embodiments described in the present disclosure may be implemented in software or in hardware. Among them, the name of the unit does not constitute a limitation to the unit itself in some cases.
[0239] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGA), application specific integrated circuits (ASIC), application specific standard products (ASSP), system on a chip (SOC), complex programmable logic devices (CPLD), and so on.
[0240] In the context of the present disclosure, a computer-readable medium can be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a computer-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0241] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, a technical solution formed by mutually replacing the above features with technical features having similar functions (but not limited to) disclosed in the present disclosure.
[0242] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although a number of specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment can also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0243] Although the subject matter has been described in language specific to structural features and / or methodological acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A video editing method, characterized in that, The method includes: Obtaining a first video material and a target video copy corresponding to the first video material; Determining a target video editing template based on the target video copy, where the target video editing template is used to indicate filling slots for at least one video segment and editing effects applied to the at least one video segment; Intercepting at least one material segment from the first video material; the at least one material segment corresponds to the filling slots of the at least one video segment and is used to fill the target video editing template to form the at least one video segment; Generating a second video material according to the at least one material segment and the target video editing template; wherein, the second video material is used to present the editing effects applied to the at least one material segment; Generating a target video by splicing the second video material in front of the first video material.
2. The method according to claim 1, wherein The obtaining the first video material and the target video copy corresponding to the first video material includes: Obtaining the target video copy of the video material to be processed; Based on the target video copy, dividing the video material to be processed into multiple video materials, and each video material in the multiple video materials is respectively one of the first video materials; Or, The obtaining the first video material and the video copy corresponding to the first video material includes: Obtaining the video copy of the video material to be processed of the video material to be processed; Based on the video copy of the video material to be processed, dividing the video material to be processed into multiple video materials, and each video material in the multiple video materials is respectively one of the first video materials; Obtaining the target video copy of the first video material; The generating a target video by splicing the second video material in front of the first video material includes: Generating an edited video corresponding to the first video material by splicing the second video material in front of the first video material, so as to generate an edited video corresponding to each video material; Splicing the edited videos corresponding to each video material to obtain the target video.
3. The method according to claim 1, characterized in that, The target video editing template is further used to indicate a filling slot for a video title; The method further includes: Generating a video title for the first video material according to the video copy of the first video material, where the video title is used to fill the filling slot for the video title; The generating a second video material according to the at least one material segment and the target video editing template includes: Generating a second video material according to the at least one material segment, the video title and the target video editing template; Wherein, the second video material is used to present the editing effects applied to the at least one material segment and the video title.
4. The method according to claim 1, characterized in that, The determining a target video editing template based on the target video copy includes: Determining a category label of the category to which the target video copy belongs; Determining a target video editing template corresponding to the category label from multiple video editing templates, and different category labels correspond to different video editing templates.
5. The method according to claim 1, wherein The padding slots of each video segment are also used to indicate the duration of the corresponding video segment; the intercepting at least one material segment from the first video material includes: Performing slicing processing on the first video material to obtain at least one slice; Performing highlight segment extraction processing on each of the at least one slice to obtain at least one highlight segment, and the at least one slice corresponds to the at least one highlight segment one by one; Determining N first material segments from the at least one highlight segment, the duration of each first material segment being the duration of one video segment, each first material segment corresponding to one highlight segment, and N being a natural number; In the case where N is less than M, determining M - N second material segments from the first video material, the duration of each second material segment being the duration of one video segment other than the video segments corresponding to the N first material segments, M being the number of the at least one material segment, and M being a positive integer; Determining the N first material segments and the M - N second material segments as the at least one material segment; In the case where N is equal to M, determining the N first material segments as the at least one material segment.
6. The method according to claim 5, wherein The determining M - N second material segments from the first video material in the case where N is less than M includes: In the case where the video duration of the remaining video in the first video material other than the N first material segments is greater than the target duration, determining the M - N second material segments from the remaining video, the target duration being the sum of the durations of the video segments other than the video segments corresponding to the N first material segments in the at least one video segment; In the case where the video duration of the remaining video is less than or equal to the target duration, determining K second material segments from the remaining video, K being a natural number less than or equal to M - N; Determining M - N - K second material segments from the first video material.
7. The method according to any one of claims 1 to 6, characterized in that, The padding slots of each video segment are also used to indicate the arrangement order of the corresponding video segment, and the generating the second video material according to the at least one material segment and the target video editing template includes: Based on the target video editing template, synthesizing the at least one material segment in the arrangement order of the corresponding video segments respectively to generate the second video material.
8. A video editing device, characterized in that, Including: An acquisition module, configured to acquire a first video material and a target video copy corresponding to the first video material; A determination module, configured to determine a target video editing template based on the target video copy, the target video editing template being used to indicate the padding slots of at least one video segment and the editing effects applied to the at least one video segment; An interception module, configured to intercept at least one material segment from the first video material; the at least one material segment corresponds to the padding slots of the at least one video segment and is used to fill the target video editing template to form the at least one video segment; A generation module, configured to generate second video material according to the at least one material segment and the target video editing template; wherein, the second video material is used to present the editing effect applied to the at least one material segment; Generate a target video by splicing the second video material in front of the first video material.
9. An electronic device, characterized in that, Comprising: A memory and a processor, the memory is used to store computer programs; The processor is configured to execute the video editing method according to any one of claims 1 to 7 when calling the computer program.
10. A computer-readable storage medium, characterized in that, A computer program is stored thereon, and when the computer program is executed by the processor, the video editing method according to any one of claims 1 to 7 is implemented.