Video synthesis method and device, electronic equipment, storage medium and program product

By generating and merging empty source videos during the transmission of the contract video, the problem of incomplete contract videos is solved, and the integrity of the target video and efficient backtracking capabilities are achieved.

CN119815114APending Publication Date: 2025-04-11KE COM (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411877497.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

Due to factors such as unstable network environment of the contract center or artificial misoperation, the contract video is prone to incompleteness during the transmission process, which affects the service quality inspection of the contract process.

Method used

By obtaining at least one sub-video corresponding to the target video to be generated, and when the comprehensive duration of the sub-video is inconsistent with the duration of the target video, a first empty source video of the corresponding duration is generated, and then the video merging process is performed using the at least one sub-video and the first empty source video to obtain the complete target video.

Benefits of technology

Ensure the integrity and timeline continuity of the target video, improve the backtracking efficiency of the video, and avoid video incompleteness caused by network problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119815114A_ABST
    Figure CN119815114A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a video synthesis method and device, electronic equipment, a storage medium and a program product, and the method comprises the steps: obtaining at least one sub-video corresponding to a to-be-generated target video, generating a first empty source video when the comprehensive time length corresponding to the at least one sub-video is not consistent with the time length corresponding to the target video, and performing video merging processing on the at least one sub-video and the first air source video based on the time information corresponding to the at least one sub-video and the first air source video to obtain a target video. Therefore, in the embodiment of the invention, not only is the integrity of the target video ensured, but also the time axis of the target video is ensured to be continuous, and the video time (time information) of the target video is ensured to be consistent with the actual time, so that the time can be used for backtracking in the target video, and the backtracking efficiency of the video is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to video generation technology and video completion technology, and in particular to a video synthesis method, device, electronic device, storage medium and program product. Background Art

[0002] Testing the service quality of the contract signing process is a crucial service guarantee measure, which can be achieved by tracing back the contract signing video that records the contract signing process.

[0003] In the prior art, when signing a contract at a contract signing center, a video recording device is usually used to record the entire contract signing process in real time, generate a corresponding contract signing video, and transmit each recorded contract signing video to the cloud for storage, so that the contract signing video stored in the cloud can be used to perform service quality inspection on the contract signing process later. However, in actual applications, due to factors such as unstable network environment of the contract signing center or human error operation, it is often difficult to transmit the contract signing video completely, resulting in incomplete stored contract signing video, which affects the service quality inspection of the contract signing process. Summary of the invention

[0004] In order to solve the above technical problems, the embodiments of the present disclosure provide a video synthesis method, device, electronic device, storage medium and program product.

[0005] One aspect of an embodiment of the present disclosure provides a video synthesis method, including: obtaining at least one sub-video corresponding to a target video to be generated; generating a first empty source video in response to an inconsistency between a comprehensive duration corresponding to the at least one sub-video and a duration corresponding to the target video, wherein time information corresponding to the first empty source video includes a time period difference between the target video and the at least one sub-video, the comprehensive duration is the sum of the durations of the sub-videos in the at least one sub-video, the duration corresponding to the target video is the playback duration corresponding to the target video, the duration corresponding to the first empty source video is equal to the duration corresponding to the time period difference, and the time period difference is used to represent the time period difference between the at least one sub-video and the target video; based on the time information corresponding to the at least one sub-video and the first empty source video respectively, performing video merging processing on the at least one sub-video and the first empty source video to obtain the target video, wherein the time information includes a start time and an end time.

[0006] Another aspect of the embodiments of the present disclosure provides a video synthesis device, including: a video acquisition module, used to acquire at least one sub-video corresponding to a target video to be generated; a first empty source video generation module, used to generate a first empty source video in response to the inconsistency between the comprehensive duration corresponding to the at least one sub-video and the duration corresponding to the target video, the time information corresponding to the first empty source video includes the time period difference between the target video and the at least one sub-video, the comprehensive duration is the sum of the durations of each sub-video in the at least one sub-video, the duration corresponding to the target video is the playback duration corresponding to the target video, the duration corresponding to the first empty source video is equal to the duration corresponding to the time period difference, and the time period difference is used to represent the time period difference between the at least one sub-video and the target video; a first video merging module, used to perform video merging processing on the at least one sub-video and the first empty source video based on the time information corresponding to the at least one sub-video and the first empty source video respectively, to obtain the target video, the time information includes a start time and an end time.

[0007] Another aspect of the embodiments of the present disclosure provides an electronic device, including: a memory for storing a computer program; a processor for executing the computer program stored in the memory, and when the computer program is executed, the above-mentioned video synthesis method is implemented.

[0008] According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned video synthesis method is implemented.

[0009] According to another aspect of the embodiments of the present disclosure, a computer program product is provided, including computer program instructions, which implement the above-mentioned video synthesis method when executed by a processor.

[0010] In the embodiments of the present disclosure, when the comprehensive duration corresponding to the sub-video is inconsistent with the duration corresponding to the target video, a first empty source video of the corresponding duration is generated, and then the target video is generated using each sub-video in at least one sub-video and the first empty source video, thereby ensuring the integrity of the target video and avoiding the situation where the target video is incomplete due to factors such as an unstable network environment when the target video is directly captured.

[0011] In addition, in terms of ensuring the quality of the target video, when the comprehensive duration corresponding to the sub-video is inconsistent with the duration corresponding to the target video, the target video is generated using the first empty source video and sub-video of the corresponding duration, thereby ensuring the continuity of the time axis of the target video, and making the video time (time information) of the target video consistent with the actual time, so that time can be used to trace back in the target video, thereby improving the efficiency of video tracing.

[0012] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0014] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:

[0015] Figure 1 It is a flowchart of a video synthesis method provided by an exemplary embodiment of the present disclosure.

[0016] Figure 2 It is a flowchart of step S110 provided by an exemplary embodiment of the present disclosure.

[0017] Figure 3 It is a flowchart of step S110 provided by another exemplary embodiment of the present disclosure.

[0018] Figure 4 It is a flowchart of a video synthesis method provided by another exemplary embodiment of the present disclosure.

[0019] Figure 5 It is a flowchart of step S120 provided by an exemplary embodiment of the present disclosure.

[0020] Figure 6 It is a flowchart of a video synthesis method provided by another exemplary embodiment of the present disclosure.

[0021] Figure 7 It is a structural schematic diagram of a video synthesis device provided by an exemplary embodiment of the present disclosure.

[0022] Figure 8 The figure is a schematic diagram of the structure of an application embodiment of the electronic device disclosed in the present invention. DETAILED DESCRIPTION

[0023] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure unless otherwise specifically stated.

[0024] Those skilled in the art can understand that the terms "first" and "second" in the embodiments of the present disclosure are only used to distinguish different steps, devices or modules, etc., and neither represent any specific technical meaning nor indicate the necessary logical order between them.

[0025] It should also be understood that in the embodiments of the present disclosure, “plurality” may refer to two or more than two, and “at least one” may refer to one, two, or more than two.

[0026] It should also be understood that any component, data or structure mentioned in the embodiments of the present disclosure can generally be understood as one or more, unless explicitly limited or otherwise indicated in the context.

[0027] In addition, the term "and / or" in the present disclosure is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in the present disclosure generally indicates that the associated objects before and after are in an "or" relationship.

[0028] It should also be understood that the description of the various embodiments in the present disclosure focuses on the differences between the various embodiments, and the same or similar aspects thereof can be referenced to each other, and for the sake of brevity, they will not be described one by one.

[0029] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0030] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the present disclosure, its application, or uses.

[0031] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered part of the specification.

[0032] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0033] The embodiments of the present disclosure can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate with many other general or special computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, etc.

[0034] Electronic devices such as terminal devices, computer systems, servers, etc. can be described in the general context of computer system executable instructions (such as program modules) executed by computer systems. Generally, program modules can include routines, programs, object programs, components, logic, data structures, etc., which perform specific tasks or implement specific abstract data types. Computer systems / servers can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.

[0035] In the process of implementing the present disclosure, the inventors found that due to the complex and changeable network environment of the contract signing center, network delays or temporary network interruptions often occur, which may cause some video data to be lost during the transmission of the contract signing video, resulting in the inability to transmit the contract signing video completely, and thus making the contract signing video stored in the cloud incomplete. In addition, the contract signing staff may be busy receiving customers and fail to pay attention to the transmission status of the contract signing video in time, which also increases the risk of the contract signing video being lost or failing to be transmitted during the transmission process.

[0036] Figure 1 FIG. 1 is a flow chart of a video synthesis method provided by an exemplary embodiment of the present disclosure. This embodiment can be applied to electronic devices, such as Figure 1 As shown, the video synthesis method includes the following steps:

[0037] Step S100: obtaining at least one sub-video corresponding to the target video to be generated.

[0038] The sub-video may be a video used to generate a target video.

[0039] In one embodiment, multiple videos may be pre-stored in a video storage device such as a cloud storage system, each of which has a duration and time information corresponding to the video, and the time information corresponding to the video is used to indicate the shooting time of the video. According to the time information corresponding to the target video and the time information corresponding to the video, a video whose time information is within the time information corresponding to the target video may be searched from multiple videos as a sub-video.

[0040] For example, assuming that the time information corresponding to video A is 12:10-12:20, the time information corresponding to video B is 12:30-12:40, the time information corresponding to video C is 13:10-13:20, and the time information corresponding to the target video is 12:00-12:50, then video A and video B are determined as sub-videos corresponding to the target video.

[0041] Step S110 , in response to the fact that the comprehensive duration corresponding to at least one sub-video is inconsistent with the duration corresponding to the target video, a first empty source video is generated.

[0042] Among them, the first empty source video can be a black screen video with no content. The time information corresponding to the first empty source video includes the difference period between the target video and at least one sub-video, and the difference period is used to represent the time period between at least one sub-video and the target video, that is, the difference period can be understood as the vacant time period when the target video is generated using at least one sub-video, and the duration corresponding to the first empty source video is equal to the duration corresponding to the difference period. Exemplarily, assuming that the time information corresponding to the target video is 12:00-12:30, the corresponding duration of the target video is 30 minutes, the time information corresponding to the sub-video is 12:10-12:30, and the corresponding duration of the sub-video is 20 minutes, then the difference period between the target video and the sub-video is 12:00-12:10, and the duration corresponding to the difference period is 10 minutes. Correspondingly, the time information corresponding to the first empty source video is 12:00-12:10 (difference period), and the duration corresponding to the first empty source video is 10 minutes.

[0043] The comprehensive duration corresponding to at least one sub-video can be used to represent the sum of the durations corresponding to each sub-video in at least one sub-video. In one embodiment, when the number of sub-videos is 1, the duration corresponding to the sub-video can be determined as the comprehensive duration, and the comprehensive duration is compared with the duration corresponding to the target video. When the comprehensive duration is consistent with the duration corresponding to the target video, the sub-video is determined as the target video. When the comprehensive duration is inconsistent with the duration corresponding to the target video, a first empty source video is generated; when the number of sub-videos is 2 or more, the sum of the durations corresponding to each sub-video can be determined as the comprehensive duration, and the comprehensive duration is compared with the duration corresponding to the target video. When the comprehensive duration is inconsistent with the duration corresponding to the target video, a first empty source video is generated. The duration corresponding to the target video can be used to represent the corresponding playback duration of the target video. For example, the duration corresponding to the target video can be 5 minutes, etc.

[0044] In a specific embodiment, when there are multiple time periods between the sub-video and the target video, the first empty source video corresponding to each time period can be generated respectively. Exemplarily, assuming that the time information corresponding to the target video is 12:00-12:30, and the time information corresponding to the sub-video is 12:10-12:20, then there are two time periods between the sub-video and the target video, namely 12:00-12:10 and 12:20-12:30, then two first empty source videos can be generated, and the time information corresponding to the two first empty source videos is 12:00-12:10 and 12:20-12:30 respectively.

[0045] Step S120: Based on the time information corresponding to the at least one sub-video and the first empty source video, respectively, a video merging process is performed on the at least one sub-video and the first empty source video to obtain a target video.

[0046] The time information may include: the start time and the end time. Specifically, the time information corresponding to each sub-video includes: the start time and the end time of the sub-video; the time information corresponding to the first empty source video includes: the start time and the end time of the first empty source video; the start time corresponding to the first empty source video or sub-video can be used to indicate the time point when the video is started to be shot, and the end time corresponding to the start time corresponding to the first empty source video or sub-video can be used to indicate the time point when the video is stopped to be shot.

[0047] In one embodiment, after the first empty source video is generated, a merged video list can also be constructed. The merged video list includes time information corresponding to the first empty source video and time information corresponding to each sub-video, etc. Based on the merged video list, each sub-video can be merged with the first empty source video to generate a complete video, and the complete video is determined as the target video.

[0048] In the disclosed embodiment, when the comprehensive duration corresponding to the sub-video is inconsistent with the duration corresponding to the target video, a first empty source video of the corresponding duration is generated, and then the target video is generated using each sub-video in at least one sub-video and the first empty source video, thereby ensuring the integrity of the target video and avoiding the situation where the target video is incomplete due to factors such as an unstable network environment when the target video is directly captured. In addition, in terms of ensuring the quality of the target video, when the comprehensive duration corresponding to the sub-video is inconsistent with the duration corresponding to the target video, the target video is generated using the first empty source video of the corresponding duration and the sub-video, thereby ensuring the continuity of the time axis of the target video, making the video time (time information) of the target video consistent with the actual time, so that time can be used to trace back in the target video, thereby also improving the efficiency of video tracing.

[0049] Figure 2 is a flow chart of step S110 provided by an exemplary embodiment of the present disclosure. In some optional implementations, such as Figure 2 Said step S110 may include the following steps:

[0050] Step S111, determining time information corresponding to the first empty source video according to the start time and end time corresponding to at least one sub-video and the start time and end time corresponding to the target video.

[0051] In one embodiment, when there is one sub-video, the time period difference between the sub-video and the target video can be determined; when there are two or more sub-videos, the time period difference between the target video and all sub-videos can be determined, and the time period difference can be determined as the time information corresponding to the first empty source video.

[0052] Exemplarily, assuming that the time information corresponding to sub-video 1 is 9:10-9:17, the time information corresponding to sub-video 2 is 9:20-9:27, and the time information corresponding to the target video is 9:00-9:30, then the time periods between sub-videos 1 and 2 and the target video include: 9:00-9:10, 9:17-9:20 and 9:27-9:30. Accordingly, three first empty source videos need to be generated, and the time information corresponding to the three first empty source videos is 9:00-9:10, 9:17-9:20 and 9:27-9:30, respectively.

[0053] Step S112, in response to the audio and video parameters corresponding to each sub-video in at least one sub-video being consistent, a first empty source video is generated based on the audio and video parameters corresponding to the sub-video and the time information corresponding to the first empty source video.

[0054] Among them, the audio and video parameters corresponding to the first empty source video are consistent with the audio and video parameters corresponding to the sub-video.

[0055] Audio and video parameters can be used to measure the quality of the video. Audio and video parameters can include: video parameters and audio parameters. Video parameters can include: video encoding, bit rate, frame rate, resolution and time base (Timebase), the time base is the reciprocal of the time scale (TimeScale), and the time scale is used to mark the frame rate of time. Audio parameters can include: audio encoding, bit rate, sampling rate and channels.

[0056] The consistency of audio and video parameters can be understood as the audio parameters corresponding to each sub-video are the same, and the video parameters corresponding to each sub-view are the same.

[0057] In one embodiment, the time information corresponding to the first empty source video can be used to determine the duration corresponding to the first empty source video, and then the first empty source video can be generated using FFmpeg (FastForward Mpeg) based on the audio and video parameters corresponding to the sub-video and the duration corresponding to the first empty source video.

[0058] In the embodiments of the present disclosure, the time information corresponding to the target video and the time information corresponding to the sub-video can be used to quickly determine the time information corresponding to the first empty source video. When the audio and video parameters corresponding to the sub-videos are consistent, the first empty source video is generated directly using the audio and video parameters corresponding to the sub-video and the time information corresponding to the first empty source video, so that the audio and video parameters corresponding to the first empty source video are consistent with the audio and video parameters corresponding to the sub-video, thereby facilitating the subsequent merging of the first empty source video and the sub-video.

[0059] Figure 3 is a flow chart of step S110 provided by another exemplary embodiment of the present disclosure. In some optional implementations, such as Figure 3 The method may further include after step S111:

[0060] Step S113, in response to the sub-videos having inconsistent audio and video parameters, obtaining reference audio and video parameters.

[0061] The inconsistency of audio and video parameters can be understood as that at least one sub-video in each sub-video has video parameters that are different from those of other sub-videos, and / or at least one sub-video in each sub-video has audio parameters that are different from those of other sub-videos. In one embodiment, the reference audio and video parameters can be preset.

[0062] It should be noted that, in this embodiment, there is no specific execution order between step S112 and step S113.

[0063] Step S114: Generate a first empty source video based on the reference audio and video parameters and the time information corresponding to the first empty source video.

[0064] Among them, the method of generating the first empty source video based on the benchmark audio and video parameters and the time information corresponding to the first empty source video can refer to the method of generating the first empty source video based on the audio and video parameters corresponding to the sub-video and the time information corresponding to the first empty source video, which will not be repeated here.

[0065] In the disclosed embodiment, when there are sub-videos with inconsistent audio and video parameters among the sub-videos, a first empty source video is generated using reference audio and video parameters to facilitate subsequent video merging of the first empty source video and the sub-videos.

[0066] In some optional implementations, step S113 in the disclosed embodiment may include: determining reference audio and video parameters based on preset audio and video parameters and / or audio and video parameters corresponding to each sub-video.

[0067] In one embodiment, the lowest common divisor of the values ​​of the audio and video parameters corresponding to each sub-video may be used as the reference audio and video parameters; that is, the lowest common divisor of the video encoding, bit rate, frame rate, resolution and time base is determined in the video parameters corresponding to each sub-video as the corresponding parameter in the reference audio and video parameters, and the lowest common divisor of the audio encoding, bit rate, sampling rate and channel is determined in the audio parameters corresponding to each sub-video as the corresponding parameter in the reference audio and video parameters; or,

[0068] Alternatively, the audio and video parameters that appear most frequently among the audio and video parameters corresponding to each sub-video may be used as the reference audio and video parameters; or

[0069] Alternatively, the audio and video parameters with the smallest values ​​in each sub-video may be used as the reference audio and video parameters, that is, the video encoding, bit rate, frame rate, resolution and time base with the smallest values ​​in the video parameters corresponding to each sub-video may be used as the video parameters in the reference audio and video parameters, and the audio encoding, bit rate, sampling rate and channel with the smallest values ​​in the audio parameters corresponding to the sub-video may be used as the audio parameters in the reference audio and video parameters; or,

[0070] Alternatively, based on the time information corresponding to the first empty source video, the audio and video parameters corresponding to the sub-video whose playback timing is before the first empty source video and adjacent to the first empty source video may be determined as the reference audio and video parameters; illustratively, assuming that the time information corresponding to the first empty source video is 16:10 to 16:15, and the time information corresponding to the sub-video a is 16:05 to 16:10, then the sub-video a is the sub-video whose playback timing is before the first empty source video and adjacent to the first empty source video, and the audio and video parameters corresponding to the sub-video a are determined as the reference audio and video parameters; or,

[0071] You can also pre-set preset audio and video parameters, and when the audio and video parameters corresponding to each sub-video are inconsistent, use the preset audio and video parameters as the benchmark audio and video parameters; alternatively, you can also perform corresponding reduction or enlargement processing on the preset audio and video parameters based on the hardware information of the computing device used for video merging, and use the processed preset audio and video parameters as the benchmark audio and video parameters.

[0072] In the embodiments of the present disclosure, the reference audio and video parameters are determined by the audio and video parameters of each sub-video and / or the preset audio and video parameters, thereby achieving fast and efficient determination of the reference audio and video parameters.

[0073] In some optional embodiments, in the embodiments of the present disclosure, step S120 may include: in response to the existence of sub-videos with inconsistent audio and video parameters in each sub-video, adjusting the audio and video parameters corresponding to the sub-video so that the audio and video parameters corresponding to each sub-video after the adjustment of the audio and video parameters are consistent with the benchmark audio and video parameters, and then performing video merging processing on each sub-video after the adjustment of the audio and video parameters and the first empty source video according to the time information corresponding to each sub-video after the adjustment of the audio and video parameters and the first empty source video, to obtain the target video.

[0074] In one implementation, before merging the videos, it may be determined whether the audio and video parameters corresponding to the sub-videos are consistent.

[0075] When there are sub-videos with inconsistent audio and video parameters among the sub-videos, the benchmark audio and video parameters can be obtained, and then the sub-videos whose audio and video parameters are consistent with the benchmark audio and video parameters are called sub-videos after the audio and video parameters are adjusted; based on the benchmark audio and video parameters, the sub-videos whose audio and video parameters are inconsistent with the benchmark audio and video parameters are transcoded to adjust their audio and video parameters to obtain the corresponding sub-videos after the audio and video parameters are adjusted. The audio and video parameters corresponding to the sub-video after the audio and video parameters are adjusted are the benchmark audio and video parameters, and the corresponding time information is also the time information before the audio and video parameters are adjusted.

[0076] The adjusted sub-videos and the first empty source video can be sorted accordingly based on time information; then, based on the sorting of the sub-videos after the audio and video parameters are adjusted and the sorting of the first empty source video, FFmpeg is used to splice (video merge) the sub-videos after the audio and video parameters are adjusted to obtain the target video.

[0077] In the disclosed embodiment, when there are sub-videos with inconsistent audio and video parameters, the audio and video parameters corresponding to the sub-videos with different audio and video parameters are adjusted so that the audio and video parameters corresponding to all sub-videos are consistent, thereby ensuring smooth video merging of the sub-videos.

[0078] Figure 4 FIG. 1 is a flow chart of a video synthesis method provided by another exemplary embodiment of the present disclosure. In some optional implementations, such as Figure 4 As shown, the video synthesis method may further include the following steps:

[0079] Step S200, in response to the consistency of the audio and video parameters corresponding to each sub-video, video merging processing is performed on each sub-video and the first empty source video according to the time information corresponding to each sub-video and the first empty source video respectively.

[0080] Among them, when the audio and video parameters corresponding to each sub-video are consistent, each sub-video and the first empty source video can be sorted according to the time information, and then based on the sorting of each sub-video and the sorting of the first empty source video, each sub-video and the first empty source video can be spliced ​​(video merged) using FFmpeg.

[0081] Step S210, in response to each sub-video and the first empty source video being merged successfully, a target video is obtained.

[0082] Step S220, in response to the unsuccessful merging of each sub-video and the first empty source video, the audio and video parameters corresponding to each sub-video and the audio and video parameters corresponding to the first empty source video are adjusted to the reference audio and video parameters to obtain the corresponding adjusted video.

[0083] In one embodiment, each sub-video and the first blank source video are transcoded according to the reference audio and video parameters to adjust the corresponding audio and video parameters to obtain an adjusted video corresponding to each sub-video and an adjusted video corresponding to the first blank source video. The audio and video parameters corresponding to the adjusted video are the reference audio and video parameters, and the corresponding time information is the time information corresponding to the corresponding sub-video or the first blank source video before the audio and video parameters are adjusted.

[0084] It should be noted that, in the embodiment of the present disclosure, there is no execution order between step S210 and step S220.

[0085] Step S230: performing video merging processing on each adjusted video according to the time information corresponding to each adjusted video to obtain a target video.

[0086] The adjusted videos are sorted based on time information, and then based on the sorting of the adjusted videos, FFmpeg is used to splice the adjusted videos (video merging) to obtain the target video.

[0087] In one embodiment, a corresponding video transmission method can be selected according to the size of the target video to transmit the target video to the video storage device. Exemplarily, when the size of the target video is less than a preset threshold, the target video can be directly transmitted to the video storage device, and when the size of the target video is greater than or equal to the preset threshold, the target video can be uploaded to the video storage device in a segmented upload manner.

[0088] In the disclosed embodiment, the strategy for video merging is determined based on the audio and video parameters corresponding to each sub-video, from the optimal direct splicing at the file level (the audio and video parameters corresponding to each sub-video are consistent), to splicing after transcoding for different formats (the audio and video parameters corresponding to each sub-video are inconsistent), to bottom-up splicing (all converted to baseline audio and video parameters), step by step, to ensure that the video merging task can be completed under any circumstances.

[0089] Figure 5 is a flow chart of step S120 provided by an exemplary embodiment of the present disclosure. In some optional implementations, such as Figure 5 The step S120 may include the following steps:

[0090] Step S121, extracting the audio stream and the video stream of at least one sub-video and the first empty source video respectively.

[0091] Each sub-video includes an audio stream and a video stream.

[0092] In one embodiment, when the audio and video parameters corresponding to each sub-video are consistent, FFmpeg can be used to directly extract the audio stream and video stream of each sub-video, as well as the audio stream and video stream of the first blank source video; when there are sub-videos with inconsistent audio and video parameters among the sub-videos, each sub-video is encoded to make the audio and video parameters corresponding to each sub-video consistent, and then FFmpeg is used to extract the audio stream and video stream of each sub-video, as well as the audio stream and video stream of the first blank source video; or, when directly merging each sub-video with the first blank source video fails, the audio stream and video stream of each sub-video, as well as the audio stream and video stream of the first blank source video, can be extracted.

[0093] Step S122: splicing the multiple audio streams according to the time information corresponding to the multiple audio streams to obtain a target audio stream.

[0094] The time information corresponding to the audio stream is the time information corresponding to the sub-video or the first empty source video from which the audio stream is extracted. Exemplarily, the time information corresponding to the audio stream may include the start time and the end time of the audio stream.

[0095] In one embodiment, each audio stream is sorted based on time information, and then multiple audio streams are spliced ​​using FFmpeg according to the sorting of each audio stream to obtain a target audio stream, wherein the duration corresponding to the target audio stream is the same as the duration corresponding to the target video, and the audio parameters corresponding to the target audio stream are the audio parameters corresponding to the sub-video.

[0096] Step S123, splicing the multiple video streams according to the time information corresponding to the multiple video streams to obtain a target video stream.

[0097] The time information corresponding to the video stream is the time information corresponding to the sub-video or the first empty source video extracted from the video stream. Exemplarily, the time information corresponding to the video stream may include the start time and the end time of the video stream.

[0098] In one embodiment, multiple video streams are sorted based on time information, and then based on the sorting of each video stream, multiple video streams are spliced ​​using FFmpeg to obtain a target video stream, wherein the duration corresponding to the target video stream is the same as the duration corresponding to the target video, and the video parameters corresponding to the target video stream are the video parameters corresponding to the sub-video.

[0099] Step S124, merging the target audio stream and the target video stream to obtain the target video.

[0100] The target audio stream and the target video stream may be merged by using a filter in FFmpeg to obtain the target video. In one embodiment, the target video may include: a target video stream and a target audio stream.

[0101] In the disclosed embodiment, the target video stream and the target video stream are obtained by splicing the audio stream and the video stream corresponding to each sub-video and the first empty source video, and then the target video stream and the audio stream are merged to generate the target video, thereby more accurately synthesizing the sub-video and the first empty source video.

[0102] Figure 6 FIG. 1 is a flow chart of a video synthesis method provided by another exemplary embodiment of the present disclosure. In some optional implementations, such as Figure 6 As shown, before step S120, the following steps may also be included:

[0103] Step S300, in response to the inconsistency between the duration corresponding to at least one sub-video and the duration corresponding to the video container of at least one sub-video, determining a reference duration based on the duration corresponding to the at least one sub-video and the duration corresponding to the video container.

[0104] The video container refers to a file format for loading multimedia data streams (including video streams or audio streams, etc.). Exemplary video container formats may include: AVI (Audio Video Interleave), MKV (Matroska Video) and WMV (Windows Media Video), etc.

[0105] In one embodiment, the parameters corresponding to the video container include the duration of the video container (the duration corresponding to the video container), the playback timing of the audio stream in all sub-videos and the first empty source video, and the playback timing of the video stream in all sub-videos and the first empty source video. For each sub-video, the duration corresponding to the audio stream and the duration corresponding to the video stream in the sub-video can be obtained respectively, and then the longest duration between the duration corresponding to the audio stream and the duration corresponding to the video stream is selected as the comparison duration, and it is determined whether the comparison duration is the same as the duration corresponding to the video container. If they are the same, it is determined that the duration corresponding to the sub-video is consistent with the duration corresponding to the video container of the sub-video, and no processing is performed. If they are not the same, it is determined that the duration corresponding to the sub-video is inconsistent with the duration corresponding to the video container of the sub-video, and the duration difference between the comparison duration and the duration corresponding to the video container is used as the reference duration.

[0106] For example, assuming that the corresponding durations of the audio stream and video stream in the sub-video are 3 minutes and 2 minutes, and the corresponding duration of the video container of the sub-video is 5 minutes, then the 3 minutes corresponding to the video stream is the comparison duration, and the corresponding 2 minutes is the reference duration (5min-3min=2min).

[0107] Step S310: Generate a second empty source video based on the reference duration and audio and video parameters corresponding to at least one sub-video.

[0108] Among them, based on the audio and video parameters and the reference duration of at least one sub-video, FFmpeg can be used to generate a second empty source video, and the duration corresponding to the second empty source video is the reference duration.

[0109] Step S320: splice at least one sub-video with the second blank source video to obtain a completed sub-video.

[0110] Among them, FFmpeg can be used to splice at least one sub-video and the second empty source video to obtain a completed sub-video, and the duration corresponding to the completed sub-video is the same as the duration corresponding to the video container.

[0111] Accordingly, step S120 in the embodiment of the present disclosure may include: performing video merging processing on the completed sub-video and the first empty source video to obtain a target video.

[0112] Among them, the method of merging the video of the completed sub-video and the first empty source video can refer to the method of merging the video of the sub-video and the first empty source video, which will not be repeated here.

[0113] In the embodiment of the present disclosure, before merging the first empty source video and the sub-video, determine the sub-video whose duration corresponding to the sub-video is different from the duration corresponding to the video container, then generate a second empty source video of the corresponding duration, and use the second empty source video to merge the sub-video to complete the sub-video, thereby improving the accuracy of subsequent generation of the target video.

[0114] In an optional embodiment, after the first empty source video is generated, or after the target video is generated, the first empty source video can be transmitted to the video storage device. In the video storage device, a video data structure can be pre-set, and the video data structure includes: a first video list, a second video list, and a third video list; the first video list includes: the identifier, name, and storage address of the empty source video, etc., the second video list includes: multiple videos, and the third video list includes: the videos in the first video list sorted in chronological order and the videos in the second video list. When obtaining a sub-video, the third video list can be traversed to determine whether a sub-video exists. When it is determined that a sub-video exists, the sub-video is downloaded. When it is determined that the first empty source video and the second empty source video are generated, the first video list and the third video list are updated according to the first empty source video and the second empty source video.

[0115] In some optional implementations, the video synthesis method in the embodiment of the present disclosure further includes: in response to the absence of a sub-video, generating a target video according to a duration corresponding to the target video and preset audio and video parameters.

[0116] In one embodiment, when there is no video whose time information is in the time information corresponding to the target video in the video storage device, it is determined that there is no sub-video corresponding to the target video. Based on the duration corresponding to the target video and preset audio and video parameters, a content-free empty source video can be generated using FFmpeg, and the empty source video can be determined as the target video. The empty source video can be, for example, a content-free black screen video.

[0117] The following is an application example of the video synthesis method of the present disclosure. In this application example, the video synthesis method may include:

[0118] Determine sub-videos: Determine whether there are sub-videos corresponding to the target video to be generated in the video storage device. When there are no sub-videos corresponding to the target video to be generated, generate the target video according to the duration and preset audio and video parameters corresponding to the target video. When there are sub-videos corresponding to the target video to be generated, download each sub-video from the video storage device.

[0119] Determine the reference audio and video parameters: Analyze the audio and video parameters corresponding to each sub-video. When the audio and video parameters corresponding to each sub-video are consistent, determine the audio and video parameters corresponding to any sub-video as the reference audio and video parameters. When there are videos with inconsistent audio and video parameters among the sub-videos, determine the lowest common divisor of the audio and video parameters corresponding to each sub-video as the reference audio and video parameters.

[0120] Adjustment of audio and video parameters: When the audio and video parameters corresponding to each sub-video are consistent, no processing is performed. When there are videos with inconsistent audio and video parameters among the sub-videos, the audio and video parameters corresponding to the sub-video are adjusted to the reference audio and video parameters.

[0121] Determine the empty source video: determine whether the comprehensive duration corresponding to each sub-video is consistent with the duration corresponding to the target video. If they are consistent, no processing is performed. If they are inconsistent, determine the time information corresponding to the first empty source video according to the time information corresponding to each sub-video and the time information corresponding to the target video, and then generate the first empty source video based on the reference audio and video parameters and the time information corresponding to the first empty source video;

[0122] For each sub-video, determine whether the duration corresponding to the sub-video is consistent with the duration corresponding to the video container of the sub-video. If they are consistent, no processing is performed. If they are inconsistent, determine the reference duration based on the duration corresponding to the sub-video and the duration corresponding to the video container. Then, generate a second empty source video based on the reference duration and the audio and video parameters corresponding to the sub-video. Then, splice the sub-video and the second empty source video to complete the sub-video so that the duration corresponding to the sub-video is consistent with the duration corresponding to the video container. Video merging: When the comprehensive duration corresponding to each sub-video is consistent with the duration corresponding to the target video, use each sub-video to generate the target video. When the comprehensive duration corresponding to the sub-video is inconsistent with the duration corresponding to the target video, use each sub-video and the first empty source video to generate the target video. The method of generating the target video using each sub-video is the same as the method of generating the target video using each sub-video and the first empty source video. In this application example, the method of generating the target video using each sub-video and the first empty source video is used as an example for explanation, specifically including:

[0123] Perform video merging on each sub-video and the first empty source video. When the video merging is successful, obtain the target video. When the video merging is unsuccessful, respectively extract the audio stream and video stream of each sub-video and the audio stream and video stream corresponding to the first empty source video, splice the multiple audio streams to obtain the target audio stream, splice the multiple video streams to obtain the target video stream, splice the target audio stream and the target video stream, and when the splicing is successful, obtain the target video. When the splicing is unsuccessful, adjust the audio and video parameters corresponding to each sub-video and the audio and video parameters corresponding to the first empty source video to the preset audio and video parameters to obtain the corresponding adjusted audio and video. Then, perform video merging on the adjusted audio and video to obtain the target video.

[0124] Please refer to the corresponding beneficial technical effects of the above-mentioned corresponding exemplary method part, which will not be repeated here.

[0125] Figure 7 FIG. 1 is a schematic diagram of the structure of a video synthesis device provided by an exemplary embodiment of the present disclosure. Figure 7 As shown, the apparatus of this embodiment may include: a video acquisition module 400 , a first empty source video generation module 410 and a first video merging module 420 .

[0126] The video acquisition module 400 is used to acquire at least one sub-video corresponding to the target video to be generated;

[0127] A first empty source video generating module 410 is configured to generate a first empty source video in response to the inconsistency between the comprehensive duration corresponding to the at least one sub-video and the duration corresponding to the target video, wherein the time information corresponding to the first empty source video includes the time period difference between the target video and the at least one sub-video, the comprehensive duration is the sum of the durations of the sub-videos in the at least one sub-video, the duration corresponding to the target video is the playback duration corresponding to the target video, the duration corresponding to the first empty source video is equal to the duration corresponding to the time period difference, and the time period difference is used to represent the time period difference between the at least one sub-video and the target video;

[0128] The first video merging module 420 is used to perform video merging processing on the at least one sub-video and the first empty source video based on the time information corresponding to the at least one sub-video and the first empty source video respectively, so as to obtain the target video, wherein the time information includes a start time and an end time.

[0129] In some possible implementations of the present disclosure, the first empty source video generation module 410 in the embodiment of the present disclosure includes:

[0130] A time generation submodule, used to determine the time information corresponding to the first blank source video according to the start time and end time corresponding to the at least one sub-video and the start time and end time corresponding to the target video;

[0131] The first empty source video generating submodule is used to generate the first empty source video in response to the consistency of the audio and video parameters corresponding to each sub-video in the at least one sub-video, based on the audio and video parameters corresponding to the sub-video and the time information corresponding to the first empty source video.

[0132] In some possible implementations of the present disclosure, the first empty source video generation module 410 in the embodiment of the present disclosure may also include:

[0133] A parameter acquisition submodule, configured to acquire reference audio and video parameters in response to a sub-video having inconsistent audio and video parameters among the sub-videos;

[0134] The second empty source video generation submodule is used to generate the first empty source video based on the reference audio and video parameters and the time information corresponding to the first empty source video.

[0135] In some possible implementations of the present disclosure, the parameter acquisition submodule in the embodiments of the present disclosure is specifically used to determine the benchmark audio and video parameters based on preset audio and video parameters and / or the audio and video parameters corresponding to each sub-video.

[0136] In some possible implementations of the present disclosure, the first video merging module 420 in the embodiment of the present disclosure includes:

[0137] A parameter adjustment submodule, for adjusting the audio and video parameters corresponding to the sub-videos in response to the sub-videos having inconsistent audio and video parameters, so that the audio and video parameters corresponding to the sub-videos after the adjustment of the audio and video parameters are consistent with the reference audio and video parameters;

[0138] The first merging submodule is used to perform video merging processing on each sub-video after the audio and video parameters are adjusted and the first empty source video according to the time information corresponding to each sub-video after the audio and video parameters are adjusted and the first empty source video, so as to obtain the target video.

[0139] In some possible implementations of the present disclosure, the video merging device in the embodiment of the present disclosure may further include:

[0140] A second video merging module is configured to, in response to the audio and video parameters corresponding to the sub-videos being consistent, perform video merging processing on the sub-videos and the first empty source video according to time information corresponding to the sub-videos and the first empty source video respectively;

[0141] A judgment module, configured to obtain the target video in response to the successful merging of each sub-video and the first empty source video;

[0142] A parameter adjustment module, configured to adjust the audio and video parameters corresponding to each sub-video and the audio and video parameters corresponding to the first empty source video to the reference audio and video parameters in response to the failure of merging the sub-videos with the first empty source video to obtain a corresponding adjusted video;

[0143] The third video merging module is used to perform video merging processing on the adjusted videos according to the time information corresponding to the adjusted videos to obtain the target video.

[0144] In some possible implementations of the present disclosure, the first video merging module 420 in the embodiment of the present disclosure includes:

[0145] An extraction submodule, used to extract the audio stream and the video stream of the at least one sub-video and the first empty source video respectively;

[0146] A first splicing submodule, configured to splice the multiple audio streams according to time information corresponding to the multiple audio streams to obtain a target audio stream;

[0147] A second splicing submodule, configured to splice the multiple video streams according to time information corresponding to the multiple video streams to obtain a target video stream;

[0148] The third splicing submodule is used to merge the target audio stream and the target video stream to obtain the target video.

[0149] In some possible implementations of the present disclosure, the video merging device in the embodiment of the present disclosure may further include:

[0150] a duration determination module, configured to determine a reference duration based on the duration corresponding to the at least one sub-video and the duration corresponding to the video container in response to the duration corresponding to the at least one sub-video being inconsistent with the duration corresponding to the video container of the at least one sub-video;

[0151] A second empty source video generating submodule, configured to generate a second empty source video based on the reference duration and the audio and video parameters corresponding to the at least one sub-video;

[0152] A completion module, configured to perform splicing processing on the at least one sub-video and the second blank source video to obtain a completed sub-video;

[0153] In the disclosed embodiment, the first video merging module 420 is specifically configured to perform video merging processing on the completed sub-video and the first empty source video to obtain the target video.

[0154] In some possible implementations of the present disclosure, the video merging device in the embodiment of the present disclosure may further include:

[0155] The fourth video merging module is used to generate the target video according to the duration corresponding to the target video and preset audio and video parameters in response to the absence of the sub-video.

[0156] The video synthesis device of the embodiment of the present disclosure corresponds to the embodiment of the above-mentioned video synthesis method of the present disclosure, and the relevant contents can be referenced to each other and will not be repeated here.

[0157] The beneficial technical effects corresponding to the exemplary embodiments of the video synthesis device of the disclosed embodiments can be found in the corresponding beneficial technical effects of the above-mentioned corresponding exemplary method part, which will not be repeated here.

[0158] In addition, an embodiment of the present disclosure further provides an electronic device, including:

[0159] Memory for storing computer programs;

[0160] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the video synthesis method described in any of the above embodiments of the present disclosure is implemented.

[0161] Figure 8 This is a schematic diagram of the structure of an application embodiment of the electronic device disclosed in the present invention. Figure 8 The electronic device according to the embodiment of the present disclosure is described. The electronic device may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signals from them.

[0162] like Figure 8 As shown, the electronic device includes one or more processors and memory.

[0163] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.

[0164] The memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, a random access memory (RAM) and / or a cache memory (cache), etc. The non-volatile memory may include, for example, a read-only memory (ROM), a hard disk, a flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the video synthesis method of each embodiment of the present disclosure described above and / or other desired functions.

[0165] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0166] In addition, the input device may also include, for example, a keyboard, a mouse, and the like.

[0167] The output device can output various information to the outside, including the determined distance information, direction information, etc. The output device can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0168] Of course, to simplify, Figure 8 Only some of the components related to the present disclosure in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device may further include any other appropriate components.

[0169] In addition to the above-mentioned methods and devices, an embodiment of the present disclosure may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the video synthesis method according to various embodiments of the present disclosure described in the above part of this specification.

[0170] The computer program product may be written in any combination of one or more programming languages ​​to write program code for performing the operations of the disclosed embodiments, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0171] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enables the processor to execute the steps of the video synthesis method according to various embodiments of the present disclosure described in the above part of this specification.

[0172] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0173] A person of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0174] The basic principles of the present disclosure are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present disclosure. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, and are not limitations. The above details do not limit the present disclosure to the necessity of adopting the above specific details to be implemented.

[0175] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0176] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," and the like are open words, referring to "including but not limited to," and can be used interchangeably therewith. The words "or" and "and" used herein refer to the words "and / or," and can be used interchangeably therewith, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to," and can be used interchangeably therewith.

[0177] The method and apparatus of the present disclosure may be implemented in many ways. For example, the method and apparatus of the present disclosure may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present disclosure are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present disclosure may also be implemented as a program recorded in a recording medium, which includes machine-readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers a recording medium storing a program for executing the method according to the present disclosure.

[0178] It should also be noted that in the apparatus, device and method of the present disclosure, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present disclosure.

[0179] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0180] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A video synthesis method, characterized in that: include: Obtain at least one sub-video corresponding to the target video to be generated; In response to the inconsistency between the comprehensive duration corresponding to the at least one sub-video and the duration corresponding to the target video, a first empty source video is generated, wherein the time information corresponding to the first empty source video includes the time period difference between the target video and the at least one sub-video, the comprehensive duration is the sum of the durations of the sub-videos in the at least one sub-video, the duration corresponding to the target video is the playback duration corresponding to the target video, the duration corresponding to the first empty source video is equal to the duration corresponding to the time period difference, and the time period difference is used to represent the time period difference between the at least one sub-video and the target video; Based on the time information respectively corresponding to the at least one sub-video and the first empty source video, the at least one sub-video and the first empty source video are subjected to video merging processing to obtain the target video, wherein the time information includes a start time and an end time.

2. The method according to claim 1, characterized in that The generating of the first empty source video comprises: Determine the time information corresponding to the first empty source video according to the start time and the end time corresponding to the at least one sub-video and the start time and the end time corresponding to the target video; In response to the consistency of audio and video parameters corresponding to each sub-video in the at least one sub-video, the first empty source video is generated based on the audio and video parameters corresponding to the sub-video and the time information corresponding to the first empty source video.

3. The method according to claim 2, characterized in that After determining the time information corresponding to the first empty source video, the method further includes: In response to a sub-video having inconsistent audio and video parameters among the sub-videos, obtaining reference audio and video parameters; The first empty source video is generated based on the reference audio and video parameters and the time information corresponding to the first empty source video.

4. The method according to claim 3, characterized in that The obtaining of reference audio and video parameters includes: The reference audio and video parameters are determined based on preset audio and video parameters and / or audio and video parameters corresponding to each sub-video.

5. The method according to any one of claims 1 to 4, characterized in that: The performing video merging processing on the at least one sub-video and the first empty source video includes: In response to a sub-video having inconsistent audio and video parameters among the sub-videos, adjusting the audio and video parameters corresponding to the sub-videos so that the audio and video parameters corresponding to the sub-videos after the adjustment of the audio and video parameters are consistent with the reference audio and video parameters; According to the time information corresponding to each sub-video after the audio and video parameters are adjusted and the first empty source video, video merging processing is performed on each sub-video after the audio and video parameters are adjusted and the first empty source video to obtain the target video.

6. The method according to claim 5, characterized in that Also includes: In response to the audio and video parameters corresponding to the sub-videos being consistent, performing video merging processing on the sub-videos and the first empty source video according to time information corresponding to the sub-videos and the first empty source video respectively; In response to each of the sub-videos and the first empty source video being merged successfully, obtaining the target video; In response to the unsuccessful merging of the sub-videos and the first empty source video, adjusting the audio and video parameters corresponding to the sub-videos and the audio and video parameters corresponding to the first empty source video to the reference audio and video parameters to obtain a corresponding adjusted video; According to the time information corresponding to each adjusted video, the video merging process is performed on the adjusted videos to obtain the target video.

7. The method according to claim 1, characterized in that The performing video merging processing on the at least one sub-video and the first empty source video includes: Respectively extracting the audio stream and the video stream of the at least one sub-video and the first empty source video; According to time information corresponding to the multiple audio streams, the multiple audio streams are spliced ​​to obtain a target audio stream; According to time information corresponding to the multiple video streams, the multiple video streams are spliced ​​to obtain a target video stream; The target audio stream and the target video stream are combined to obtain the target video.

8. The method according to any one of claims 1 to 7, characterized in that: Before performing video merging processing on the at least one sub-video and the empty source video, the method further includes: In response to the duration corresponding to the at least one sub-video being inconsistent with the duration corresponding to the video container of the at least one sub-video, determining a reference duration based on the duration corresponding to the at least one sub-video and the duration corresponding to the video container; Generate a second empty source video based on the reference duration and the audio and video parameters corresponding to the at least one sub-video; Splicing the at least one sub-video with the second blank source video to obtain a completed sub-video; The performing video merging processing on the at least one sub-video and the first empty source video includes: The completed sub-video and the first empty source video are subjected to video merging processing to obtain the target video.

9. The method according to any one of claims 1 to 8, characterized in that: The method further comprises: In response to the absence of a sub-video, the target video is generated according to a duration corresponding to the target video and preset audio and video parameters.

10. A video synthesis device, characterized in that: include: A video acquisition module, used to acquire at least one sub-video corresponding to the target video to be generated; A first empty source video generation module is used to generate a first empty source video in response to the inconsistency between the comprehensive duration corresponding to the at least one sub-video and the duration corresponding to the target video, wherein the time information corresponding to the first empty source video includes the time period difference between the target video and the at least one sub-video, the comprehensive duration is the sum of the durations of the sub-videos in the at least one sub-video, the duration corresponding to the target video is the playback duration corresponding to the target video, the duration corresponding to the first empty source video is equal to the duration corresponding to the time period difference, and the time period difference is used to represent the time period difference between the at least one sub-video and the target video; The first video merging module is used to perform video merging processing on the at least one sub-video and the first empty source video based on the time information corresponding to the at least one sub-video and the first empty source video respectively, so as to obtain the target video, wherein the time information includes a start time and an end time.

11. An electronic device, characterized in that: include: Memory for storing computer programs; The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the video synthesis method described in any one of claims 1 to 9 is implemented.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the video synthesis method described in any one of claims 1 to 9 is implemented.

13. A computer program product comprising computer program instructions, characterized in that When the computer program instructions are executed by a processor, the video synthesis method described in any one of claims 1 to 9 is implemented.