CN112468741A - Video generation method, electronic device and storage medium - Google Patents

Video generation method, electronic device and storage medium Download PDF

Info

Publication number
CN112468741A
CN112468741A CN202011271827.8A CN202011271827A CN112468741A CN 112468741 A CN112468741 A CN 112468741A CN 202011271827 A CN202011271827 A CN 202011271827A CN 112468741 A CN112468741 A CN 112468741A
Authority
CN
China
Prior art keywords
standard
target
point
multimedia file
card point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202011271827.8A
Other languages
Chinese (zh)
Inventor
李琳
王鑫炎
王志国
郭凡
赵磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
MIGU Culture Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Mobile Communications Group Co Ltd, MIGU Culture Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202011271827.8A priority Critical patent/CN112468741A/en
Publication of CN112468741A publication Critical patent/CN112468741A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/83Generation or processing of protective or descriptive data associated with content; Content structuring
    • H04N21/845Structuring of content, e.g. decomposing content into time segments
    • H04N21/8456Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

The embodiment of the invention relates to the field of videos and discloses a video generation method, electronic equipment and a storage medium. The method for generating the video comprises the following steps: acquiring a target card point of a multimedia file and a standard card point corresponding to the target card point, wherein the standard card point is a card point in preset standard template music; editing the multimedia file according to the position of the target card point and the position of the corresponding standard card point so as to enable the target card point to be matched with the corresponding standard card point; and overlapping the edited multimedia file with the standard template music to form a target checkpoint video. By adopting the embodiment, the efficiency and the speed of generating the target checkpoint video can be improved.

Description

Video generation method, electronic device and storage medium
Technical Field
The embodiment of the invention relates to the field of videos, in particular to a video generation method, electronic equipment and a storage medium.
Background
With the continuous progress of the technology, more and more people begin to produce personalized videos, for example, music is added into the videos, and the videos are edited according to the music rhythm, so that the pictures of the videos are played or switched along with the music rhythm to form the click videos. The production of the stuck point video can be generally completed by manual production by software, and the specific process is approximately as follows: and selecting standard template music, intercepting a plurality of sections of video clips according to the accent time of the standard template music, and combining the standard template music and the intercepted video to form a stuck point video.
However, when the click video is manually made, the frame is manually captured frame by frame, and the captured frame is continuously adjusted according to the position of the click of the standard template music, so that the efficiency of making the click video is low.
Disclosure of Invention
The invention aims to provide a video generation method, an electronic device and a storage medium, which can improve the efficiency and speed of generating a target checkpoint video.
To solve the above technical problem, an embodiment of the present invention provides a method for generating a video, including: acquiring a target card point of a multimedia file and a standard card point corresponding to the target card point, wherein the standard card point is a card point in preset standard template music; editing the multimedia file according to the position of the target card point and the position of the corresponding standard card point so as to enable the target card point to be matched with the corresponding standard card point; and overlapping the edited multimedia file with the standard template music to form a target checkpoint video.
An embodiment of the present invention also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the video generation method.
Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the above-mentioned video generation method.
In the embodiment of the application, the multimedia file is edited through the position of each target card point of the multimedia file and the position of the corresponding standard card point, so that the position of the target card point is matched with the position of the corresponding standard card point, and further, after the edited multimedia file is overlapped with the standard template music, a target card point video played by the multimedia file along with the rhythm of the standard template music is formed; because the multimedia file does not need to be edited manually, the speed and the efficiency of forming the target checkpoint video are improved; meanwhile, the positions of the stuck points in the standard template music are obtained again, so that the standard template music can be selected by a user, the standard template music fixed in the template is not required to be adopted, the target stuck point video can be flexibly generated, and the generated target stuck point video meets the personalized requirements of the user.
In addition, editing the multimedia file according to the position of the target card point and the position of the corresponding standard card point so as to match the target card point with the corresponding standard card point, comprising: and if the position of the target card point is not coincident with the position of the corresponding standard card point, adjusting the playing speed of the multimedia file. Whether the positions of the target card points and the positions of the corresponding standard card points coincide or not is compared one by one, whether the multimedia file is adjusted or not is determined, when the positions of the target card points and the positions of the corresponding standard card points do not coincide, the playing speed of the multimedia file is adjusted, and the adjustment is only carried out when the positions of the target card points and the positions of the corresponding standard card points do not coincide, so that the adjustment times can be reduced, and the adjustment efficiency is improved.
In addition, if the position of the target card point is detected to be behind the position of the corresponding standard card point, the playing speed of the multimedia file is increased, so that the playing time length of the multimedia file is compressed by a preset time length, and the preset time length is the time length difference value between the target card point and the corresponding standard card point; and if the position of the target card point is detected to be before the position of the corresponding standard card point, reducing the playing speed of the multimedia file so as to increase the playing time of the media file by the preset time. Compressing or increasing the playing time of the multimedia file to ensure that the position of the current target card point is superposed with the position of the corresponding standard card point; the adjusting mode is simple and the adjusting speed is high.
In addition, the method further comprises: and if the standard card point corresponding to the target card point is detected to be empty, stopping adjusting the playing rate of the multimedia file. When the standard card points corresponding to the target card points are detected to be empty, the number of the target card points of the multimedia file is more than that of the standard card points, the adjustment is finished at the moment, the multimedia file is played according to the original playing speed, the multimedia file with the same number as that of the standard template music does not need to be input, and the applicable scene and flexibility of generating the target card point video are improved.
In addition, acquiring a target card point of the multimedia file and a standard card point corresponding to the target card point comprises the following steps: acquiring at least one target card point in the multimedia file; acquiring at least one standard card point in the standard template music; sequencing the target stuck points and sequencing the standard stuck points according to the time sequence; and performing the following processing on each target stuck point: and acquiring the sequencing position of the target card point, searching for the standard card point with the same sequencing position, and corresponding the target card point to the searched standard card point. And binding the target card point and the standard card point according to the time sequence, thereby avoiding the situation of adjustment dislocation and improving the accuracy of adjustment.
In addition, acquiring at least one target card point in the multimedia file comprises the following steps: acquiring an energy value of the multimedia file at each sampling time point; and acquiring a sampling time point corresponding to the energy value meeting the first preset condition as a target stuck point.
In addition, acquiring at least one target card point in the multimedia file comprises: and acquiring a sampling time point corresponding to the key frame meeting the second preset condition in the multimedia file as a target stuck point.
In addition, acquiring at least one standard checkpoint in the standard template music comprises: acquiring the energy value of the standard template music at each sampling time point; and acquiring a sampling time point corresponding to the energy value meeting the first preset condition as a standard stuck point.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
Fig. 1 is a flow chart of a method of video generation provided according to a first embodiment of the invention;
fig. 2 is a flowchart of a method of video generation according to a second embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a distribution of stuck point locations and standard stuck point locations in a method for video generation according to a second embodiment of the present invention;
fig. 4 is a schematic diagram of distribution of stuck point positions and standard stuck point positions in a video generation method according to a second embodiment of the present invention;
FIG. 5 is a schematic diagram of distribution of stuck point positions and standard stuck point positions in a video generation method according to a second embodiment of the present invention
Fig. 6 is a schematic diagram illustrating a standard stuck point position before a stuck point position in a method for video generation according to a second embodiment of the present invention;
fig. 7 is a schematic diagram illustrating a standard checkpoint position located behind a checkpoint position in a video generation method according to a second embodiment of the present invention;
fig. 8 is a schematic distribution diagram of standard stuck point positions and stuck point positions in a video generation method according to a second embodiment of the present invention;
fig. 9 is a flowchart of a method of video generation according to a third embodiment of the present invention;
fig. 10 is a block diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present invention, and the embodiments may be mutually incorporated and referred to without contradiction.
At present, the modes of generating a target checkpoint video are divided into two modes, one is to use the existing software and import a multimedia file conforming to a template according to the template in the software, for example, the number of photos or the video length required by the template; and synthesizing the imported multimedia file with the background music in the template to form a target checkpoint video. However, the background music in the template cannot be changed in this way, the background music in the template must be selected, and the imported multimedia file must also meet the requirements of the template, so that the personalized requirements of the user cannot be realized, and the application range of generating the target click video is also reduced.
And the second mode is that the target checkpoint video is generated manually by using professional editing software, the process is to select standard template music, intercept a plurality of sections of video segments according to the accent time of the standard template music, and then combine the standard template music and the intercepted video to form the target checkpoint video. Although the method meets the personalized requirements of the user, the user is required to have professional ability, and the whole process needs manual participation, so that the efficiency of generating the target checkpoint video is reduced.
The first embodiment of the present invention relates to a video generation method, the flow of which is shown in fig. 1:
step 101: and acquiring a target card point of the multimedia file and a standard card point corresponding to the target card point, wherein the standard card point is a card point in the preset standard template music.
Step 102: and editing the multimedia file according to the position of the target card point and the position of the corresponding standard card point so as to match the target card point with the corresponding standard card point.
Step 103: and overlapping the edited multimedia file with the standard template music to form a target checkpoint video.
In the embodiment of the application, the multimedia file is edited through the position of each target card point of the multimedia file and the position of the corresponding standard card point, so that the position of the target card point is matched with the position of the corresponding standard card point, and further, after the edited multimedia file is overlapped with the standard template music, a target card point video played by the multimedia file along with the rhythm of the standard template music is formed; because the multimedia file does not need to be edited manually, the speed and the efficiency of forming the target checkpoint video are improved; meanwhile, the positions of the stuck points in the standard template music are obtained again, so that the standard template music can be selected by a user, the standard template music fixed in the template is not required to be adopted, the target stuck point video can be flexibly generated, and the generated target stuck point video meets the personalized requirements of the user.
A second embodiment of the invention relates to a method of video generation. The second embodiment is a detailed description of steps 101 to 103 in the first embodiment, wherein the method for generating a video can be applied to an electronic device, for example, a mobile phone, a computer, and the like, and a specific flow of the method for generating a video is shown in fig. 2, and includes:
step 201: and acquiring a target card point of the multimedia file and a standard card point corresponding to the target card point, wherein the standard card point is a card point in the preset standard template music.
Specifically, the multimedia file may be a video file, or an audio-video file, or a picture, a photo, or the like. In this example, an audio/video file is described as an example of a multimedia file. The preset standard template music can be customized by a user, and can also be default template music as the standard template music. The standard template music in this example is user-defined music, and the standard template music and the multimedia file can be imported into the electronic equipment by a user.
The target number of the target clicks in the multimedia file may include at least one, and the number of the clicks in the standard template music may also include at least 1, where the number of the target clicks in the multimedia file may be different from or the same as the number of the clicks in the standard template music, which is not limited in this example.
In one example, at least one target card point in a multimedia file is obtained; acquiring at least one standard card point in standard template music; respectively sequencing the target stuck points and the standard stuck points according to the time sequence; and performing the following processing on each target stuck point: and acquiring the sequencing position of the target card point, searching for the standard card points with the same sequencing position, and corresponding the target card point to the searched standard card point.
Specifically, there are various manners of acquiring each of the clicks in the standard template music, for example, a time point corresponding to an accent in the standard template music may be used as the standard click, and a time point at which a pause occurs in the standard template music may also be used as the standard click.
Similarly, there are various ways to obtain each target checkpoint in the multimedia file, and the target checkpoint may be obtained according to the type of the multimedia file, for example, if the multimedia file is a photo, the time point of switching the photo may be used as the target checkpoint; if the multimedia file is an audio/video file, the time point corresponding to the accent in the audio/video file can be used as a target card point; if the multimedia file is a video file, the time point corresponding to the preset action in the video file can be used as a target card point.
Marking each target card point on a time axis of the multimedia file to obtain a distribution map of the card points; and marking each standard card point on the time axis of the standard template music to obtain a distribution diagram of the standard card points. And according to the time sequence, the target card points and the standard card points are in one-to-one correspondence. The binding procedure is described in the following case in section 3:
the first condition is as follows: the number of stuck point locations is greater than the number of standard stuck point locations.
As shown in the distribution diagram of the target stuck points and the distribution diagram of the standard stuck points in fig. 3, in a time period of 0 to n seconds, the number of the target stuck points is 5, and the target stuck points are sorted in chronological order as a1, a2, A3, a4 and a 5; the number of the standard stuck point positions is 3, and the standard stuck point positions are sorted into B1, B2 and B3 according to the time sequence; the processing for each target stuck point is as follows: if the sorting position of A1 is first, the standard checkpoint with the first sorting position is B1, and A1 corresponds to B1; similarly, if the sorting position of a2 is second, the standard checkpoint whose query sorting position is second is B2, then a2 corresponds to B2, and if A3 corresponds to B3, and if there is no corresponding standard checkpoint in the sorting positions corresponding to a4 and A5, it is determined that the standard checkpoint positions corresponding to a4 and A5 are empty.
Case two: the number of stuck point locations is less than the number of standard stuck point locations.
As shown in the distribution diagram of the target stuck points and the distribution diagram of the standard stuck points in fig. 4, in a time period of 0 to n seconds, the number of the target stuck points is 3, and the target stuck points are sorted into a1, a2 and A3 according to the chronological order; the number of the standard card point positions is 5, and the standard card point positions are sorted into B1, B2, B3, B4 and B5 according to the time sequence; the processing for each target stuck point is as follows: if the sorting position of a1 is first, the standard checkpoint with the first query sorting position is B1, a1 corresponds to B1, if the sorting position of a2 is second, the standard checkpoint with the second query sorting position is B2, a2 corresponds to B2, similarly, A3 corresponds to B3, if there is no target checkpoint after A3, and the corresponding operation of the target checkpoint and the standard checkpoint is finished.
Case three: the number of stuck point positions is equal to the number of standard stuck point positions.
As shown in the distribution diagram of the target stuck points and the distribution diagram of the standard stuck points in fig. 5, in a time period of 0 to n seconds, the number of the target stuck points is 3, and the target stuck points are sorted into a1, a2 and A3 according to the chronological order; the number of the standard stuck point positions is 3, and the standard stuck point positions are sorted into B1, B2 and B3 according to the time sequence; the processing for each target stuck point is as follows: if the sorting position of a1 is first, the standard checkpoint with the first query sorting position is B1, a1 corresponds to B1, if the sorting position of a2 is second, the standard checkpoint with the second query sorting position is B2, a2 corresponds to B2, and similarly, A3 corresponds to B3.
Step 202: processing is carried out for each target stuck point: and judging whether the position of the target stuck point is coincident with the position of the corresponding standard stuck point, if the position of the target stuck point is not coincident with the position of the corresponding standard stuck point, executing the step 203, otherwise, continuously processing the next target stuck point until the adjustment is finished.
Specifically, if the position of the target stuck point is equal to the position of the corresponding standard stuck point, it indicates that the position of the target stuck point coincides with the position of the corresponding standard stuck point.
It should be noted that, before or after determining whether the position of the target checkpoint coincides with the position of the corresponding standard checkpoint in time sequence, if it is detected that the standard checkpoint corresponding to the target checkpoint is empty, that is, the detected target checkpoint does not have the corresponding standard checkpoint, the adjustment of the play rate of the multimedia file is directly finished.
Step 203: and adjusting the playing speed of the multimedia file.
In one example, if the position of the target checkpoint is detected to be behind the position of the corresponding standard checkpoint, the playing rate of the multimedia file is increased, so that the playing time of the multimedia file is compressed by a preset time, wherein the preset time is a time difference between the target checkpoint and the corresponding standard checkpoint; and if the position of the target card point is detected to be before the position of the corresponding standard card point, reducing the playing speed of the multimedia file so as to increase the preset time length for the playing time length of the media file.
Specifically, a first time difference value between a previous checkpoint position and a previous reference position thereof may be obtained, and a second time difference value between a corresponding standard checkpoint position and a previous reference position thereof may be obtained; and adjusting the playing rate of the multimedia file according to the ratio of the first time difference to the second time difference, wherein the starting point of the adjustment is the position of the previous checkpoint, and the adjustment duration of the adjustment is the second time difference.
Specifically, the position of the checkpoint is adjusted for the multimedia file by compressing the time length or increasing the time length, and the adjusted time length is a second time difference. For example, the previous reference position of the multi-media file at the checkpoint position t1, the checkpoint position t1 may be the previous checkpoint position t0, and the first time difference Δ t is t1-t 0; a standard pinch point position t1' corresponding to the pinch point position t1, wherein a previous reference position of the standard pinch point position t1' is a standard pinch point position t0 '; the second time difference Δ t ═ t1'-t 0'; adjusting the proportion l to be delta t/delta t'; if the playback rate is s1, the adjusted playback rate is s1 ═ s1(Δ t/Δ t'). The starting point of the adjustment of this time is t0, and the adjustment time length is a second time difference.
It should be noted that the previous reference position of the checkpoint position may also be the position of the frame 0 of the multimedia file, and similarly, the previous reference position of the standard checkpoint position corresponding to the checkpoint position may also be the position of the frame 0 of the standard music template.
There are two situations when the position of the stuck point is not coincident with the corresponding position of the standard stuck point, and the adjustment modes of the two situations will be described separately below.
The first condition is as follows: the position of the standard stuck point is located before the position of the target stuck point.
The position distribution of the standard clicks of the standard template music is shown in fig. 6, and includes a position B1 of the standard click and a position B2 of the standard click; the positions of the target pinch points are labeled A1 and A2, respectively; assuming that the playing time of the standard template music is equal to the playing time of the multimedia file, it is marked as n seconds.
The treatment of A1 and A2 were performed sequentially in chronological order. By increasing the rate, the playing duration is compressed, and the process for processing a1 is as follows: the starting point of the adjustment is marked as x, the x is 0 second, the first time difference is A1-x, and the second time difference is B1-x; starting to adjust the speed from 0 second, wherein the adjusting time length is B1; if the normal playing speed of the multimedia file is S, S (a1) ═ S (a 1-x)/(B1-x); after the adjustment, whether the next checkpoint position a2 coincides with the corresponding next standard checkpoint position B2 is judged, the adjustment starting point is a1, and since the rate of the adjustment of the a1 is performed at this time, the first time difference is a2-a 1-x; the second time difference is B2-B1-x; then S (a2) ═ S (a2-a1-x)/(B2-B1-x), where x is 0 and S (a2) ═ S (a2-a 1)/(B2-B1). After the time length of B2-B1, the playing time length of the multimedia file is compressed to a preset time length, wherein the preset time length is the time length difference between the target card point and the corresponding standard card point. Wherein after the duration of B2-B1, the rate returns to the original rate s.
The playing rate of the multimedia file is represented as: the playback rate is S (A2) in the duration from 0 to B1, and the playback rate is S (A1) and B1 to (B2-B1) and then S; wherein, after the time length of 0-B1, A1 is B1, and after the time length of B1- (B2-B1), A2 is B2; at this time, each target checkpoint is matched with a corresponding standard checkpoint.
Case two: the location of the standard stuck point is located after the location of the target stuck point.
The position distribution of the standard clicks of the standard template music is shown in fig. 7, and includes a standard click position B1 and a standard click position B2; the positions of the target pinch points are labeled A1 and A2, respectively; assuming that the playing time of the standard template music is equal to the playing time of the multimedia file, it is marked as n seconds.
The treatment of A1 and A2 were performed sequentially in chronological order. The process for processing a1 is as follows: the adjustment starting point is marked as x, the first time difference value is A1-x, and the second time difference value is B1-0; x is 0 seconds; the rate is adjusted from 0 second for a time period of B1; if the normal playing speed of the multimedia file is S, S (a1) ═ S (a 1-x)/(B1-x); after the adjustment, whether the next checkpoint position a2 coincides with the corresponding next standard checkpoint position B2 is judged, the adjustment starting point is a1, and since the rate of the adjustment of the a1 is performed at this time, the first time difference is a2-a 1-x; the second time difference is B2-B1-x; then S (a2) ═ S (a2-a1-x)/(B2-B1-x), where x is 0 and S (a2) ═ S (a2-a 1)/(B2-B1). After the time length of B2-B1, the playing time length of the multimedia file is compressed to a preset time length, wherein the preset time length is the time length difference between the target card point and the corresponding standard card point. Wherein after the duration of B2-B1, the rate returns to the original rate s.
The playing rate of the multimedia file is represented as: the playback rate is S (A2) in the duration from 0 to B1, and the playback rate is S (A1) and B1 to (B2-B1) and then S; wherein, after the time length of 0-B1, A1 is B1, and after the time length of B1- (B2-B1), A2 is B2; at this point, each checkpoint position matches the corresponding standard checkpoint position.
It can be understood that, during the playing of the multimedia file, there can exist a case where the position of a part of the target stuck point is located after the position of the standard stuck point and a case where the position of a part of the target stuck point is located before the position of the standard stuck point. The process of processing for the location of each target stuck point is similar to cases one and two.
For example, the standard checkpoint positions of the standard template music are distributed as shown in fig. 8, and the standard checkpoint positions are respectively marked as B2, B1, B3 and B4 in chronological order; the checkpoint positions are labeled a2, a1, A3, and a4, respectively; assuming that the playing time of the standard template music is equal to the playing time of the multimedia file, it is marked as n seconds. The original playing speed of the multimedia file is s; in the time period from 0 to B2, the playing speed S (A2) is A2/B2; if a1 is still earlier than B1 after the adjustment, the adjusted playback speed S (a1) is (a1-a2)/(B1-B2), and the playback time is B1-B2. The subsequent adjustment of the playback rates corresponding to A3 and a4 is similar, and will not be described herein again.
Step 204: and overlapping the edited multimedia file with the standard template music to form a target checkpoint video.
And overlapping the edited multimedia file with the standard template music to form a click video. The multimedia file is played with the rhythm of the standard template music.
The target checkpoint is matched with the corresponding standard checkpoint, so that the generated target checkpoint video is accurate, the obtained target checkpoint video is good in effect, and the generation efficiency is high.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
A third embodiment of the present invention relates to a method of video generation. This embodiment is an introduction to a specific implementation of step 101 in the first embodiment or step 201 in the second embodiment, and a specific implementation process is as shown in fig. 9;
step 301: and acquiring at least one target card point in the multimedia file.
In one example, an energy value of the multimedia file at each sampling time point is obtained; and acquiring a sampling time point corresponding to the energy value meeting the first preset condition as a target stuck point.
Specifically, if the multimedia file is an audio/video file or a video file, the energy value in the multimedia file may be extracted through an energy extraction function in the audio processing tool. The energy extraction function can be shown as equation (1):
Figure BDA0002777920380000091
wherein p isrefIs the maximum value of the total amplitude, p, of the multimedia filermsIs the amplitude value, L, of the current multimedia filepIs the energy value of the current time position.
Sampling the multimedia file through a preset sampling time point to obtain a corresponding energy value of the sampling time point; the first predetermined condition may be set according to practical applications, for example, the first predetermined condition is an energy value exceeding a first threshold value, and the first threshold value is an energy value 1/4 of an energy peak in the multimedia file.
In another example, a sampling time point corresponding to a key frame satisfying a second preset condition in the multimedia file is obtained as a target stuck point of the multimedia file.
Specifically, the multimedia file is a video file or a collection of photos, and a key frame in the multimedia file may be extracted, and the second preset condition may be a picture including a specified action, for example, a key frame including an action of raising a hand, clapping a hand, stomping a foot, and the like.
Step 302: and acquiring at least one standard checkpoint in the standard template music.
Specifically, an energy value of standard template music at each sampling time point is obtained; and acquiring a sampling time point corresponding to the energy value meeting the first preset condition as a standard stuck point. The function of the extracted energy value is shown in formula (1), and a standard stuck point is obtained according to the amplitude of sound.
Step 303: and respectively sequencing the target stuck points and the standard stuck points according to the time sequence.
Step 304: and performing the following processing on each target stuck point: and acquiring the sequencing position of the target card point, searching for the standard card point with the same sequencing position, and corresponding the target card point to the searched standard card point.
Step 303 and step 304 are substantially the same as step 201 in the second embodiment, and will not be described herein again.
In this embodiment, various modes of acquiring the position of the stuck point are provided, so that the position of the stuck point can be flexibly acquired.
A fourth embodiment of the present invention relates to an electronic device, a block diagram of which is shown in fig. 10, and includes: at least one processor 401; and a memory 402 communicatively coupled to the at least one processor 401; the memory 402 stores instructions executable by the at least one processor 401, and the instructions are executed by the at least one processor 401, so that the at least one processor 401 can execute the video generation method.
The memory and the processor are connected by a bus, which may include any number of interconnected buses and bridges, linking together one or more of the various circuits of the processor and the memory. The bus may also link various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program which, when executed by a processor, implements the method of video generation described above.
Those skilled in the art can understand that all or part of the steps in the method of the foregoing embodiments may be implemented by a program to instruct related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.

Claims (10)

1. A method of video generation, comprising:
acquiring a target card point of a multimedia file and a standard card point corresponding to the target card point, wherein the standard card point is a card point in preset standard template music;
editing the multimedia file according to the position of the target card point and the position of the corresponding standard card point so as to enable the target card point to be matched with the corresponding standard card point;
and overlapping the edited multimedia file with the standard template music to form a target checkpoint video.
2. The method of claim 1, wherein editing the multimedia file according to the position of the target checkpoint and the position of the corresponding standard checkpoint to match the target checkpoint with the corresponding standard checkpoint comprises:
and if the position of the target card point is not coincident with the position of the corresponding standard card point, adjusting the playing speed of the multimedia file.
3. The method of claim 2, wherein said adjusting the play rate of the multimedia file comprises:
if the target card point is detected to be behind the corresponding standard card point, increasing the playing speed of the multimedia file so as to compress the playing time of the multimedia file by a preset time, wherein the preset time is the time difference between the target card point and the corresponding standard card point;
and if the position of the target card point is detected to be before the position of the corresponding standard card point, reducing the playing speed of the multimedia file so as to increase the playing time of the multimedia file by the preset time.
4. A method for video generation according to any of claims 2 to 3, wherein the method further comprises: and if the standard card point corresponding to the target card point is detected to be empty, stopping adjusting the playing speed of the multimedia file.
5. The method of claim 1, wherein the obtaining a target checkpoint of a multimedia file and a standard checkpoint corresponding to the target checkpoint comprises:
acquiring at least one target card point in the multimedia file;
acquiring at least one standard card point in the standard template music;
sequencing the target stuck points and sequencing the standard stuck points according to the time sequence;
and performing the following processing on each target stuck point: and acquiring the sequencing position of the target card point, searching for the standard card point with the same sequencing position, and corresponding the target card point to the searched standard card point.
6. The method of claim 5, wherein the obtaining at least one target card point in the multimedia file comprises:
acquiring an energy value of the multimedia file at each sampling time point;
and acquiring the sampling time point corresponding to the energy value meeting the first preset condition as the target stuck point.
7. The method of claim 5, wherein the obtaining at least one target card point in the multimedia file comprises:
and acquiring a sampling time point corresponding to the key frame meeting a second preset condition in the multimedia file as the target stuck point.
8. The method of claim 5, wherein said obtaining at least one standard stuck point in the standard template music comprises:
acquiring the energy value of the standard template music at each sampling time point;
and acquiring the sampling time point corresponding to the energy value meeting the first preset condition as the standard stuck point.
9. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of video generation according to any one of claims 1-8.
10. A computer-readable storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the method of video generation of any of claims 1 to 8.
CN202011271827.8A 2020-11-13 2020-11-13 Video generation method, electronic device and storage medium Pending CN112468741A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011271827.8A CN112468741A (en) 2020-11-13 2020-11-13 Video generation method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011271827.8A CN112468741A (en) 2020-11-13 2020-11-13 Video generation method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN112468741A true CN112468741A (en) 2021-03-09

Family

ID=74836247

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011271827.8A Pending CN112468741A (en) 2020-11-13 2020-11-13 Video generation method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN112468741A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114242070A (en) * 2021-12-20 2022-03-25 阿里巴巴(中国)有限公司 Video generation method, device, equipment and storage medium
WO2022231515A1 (en) * 2021-04-30 2022-11-03 Lemon Inc. Content creation based on rhythm
CN115361594A (en) * 2022-07-15 2022-11-18 北京达佳互联信息技术有限公司 Method and device for generating click video, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10440473B1 (en) * 2018-06-22 2019-10-08 EVA Automation, Inc. Automatic de-baffling
CN110602550A (en) * 2019-08-09 2019-12-20 咪咕动漫有限公司 Video processing method, electronic equipment and storage medium
CN110933487A (en) * 2019-12-18 2020-03-27 北京百度网讯科技有限公司 Method, device and equipment for generating click video and storage medium
CN111835986A (en) * 2020-07-09 2020-10-27 腾讯科技(深圳)有限公司 Video editing processing method and device and electronic equipment
CN111914523A (en) * 2020-08-19 2020-11-10 腾讯科技(深圳)有限公司 Multimedia processing method and device based on artificial intelligence and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10440473B1 (en) * 2018-06-22 2019-10-08 EVA Automation, Inc. Automatic de-baffling
CN110602550A (en) * 2019-08-09 2019-12-20 咪咕动漫有限公司 Video processing method, electronic equipment and storage medium
CN110933487A (en) * 2019-12-18 2020-03-27 北京百度网讯科技有限公司 Method, device and equipment for generating click video and storage medium
CN111835986A (en) * 2020-07-09 2020-10-27 腾讯科技(深圳)有限公司 Video editing processing method and device and electronic equipment
CN111914523A (en) * 2020-08-19 2020-11-10 腾讯科技(深圳)有限公司 Multimedia processing method and device based on artificial intelligence and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022231515A1 (en) * 2021-04-30 2022-11-03 Lemon Inc. Content creation based on rhythm
US11961537B2 (en) 2021-04-30 2024-04-16 Lemon Inc. Content creation based on rhythm
CN114242070A (en) * 2021-12-20 2022-03-25 阿里巴巴(中国)有限公司 Video generation method, device, equipment and storage medium
CN115361594A (en) * 2022-07-15 2022-11-18 北京达佳互联信息技术有限公司 Method and device for generating click video, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN112468741A (en) Video generation method, electronic device and storage medium
CN110602550A (en) Video processing method, electronic equipment and storage medium
US8886635B2 (en) Apparatus and method for recognizing content using audio signal
US20050228861A1 (en) Minute file creation method, minute file management method, conference server, and network conference system
EP2685450A1 (en) Device and method for recognizing content using audio signals
EP1830361A1 (en) Image displaying method and video playback apparatus
US10341727B2 (en) Information processing apparatus, information processing method, and information processing program
CN103686352A (en) Smart television media player and subtitle processing method thereof, and smart television
CN107170432A (en) A kind of music generating method and device
US20240037166A1 (en) Multimedia resource display method and apparatus
CN105824895A (en) KTV song selection method and system
CN109842820B (en) Barrage information input method and device, mobile terminal and readable storage medium
EP4184310A1 (en) Volume recommendation method and apparatus, device and storage medium
CN104731938A (en) Video searching method and device
CN104581224A (en) Play content switching method and device and terminal
CN112347049A (en) File information display method, terminal device and computer-readable storage medium
CN103607629B (en) Multimedia file playing method and electronic terminal
CN106205656A (en) The localization method of a kind of file playing position and device
CN102811380A (en) Demultiplexing method and demultiplexing device for audio and video data in multimedia files
CN105847990A (en) Media file playing method and apparatus
CN112653919B (en) Subtitle adding method and device
CN1692373B (en) Video recognition system and method
US20140016914A1 (en) Editing apparatus, editing method, program and storage medium
CN106547768A (en) A kind of control method for playing back and device of media file
KR102527469B1 (en) Video playback speed control method, apparatus, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210309

RJ01 Rejection of invention patent application after publication