Video generation method and device, storage medium and electronic device

By displaying the template selection interface and setting video time nodes, the video production process is simplified and the quality and speed of video generation is improved.

CN113325979BActive Publication Date: 2025-08-26BEIJING ZHONGZHI XUN BO DATA INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110592870.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-28
Publication Date
2025-08-26
Estimated Expiration
2041-05-28

AI Technical Summary

Technical Problem

When making videos, the operation process of adding animations and special effects is complicated, which makes video production more difficult.

Method used

Provide a video generation method, by displaying the template selection interface, setting video time nodes and filling materials to generate videos.

Benefits of technology

Improve the quality and speed of video production and simplify the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113325979B_ABST
    Figure CN113325979B_ABST
Patent Text Reader

Abstract

The present invention provides a video generation method and device, a storage medium, and an electronic device. The method includes: displaying a first interface; the first interface includes multiple template controls and a template selection prompt box; in response to a user's first trigger operation on a target template control, displaying a second interface; the target template control is any one of the template controls, and the second interface includes a timeline of a video template corresponding to the target template control and a video save control; the timeline includes multiple video time nodes and a material fill control for each of the video time nodes; in response to a user's fill operation on each of the material fill controls, setting a video material for each of the video time nodes; and in response to a user's second trigger operation on the video save control, generating a video based on the video template and the video material for each of the video time nodes. Application of the method provided by the embodiments of the present invention can improve the quality and speed of video production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a video generation method and device, a storage medium, and an electronic device. Background Art

[0002] With the development of computer science and technology, more and more Internet platforms are disseminating information through video advertising. For users, video advertising has low cost in obtaining information, the information is more realistic and three-dimensional, and it is highly interactive. Therefore, the use of video advertising can increase users' interest in advertising content.

[0003] However, in the process of video production, animations and special effects are often added to the original material to make the produced video more aesthetically pleasing. However, the operation process required to add animations and special effects is relatively complicated, making video production more difficult. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a video generation method that can improve the quality and speed of video production.

[0005] The present invention also provides a video generating device to ensure the implementation and application of the above method in practice.

[0006] A video generation method, applied to an electronic device, comprising:

[0007] Display a first interface; the first interface includes multiple template controls and a template selection prompt box; the template prompt box is used to prompt the user to select a video template; each template control includes a first style prompt box and a second style prompt box of the video template corresponding to the template control; the first style prompt box is used to display the style description text of the video template, and the second style prompt box is used to display the style description video of the video template;

[0008] In response to a first trigger operation of a target template control by a user, a second interface is displayed; the target template control is any one of the template controls, and the second interface includes a timeline of a video template corresponding to the target template control and a video saving control; the timeline includes multiple video time nodes and a material filling control for each of the video time nodes;

[0009] In response to a user's filling operation on each of the material filling controls, setting a video material for each of the video time nodes;

[0010] In response to a second trigger operation of the user on the video saving control, a video is generated based on the video template and the video material of each video time node.

[0011] In the above method, optionally, the material filling control includes a material filling box and a material filling prompt box; the material filling box is used to obtain the original video material added by the user, and the material filling prompt box is used to prompt the material condition corresponding to the video time node to which the material filling control belongs;

[0012] The step of setting the video material for each video time node includes:

[0013] Obtaining the original video material added by the user for the video time node;

[0014] Determining whether the original video material meets the material condition corresponding to the video time node;

[0015] If the original video material meets the material condition, the original video material is used as the video material of the video time node.

[0016] The above method may optionally further include:

[0017] If the original video material does not meet the material condition, the user is prompted that the original video material does not meet the material condition.

[0018] In the above method, optionally, the second interface further includes a video preview window;

[0019] After setting the video material for each video time node, the method further includes:

[0020] In response to the user's third triggering operation on the video preview window, a preview video is generated based on the video template and the currently set video material, and the preview video is played in the video preview window.

[0021] Optionally, in the above method, generating a video based on the video template and the video material at each video time node includes:

[0022] Generate ffmpeg instructions based on the video template and the video materials of each video time node;

[0023] The ffmpeg instruction is called to execute the video generation task and obtain the video corresponding to the ffmpeg instruction.

[0024] The above method may optionally further include:

[0025] The video is uploaded to a pre-set video on demand system, and a cover image of the video is generated.

[0026] A video generation device, applied to an electronic device, comprising:

[0027] A first display unit is configured to display a first interface; the first interface includes a plurality of template controls and a template selection prompt box; the template prompt box is configured to prompt a user to select a video template; each template control includes a first style prompt box and a second style prompt box of the video template corresponding to the template control; the first style prompt box is configured to display a style description text of the video template, and the second style prompt box is configured to display a style description video of the video template;

[0028] A second display unit is configured to display a second interface in response to a first trigger operation of a target template control by a user; the target template control is any one of the template controls, and the second interface includes a timeline of a video template corresponding to the target template control and a video saving control; the timeline includes a plurality of video time nodes and a material filling control for each of the video time nodes;

[0029] A setting unit, configured to set a video material for each of the video time nodes in response to a user's filling operation on each of the material filling controls;

[0030] A generating unit is configured to generate a video based on the video template and the video material at each of the video time nodes in response to a second triggering operation of the video saving control by the user.

[0031] In the above device, optionally, the material filling control includes a material filling box and a material filling prompt box; the material filling box is used to obtain the original video material added by the user, and the material filling prompt box is used to prompt the material condition corresponding to the video time node to which the material filling control belongs;

[0032] The setting unit includes:

[0033] An acquisition subunit, configured to acquire the original video material added by the user for the video time node;

[0034] A judging subunit, configured to judge whether the original video material satisfies the material condition corresponding to the video time node;

[0035] The execution subunit is configured to use the original video material as the video material of the video time node if the original video material meets the material condition.

[0036] A storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the video generation method as described above.

[0037] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to execute the above-mentioned video generation method by one or more processors.

[0038] Compared with the prior art, the present invention has the following advantages:

[0039] The present invention provides a video generation method and device, a storage medium, and an electronic device, the method comprising: displaying a first interface; the first interface comprising multiple template controls and a template selection prompt box; the template prompt box being used to prompt a user to select a video template; each template control comprising a first style prompt box and a second style prompt box for the video template corresponding to the template control; the first style prompt box being used to display a style description text of the video template, and the second style prompt box being used to display a style description video of the video template; displaying a second interface in response to a user's first triggering operation on a target template control; the target template control being any one of the template controls; the second interface comprising a timeline and a video saving control for the video template corresponding to the target template control; the timeline comprising multiple video time nodes and a material filling control for each of the video time nodes; setting a video material for each of the video time nodes in response to a user's filling operation on each of the material filling controls; and generating a video based on the video template and the video material for each of the video time nodes in response to a second triggering operation on the video saving control. The method provided by the embodiments of the present invention can improve the quality and speed of video production. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0041] Figure 1 A flow chart of a video generation method provided by the present invention;

[0042] Figure 2 An example diagram of a first interface provided by the present invention;

[0043] Figure 3 An example diagram of a second interface provided by the present invention;

[0044] Figure 4 A flowchart of a process of setting video material for each video time node provided by the present invention;

[0045] Figure 5 A flowchart of a process for generating a video provided by the present invention;

[0046] Figure 6 A schematic structural diagram of a video generating device provided by the present invention;

[0047] Figure 7 This is a structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION

[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0049] In this application, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.

[0050] The embodiment of the present invention provides a video generation method, which can be applied to an electronic device, which can be provided with a display screen or an external display device, and the electronic device can be a mobile phone or a computer, etc. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0051] S101: Display the first interface; the first interface includes multiple template controls and a template selection prompt box; the template prompt box is used to prompt the user to select a video template; each template control includes a first style prompt box and a second style prompt box of the video template corresponding to the template control; the first style prompt box is used to display the style description text of the video template, and the second style prompt box is used to display the style description video of the video template.

[0052] In an embodiment of the present invention, the electronic device may display the first interface in response to the video generation instruction.

[0053] See also Figure 2, which is an example diagram of the first interface provided by an embodiment of the present invention; the first interface includes multiple template controls and a template selection prompt box, each template control corresponds to a video template, the template control includes a first style prompt box and a second style prompt box, the first style prompt box is used to display the style description text of the video template, for example, displaying "multi-image switching-smooth", and the second style prompt box is used to display the style description video of the video template, and the style description video of each video template is different.

[0054] S102: In response to the user's first trigger operation on the target template control, a second interface is displayed; the target template control is any one of the template controls, and the second interface includes the timeline of the video template corresponding to the target template control and a video saving control; the timeline includes multiple video time nodes and a material filling control for each of the video time nodes.

[0055] In the embodiment of the present invention, the first triggering operation for the target template control may be a click operation on the first style prompt box or the second style prompt box, specifically a single-click operation or a double-click operation.

[0056] See also Figure 3 , is an example diagram of a second interface provided by an embodiment of the present invention. The second interface includes a timeline of a video template corresponding to a target template control and a video save control, and may also include a video preview window.

[0057] S103: In response to the user's filling operation on each of the material filling controls, setting the video material for each of the video time nodes.

[0058] In the embodiment of the present invention, the video material of each video time node may be text material and / or picture material.

[0059] The filling operation may be to add the original video material to the material filling control.

[0060] S104: In response to a second trigger operation of the user on the video saving control, a video is generated based on the video template and the video material of each video time node.

[0061] In the embodiment of the present invention, the second triggering operation of the user on the video saving control may be a click operation on the video saving control.

[0062] The video template is pre-generated and may include video configuration parameters, which may include image format parameters, time parameters, image size parameters, text parameters, video special effects parameters, and the like.

[0063] The method provided by the embodiment of the present invention can improve the quality and speed of video production.

[0064] In an embodiment of the present invention, based on the above implementation process, specifically, the material filling control includes a material filling box and a material filling prompt box; the material filling box is used to obtain the original video material added by the user, and the material filling prompt box is used to prompt the material conditions corresponding to the video time node to which the material filling control belongs;

[0065] The video material is set for each video time node, such as Figure 4 Shown, including:

[0066] S401: Acquire the original video material added by the user for the video time node.

[0067] In the embodiment of the present invention, the original video material added by the user is obtained through the material filling box.

[0068] S402: Determine whether the original video material meets the material condition corresponding to the video time node. If so, execute S403; if not, execute S404.

[0069] In the embodiment of the present invention, the material condition may be a picture material condition and / or a text material condition.

[0070] The image material condition may include one or more items such as image format, image size, and image size, and the text material condition may include that the number of input characters is less than or equal to a preset number threshold.

[0071] S403: Using the original video material as the video material of the video time node.

[0072] S404: Prompt the user that the original video material does not meet the material condition.

[0073] In the embodiment of the present invention, after prompting the user that the original material does not meet the material condition, the original video material added by the user for the video time node can be re-acquired.

[0074] In the embodiment of the present invention, based on the above implementation process, specifically, the second interface further includes a video preview window;

[0075] After setting the video material for each video time node, the method further includes:

[0076] In response to the user's third triggering operation on the video preview window, a preview video is generated based on the video template and the currently set video material, and the preview video is played in the video preview window.

[0077] In the embodiment of the present invention, based on the above implementation process, specifically, the video is generated based on the video template and the video material of each video time node, such as Figure 5 As shown, specifically including:

[0078] S501: Generate ffmpeg instructions based on the video template and the video materials at each of the video time nodes.

[0079] In an embodiment of the present invention, a pre-set script may be called to generate ffmpeg instructions based on a video template and video materials at a video time node.

[0080] S502: Call the ffmpeg instruction to execute the video generation task and obtain the video corresponding to the ffmpeg instruction.

[0081] In the embodiment of the present invention, the video generation task may be to render the video material of each video time node based on the video parameters in the video template.

[0082] In the embodiment of the present invention, based on the above implementation process, specifically, the following is further included:

[0083] The video is uploaded to a pre-set video on demand system, and a cover image of the video is generated.

[0084] and Figure 1 Corresponding to the method described above, the embodiment of the present invention further provides a video generating device for Figure 1 The specific implementation of the method in the embodiment of the present invention is that the video generation device provided by the embodiment of the present invention can be applied to electronic devices, and its structural diagram is as follows Figure 6 As shown, specifically including:

[0085] The first display unit 601 is used to display a first interface; the first interface includes multiple template controls and a template selection prompt box; the template prompt box is used to prompt the user to select a video template; each template control includes a first style prompt box and a second style prompt box of the video template corresponding to the template control; the first style prompt box is used to display the style description text of the video template, and the second style prompt box is used to display the style description video of the video template;

[0086] A second display unit 602 is configured to display a second interface in response to a first trigger operation of a target template control by a user; the target template control is any one of the template controls, and the second interface includes a timeline of a video template corresponding to the target template control and a video save control; the timeline includes multiple video time nodes and a material fill control for each of the video time nodes;

[0087] A setting unit 603 is configured to set a video material for each of the video time nodes in response to a user's filling operation on each of the material filling controls;

[0088] The generating unit 604 is configured to generate a video based on the video template and the video material at each of the video time nodes in response to a second triggering operation of the video saving control by the user.

[0089] In an embodiment provided by the present invention, based on the above-mentioned solution, specifically, the material filling control includes a material filling box and a material filling prompt box; the material filling box is used to obtain the original video material added by the user, and the material filling prompt box is used to prompt the material conditions corresponding to the video time node to which the material filling control belongs;

[0090] The setting unit 603 includes:

[0091] An acquisition subunit, configured to acquire the original video material added by the user for the video time node;

[0092] A judging subunit, configured to judge whether the original video material satisfies the material condition corresponding to the video time node;

[0093] The execution subunit is configured to use the original video material as the video material of the video time node if the original video material meets the material condition.

[0094] In an embodiment provided by the present invention, based on the above solution, specifically, the setting unit further includes:

[0095] The prompting subunit is used to prompt the user that the original video material does not meet the material condition if the original video material does not meet the material condition.

[0096] In an embodiment provided by the present invention, based on the above solution, specifically, the second interface further includes a video preview window;

[0097] The video generating device further includes:

[0098] The preview unit is used to generate a preview video based on the video template and the currently set video material in response to the user's third trigger operation on the video preview window, and play the preview video in the video preview window.

[0099] In an embodiment provided by the present invention, based on the above solution, specifically, generating a video based on the video template and the video material at each video time node includes:

[0100] A generating subunit, configured to generate ffmpeg instructions based on the video template and the video material at each of the video time nodes;

[0101] The calling subunit is used to call the ffmpeg instruction to execute the video generation task and obtain the video corresponding to the ffmpeg instruction.

[0102] In an embodiment provided by the present invention, based on the above solution, specifically, the video generating device further includes:

[0103] The uploading unit is used to upload the video to a pre-set video on demand system and generate a cover image for the video.

[0104] The specific principles and execution processes of each unit and module in the video generation device disclosed in the above embodiment of the present invention are the same as those of the video generation method disclosed in the above embodiment of the present invention. Please refer to the corresponding parts of the video generation method provided in the above embodiment of the present invention, and no further details will be given here.

[0105] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned video generation method.

[0106] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 7 As shown, it specifically includes a memory 701 and one or more instructions 702, wherein the one or more instructions 702 are stored in the memory 701 and are configured to be executed by one or more processors 703 to perform the following operations:

[0107] Display a first interface; the first interface includes multiple template controls and a template selection prompt box; the template prompt box is used to prompt the user to select a video template; each template control includes a first style prompt box and a second style prompt box of the video template corresponding to the template control; the first style prompt box is used to display the style description text of the video template, and the second style prompt box is used to display the style description video of the video template;

[0108] In response to a first trigger operation of a target template control by a user, a second interface is displayed; the target template control is any one of the template controls, and the second interface includes a timeline of a video template corresponding to the target template control and a video saving control; the timeline includes multiple video time nodes and a material filling control for each of the video time nodes;

[0109] In response to a user's filling operation on each of the material filling controls, setting a video material for each of the video time nodes;

[0110] In response to a second trigger operation of the user on the video saving control, a video is generated based on the video template and the video material of each video time node.

[0111] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similarities between the various embodiments can be referred to in conjunction with each other. For device embodiments, since they are generally similar to method embodiments, their description is relatively simple, and for relevant details, reference can be made to the description of the method embodiments.

[0112] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0113] For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0114] From the above description of the embodiments, it can be seen that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus the necessary general-purpose hardware platform. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention or certain parts of the embodiments.

[0115] The above is a detailed introduction to a video generation method provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the ideas of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A video generation method, characterized in that: Applied to electronic equipment, the method includes: Displaying a first interface; the first interface includes multiple template controls and a template selection prompt box; the template selection prompt box is used to prompt the user to select a video template; each template control includes a first style prompt box and a second style prompt box for the video template corresponding to the template control; the first style prompt box is used to display the style description text of the video template, and the second style prompt box is used to display the style description video of the video template; In response to a first trigger operation of a target template control by a user, a second interface is displayed; the target template control is any one of the template controls, and the second interface includes a timeline of a video template corresponding to the target template control and a video saving control; the timeline includes multiple video time nodes and a material filling control for each of the video time nodes; In response to a user's filling operation on each of the material filling controls, setting a video material for each of the video time nodes, wherein the video material is a text material and / or a picture material; In response to a second trigger operation of the user on the video saving control, generating a video based on the video template and the video material of each video time node; The material filling control includes a material filling box and a material filling prompt box; the material filling box is used to obtain the original video material added by the user, and the material filling prompt box is used to prompt the material conditions corresponding to the video time node to which the material filling control belongs, and the material conditions are picture material conditions and / or text material conditions; The step of setting the video material for each video time node includes: Obtaining the original video material added by the user for the video time node; Determining whether the original video material meets the material condition corresponding to the video time node; If the original video material meets the material condition, the original video material is used as the video material of the video time node.

2. The method according to claim 1, characterized in that Also includes: If the original video material does not meet the material condition, the user is prompted that the original video material does not meet the material condition.

3. The method according to claim 1, characterized in that The second interface also includes a video preview window; After setting the video material for each video time node, the method further includes: In response to the user's third triggering operation on the video preview window, a preview video is generated based on the video template and the currently set video material, and the preview video is played in the video preview window.

4. The method according to claim 1, wherein Generating a video based on the video template and the video material of each video time node includes: Generate ffmpeg instructions based on the video template and the video materials of each video time node; The ffmpeg instruction is called to execute the video generation task and obtain the video corresponding to the ffmpeg instruction.

5. The method according to any one of claims 1 to 4, characterized in that Also includes: The video is uploaded to a pre-set video on demand system, and a cover image of the video is generated.

6. A video generating device, characterized in that: Applied to electronic equipment, the device comprises: A first display unit is configured to display a first interface; the first interface includes a plurality of template controls and a template selection prompt box; the template selection prompt box is configured to prompt a user to select a video template; each template control includes a first style prompt box and a second style prompt box of the video template corresponding to the template control; the first style prompt box is configured to display a style description text of the video template, and the second style prompt box is configured to display a style description video of the video template; A second display unit is configured to display a second interface in response to a first trigger operation of a target template control by a user; the target template control is any one of the template controls, and the second interface includes a timeline of a video template corresponding to the target template control and a video saving control; the timeline includes a plurality of video time nodes and a material filling control for each of the video time nodes; A setting unit, configured to set a video material for each of the video time nodes in response to a user's filling operation on each of the material filling controls, wherein the video material is a text material and / or a picture material; a generating unit, configured to generate a video based on the video template and the video material of each video time node in response to a second triggering operation of the video saving control by the user; The material filling control includes a material filling box and a material filling prompt box; the material filling box is used to obtain the original video material added by the user, and the material filling prompt box is used to prompt the material conditions corresponding to the video time node to which the material filling control belongs, and the material conditions are picture material conditions and / or text material conditions; The setting unit includes: An acquisition subunit, configured to acquire the original video material added by the user for the video time node; A judging subunit, configured to judge whether the original video material satisfies the material condition corresponding to the video time node; The execution subunit is configured to use the original video material as the video material of the video time node if the original video material meets the material condition.

7. A storage medium, characterized in that: The storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the video generation method according to any one of claims 1 to 5.

8. An electronic device, characterized in that: The system comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to execute the video generation method according to any one of claims 1 to 5 by one or more processors.

Citation Information

Patent Citations

  • Video editing processing method, device, electronic equipment and storage medium

    CN111930994A