A music-driven video automatic generation method, system, device and medium
By generating audio feature descriptions and using large models to generate scene text, it solves the problem of requiring lyrics and a large amount of training data in the existing technology, achieving the effect of generating lyrics-free videos and reducing the need for training data.
Patent Information
- Application Number
- CN202311823680.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2043-12-27
AI Technical Summary
Existing music-driven video generation methods need to provide both audio and lyric information of the music, and methods based on deep learning require a large amount of training data and consume a lot of manpower and material resources.
By obtaining audio data, static and dynamic feature descriptions of the audio are generated, large models such as ChatGPT and Wenxinyiyan are used to generate scene description text, and finally the text is input into the text-to-video generation tool to generate a video that matches the audio.
Audio-related videos can be generated without lyrics, and there is no need to collect a large amount of music and video data for model training. It can directly use existing large-scale models to achieve automatic video generation.
Smart Images

Figure CN117956247B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of automatic video generation, and in particular relates to a music-driven automatic video generation method, system, device and medium. Background Art
[0002] Automatically generating videos related to music, i.e. music-driven video generation, is widely used in many fields such as film, television, animation, virtual reality, etc. Existing methods generally require both audio and lyrics information in music to generate videos, but some music, such as piano music, does not have lyrics. In addition, existing deep learning-based methods generally require the collection of a large amount of training data containing both music and videos, and then training the model, which requires a lot of manpower and material resources. Summary of the invention
[0003] In order to solve the above problems, the present invention provides a music-driven video automatic generation method, system, device and medium.
[0004] The technical solution of the present invention is as follows:
[0005] A method for automatically generating a music-driven video, the method comprising the following steps:
[0006] Get audio data;
[0007] Generating an objective feature description of the audio based on the audio data;
[0008] Generate a subjective feature description of the audio through a large model based on the objective feature description of the audio;
[0009] Generate scene description text through a large model based on the objective feature description of the audio and the subjective feature description of the audio;
[0010] The scene description text is fed into a text-to-video tool to generate a video that matches the audio data.
[0011] Furthermore, the objective feature description of the audio includes a static feature description of the audio and a dynamic feature description of the audio.
[0012] Furthermore, the method for generating the static feature description of the audio is:
[0013] The complete audio data is divided into time sections, and the pitch characteristics, volume characteristics and timbre characteristics of each section of the divided audio data are calculated; the pitch characteristics, volume characteristics and timbre characteristics of the audio data are determined as static feature descriptions of the audio.
[0014] Furthermore, the method for generating the dynamic feature description of the audio is:
[0015] Several adjacent audio segments with the same static feature description are merged into one segment, and the pitch difference, volume difference and timbre difference between the last audio segment and the first audio segment of each audio segment are calculated, and the dynamic feature description of the audio is obtained according to the size of the difference value.
[0016] Furthermore, the large model is one of ChatGPT and Wenxinyiyan.
[0017] Furthermore, when generating the scene description text, it also includes:
[0018] The audio objective feature description is reconstructed through the scene description text, and the similarity between the reconstructed audio objective feature description and the input audio objective feature description is compared. If the similarity exceeds a certain threshold, it is considered that a relatively correct scene description text is generated, otherwise it is regenerated.
[0019] The present invention also provides a music-driven video automatic generation system, the system comprising:
[0020] An audio acquisition module, used to acquire audio data;
[0021] An audio feature generation module, used to generate an objective feature description of the audio and a subjective feature description of the audio;
[0022] A text generation module, used to generate scene description text through a large model based on the objective feature description of the audio and the subjective feature description of the audio;
[0023] The video generation module is used to input the scene description text into the text-to-video generation tool to generate a video that matches the audio data.
[0024] The present invention also provides an electronic device, characterized in that it includes a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the above-mentioned music-driven automatic video generation method.
[0025] The present invention also provides a computer-readable storage medium, characterized in that it stores a computer program, and when the computer program is executed by a processor, it implements the above-mentioned music-driven automatic video generation method.
[0026] Technical effects of the present invention:
[0027] 1. The present invention can generate a video related to the audio by using only the audio information in the music without lyrics.
[0028] 2. The present invention is directly based on the existing large-scale model. It does not require the collection of a large amount of music and video data, and does not require additional training models to achieve automatic generation of music videos. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The accompanying drawings generally illustrate various embodiments by way of example and not limitation, and together with the description and claims, serve to illustrate the embodiments of the invention. Where appropriate, the same reference numerals are used throughout the drawings to refer to the same or similar parts. Such embodiments are illustrative and are not intended to be exhaustive or exclusive embodiments of the present apparatus or method.
[0030] Figure 1 A schematic diagram of the method flow of the present invention is shown;
[0031] Figure 2 A schematic diagram of a flow chart of an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0032] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0033] like Figure 1-Figure 2 As shown, the present invention provides a method for automatically generating a music-driven video, and the method is as follows:
[0034] 1. Generate static feature description of audio
[0035] Input a piece of music audio data A, and divide the audio data into N sections according to the length of each section of 0.5 seconds, denoted as {A i ,i=1..N};
[0036] For each audio data A i Calculate the average pitch AT i , according to the average pitch AT i The value is expressed by one of the following qualitative descriptors to describe the tonal characteristics: deep, warm, medium, crisp, or sharp.
[0037] For each audio data A i Calculate the average volume AV i , according to the average volume AV i The value is expressed by one of the following qualitative descriptors: quiet, soft, medium, loud, high-pitched;
[0038] For each audio data A i Perform spectrum analysis to obtain the tone clarity AC i , AF tone fullness i , and is expressed by one of the following qualitative descriptors depending on the magnitude of its value: low, medium, high;
[0039] Through the above calculation, we can get the audio data A of each section.i Static feature description FS i , such as crisp tone, soft volume, lower tone clarity and higher tone fullness.
[0040] 2. Generate dynamic feature description of audio
[0041] Based on each audio A i Static feature description FS i , merge several adjacent audio sections with the same static feature description to obtain an audio section;
[0042] For each audio segment S k , including several adjacent audio segments A k1 , A k2 , …A kn , calculate the last audio section A kn and the first audio A k1 The average pitch difference between kn -AT k1 ), average volume difference (AV kn -AV k1 ), the difference in tone clarity (AC kn -AC k1 ), the difference in timbre fullness (AF kn -AF k1 ), according to the difference value, the audio segment S is obtained k Dynamic feature description FD k , i.e., changes in pitch, volume, timbre clarity, and timbre fullness, expressed by one of the following qualitative descriptors: gradually decreasing, basically stable, gradually increasing;
[0043] Audio segment S k The static feature description and dynamic feature description together constitute the objective feature description FO k For example, a clear and gradually rising tone, a soft and basically stable volume, a low and gradually rising timbre clarity, and a high and basically stable timbre fullness.
[0044] 3. Generate a subjective feature description of the audio.
[0045] Each audio segment S k Objective characterization of FO k Input to the human-computer interaction language model, such as ChatGPT and Wenxinyiyan, to ask what topic this audio data belongs to, and get the subjective feature description of this audio FS k .
[0046] For example, the input to the large language model is: a piece of music has a clear and gradually rising tone, a soft and basically stable volume, a low and gradually rising timbre clarity, and a high and basically stable timbre fullness. Which of the following is the theme of this music? Cheerful and energetic, romantic and tender, exciting, quiet and lyrical, mysterious and fantastic, calm and calm, happy and relaxed, sad and contemplative, excited and carnival, complex and changeable. The output of the large language model is: According to the description, the theme of this music may be more romantic and tender. Get the subjective feature description FS of this audio k For: romance and tenderness.
[0047] 4. Scene description text generation based on large language model and reconstruction confirmation
[0048] Each audio segment S k Objective characterization of FO k , subjective feature description FS k Input to the human-computer interaction language model to generate a scene description text T that matches this audio k ;
[0049] Since the scene text description generated by the large language model may be wrong, in order to ensure that the scene text description matches the audio features, the scene description text T k Reconstruct audio objective feature description FOC k , compared with the reconstructed audio objective feature description FOC k and the objective feature description of the input FO k If the similarity between them exceeds a certain threshold, it is considered that a relatively correct scene description text T is generated. k , otherwise regenerate;
[0050] For example, the input to the large language model is: a piece of music with a clear and gradually rising tone, a soft and basically stable volume, a low and gradually rising timbre clarity, and a high and basically stable timbre fullness. Generate a scene description that can match this piece of music, which should reflect the theme of romance and tenderness, limit it to one sentence, and do not generate words directly related to the music. The output of the large language model is: On a quiet forest path, the breeze blows through the soft leaves, reflecting the afterglow of the setting sun, a pair of lovers walk hand in hand, immersed in the soft and warm atmosphere of the evening. This is the generated scene description text T k ;
[0051] Then reconstruct the objective feature description of the audio, and give the [input of the large language model]: On a quiet forest path, the breeze blows through the soft leaves, reflecting the afterglow of the setting sun, a pair of lovers walk hand in hand, immersed in the soft and warm atmosphere of the evening. For this scene description, what are the best settings for volume, pitch, timbre clarity, and timbre fullness. (Note: Here you are required to answer through multiple-choice questions, and the options are set as qualitative descriptors of volume, pitch, timbre clarity, and timbre fullness). [The output of the large language model] is the reconstructed objective feature description of the music. Calculate its similarity with the objective feature description of the music input in the previous paragraph. If it exceeds a certain threshold, the scene description text is successfully generated, otherwise the scene description text is regenerated.
[0052] 5. Generate video that matches the audio
[0053] Set the scene description text to k Input into the text-to-video generation tool to generate a video, that is, a video that matches the audio.
[0054] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A music-driven video automatic generation method, characterized in that: The method comprises the following steps: Get audio data; Generating an objective feature description of the audio based on the audio data; Generate a subjective feature description of the audio through a large model based on the objective feature description of the audio; Generate scene description text through a large model based on the objective feature description of the audio and the subjective feature description of the audio; Input the scene description text into the text-to-video generation tool to generate a video that matches the audio data; The objective feature description of the audio includes a static feature description of the audio and a dynamic feature description of the audio; The method for generating the static feature description of the audio is: The complete audio data is divided into time sections, and the pitch characteristics, volume characteristics and timbre characteristics of each section of the divided audio data are calculated; the pitch characteristics, volume characteristics and timbre characteristics of the audio data are determined as static feature descriptions of the audio; The method for generating the dynamic feature description of the audio is: Several adjacent audio segments with the same static feature description are merged into one segment, and the pitch difference, volume difference and timbre difference between the last audio segment and the first audio segment of each audio segment are calculated, and the dynamic feature description of the audio segment is obtained based on the difference values.
2. The music-driven video automatic generation method according to claim 1, characterized in that: The large model is one of ChatGPT and Wenxinyiyan.
3. The music-driven video automatic generation method according to claim 1, characterized in that: When generating scene description text, it also includes: The audio objective feature description is reconstructed through the scene description text, and the similarity between the reconstructed audio objective feature description and the input audio objective feature description is compared. If the similarity exceeds a certain threshold, it is considered that a relatively correct scene description text is generated, otherwise it is regenerated.
4. A music-driven video automatic generation system, characterized in that: The system comprises: An audio acquisition module, used to acquire audio data; An audio feature generation module, used to generate an objective feature description of the audio and a subjective feature description of the audio; A text generation module, used to generate scene description text through a large model based on the objective feature description of the audio and the subjective feature description of the audio; A video generation module, which is used to input the scene description text into the text-to-video generation tool to generate a video that matches the audio data; The objective feature description of the audio includes a static feature description of the audio and a dynamic feature description of the audio; The method for generating the static feature description of the audio is: The complete audio data is divided into time sections, and the pitch characteristics, volume characteristics and timbre characteristics of each section of the divided audio data are calculated; the pitch characteristics, volume characteristics and timbre characteristics of the audio data are determined as static feature descriptions of the audio; The method for generating the dynamic feature description of the audio is: Several adjacent audio segments with the same static feature description are merged into one segment, and the pitch difference, volume difference and timbre difference between the last audio segment and the first audio segment of each audio segment are calculated, and the dynamic feature description of the audio segment is obtained based on the difference values.
5. An electronic device, characterized in that: It comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the music-driven automatic video generation method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the music-driven automatic video generation method as described in any one of claims 1 to 3.
