Video generation method and device, computer equipment and computer readable storage medium
By extracting feature information of the editing material and selecting matching video clip effects to generate target videos, the problem of high difficulty and low enthusiasm for users when publishing videos on social platforms is solved, and the efficiency and quality of video generation are improved.
Patent Information
- Application Number
- CN202410596203.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-12-20
AI Technical Summary
When users post videos on social platforms, because they need to select appropriate video editing effects based on the characteristics of the editing materials, it is difficult to publish content, low enthusiasm, and low video generation efficiency and quality.
By obtaining multiple editing materials, extracting material feature information, selecting matching video editing effects, and generating target videos based on editing materials and effects, it reduces the difficulty of users posting videos, and improves enthusiasm, generation efficiency and quality.
It has achieved the reduction of the difficulty of users posting videos, improves users' enthusiasm for posting videos, and improves the efficiency and quality of video generation.
Smart Images

Figure CN119172604A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a video generation method, apparatus, computer device and computer-readable storage medium. Background Art
[0002] When using social platforms, users are more willing to browse content posted by others, and are less likely to post content themselves. The reason why users post less content is that they have no inspiration. Although mobile photography technology and Internet technology have developed rapidly, users have a large amount of video editing materials. Users need to select appropriate video editing effects according to the characteristics of the editing materials in order to edit videos of better quality. This requires certain editing skills of users, which makes it more difficult for users to post content and their enthusiasm for posting content is low. Summary of the invention
[0003] The embodiments of the present application provide a video generation method, apparatus, computer device, and computer-readable storage medium, which can reduce the difficulty of users publishing content and increase the enthusiasm of users to publish content.
[0004] A video generation method provided in an embodiment of the present application includes:
[0005] Acquire a plurality of clipping materials for generating a video, wherein the plurality of clipping material sets include at least one of an image and a video;
[0006] Extracting material features from the plurality of clipping materials to obtain video content feature information of the to-be-generated video corresponding to the plurality of clipping materials;
[0007] Selecting a video editing effect that matches the video to be generated according to the video content feature information of the video to be generated;
[0008] Based on the multiple clipping materials and the video clipping effect, a target video with the video clipping effect added thereto is generated.
[0009] Accordingly, an embodiment of the present application further provides a video generating device, including:
[0010] A receiving unit, configured to obtain a plurality of clipping materials for generating a video, wherein the plurality of clipping material sets include at least one of an image and a video;
[0011] An extraction unit, configured to extract material features from the plurality of clipping materials to obtain video content feature information of a video to be generated corresponding to the plurality of clipping materials;
[0012] A selection unit, configured to select a video editing effect matching the video to be generated according to video content feature information of the video to be generated;
[0013] A generating unit is used to generate a target video with the video editing effect added thereto based on the multiple editing materials and the video editing effect.
[0014] In one embodiment, the content feature information includes content motion information, and the extraction unit includes:
[0015] A feature extraction subunit is used to extract motion features from each clip material to obtain content motion information of each clip material;
[0016] The strength determination subunit is used to determine the video strength of the video to be generated according to the content motion information of each clip material, and the video strength is used to describe the degree of content change of the video to be generated.
[0017] In one embodiment, the video editing effect includes an auditory effect, and the selection unit includes:
[0018] A speed determination subunit, configured to determine an audio speed matching the video intensity according to a preset correspondence between the video intensity and the audio speed;
[0019] The audio acquisition subunit is used to acquire target audio that matches the content change degree of the video to be generated based on the audio speed that matches the video intensity, and the target audio is enhanced to add auditory effects.
[0020] In one embodiment, the generating unit comprises:
[0021] A rebeat point determination subunit, used to obtain a rebeat point of the target audio, wherein the rebeat point includes a time point at which a rebeat occurs in the target audio;
[0022] An adding subunit, used for determining a time slot according to a retake point of the target audio, and adding at least one clip material in each time slot;
[0023] The video generation subunit is used to generate the target video according to the target audio and the editing materials placed based on the key shots of the target audio.
[0024] In one embodiment, the adding subunit includes:
[0025] A highlight point acquisition module, used to acquire the highlight point of the target audio, wherein the highlight point is the time point at which the highlight audio segment in the target audio appears, and the highlight point is no later than the first retake point of the target audio;
[0026] A first slot determination module is configured to determine, if the time interval between the first retake point and the highlight point is greater than a preset threshold, a first time slot of the target audio between the highlight point and the first retake point, and determine a time slot for each two adjacent retake points for the retake points after the first retake point;
[0027] The second slot determination module is used to determine the first time slot of the target audio based on the highlight point and the second rebeat point if the time interval between the first rebeat point and the highlight point is not greater than a preset threshold, and for the rebeat point after the second rebeat point, determine a time slot according to every two adjacent rebeat points.
[0028] In one embodiment, the speed determination subunit includes:
[0029] A quantity acquisition module is used to obtain the quantity of materials contained in the video to be generated;
[0030] The audio speed determination module is used to determine the audio speed that matches the material quantity and video strength of the video to be generated according to the corresponding relationship between the preset material quantity, video strength and audio speed.
[0031] In one embodiment, the video feature information includes a video theme, and the audio acquisition unit includes:
[0032] A music type determination subunit, used to determine a target music type that matches the video to be generated according to a preset correspondence between a video theme and a music type;
[0033] The audio selection subunit is used to select the target audio from the audio under the target music type based on the audio speed matching the video intensity.
[0034] In one embodiment, the video feature information includes a video theme, the video editing effect includes a visual effect, and the generating unit is further configured to:
[0035] According to the correspondence between the preset video theme and the filter, a target filter matching the video to be generated is determined, and the target filter is used to enhance the visual effect.
[0036] In one embodiment, the video feature information includes a video theme, the video editing effect includes a visual effect, and the generating unit is further configured to:
[0037] According to the correspondence between the preset video theme and the special effect, a target video special effect matching the video to be generated is determined, and the target special effect is used to enhance the visual effect.
[0038] Correspondingly, an embodiment of the present application also provides a computer device, including a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute any video generation method provided in the embodiment of the present application.
[0039] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute any one of the video generation methods provided in the embodiments of the present application.
[0040] The embodiment of the present application obtains multiple editing materials for generating a video, wherein the multiple editing material sets include at least one of images and videos; performs material feature extraction on the multiple editing materials to obtain video content feature information of the video to be generated corresponding to the multiple editing materials; selects a video editing effect that matches the video to be generated according to the video content feature information of the video to be generated; and generates a target video with the video editing effect added thereto based on the multiple editing materials and the video editing effects.
[0041] The embodiment of the present application determines video content feature information of a video to be generated based on multiple editing materials, selects video editing effects that match the video content based on the video content feature information, and intelligently edits the target video with the video editing effects added, thereby reducing the content of videos posted by users and thereby increasing the enthusiasm of users to post videos. In addition, it can also improve the video generation efficiency and video generation quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0043] Figure 1 is a flow chart of a video generation method provided in an embodiment of the present application;
[0044] Figure 2 is a schematic diagram of a video generating device provided in an embodiment of the present application;
[0045] Figure 3 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0047] The embodiment of the present application provides a video generation method, device, computer equipment and computer readable storage medium. The video generation device can be integrated in a computer equipment, which can be a server or a terminal.
[0048] The terminal may include a mobile phone, a wearable smart device, a tablet computer, a laptop computer, a personal computer (PC), and a vehicle-mounted computer.
[0049] Among them, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, as well as big data and artificial intelligence platforms.
[0050] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0051] This embodiment will be described from the perspective of a video generating device. The video generating device may be integrated into a computer device, which may be a server or a terminal.
[0052] The embodiment of the present application provides a video generation method, such as Figure 1 As shown, the specific process of the video generation method can be as follows:
[0053] 101. Acquire a plurality of clipping materials for generating a video, wherein the plurality of clipping material sets include at least one of an image and a video.
[0054] The editing materials may include images, videos and other materials used to synthesize videos. The editing materials may be obtained based on the user's selection of materials displayed on the client, or may be obtained by screening materials in a gallery on the user's terminal.
[0055] For example, the client may display a plurality of selectable materials to the user, and the user may select a clipping material for generating a video from the materials, and trigger the terminal to send the clipping material to the server.
[0056] Optionally, the user can trigger a video generation request on the client, and the video generation request is used to request the server or terminal to intelligently edit the material and generate a video. The server responds to the video generation request and obtains the material in the gallery on the user terminal, and aggregates the material based on at least one aggregation dimension according to the shooting information of the material in the gallery under the aggregation dimension to obtain a material set, which includes multiple editing materials and corresponds to an aggregation theme. The process of aggregating to obtain the material set is described below and will not be repeated here.
[0057] 102. Perform material feature extraction on the multiple editing materials to obtain video content feature information of the to-be-generated video corresponding to the multiple editing materials.
[0058] Among them, material feature extraction includes extracting material features of multiple editing materials, such as feature information of the shot content, feature information of content changes, feature information of the shooting time, location feature information of the shooting location, and the number of materials included.
[0059] In one embodiment, the multiple clipping materials may be materials obtained from user images, and material features may be extracted from the multiple clipping materials. Scene recognition may be performed on each clipping material to determine the shooting scene of the clipping material. The materials may be marked by a marking model (DeepDanbooru). The materials may also be classified and the shooting scene of the materials may be determined according to the classification results. For example, image features may be extracted from each material to obtain image feature information of each material, and the materials may be classified based on the image feature information through a classification network to obtain the classification results of the materials. Multi-label classification may be used, and each material may correspond to multiple scene labels, such as sunrise, group photo, sea, etc.
[0060] According to the shooting information under different aggregation dimensions corresponding to each clip material, such as shooting time, shooting location and shooting scene, multiple clip materials are aggregated to obtain a material set. The video to be generated based on the materials in the material set is the video to be generated, and the aggregation theme of the material set is at least a part of the video content feature information of the video to be generated, for example, the video content feature information may include time theme, motion theme, mountain theme, etc.
[0061] In one embodiment, the plurality of clipping materials may be a material set obtained by aggregating materials in a user gallery, the material set corresponding to an aggregation theme and a material quantity, and performing material feature extraction on the plurality of clipping materials may include extracting an aggregation theme and a material quantity of the material set, and obtaining video strength of a video to be generated, that is, the video feature information includes content motion information, and the step of "performing content feature extraction on each clipping material to obtain material content feature information of each clipping material" may include:
[0062] Extract motion features from each clip material to obtain content motion information of each clip material;
[0063] The video strength of the video to be generated is determined according to the content motion information of each clip material, where the video strength is used to describe the degree of change of the content of the video to be generated.
[0064] For example, for video materials in editing materials, the optical flow method can be used to analyze the movement of pixels in two adjacent frames of the video material, and the motion vector of the object in the video material can be calculated, thereby obtaining the motion intensity of the video material. For image materials, a motion intensity corresponding to an image material can be preset, and the average motion intensity can be calculated based on the number of materials of multiple editing materials and the motion intensity of each editing material. The average motion intensity is the video intensity of the video to be synthesized. The greater the video intensity, the faster the content of the video generated based on multiple editing materials changes, and the smaller the video intensity, the slower the content of the video generated based on multiple editing materials changes. Therefore, the video intensity can indicate the drastic degree of change in the video content.
[0065] 103. Select a video editing effect that matches the video to be generated according to video content feature information of the video to be generated.
[0066] The video editing effect may include at least one of a visual effect and an auditory effect, and may also include a dynamic effect. For example, the vibration of a mobile phone may be controlled to convey a dynamic effect to the user.
[0067] For example, audio that matches the rhythm of the music can be selected according to the video intensity, so that in the generated video, the rhythm of the music and the rhythm of the video are matched, and there will be no more dynamic videos with soothing music, or slow-paced soothing videos with fast-paced music. That is, in one embodiment, the video editing effect includes an auditory effect, and the step of "selecting a video editing effect that matches the video to be generated according to the video content feature information" may include:
[0068] Determining an audio speed matching the video intensity according to a preset correspondence between the video intensity and the audio speed;
[0069] Based on the audio speed that matches the video intensity, a target audio that matches the degree of change in the content of the video to be generated is obtained, and the target audio is enhanced to add an auditory effect.
[0070] The audio speed may be related to the number of beats per minute (BPM) of the audio. The larger the BPM, the faster the audio tempo, and the smaller the BPM, the slower the audio tempo.
[0071] For example, a correspondence between video intensity and audio speed can be preset. In the correspondence, the greater the video intensity, the faster the corresponding audio speed. Multiple video intensity intervals and multiple audio speed intervals can be set, and the video intensity intervals and the audio speed intervals correspond one to one. Optionally, the video intensity can have three levels: strong, medium, and weak, and the audio speed can have three levels: fast, medium, and slow, and the video intensity levels and the audio speed levels correspond one to one.
[0072] The audio speed matching the video intensity can be determined according to the corresponding relationship, and the target audio is obtained according to the audio speed.
[0073] Combine multiple clips to generate a video, and add target audio to the video to obtain a target video with music.
[0074] Optionally, the playing time of each clip material in the generated target video may also be determined according to the beat of the target audio. That is, in one embodiment, the step of "generating the target video with the video clip effect added thereto based on the multiple clip materials and the video clip effect" includes:
[0075] Obtaining a rebeat point of the target audio, wherein the rebeat point includes a time point at which a rebeat occurs in the target audio;
[0076] Determine a time slot according to the retake point of the target audio, and add at least one clip material in each time slot;
[0077] The target video is generated according to the target audio and the editing materials placed based on the focus shots of the target audio.
[0078] The beats of music can be divided into strong beats and weak beats. The strong beats can also be called the beats, and the beat points can be the time points at which the beats of the audio occur.
[0079] For example, every two adjacent strong beats in the target audio can form a slot, and one slot can correspond to a clip material. For example, the first retake point is 00:24 in the audio, and the second retake point is 00:35 in the audio. 00:24-00:29 is a time slot, and the length of the time slot is 5 seconds. Then the display time of the clip material inserted into the time slot is 5s. Place a clip material in each slot, and the generated target video switches the clip material when playing each retake. The video has a sense of tapping and a good editing effect.
[0080] Since the audio also has highlight points, the highlight points can be considered as the time point where the climax of the audio begins. The highlight points are usually before or at the first retake point. The editing material can be displayed at the highlight point, and the editing material displayed can be switched at each key shot, so that the editing material in the video and the audio can be "in step", and the video effect is better. If the time interval between the highlight point and the first retake point is long, the time slot formed by the highlight point and the first retake point can be used as the first slot. If the time interval between the highlight point and the first retake point is short, the time slot formed by the highlight point and the second retake point can be used as the first slot. That is, in one embodiment, the step of "determining the time slot according to the retake point of the target audio" can include:
[0081] Acquire a highlight point of the target audio, where the highlight point is a time point at which a highlight audio segment in the target audio appears, and the highlight point is no later than a retake point of the target audio;
[0082] If the time interval between the first rebeat point and the highlight point is greater than a preset threshold, then based on the highlight point and the first rebeat point, determine a first time slot of the target audio, and for the rebeat points after the first rebeat point, determine a time slot according to every two adjacent rebeat points;
[0083] If the time interval between the first rebeat point and the highlight point is not greater than a preset threshold, then based on the highlight point and the second rebeat point, determine the first time slot of the target audio, and for the rebeat point after the second rebeat point, determine a time slot based on every two adjacent rebeat points.
[0084] Among them, the highlight points can be obtained by manually marking the audio in advance, or by pre-recognizing and processing the audio. Specifically, the highlight points in the audio can be automatically identified through a neural network model.
[0085] For example, the highlight point of the target audio can be obtained. If the time interval between the first retake point and the highlight point of the target audio is greater than a preset threshold, the time slot formed by the highlight point and the first retake point is the first time slot of the video to be generated.
[0086] The time interval between the second key beat and the third key beat is the second time slot, the time interval between the third key beat and the fourth key beat is the third time slot, and so on.
[0087] If the time interval between the highlight point and the first retake point of the target audio is not greater than a preset threshold, the time slot formed by the highlight point and the second retake point is the first time slot of the video to be generated.
[0088] The time interval between the third key beat and the fourth key beat is the second time slot, the time interval between the fourth key beat and the fifth key beat is the third time slot, and so on.
[0089] Exemplarily, the preset threshold is 1s. If the time interval between the highlight point and the first retake point is less than 1s, the time slot formed by the highlight point and the second retake point is the first time slot, and the time slot formed by the second retake point and the third retake point is the second time slot, and so on. Multiple time slots can be obtained, and a clip material is placed in each time slot, and a target video is generated. The display effect of the target video is that when the video plays to the highlight point of the target audio, the first clip material comes in, and when it plays to the second retake point, it switches to display the second clip material, and when it plays to the third retake point, it switches to display the third clip material, and so on.
[0090] The selected audio speed may be related not only to the video strength, but also to the audio with the same amount of material and the same duration. For audio with a fast rhythm, there are more retake points. For videos with the same video strength, the video length of videos with fewer materials is very short. Therefore, the audio speed may be determined in combination with the video strength and the amount of material. That is, in one embodiment, the step of "determining the audio speed matching the video strength according to the correspondence between the preset video strength and the audio speed" may include:
[0091] Obtaining the number of materials contained in the video to be generated;
[0092] According to the corresponding relationship between the preset material quantity, video strength and audio speed, an audio speed matching the material quantity and video strength of the video to be generated is determined.
[0093] Among them, the corresponding relationship between the preset material quantity, video intensity and audio speed may include the audio speed corresponding to each combination of material quantity and video intensity. Exemplarily, the corresponding relationship between the preset material quantity, video intensity and audio speed is shown in the following table.
[0094]
[0095] For example, the number of materials contained in the video to be generated may be obtained, and the corresponding audio speed may be determined according to the number of materials and the video strength of the video to be generated.
[0096] In addition to selecting the audio speed, the music type can also be selected according to the video content characteristics. For example, the music type can be determined according to the video theme of the video to be generated. That is, in one embodiment, the video feature information includes the video theme. Based on the audio speed matching the video intensity, the step of "obtaining the target audio matching the content change degree of the video to be generated" can include:
[0097] Determining a target music type that matches the video to be generated according to a preset correspondence between the video theme and the music type;
[0098] The target audio is selected from audios under the target music type based on an audio speed that matches the video intensity.
[0099] Among them, the video theme can be an aggregate theme of multiple clip materials corresponding to the video to be generated. For example, a certain shooting scene can be used as the aggregate theme to obtain multiple clip materials. The shooting scene of the multiple clip materials is the same. The shooting scene is the video theme of the video to be generated. Time can also be used as the aggregate theme to obtain multiple clip materials of a certain time or a certain period of time.
[0100] The correspondence between the video theme and the music type can be preset. For example, the birthday theme is relatively relaxed and happy, and the corresponding music types are R&B, Lo-Fi, and houses. The time theme is usually a review and summary of the past, and the corresponding music type can be relatively soothing and healing, for example, it can correspond to light music, future-bass, etc. After determining the target music type according to the video theme of the video to be generated, the target audio that can be based on the audio speed matching the video intensity is obtained from the target music type.
[0101] In addition to adding music to the video, a filter may also be added to the video to enhance the visual effect of the video. That is, in one embodiment, the video feature information includes the video theme, the video editing effect includes a visual effect, and the step of "selecting a video editing effect matching the video to be generated according to the video content feature information of the video to be generated" may include:
[0102] According to the correspondence between the preset video theme and the filter, a target filter matching the video theme of the video to be generated is determined, and the target filter is used to enhance the visual effect.
[0103] Among them, filters can be used to achieve various special visual effects of images or videos. Filters can adjust properties such as color, contrast, brightness, etc. by changing pixel values, or add special visual effects to produce different visual effects. Filters can include: black and white filters, hue filters, and comic effect filters. Black and white filters are used to convert images into black and white tones and remove color information; hue filters are used to change the overall hue of an image, such as warm or cold tones; comic effect filters are used to give images comic-like visual effects, emphasizing edges and colors. There are many types of hue filters, such as filters that adjust the image to a reddish tone and filters that adjust the image to a greenish tone.
[0104] Some filters can be preset, and the relationship between filters and video themes can be set so as to determine the filters to be used for the video based on the video theme.
[0105] Exemplarily, a "rosy" filter, a "native" filter, a "wishful" filter, a "leisure" filter, and a "clear" filter can be pre-set, and the "portrait" theme can be set to correspond to the "rosy" filter or the "native" filter, and the "mountains", "sea", "sunset" and "sky" themes can be set to correspond to the "leisure" filter or the "clear" filter.
[0106] According to the correspondence between the preset video theme and the filter, the target filter to be used is determined, and the target filter is added to the video synthesized based on multiple clip materials to obtain the target video.
[0107] Special effects may also be added to the video. That is, in one embodiment, the video feature information includes a video theme, the video editing effect includes a visual effect, and the video editing effect matching the video to be generated is selected according to the video content feature information of the video to be generated, including:
[0108] According to the correspondence between the preset video theme and the special effect, a target video special effect matching the video theme of the video to be generated is determined, and the target special effect is used to enhance the visual effect.
[0109] Among them, special effects can be used to realize various dynamic visual effects in videos, such as halo, falling fireworks, shining stars and other effects.
[0110] You can preset some special effects and set the relationship between the special effects and the video theme, so as to determine the special effects to be used in the video based on the video theme.
[0111] Exemplarily, the “bubble zoom” special effect, “backlight focus” special effect, “color change” special effect, “halo” special effect, “fireworks gun” special effect and “starry sky” special effect can be pre-set. The “this day last year” theme corresponds to the “bubble zoom” special effect, “backlight focus” special effect or “color change” special effect, and the “birthday” theme corresponds to the “halo” special effect, “fireworks gun” special effect and “starry sky” special effect.
[0112] According to the correspondence between the preset video theme and the special effects, the target special effects to be used are determined, and the target special effects are added to the video synthesized based on multiple clip materials to obtain the target video.
[0113] Optionally, you can also add transition effects to the video. You can determine whether to use transitions based on the number of materials. If the number of materials is small, you can add one transition effect. If the number of materials is large, you can add multiple transition effects, or add a transition effect to each material, or add a transition effect for every two materials.
[0114] Exemplarily, when the number of materials is 2-5, a transition effect is randomly set, such as overlay or blur, and the video effect is that each material is transitioned by overlay or blur. When the number of materials is 6-15, a transition effect can be set for every two editing materials, and the video effect is that every two videos are transitioned by using a transition effect.
[0115] 104. Generate a target video with the video editing effect added thereto based on the multiple editing materials and the video editing effect.
[0116] For example, after determining the audio, filters, special effects and other video editing effects used, a target video can be generated based on the video editing effects. When the target video is played, it is accompanied by the target audio, and the video has video effects such as filters and special effects added.
[0117] In one embodiment, corresponding text may also be generated for the generated published video so that the user can publish the video with one click. That is, after step 105 of "generating a target video with the video editing effect added based on the multiple editing materials and the video editing effect", the video generation method provided in the embodiment of the present application may further include:
[0118] Determine a copywriting generation strategy based on the aggregation dimensions and aggregation topics of the published videos;
[0119] The publishing copy of the published video is generated according to the copy generation strategy, and the aggregation dimension and aggregation theme of the published video.
[0120] For example, at least two copy generation strategies may be provided. The first copy generation strategy may be to select a target publishing copy from a copy set corresponding to an aggregated topic according to an aggregated topic.
[0121] For example, the copywriting collections corresponding to the monthly and weekly report themes under the time dimension include "The joy of inventory, send it today!", "The memories of inventory, send it today!", and "Share the fragments of life in inventory", etc. The copywriting collection under the theme of that day can include "That day", "That day under the lens", and "Where is that day in your photo album?", etc. The copywriting collection corresponding to the mountain and river theme under the scene dimension can include "Become an outdoor life lover", "Close contact with nature", and "Moments of being healed by nature", etc.
[0122] The second copywriting generation strategy may be to generate a publishing copywriting based on a copywriting template and an aggregated theme. The copywriting template may include at least two components, a first component and a second component. The first component may be a verb part, and the second component is related to an event. That is, in one embodiment, the copywriting generation strategy indicates to generate a publishing text based on a copywriting template. The copywriting template includes at least a first component and a second component. The first component is a verb part, and the second component is related to an event recorded by a video. The generation of the publishing copywriting of the published video based on the copywriting generation strategy and the aggregated dimension and aggregated theme of the published video includes:
[0123] Selecting a target verb text from a preset verb library as the first part of the copy corresponding to the first component;
[0124] Selecting a second part of the copy corresponding to the second component from a text library corresponding to the aggregated topic;
[0125] Generate the publishing copy of the published video based on the first part of the copy and the second part of the copy.
[0126] For example, the copy template may include a first component and a second component, the first component being a verb part, and the second component being related to an event recorded in the video, such as at least one of time, place, and event, and the target verb text is selected from a preset verb library as the partial copy corresponding to the first component, that is, the first part of the copy; the second component may include an event part, and different aggregated topics may correspond to an event text library. From the event text library corresponding to the aggregated topic, the target text is selected as the second part of the copy corresponding to the second component, and the first part of the copy and the second part of the copy are combined to obtain the release copy for the released video.
[0127] Exemplarily, the preset verb library may include "show off", "show off", "record", "recall", "reminisce", "share", "review", etc. If the aggregation theme is the location dimension, the corresponding event text library may include "travel time", "daily travel", "travel fragments" and "travel reality", etc.
[0128] By randomly selecting “show off” from the preset verb library as the first part of the copy, and selecting “travel fragments” from the event text library corresponding to the aggregated topic as the second part of the copy, you can get the publishing copy “show off travel fragments”.
[0129] In addition to the event part, the second component may also include an event element part, such as a time part or a location part, etc. That is, in one implementation, the step of "selecting and determining the second part of the copy corresponding to the second component from the text library corresponding to the aggregated topic" may include:
[0130] If the aggregation dimension is a time dimension or a scene dimension, a target time text is selected from a time text library corresponding to the aggregation theme as a partial copy corresponding to the event element part;
[0131] According to the event text library corresponding to the aggregated topic, a first target event text is selected as a partial copy corresponding to the event part;
[0132] The second copy part is generated based on the partial copy corresponding to the event element part and the partial copy corresponding to the event part.
[0133] For example, the event element part in the copywriting template can correspond to time or place, so the copywriting template can be verb+place+event, or verb+time+event. If the aggregation dimension is the time dimension or the scene dimension, the event element part is the time element, and the target time text is selected from the time text library corresponding to the aggregation theme as the partial copywriting corresponding to the event element part, and the first target event text is selected from the event text library corresponding to the aggregation theme as the partial copywriting corresponding to the event part, and the partial copywriting corresponding to the event element part and the partial copywriting corresponding to the event part are merged to obtain the second copywriting part.
[0134] Exemplarily, the aggregated theme is the group photo theme under the scene dimension. The corresponding time text library may include "recent", "most recent", etc., from which "recent" is selected, that is, the target time text. The corresponding event text library may include "group photo moments", "friends' daily life", "happy moments", "casual photos", etc., from which "friends' daily life" is selected, that is, the first target event text. After merging, we can get "recent friends' daily life".
[0135] If the aggregation dimension is the location dimension, the event element part is the location, and the aggregation theme can be used as part of the copy corresponding to the event element part. That is, in one embodiment, the video generation method provided in the embodiment of the present application can also include:
[0136] If the aggregation dimension is the location dimension, the aggregation theme is used as part of the copy corresponding to the event element part;
[0137] Selecting a second target event text as a partial copy corresponding to the event part from the event text library corresponding to the location dimension;
[0138] The second copy part is generated based on the partial copy corresponding to the event element part and the partial copy corresponding to the event part.
[0139] For example, if the aggregation dimension is the location dimension, the event element part is the location, and the aggregation theme is the shooting location, the aggregation theme can be used as the partial copy corresponding to the event element part, and the second target event text can be selected from the event text library corresponding to the aggregation theme as the partial copy corresponding to the event part, and the partial copy corresponding to the event element part and the partial copy corresponding to the event part are merged to obtain the second copy part.
[0140] Exemplarily, the aggregation theme is Beijing, and the corresponding event text library may include "travel time", "travel daily life", "travel fragments" and "travel reality", etc., from which "travel daily life" is selected, that is, the second target event text, and merged to obtain "travel fragments in Beijing".
[0141] The copywriting generation strategy used can be determined according to the aggregation dimension and the aggregation theme. For example, the aggregation theme under the location dimension is the location where the event occurred, so the video collection under the location dimension can use the second copywriting generation strategy to generate the release copy. Under the time dimension, if the aggregation theme is a certain period of time, such as January, February, and the past week, the second copywriting generation strategy can be used, and the corresponding time texts can include January, February, spring, spring, winter, winter, etc. If the aggregation theme is this day last year or that day, the first copywriting generation strategy is used. If it is a scene dimension, the first copywriting generation strategy can be used because the scene dimension can also use the second copywriting generation strategy.
[0142] After generating the release video and release copy, the generated release video and release copy can be displayed to the user. The user can edit the release copy and release video, or directly publish them with one click.
[0143] It is understandable that multiple release videos can be generated, each release video has a corresponding release copy, and the user can switch the release video, and the release copy in the text editing box will switch accordingly.
[0144] Exemplarily, multiple video collections can be aggregated for each aggregation dimension. For example, four material collections can be aggregated under the scene dimension, three material collections can be aggregated under the time dimension, and three material collections can be aggregated under the location dimension, and the aggregation themes of the material collections do not overlap. A release video is generated for each material collection to obtain 10 release videos, and a corresponding release copy can be generated for each release video. The 10 release videos and the corresponding release copy are displayed to the user, so that the user can select one of the release videos to publish, thereby improving the efficiency of video publishing for the user.
[0145] In one embodiment, the video editing effect of the video to be generated may also be determined according to the account feature information of the publishing account, so as to generate a target video that conforms to the style of the publishing account. That is, in one embodiment, the video generation method provided in the embodiment of the present application may further include:
[0146] Determining a first target video editing effect matching the publishing account based on account feature information of the publishing account or video content of a published video under the publishing account;
[0147] Based on the multiple clipping materials and the first target video clipping effect, a target video with the first target video clipping effect added thereto is generated.
[0148] Among them, the account characteristic information may include information such as the preferences or fields of the publishing account. The account characteristic information may indicate that the publisher of the video is a travel blogger, a life blogger, or a beauty blogger, etc. The content posted by users is usually related to their own positioning or preferences, so the style information of the publishing account can be determined based on the account characteristic information of the publishing account. The account characteristic information can be determined based on the account information of the publishing account, such as gender, introduction, content of interest, and other information.
[0149] For example, the style information of the publishing account can be determined based on the account characteristic information of the publishing account, and the first video editing effect matching the style of the publishing account can be determined based on the style information and a mapping relationship between preset styles and video editing effects.
[0150] The video style may also be determined based on the video content of the videos published under the publishing account. For example, video features of the published videos may be extracted, and the video style of the video may be determined based on the extracted video feature information.
[0151] Optionally, the target video editing effect may be determined according to the video editing effect applied to the published video. That is, in one embodiment, the video generation method provided in the embodiment of the present application may further include:
[0152] Filtering reference videos from the published target videos according to user interaction data of the videos published under the publishing account;
[0153] A target video with the second target video editing effect added thereto is generated according to the second video editing effect applied to the reference video and the plurality of editing materials.
[0154] Among them, user interaction data can be record data of users' operations such as likes, browsing and collection of the video after the video is released. Generally, the more likes, browsing and collections, the more popular the video is and the higher the quality of the video.
[0155] High-quality videos among the published videos under the publishing account can be determined according to the user interaction data, and the video editing effect applied to the high-quality videos can be used as the second video editing effect.
[0156] In one embodiment, the plurality of clipping materials may be materials in a material set obtained by aggregation, and step 101 may specifically include:
[0157] 1101. Acquire multiple materials in a user gallery, where the materials include at least one of images and videos;
[0158] 1102. Perform highlight recognition processing on a target material among the multiple materials to extract a highlight portion of the target material among the multiple materials, thereby obtaining a plurality of processed materials;
[0159] 1103. Aggregate the processed multiple materials according to shooting information of each material in at least one aggregation dimension to obtain a material set in each aggregation dimension;
[0160] The detailed description of each step is as follows:
[0161] 1101. Receive a video publishing request, and obtain multiple materials in a user gallery, where the material includes at least one of an image and a video.
[0162] The video publishing request may include a request to generate a video for publishing, and the material may include materials of types such as pictures, videos, GIF animations, and dynamic pictures (Live). The gallery may be a gallery on a terminal used by the user, and the gallery may store pictures and videos taken by the user, as well as pictures and videos saved by the user from a website or other location.
[0163] For example, a user can trigger a video publishing request on the client, and the server receives the video publishing request sent by the client, obtains multiple materials in the user's gallery, obtains materials shot within a preset time period, or obtains a preset number of materials.
[0164] Exemplarily, the materials in the gallery within the past year can be counted. If the number of materials in the past year is greater than or equal to 3,000, multiple materials in the gallery within the past year are obtained, and the number of materials obtained does not exceed 10,000; if the number of materials in the past year is less than 3,000, the more recent 3,000 materials within the past three years are taken.
[0165] Optionally, after obtaining multiple materials, the materials can be deduplicated to filter out materials with duplicate content.
[0166] 1102. Perform highlight recognition processing on a target material among the multiple materials to extract a highlight portion of the target material among the multiple materials to obtain a plurality of processed materials.
[0167] Among them, highlight recognition processing can be used to find highlight parts from the target material, such as highlight clips in a video, or highlight areas in an image.
[0168] The target material may be a video material among multiple materials, or may be a picture material and a video material among the material videos.
[0169] For example, highlight detection may be performed on a video material among multiple materials to obtain highlight segments in the video material, and multiple processed materials may be obtained based on the highlight segments of a target material and other materials among the multiple materials.
[0170] Optionally, the target material may also include image material. For example, if a face is detected from an image, the area ratio of the face in the image material is determined. If the area ratio is less than a preset ratio threshold, the image material can be cropped with the position of the face as a reference point, so that the area ratio of the face in the cropped image is greater than or equal to the preset ratio threshold and is located at the target position (for example, the middle of the image).
[0171] Optionally, human body detection or pedestrian detection can be used to determine whether the image contains a human body. If a human body is contained, the area ratio of the human body region in the image is calculated. If the area ratio is less than a preset ratio threshold, the image material can be cropped based on the location of the human body region, so that the area ratio of the face in the cropped image is greater than or equal to the preset ratio threshold and is located at the target position.
[0172] A highlight portion is extracted from a target material among multiple materials to obtain multiple processed materials.
[0173] 1103. Aggregate the processed multiple materials according to shooting information of each material in at least one aggregation dimension to obtain a material set in each aggregation dimension.
[0174] The aggregation dimensions may include time, location, and scene dimensions, etc. The shooting information of the material may include shooting time, shooting location, and shooting scene, etc. The shooting time may be the date when the user shoots the material, such as 2023.12.20, and the shooting location may be the geographical location where the user is when shooting the material, such as Shenzhen City, Guangdong Province. The shooting scene may be related to the content shot by the user, such as selfies, group photos, sunsets, seas, food, etc.
[0175] Among them, the shooting scene can be obtained by marking the material through a marking model (DeepDanbooru), and the material can also be classified and processed to determine the shooting scene of the material according to the classification result. For example, image feature extraction can be performed on each material to obtain image feature information of each material, and the material can be classified based on the image feature information through a classification network to obtain the classification result of the material. Multi-label classification can be used, and each material can correspond to multiple scene labels, such as sunrise, group photo, sea, etc.
[0176] For at least one aggregation dimension, the processed multiple materials may be aggregated according to shooting information related to the materials and the aggregation dimension to obtain a material set with the same or similar shooting information.
[0177] For example, a plurality of materials are aggregated based on a time dimension, a plurality of materials are aggregated based on a location dimension, and a plurality of materials are aggregated based on a scene dimension. That is, in one embodiment, at least one aggregation dimension includes at least one of a time dimension, a location dimension, and a scene dimension, and the shooting information includes at least one of shooting time, shooting location, and shooting scene. The step of “aggregating the plurality of materials according to the shooting information of each material under at least one aggregation dimension to obtain a material set under each aggregation dimension” includes:
[0178] Obtain at least one of the shooting information of the shooting time, shooting location and shooting scene of each material;
[0179] If the aggregation dimension is a time dimension, then the materials whose shooting time satisfies a preset time among the multiple materials are aggregated to obtain a material set under the time dimension.
[0180] You can aggregate multiple materials based on the time dimension to obtain material collections corresponding to different aggregation themes under the time dimension. For example, you can filter out materials from this day last year from multiple materials based on the shooting time and aggregate these materials into a material collection; you can also filter out materials from the past week from multiple materials based on the shooting time and aggregate them into a material collection; you can also filter out materials within a month from multiple materials based on the shooting time and aggregate them into a material collection, such as materials in May; or you can filter out materials on holidays from multiple materials based on the shooting time and aggregate them into a material collection, such as the National Day holiday, May Day holiday, Winter Solstice, Spring Festival, etc.
[0181] If the aggregation dimension is location, the materials can be aggregated according to the shooting location. That is, in one embodiment, the video generation method provided in the embodiment of the present application may further include:
[0182] If the aggregation dimension is a location dimension, the materials shot at the same location among the multiple materials are aggregated to obtain a candidate material set under the location dimension;
[0183] Determine the user's permanent residence location according to the shooting location corresponding to each candidate material set under the location dimension and the number of materials included;
[0184] The candidate material set corresponding to the permanent residence location is filtered from the candidate material set to obtain a candidate material set under the location dimension.
[0185] For example, based on the shooting location of each material, the materials with the same shooting location can be aggregated to obtain a candidate material set under the location dimension. Since users have permanent residences, the content shot by users without leaving their permanent residences is usually diverse. If the material set aggregated by permanent residence is messy and has no clear theme, the candidate material set corresponding to the permanent residence can be filtered out to obtain a material set under the location dimension.
[0186] The shooting location corresponding to the candidate material set containing the largest number of materials can be determined as the user's permanent residence, and the candidate material set can be removed. Optionally, the number of materials contained in each material set can also be set. For example, the number of materials contained in each material set can be set to 5-15. Then, the same shooting location can be aggregated into multiple candidate material sets, and the shooting location corresponding to the largest number of candidate material sets can be determined as the user's permanent residence.
[0187] For example, the smallest aggregation unit may be a prefecture-level city, and based on the materials in the gallery, a material set corresponding to Shenzhen City, a material set corresponding to Beijing City, and so on may be obtained.
[0188] If the aggregation dimension is a scene dimension, materials with the same shooting scene can be aggregated. That is, in one embodiment, the video generation method provided in the embodiment of the present application may further include:
[0189] If the aggregation dimension is a scene dimension, the materials with the same shooting scene among the multiple materials are aggregated to obtain a candidate material set under the scene dimension;
[0190] Sampling processing is performed on each candidate material set under the scene dimension based on the shooting time to obtain a material set under the scene dimension.
[0191] For example, based on the shooting scene of each material, materials with the same shooting scene can be aggregated to obtain multiple candidate material sets. The shooting scene of the materials in each candidate material set is the same. The candidate material sets can be sampled according to the shooting time to obtain a material set with evenly distributed shooting time.
[0192] For example, the materials in each month may be sampled from the candidate material set according to the shooting time to obtain a material set in which the materials of each month are evenly distributed.
[0193] Optionally, the number of materials contained in each material set can be set, and the candidate material set can be sampled based on the number of materials. For example, the candidate material set can be collected from fine granularity to coarse granularity until the number of material sets meets the requirement. For example, a candidate material set with a shooting scene at the seaside can be aggregated, and materials within a month can be selected based on the shooting information. If the number is insufficient, the granularity is expanded to a quarter. If the number of materials within a quarter is still insufficient, the granularity is expanded to a year.
[0194] In one embodiment, the aggregation themes under each aggregation dimension can be preset. For example, the time dimension can include themes such as this day last year, holidays, weekly reports, and monthly reports. The aggregation themes under the location dimension are different shooting locations. The scene dimension can include portraits, outdoors, objects, sports, indoors and other themes. There is a certain number of material sets under each aggregation theme, such as 5-15 materials, 3-5 materials, etc., and each aggregation theme only aggregates one material set.
[0195] For each aggregation dimension, the candidate material set under each aggregation theme can be sampled based on the shooting information corresponding to other aggregation dimensions other than the aggregation dimension to obtain a material set with a quantity that meets the requirements. For example, for the candidate material set under the time dimension, the candidate material set can be sampled according to the shooting scene and shooting location, so that different shooting scenes and shooting locations are evenly distributed in the obtained material set; for the candidate material set under the location dimension, the candidate material set can be sampled according to the shooting scene and shooting time, so that different shooting scenes and shooting times are evenly distributed in the obtained material set; for the candidate material set under the scene dimension, the candidate material set can be sampled according to the shooting time, so that different shooting times are evenly distributed in the obtained material set.
[0196] As can be seen from the above, the embodiments of the present application obtain multiple editing materials for generating a video, wherein the multiple editing material sets include at least one of images and videos; perform material feature extraction on the multiple editing materials to obtain video content feature information of the video to be generated corresponding to the multiple editing materials; select a video editing effect that matches the video to be generated based on the video content feature information of the video to be generated; and generate a target video with the video editing effect added thereto based on the multiple editing materials and the video editing effects.
[0197] The embodiment of the present application determines video content feature information of a video to be generated based on multiple editing materials, selects video editing effects that match the video content based on the video content feature information, and intelligently edits the target video with the video editing effects added, thereby reducing the content of videos posted by users and thereby increasing the enthusiasm of users to post videos. In addition, it can also improve the video generation efficiency and video generation quality.
[0198] In order to facilitate better implementation of the video generation method provided in the embodiment of the present application, a video generation device is also provided in one embodiment. The meanings of the terms are the same as those in the above-mentioned video generation method, and the specific implementation details can refer to the description in the method embodiment.
[0199] The video generation device can be integrated into a computer device, such as Figure 2 As shown, the video generation device may include: a receiving unit 301, an extracting unit 302, a selecting unit 303 and a generating unit 304, which are specifically as follows:
[0200] (1) A receiving unit 301 is used to obtain a plurality of clipping materials for generating a video, where the plurality of clipping materials include at least one of an image and a video.
[0201] (2) An extraction unit 302 is used to extract material features from the plurality of clipping materials to obtain video content feature information of the to-be-generated video corresponding to the plurality of clipping materials.
[0202] In one embodiment, the content feature information includes content motion information, and the extraction unit 302 includes:
[0203] A feature extraction subunit is used to extract motion features from each clip material to obtain content motion information of each clip material;
[0204] The strength determination subunit is used to determine the video strength of the video to be generated according to the content motion information of each clip material, and the above video strength is used to describe the degree of content change of the above video to be generated.
[0205] (3) A selection unit 303, configured to select a video editing effect that matches the video to be generated based on the video content feature information of the video to be generated.
[0206] In one embodiment, the video editing effect includes an auditory effect, and the selection unit 303 includes:
[0207] A speed determination subunit, configured to determine an audio speed matching the video intensity according to a preset correspondence between the video intensity and the audio speed;
[0208] The audio acquisition subunit is used to acquire target audio that matches the content change degree of the video to be generated based on the audio speed that matches the video intensity, and the target audio is enhanced to add auditory effects.
[0209] (4) A generating unit 304, configured to generate a target video with the video editing effect added thereto based on the plurality of editing materials and the video editing effect.
[0210] In one embodiment, the generating unit 304 includes:
[0211] A rebeat point determination subunit, used to obtain the rebeat point of the target audio, wherein the rebeat point includes a time point at which the rebeat occurs in the target audio;
[0212] An adding subunit is used to determine a time slot according to the retake point of the target audio, and add at least one clip material in each time slot;
[0213] The video generation subunit is used to generate the above-mentioned target video based on the above-mentioned target audio and the editing materials placed based on the above-mentioned target audio.
[0214] In one embodiment, the adding subunit includes:
[0215] A highlight point acquisition module, used to acquire the highlight point of the target audio, where the highlight point is the time point at which the highlight audio segment in the target audio appears, and the highlight point is no later than the first retake point of the target audio;
[0216] A first slot determination module is configured to determine, if the time interval between the first re-beat point and the highlight point is greater than a preset threshold, a first time slot of the target audio between the highlight point and the first re-beat point, and determine a time slot for each two adjacent re-beat points for the re-beat points after the first re-beat point;
[0217] The second slot determination module is used to determine the first time slot of the target audio based on the highlight point and the second rebeat point if the time interval between the first rebeat point and the highlight point is not greater than a preset threshold, and for the rebeat point after the second rebeat point, determine a time slot according to every two adjacent rebeat points.
[0218] In one embodiment, the speed determination subunit includes:
[0219] A quantity acquisition module is used to obtain the quantity of materials contained in the above-mentioned video to be generated;
[0220] The audio speed determination module is used to determine the audio speed that matches the material quantity and video strength of the video to be generated according to the corresponding relationship between the preset material quantity, video strength and audio speed.
[0221] In one embodiment, the video feature information includes a video theme, and the audio acquisition unit includes:
[0222] A music type determination subunit, used to determine a target music type that matches the video to be generated according to a preset correspondence between the video theme and the music type;
[0223] The audio selection subunit is used to select the target audio from the audio under the target music type based on the audio speed matching the video intensity.
[0224] In one embodiment, the video feature information includes a video theme, the video editing effect includes a visual effect, and the generating unit 304 is further configured to:
[0225] According to the correspondence between the preset video theme and the filter, a target filter matching the above-mentioned video to be generated is determined, and the above-mentioned target filter is used to enhance the visual effect.
[0226] In one embodiment, the video feature information includes a video theme, the video editing effect includes a visual effect, and the generating unit 304 is further configured to:
[0227] According to the correspondence between the preset video theme and the special effects, a target video special effect matching the above-mentioned video to be generated is determined, and the above-mentioned target special effect is used to enhance the visual effect.
[0228] As can be seen from the above, the video generating device of the embodiment of the present application obtains multiple editing materials for generating a video through the receiving unit 301, and the multiple editing material sets include at least one of images and videos; the extraction unit 302 extracts material features from the multiple editing materials to obtain video content feature information of the video to be generated corresponding to the multiple editing materials; the selection unit 303 selects the video editing effect that matches the video to be generated according to the video content feature information of the video to be generated; the generation unit 304 generates a target video with the video editing effect added based on the multiple editing materials and the video editing effect.
[0229] The embodiment of the present application determines video content feature information of a video to be generated based on multiple editing materials, selects video editing effects that match the video content based on the video content feature information, and intelligently edits the target video with the video editing effects added, thereby reducing the content of videos posted by users and thereby increasing the enthusiasm of users to post videos. In addition, it can also improve the video generation efficiency and video generation quality.
[0230] The present application also provides a computer device, which may be a terminal or a server. Figure 3 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:
[0231] The computer device may include components such as a processor 1001 with one or more processing cores, a memory 1002 with one or more computer-readable storage media, a power supply 1003, and an input unit 1004. Those skilled in the art will appreciate that Figure 3 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0232] The processor 1001 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 1002 and calling data stored in the memory 1002, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 1001 may include one or more processing cores; preferably, the processor 1001 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and computer programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1001.
[0233] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The memory 1002 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, a computer program required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 1002 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 1002 may also include a memory controller to provide the processor 1001 with access to the memory 1002.
[0234] The computer device also includes a power supply 1003 for supplying power to various components. Preferably, the power supply 1003 can be logically connected to the processor 1001 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 1003 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0235] The computer device may further include an input unit 1004, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0236] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically, in this embodiment, the processor 1001 in the computer device will load the executable files corresponding to the processes of one or more computer programs into the memory 1002 according to the following instructions, and the processor 1001 will run the computer programs stored in the memory 1002, thereby realizing various functions, as follows:
[0237] Acquire a plurality of clipping materials for generating a video, wherein the plurality of clipping material sets include at least one of an image and a video;
[0238] Extracting material features from the plurality of clipping materials to obtain video content feature information of the to-be-generated video corresponding to the plurality of clipping materials;
[0239] Selecting a video editing effect that matches the video to be generated according to the video content feature information of the video to be generated;
[0240] Based on multiple clip materials and video clip effects, a target video with added video clip effects is generated.
[0241] The specific implementation of the above operations can be found in the previous embodiments and will not be described in detail here.
[0242] As can be seen from the above, the computer device of the embodiment of the present application can obtain multiple editing materials for generating videos, and the multiple editing material sets include at least one of images and videos; perform material feature extraction on the multiple editing materials to obtain video content feature information of the video to be generated corresponding to the multiple editing materials; select a video editing effect that matches the video to be generated based on the video content feature information of the video to be generated; and generate a target video with the video editing effect added based on the multiple editing materials and the video editing effects.
[0243] The embodiment of the present application determines video content feature information of a video to be generated based on multiple editing materials, selects video editing effects that match the video content based on the video content feature information, and intelligently edits the target video with the video editing effects added, thereby reducing the content of videos posted by users and thereby increasing the enthusiasm of users to post videos. In addition, it can also improve the video generation efficiency and video generation quality.
[0244] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in various optional implementations in the above-mentioned embodiments.
[0245] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0246] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program can be loaded by a processor to execute any video generation method provided in the embodiment of the present application.
[0247] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0248] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0249] Since the computer program stored in the computer-readable storage medium can execute any one of the video generation methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the video generation methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0250] The above is a detailed introduction to a video generation method, device, computer equipment and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A video generation method, characterized in that: include: Acquire a plurality of clipping materials for generating a video, wherein the plurality of clipping material sets include at least one of an image and a video; Extracting material features from the plurality of clipping materials to obtain video content feature information of the to-be-generated video corresponding to the plurality of clipping materials; Selecting a video editing effect that matches the video to be generated according to the video content feature information of the video to be generated; Based on the multiple clipping materials and the video clipping effect, a target video with the video clipping effect added thereto is generated.
2. The method according to claim 1, characterized in that The content feature information includes content motion information, and the extracting of material features from the multiple clipping materials to obtain video content feature information of the to-be-generated video corresponding to the multiple clipping materials includes: Extract motion features from each clip material to obtain content motion information of each clip material; The video strength of the video to be generated is determined according to the content motion information of each clip material, where the video strength is used to describe the degree of change of the content of the video to be generated.
3. The method according to claim 2, characterized in that The video editing effect includes an auditory effect, and the selecting of the video editing effect matching the video to be generated according to the video content feature information of the video to be generated includes: Determining an audio speed matching the video intensity according to a preset correspondence between the video intensity and the audio speed; Based on the audio speed that matches the video intensity, a target audio that matches the degree of change in the content of the video to be generated is obtained, and the target audio is enhanced to add an auditory effect.
4. The method according to claim 3, characterized in that The step of generating a target video with the video editing effect added thereto based on the plurality of editing materials and the video editing effect comprises: Obtaining a rebeat point of the target audio, wherein the rebeat point includes a time point at which a rebeat occurs in the target audio; Determine a time slot according to the retake point of the target audio, and add at least one clip material in each time slot; The target video is generated according to the target audio and the editing materials placed based on the focus shots of the target audio.
5. The method according to claim 4, characterized in that The step of determining the time slot according to the retake point of the target audio includes: Acquire a highlight point of the target audio, where the highlight point is a time point at which a highlight audio segment in the target audio appears, and the highlight point is no later than the first retake point of the target audio; If the time interval between the first rebeat point and the highlight point is greater than a preset threshold, then based on the highlight point and the first rebeat point, determine a first time slot of the target audio, and for the rebeat points after the first rebeat point, determine a time slot according to every two adjacent rebeat points; If the time interval between the first rebeat point and the highlight point is not greater than a preset threshold, then based on the highlight point and the second rebeat point, determine the first time slot of the target audio, and for the rebeat point after the second rebeat point, determine a time slot based on every two adjacent rebeat points.
6. The method according to claim 3, characterized in that The step of determining the audio speed matching the video intensity according to the preset correspondence between the video intensity and the audio speed includes: Obtaining the number of materials contained in the video to be generated; According to the corresponding relationship between the preset material quantity, video strength and audio speed, an audio speed matching the material quantity and video strength of the video to be generated is determined.
7. The method according to claim 3, characterized in that The video feature information includes a video theme, and obtaining a target audio that matches the content change degree of the video to be generated based on an audio speed that matches the video intensity includes: Determining a target music type that matches the video to be generated according to a preset correspondence between the video theme and the music type; The target audio is selected from audios under the target music type based on an audio speed that matches the video intensity.
8. The method according to claim 1, characterized in that The video feature information includes a video theme, the video editing effect includes a visual effect, and the step of selecting a video editing effect matching the video to be generated according to the video content feature information of the video to be generated includes: According to the correspondence between the preset video theme and the filter, a target filter matching the video to be generated is determined, and the target filter is used to enhance the visual effect.
9. The method according to claim 1, characterized in that: The video feature information includes a video theme, the video editing effect includes a visual effect, and the step of selecting a video editing effect matching the video to be generated according to the video content feature information of the video to be generated includes: According to the correspondence between the preset video theme and the special effect, a target video special effect matching the video to be generated is determined, and the target special effect is used to enhance the visual effect.
10. The method according to claim 1, characterized in that The method further comprises: Determining a first target video editing effect matching the publishing account based on account feature information of the publishing account or video content of a published video under the publishing account; Based on the multiple clipping materials and the first target video clipping effect, a target video with the first target video clipping effect added thereto is generated.
11. The method according to claim 1, characterized in that: The method further comprises: Filtering reference videos from the published videos according to user interaction data of the published videos under the publishing account; A target video with the second target video editing effect added thereto is generated according to the second video editing effect applied to the reference video and the plurality of editing materials.
12. A video generating device, characterized in that: include: A receiving unit, configured to obtain a plurality of clipping materials for generating a video, wherein the plurality of clipping material sets include at least one of an image and a video; An extraction unit, configured to extract material features from the plurality of clipping materials to obtain video content feature information of a video to be generated corresponding to the plurality of clipping materials; A selection unit, configured to select a video editing effect matching the video to be generated according to video content feature information of the video to be generated; A generating unit is used to generate a target video with the video editing effect added thereto based on the multiple editing materials and the video editing effect.
13. A computer device, characterized in that: It comprises a memory and a processor; the memory stores a computer program, and the processor is used to run the computer program in the memory to execute the video generation method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store a computer program, and the computer program is loaded by a processor to execute the video generation method according to any one of claims 1 to 11.
