Method for synthesizing video, terminal and storage medium
AssigneeGuangzhou Kugou Computer Technology Co., Ltd.
InventorsHan Wu, Wentao Li
Life of this patent
Estimating the term…
Abstract
A method for synthesizing a video includes: acquiring audio data and dotting data corresponding to the audio data, the dotting data including a beat time point and a beat value corresponding to the beat time point of the audio data; acquiring a plurality of material images from a local source; and synthesizing, based on the dotting data, the plurality of material images and the audio data to acquire a synthesized video, a switching time point of each of the material images in the synthesized video being the beat time point of the audio data.
Claims15
A method for synthesizing a video, comprising:
- acquiring, by a terminal, audio data and dotting data corresponding to the audio data from a server of an application program, wherein the dotting data comprises a beat time point and a beat value corresponding to the beat time point of the audio data, and the application program is installed on the terminal and has a function of making synthesized video;
- acquiring, by the terminal, a plurality of material images from a local source;
- and
- synthesizing, by the terminal and based on the dotting data, the plurality of material images and the audio data to acquire a synthesized video, wherein a switching time point of each of the material images in the synthesized video is the beat time point of the audio data;
- and
- wherein synthesizing, based on the dotting data, the plurality of material images and the audio data to acquire the synthesized video comprises:
- determining a synthesis sequence of the material images during video synthesizing;
- determining, based on the synthesis sequence of the material images, the dotting data and the material images, a sub-video corresponding to each of the material images;
- and
- synthesizing, based on the synthesis sequence, each of the sub-videos to acquire synthesized image data, and synthesizing the synthesized image data and the audio data to acquire the synthesized video;
- wherein determining, based on the synthesis sequence of the material images, the dotting data and the material images, the sub-video corresponding to each of the material images comprises:
- acquiring, based on the synthesis sequence of the material images, the material images one by one, and each time one material image is acquired, determining, based on the currently acquired material image and the dotting data, the sub-video corresponding to the currently acquired material image;
- wherein determining, based on the currently acquired material image and the dotting data, the sub-video corresponding to the currently acquired material image comprises:
- in response to the currently acquired material image being a material video and the material video being the first to be synthesized, determining a second time point of a preset duration upon a start time point of the audio data, and determining a total duration of the material video minus the preset duration as a third duration;
- in response to at least one third beat time point of which a corresponding beat value is a preset value being defined in the third duration upon the second time point, determining the third beat time point closest to the second time point, determining a fourth duration from the start time point of the audio data to the third beat time point closest to the second time point, and intercepting, in the material video, a video of the fourth duration from the start time point of the material video as a third sub-video corresponding to the material video;
- and in response to no third beat time point of which the corresponding beat value is the preset value being defined in the third duration upon the second time point, determining a fourth beat time point which is closest to the second time point and of which a corresponding beat value is the preset value between the start time point of the audio data and the second time point, determining a fifth duration from the start time point of the audio data to the fourth beat time point, and intercepting, in the material video, a video of the fifth duration from the start time point of the material video as a fourth sub-video corresponding to the material video;
- and
- in response to the material video being not the first to be synthesized, determining a second total duration of the generated sub-video, determining a third time point of the second total duration upon the start time point of the audio data, determining a fourth time point of the preset duration upon the third time point, and determining the total duration of the material video minus the preset duration as a sixth duration;
- in response to at least one fifth beat time point of which a corresponding beat value is the preset value being defined in the sixth duration upon the fourth time point, determining the fifth beat time point closest to the fourth time point, determining a seventh duration from the third time point to the fifth beat time point closest to the fourth time point, and intercepting, in the material video, a video of the seventh duration from the start time point of the material video as a fifth sub-video corresponding to the material video;
- and in response to no fifth beat time point of which the corresponding beat value is the preset value being defined in the sixth duration upon the fourth time point, determining a sixth beat time point which is closest to the fourth time point and of which a corresponding beat value is the preset value between the third time point and the fourth time point, determining an eighth duration from the third time point to the sixth beat time point closest to the fourth time point, and intercepting, in the material video, a video of the eighth duration from the start time point of the material video as a sixth sub-video corresponding to the material video.
A terminal comprising a processor and a memory configured to store at least one instruction, wherein the processor, when loading and executing the at least one instruction, is caused to perform a method for synthesizing the video, the method comprising:
- acquiring, by the terminal, audio data and dotting data corresponding to the audio data, from a server of an application program, wherein the dotting data comprises a beat time point and a beat value corresponding to the beat time point of the audio data;
- and the application program is installed on the terminal and has a function of making synthesized video;
- acquiring, by the terminal, a plurality of material images from a local source;
- and
- synthesizing, by the terminal and based on the dotting data, the plurality of material images and the audio data to acquire a synthesized video, wherein a switching time point of each of the material images in the synthesized video is the beat time point of the audio data;
- and
- wherein synthesizing, based on the dotting data, the plurality of material images and the audio data to acquire the synthesized video comprises:
- determining a synthesis sequence of the material images during video synthesizing;
- determining, based on the synthesis sequence of the material images, the dotting data and the material images, a sub-video corresponding to each of the material images;
- and
- synthesizing, based on the synthesis sequence, each of the sub-videos to acquire synthesized image data, and synthesizing the synthesized image data and the audio data to acquire the synthesized video;
- wherein determining, based on the synthesis sequence of the material images, the dotting data and the material images, the sub-video corresponding to each of the material images comprises:
- acquiring, based on the synthesis sequence of the material images, the material images one by one, and each time one material image is acquired, determining, based on the currently acquired material image and the dotting data, the sub-video corresponding to the currently acquired material image;
- wherein determining, based on the currently acquired material image and the dotting data, the sub-video corresponding to the currently acquired material image comprises:
- in response to the currently acquired material image being a material video and the material video being the first to be synthesized, determining a second time point of a preset duration after a start time point of the audio data, and determining a total duration of the material video minus the preset duration as a third duration;
- in response to the at least one third beat time point of which a corresponding beat value is a preset value being defined in the third duration upon the second time point, determining the third beat time point closest to the second time point, determining a fourth duration from the start point of the audio data to the third beat time point closest to the second time point, and intercepting, in the material video, a video of the fourth duration from the start time point of the material video as a third sub-video corresponding to the material video;
- and in response to no third beat time point of which the corresponding beat value is the preset value being defined in the third duration after the second time point, determining a fourth beat time point which is closest to the second time point and of which a corresponding beat value is the preset value between the start time point of the audio data and the second time point, determining a fifth duration from the start time point of the audio data to the fourth beat time point, and intercepting, in the material video, a video of the fifth duration from the start time point of the material video as a fourth sub-video corresponding to the material video;
- and
- in response to the material video being not the first to be synthesized, determining a second total duration of a generated sub-video, determining a third time point of the second total duration after the start time point of the audio data, determining a fourth time point of the preset duration after the third time point, and determining the total duration of the material video minus the preset duration as a sixth duration;
- in response to at least one fifth beat time point of which a corresponding beat value is the preset value being defined in the sixth duration after the fourth time point, determining the fifth beat time point closest to the fourth time point, determining a seventh duration from the third time point to the fifth beat time point closest to the fourth time point, and intercepting, in the material video, a video of the seventh duration from the start time point of the material video as a fifth sub-video corresponding to the material video;
- and in response to no fifth beat time point of which the corresponding beat value is the preset value being defined in the sixth duration after the fourth time point, determining a sixth beat time point which is closest to the fourth time point and of which a corresponding beat value is the preset value between the third time point and the fourth time point, determining an eighth duration from the third time point to the sixth beat time point closest to the fourth time point, and intercepting, in the material video, a video of the eighth duration from the start time point of the material video as a sixth sub-video corresponding to the material video.
A non-transitory computer-readable storage medium storing at least one instruction therein, wherein the at least one instruction is loaded and executed by a processor to perform a method for synthesizing the video, the method comprising:
- acquiring, by a terminal, audio data and dotting data corresponding to the audio data from a server of an application program, wherein the dotting data comprises a beat time point and a beat value corresponding to the beat time point of the audio data, and the application program is installed on the terminal and has a function of making synthesized video;
- acquiring, by the terminal, a plurality of material images from a local source;
- and
- synthesizing, by the terminal and based on the dotting data, the plurality of material images and the audio data to acquire a synthesized video, wherein a switching time point of each of the material images in the synthesized video is the beat time point of the audio data;
- and
- wherein synthesizing, based on the dotting data, the plurality of material images and the audio data to acquire the synthesized video comprises:
- determining a synthesis sequence of the material images during video synthesizing;
- determining, based on the synthesis sequence of the material images, the dotting data and the material images, a sub-video corresponding to each of the material images;
- and
- synthesizing, based on the synthesis sequence, each of the sub-videos to acquire synthesized image data, and synthesizing the synthesized image data and the audio data to acquire the synthesized video;
- wherein determining, based on the synthesis sequence of the material images, the dotting data and the material images, the sub-video corresponding to each of the material images comprises:
- acquiring, based on the synthesis sequence of the material images, the material images one by one, and each time one material image is acquired, determining, based on the currently acquired material image and the dotting data, a sub-video corresponding to the currently acquired material image;
- wherein determining, based on the currently acquired material image and the dotting data, the sub-video corresponding to the currently acquired material image comprises:
- in response to the currently acquired material image being a material video and the material video being the first to be synthesized, determining a second time point of a preset duration after a start time point of the audio data, and determining a total duration of the material video minus the preset duration as a third duration;
- in response to at least one third beat time point of which a corresponding beat value is a preset value being defined in the third duration upon the second time point, determining the third beat time point closest to the second time point, determining a fourth duration from the start time point of the audio data to the third beat time point closest to the second time point, and interception, in the material video, a video of the fourth duration from the start time pint of the material video as a third sub-video corresponding to the material video;
- and in response to no third beat time point of which the corresponding beat value is the preset value being defined in the third duration after the second time point, determining a fourth beat time point which is closest to the second time point and of which a corresponding beat value is the preset value between the start time point of the audio data and the second time point, determining a fifth duration from the start time point of the audio data to the fourth beat time point, and intercepting, in the material video, a video of the fifth duration from the start time point of the material video as a fourth sub-video corresponding to the material video;
- and
- in response to the material video being not the first to be synthesized, determining a second total duration of a generated sub-video, determining a third time point of the second total duration after the start time point of the audio data, determining a fourth time point of the preset duration after the third time point, and determining the total duration of the material video minus the preset duration as a sixth duration;
- in response to at least one fifth beat time point of which a corresponding beat value is the preset value being defined in the sixth duration after the fourth time point, determining the fifth beat time point closest to the fourth time point, determining a seventh duration from the third time point to the fifth beat time point closest to the fourth time point, and intercepting, in the material video, a video of the seventh duration from the start time point of the material video as a fifth sub-video corresponding to the material video;
- and in response to no fifth beat time point of which the corresponding beat value is the preset value being defined in the sixth duration after the fourth time point, determining a sixth beat time point which is closest to the fourth time point and of which a corresponding beat value is the preset value between the third time point and the fourth time point, determining an eighth duration from the third time point to the sixth beat time point closest to the fourth time point, and intercepting, in the material video, a video of the eighth duration from the start time point of the material video as a sixth sub-video corresponding to the material video.
Dependencies are inferred from the claim text.