Video processing method, apparatus, device, computer readable storage medium and product

CN122554677APending Publication Date: 2026-08-11BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-10
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0004]本公开实施例提供一种视频处理方法、装置、设备、计算机可读存储介质及产品,用于解决素材的截取时长与视频模板槽位的展示时长不匹配造成的视频内容质量不佳的技术问题

Benefits of technology

[0018]本实施例提供的视频处理方法、装置、设备、计算机可读存储介质及产品,通过在获取到待处理素材之后,确定待处理素材的播放时长与槽位的展示时长不一致时,基于槽位的展示时长对待处理素材进行编辑操作,获得播放时长与展示时长相同的目标素材。从而在将目标素材添加至槽位之后,由于目标素材的播放时长与槽位关联的展示时长相同,故填充之后不会出现黑帧、展示内容不完整的问题,提高了生成的视频内容的内容质量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122554677A_ABST
    Figure CN122554677A_ABST
Patent Text Reader

Abstract

This disclosure provides a video processing method, apparatus, device, computer-readable storage medium, and product. The method includes: acquiring multiple materials to be processed associated with a target template, the target template including multiple preset slots, each preset slot being associated with a preset display duration; the multiple materials to be processed being used to fill the multiple preset slots; for each material to be processed, in response to a mismatch between the playback duration of the material to be processed and the display duration of the target slot associated with the material to be processed, performing an editing operation on the material to be processed based on the display duration associated with the target slot to obtain target material, wherein the playback duration of the target material matches the display duration; and filling each target material into the target slot that matches the target material to obtain target video content. Therefore, since the playback duration of the target material is the same as the display duration associated with the slot, there will be no black frames or incomplete display content after filling, thus improving the content quality of the generated video content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of video processing technology, and in particular to a video processing method, apparatus, device, computer-readable storage medium, and product. Background Technology

[0002] To facilitate the generation of high-quality video content, many applications offer a variety of video templates. Users can choose a template based on their needs to generate videos. Video templates typically include multiple preset slots; users can select footage and add it to these slots to quickly generate high-quality video content.

[0003] The slots in a video template are usually associated with a fixed display duration. If the material selected by the user does not match the display duration associated with the slot, black frames or incomplete content display will often occur, resulting in poor quality of the generated video content. Summary of the Invention

[0004] This disclosure provides a video processing method, apparatus, device, computer-readable storage medium, and product to solve the technical problem of poor video content quality caused by a mismatch between the clipping duration of the footage and the display duration of the video template slot.

[0005] In a first aspect, embodiments of this disclosure provide a video processing method, including:

[0006] Obtain multiple materials to be processed associated with a target template, wherein the target template includes multiple preset slots, each preset slot is associated with a preset display duration, and the multiple materials to be processed are used to fill the multiple preset slots;

[0007] For each material to be processed, if the playback duration of the material to be processed does not match the display duration of the target slot associated with the material to be processed, then the material to be processed is edited based on the display duration associated with the target slot to obtain the edited target material, wherein the playback duration of the target material matches the display duration.

[0008] The target materials are filled into the target slots that match the target materials to obtain the target video content.

[0009] In a second aspect, embodiments of this disclosure provide a video processing apparatus, comprising:

[0010] The acquisition module is used to acquire multiple materials to be processed associated with the target template. The target template includes multiple preset slots, each preset slot is associated with a preset display duration, and the multiple materials to be processed are used to fill the multiple preset slots.

[0011] The editing module is used to perform editing operations on each material to be processed in response to a mismatch between the playback duration of the material to be processed and the display duration of the target slot associated with the material to be processed, based on the display duration associated with the target slot, to obtain the edited target material, wherein the playback duration of the target material matches the display duration.

[0012] The filling module is used to fill each of the target materials into the target slots that match the target materials to obtain the target video content.

[0013] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;

[0014] The memory stores computer-executed instructions;

[0015] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the video processing method as described in the first aspect and various possible designs of the first aspect.

[0016] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the video processing method described in the first aspect and various possible designs of the first aspect.

[0017] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the video processing method described in the first aspect and various possible designs of the first aspect.

[0018] The video processing method, apparatus, device, computer-readable storage medium, and product provided in this embodiment, after obtaining the material to be processed, determines that when the playback duration of the material to be processed is inconsistent with the display duration of the slot, it performs editing operations on the material to be processed based on the display duration of the slot to obtain a target material with the same playback duration and display duration. Therefore, after adding the target material to the slot, since the playback duration of the target material is the same as the display duration associated with the slot, there will be no black frames or incomplete content after filling, thus improving the content quality of the generated video content. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a structural diagram of the video template;

[0021] Figure 2 A schematic flowchart illustrating the video processing method provided in this embodiment of the disclosure;

[0022] Figure 3 A schematic flowchart of a video processing method provided in yet another embodiment of this disclosure;

[0023] Figure 4 This is a schematic diagram illustrating an application scenario provided by an embodiment of this disclosure;

[0024] Figure 5 A schematic flowchart of a video processing method provided in yet another embodiment of this disclosure;

[0025] Figure 6 This is a schematic diagram of the structure of the video processing apparatus provided in the embodiments of this disclosure;

[0026] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0028] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0029] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0030] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0031] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0032] Definitions:

[0033] Video templates: A pre-designed video frame that includes multiple preset slots. Users can insert their own content (such as images, video clips, text, and audio) into these slots to create personalized videos. Video templates are widely used in various settings, including social media, marketing, education, and personal projects.

[0034] Slots: These are pre-defined descriptions of materials within a video template. They are replaceable elements in the video template, allowing users to create personalized video content by filling in the slots.

[0035] Template-based content creation refers to the act of a template user actively selecting a video template, retrieving the materials to be processed from a preset storage path, filling the video template with the materials to be processed to generate video content, and then publishing the video content.

[0036] Speed ​​adjustment: describes the process of adjusting the playback speed of audio or video clips. For example, if a piece of material is sped up by 2x, its playback speed will be 2 times faster, and the playback time will be reduced to half of the original.

[0037] To address the technical problem of poor video content quality caused by a mismatch between the clipping duration of the footage and the display duration of the video template slot, this disclosure provides a video processing method, apparatus, device, computer-readable storage medium, and product.

[0038] It should be noted that the video processing methods, apparatus, devices, computer-readable storage media and products provided in this disclosure can be applied to any video generation scenario based on video templates.

[0039] Figure 1 This is a structural diagram of a video template, such as... Figure 1 As shown, video template 11 contains multiple preset slots, including fixed slot 12 and template slot 13. Fixed slot 12 cannot be replaced. Template slot 13 can be filled with custom content according to the user's actual needs. If the selected content cannot fill template slot 12, since the start and end times of each slot in video template 11 are fixed, the insufficient filling will result in a black screen during playback.

[0040] In the process of solving the above-mentioned technical problems, the inventors discovered through research that in order to avoid the black screen problem caused by the mismatch between the clipping duration of the material and the display duration of the video template slot, when it is determined that the clipping duration of the material and the display duration of the video template slot do not match, the material can be adjusted based on the display duration of the slot until the duration of the material matches the display duration of the slot, and then the subsequent slot filling operation can be performed.

[0041] Figure 2 This is a flowchart illustrating the video processing method provided in the embodiments of this disclosure, as shown below. Figure 1 As shown, the method includes:

[0042] Step 201: Obtain multiple materials to be processed associated with the target template, wherein the target template includes multiple preset slots, each preset slot is associated with a preset display duration, and the multiple materials to be processed are used to fill the multiple preset slots.

[0043] The execution entity in this embodiment is a video processing device. This video processing device can be coupled to a server, which can communicate with a terminal device. Therefore, after obtaining the target template and multiple materials to be processed as determined by the user on the terminal device, if the playback duration of the materials to be processed does not match the display duration of the target slot, editing operations can be performed on the materials to be processed. This allows for obtaining target materials with a display duration consistent with the target slot, and then generating video content by filling the target slot with the target materials.

[0044] In this embodiment, to facilitate the generation of video content by users, multiple video templates can be provided so that users can select a target template for template-based application. Each target template includes multiple preset slots, and each preset slot can be filled with user-defined materials to be processed.

[0045] Optionally, after determining the target template selected by the user, the user can also select the materials to be processed to fill each preset slot according to actual needs. The materials to be processed include, but are not limited to, video materials, image materials, etc.

[0046] Step 202: For each material to be processed, in response to the mismatch between the playback duration of the material to be processed and the display duration of the target slot associated with the material to be processed, the material to be processed is edited based on the display duration associated with the target slot to obtain the edited target material, wherein the playback duration of the target material matches the display duration.

[0047] In this embodiment, each preset slot is associated with a preset display duration. To ensure the quality of the generated video content and avoid black screens or content loss, the playback duration of the material filled into the preset slot must match the display duration of the preset slot.

[0048] Therefore, after obtaining multiple user-defined materials to be processed, for each material, if it is determined that the playback duration of the material does not match the display duration of the target slot associated with it, the material can be edited according to the display duration associated with the target slot to obtain the edited target material, whose playback duration matches the display duration. This editing operation includes, but is not limited to, speed adjustment and clipping.

[0049] Optionally, the material to be processed can be video material or image material. When the material to be processed is video material, editing operations can be used to match the playback duration of the video material with the display duration of its associated target slot. When the material to be processed is image material, since image material is static, it can be statically displayed regardless of the display duration of its associated target slot, and no black frames will appear.

[0050] Step 203: Fill each of the target materials into the target slot that matches the target material to obtain the target video content.

[0051] In this embodiment, for each material to be processed, after the editing operation of the material to be processed is completed, the playback duration of the target material matches the display duration. At this time, the target material can be directly filled into the target slot that matches the target material to obtain the target video content.

[0052] The video processing method provided in this embodiment, after obtaining the material to be processed, determines that when the playback duration of the material to be processed is inconsistent with the display duration of the slot, it performs editing operations on the material to be processed based on the display duration of the slot to obtain a target material with the same playback duration and display duration. Therefore, after adding the target material to the slot, since the playback duration of the target material is the same as the display duration associated with the slot, there will be no black frames or incomplete content after filling, thus improving the content quality of the generated video content.

[0053] Figure 3 This is a flowchart illustrating a video processing method provided in yet another embodiment of the present disclosure. Based on any of the above embodiments, as follows... Figure 3 Step 202 includes:

[0054] Step 301: In response to the mismatch between the playback duration and the display duration of the material to be processed, an adjustment multiplier is determined based on the display duration and the playback duration.

[0055] Step 302: Adjust the playback speed of the material to be processed according to the adjustment factor to obtain the target material.

[0056] In this embodiment, when the playback duration of the material to be processed does not match the display duration of the target slot, the playback speed of the material to be processed can be adjusted to make the playback duration of the material to be processed consistent with the display duration of the target slot.

[0057] Optionally, when the playback duration of the material to be processed does not match the display duration of the target slot, an adjustment factor can be determined based on both the display duration and the playback duration. The playback speed of the material to be processed is then adjusted according to the adjustment factor to obtain the target material.

[0058] For example, the playback duration of the material to be processed is 10 seconds, the playback speed is 1x, and the display duration of the target slot is 20 seconds. This means the playback duration of the material to be processed is less than the display duration of the target slot. In this case, the playback speed of the material to be processed can be adjusted to 0.5x, so that the adjusted playback duration of the target material reaches 20 seconds. Alternatively, the playback duration of the material to be processed is 10 seconds, the playback speed is 1x, and the display duration of the target slot is 5 seconds. This means the playback duration of the material to be processed is greater than the display duration of the target slot. In this case, the playback speed of the material to be processed can be adjusted to 2x, so that the adjusted playback duration of the target material is reduced to 5 seconds.

[0059] Figure 4 This is a schematic diagram illustrating an application scenario provided by an embodiment of this disclosure, such as... Figure 4 As shown, the display duration of target slot 41 in the video template is 10 seconds, and the playback duration of the currently selected material 42 is 5 seconds. To avoid a black screen, the playback speed of material 42 can be adjusted to 0.5x to obtain target material 43 with an adjusted playback duration of 10 seconds. At this time, the playback duration of target material 43 is consistent with the display duration of target slot 41, and slot filling can be performed.

[0060] The video processing method provided in this embodiment adjusts the playback speed of the material to be processed when the playback duration of the material to be processed does not match the display duration associated with the slot, thereby obtaining target material with a playback duration consistent with the display duration. Therefore, after adding the target material to the slot, the problem of black frames will not occur, improving the content quality of the generated video content.

[0061] Furthermore, based on any of the above embodiments, step 301 includes:

[0062] Calculate the ratio between the playback duration and the display duration, and determine the ratio as the adjustment factor.

[0063] In this embodiment, to accurately adjust the speed of the material to be processed, the adjustment factor can first be determined. Therefore, the target playback speed can then be obtained by multiplying the playback speed of the material to be processed by the adjustment factor.

[0064] Optionally, the ratio between the playback duration and the display duration can be calculated, and the ratio can be determined as the adjustment factor.

[0065] The video processing method provided in this embodiment calculates the ratio between the playback duration and the display duration, and determines the ratio as the adjustment factor. This allows for accurate determination of the adjustment factor to adjust the playback speed of the material to be processed to match the display speed, thus enabling accurate adjustment of the playback speed of the material to be processed.

[0066] Furthermore, based on any of the above embodiments, the material to be processed is material with a uniform playback speed. Step 302 includes:

[0067] Calculate the product of the adjustment factor and the playback speed to obtain the adjusted target speed.

[0068] The playback speed of the material to be processed is switched to the target speed to obtain the target material.

[0069] In this embodiment, the material to be processed is material with a uniform playback speed. For example, the material to be processed can be played at the same playback speed throughout.

[0070] For the aforementioned material to be processed, during the playback speed adjustment process, the product of the adjustment factor and the playback speed can be calculated to obtain the target playback speed. Switching the playback speed of the material to be processed to the target playback speed yields the target material.

[0071] For example, the playback duration of the material to be processed is 10 seconds, the playback speed is 1x, and the display duration of the target slot is 20 seconds. In order to ensure that the material to be processed can completely fill the target slot, the playback speed of the material to be processed can be adjusted to 0.5x, so that the adjusted playback duration of the target material reaches 20 seconds.

[0072] The video processing method provided in this embodiment obtains the target playback speed by multiplying the overall playback speed of the material to be processed (which has a uniform playback speed) by the adjustment factor. Therefore, after switching the playback speed of the material to be processed to the target playback speed, a target material with a playback duration consistent with the display duration can be obtained. Thus, after adding the target material to the slot, there will be no black screen issue caused by the material not fully filling the slot.

[0073] Furthermore, based on any of the above embodiments, the material to be processed is material with multiple variable speed nodes and inconsistent playback speeds. Step 302 includes:

[0074] For each speed-changing node, calculate the product of the playback speed associated with the speed-changing node and the target speed multiplier to obtain the target speed multiplier after the speed-changing node is adjusted.

[0075] Adjust the playback speed of each speed-changing node to the target speed to obtain the target material.

[0076] In this embodiment, the material to be processed is a material with multiple speed-changing nodes and inconsistent playback speeds. For example, the material to be processed can be played at 1x speed for 0-5 seconds, at 0.5x speed for 6-10 seconds, and at 2x speed for 11-15 seconds. In this case, the material to be processed has three speed-changing nodes: 0s, 6s, and 11s. During the playback speed adjustment process, in order to ensure that the video effect of the target material is consistent with the video effect of the material to be processed, the playback speed can be adjusted for each speed-changing node.

[0077] Optionally, for each speed-changing node, the product of the playback speed associated with the speed-changing node and the target speed is calculated to obtain the target speed after adjustment for the speed-changing node. The playback speed of each speed-changing node is then adjusted to the target speed to obtain the target material.

[0078] Continuing the previous example, the target slot's display duration is 30 seconds, and the playback duration of the material to be processed is 15 seconds. To ensure the material to be processed fills the target slot, its playback speed needs to be adjusted from its original speed to half of its original speed. Therefore, for the first 0-5 seconds of the material to be processed, the playback speed can be adjusted to 0.5x; for the last 6-10 seconds, it can be adjusted to 0.25x; and for the last 11-15 seconds, it can be adjusted to 1x. Thus, the adjusted total playback duration of the target material is 30 seconds, which is sufficient to fill the target slot.

[0079] The video processing method provided in this embodiment adjusts the playback speed at each speed-changing node for the material to be processed, thereby obtaining target material with the same playback duration and display duration while ensuring the original speed-changing effect.

[0080] Optionally, based on any of the above embodiments, step 202 includes:

[0081] If the playback duration of the material to be processed is greater than the display duration, then the material to be processed is cropped based on the display duration to obtain the target material.

[0082] In this embodiment, when the playback duration of the material to be processed selected by the user is longer than the display duration of the target slot, in order to match the playback duration of the material to be processed with the display duration of the target slot, the material to be processed can also be edited.

[0083] Optionally, users can determine the parts to be edited in the material to be processed according to actual needs, or they can automatically identify the highlights in the material to be processed and perform editing operations. This disclosure does not impose any restrictions on this.

[0084] The video processing method provided in this embodiment further trims the material to be processed when the playback duration exceeds the display duration of the slot, thereby obtaining target material with the same playback and display duration. Therefore, adding the target material to the slot avoids the problem of missing important parts of the material.

[0085] Furthermore, based on any of the above embodiments, the step of cropping the material to be processed based on the display duration to obtain the target material includes:

[0086] At least one highlight fragment in the material to be processed is identified using a preset recognition algorithm.

[0087] Determine whether the total duration of at least one highlight segment matches the display duration.

[0088] If so, then at least one highlight segment is spliced ​​together to obtain the target material.

[0089] If not, then obtain the first editing parameters determined by the user for the at least one highlight segment, the first editing parameters including the timestamp of the part to be deleted in at least one highlight segment.

[0090] Based on the first editing parameters, the at least one highlight segment is edited, and the edited at least one highlight segment is spliced ​​together to obtain the target material.

[0091] In this embodiment, when the playback duration of the material to be processed selected by the user is longer than the display duration of the target slot, in order to avoid the loss of effective content, the highlight parts in the material to be processed can be identified and edited to obtain the target material.

[0092] Optionally, at least one highlight segment in the material to be processed can be identified using a preset recognition algorithm. Any recognition algorithm capable of identifying highlight content can be used for the recognition operation; this disclosure does not impose any limitations on this. The highlight segment can be a video clip composed of several frames featuring large movements, exaggerated expressions, rich colors, excellent composition, and strong emotion.

[0093] Furthermore, the total duration of at least one highlight segment can be calculated. It is then determined whether this total duration matches the display duration of the target slot. If so, the at least one highlight segment can be directly spliced ​​to obtain the target material. Otherwise, further editing operations can be performed. First editing parameters determined by the user for at least one highlight segment can be obtained, including the timestamps of the portions to be deleted from the at least one highlight segment. Based on the first editing parameters, the at least one highlight segment is edited, and the edited at least one highlight segment is then spliced ​​to obtain the target material.

[0094] The video processing method provided in this embodiment identifies highlight segments and splices them together to obtain target material. This allows the method to retain more highlight content in the material to be processed while ensuring that the playback duration of the target material matches the display duration of the target slot, thereby improving the content quality of the video.

[0095] Figure 5 This is a flowchart illustrating a video processing method provided in yet another embodiment of the present disclosure. Based on any of the above embodiments, as follows... Figure 5 As shown, the step of cropping the material to be processed based on the display duration to obtain the target material includes:

[0096] Step 501: Obtain the second editing parameters determined by the user for the material to be processed. The second editing parameters include the timestamp of the part to be deleted in the material to be processed.

[0097] Step 502: Perform editing operations on the material to be processed based on the second editing parameters to obtain the target material.

[0098] In this embodiment, when the playback duration of the material to be processed selected by the user is longer than the display duration of the target slot, in order to avoid the loss of effective content, the user can also perform editing operations on the material to be processed according to actual needs.

[0099] Optionally, a second editing parameter determined by the user for the material to be processed can be obtained. The second editing parameter includes the timestamp of the portion to be deleted in the material. For example, the user can browse the material to be processed, select the portion to be deleted, determine the timestamp associated with the portion to be deleted, and obtain the second editing parameter.

[0100] Furthermore, after obtaining the second editing parameters, the part to be deleted can be determined based on the timestamp in the second editing parameters, and the deletion operation can be performed on the part to be deleted to obtain the target material whose playback duration matches the display duration of the target slot.

[0101] One feasible approach is to align the footage to be processed with the target slot during the editing process. This alignment includes, but is not limited to, start time alignment, end time alignment, and mid-time alignment. After alignment, the portions of the footage that do not match the target slot are then edited.

[0102] The video processing method provided in this embodiment performs editing operations on the material to be processed based on the second editing parameters determined by the user. This ensures that the playback duration of the target material matches the display duration of the target slot, while making the generated target material more in line with the user's personalized needs.

[0103] Figure 6 This is a schematic diagram of the structure of the video processing apparatus provided in the embodiments of this disclosure, such as... Figure 6As shown, the device includes: an acquisition module 61, an editing module 62, and a filling module 63. The acquisition module 61 acquires multiple materials to be processed associated with a target template. The target template includes multiple preset slots, each associated with a preset display duration. The materials to be processed are used to fill these preset slots. The editing module 62, for each material to be processed, responds to a mismatch between the playback duration of the material to be processed and the display duration of the associated target slot. It then edits the material based on the display duration associated with the target slot to obtain an edited target material whose playback duration matches the display duration. The filling module 63 fills each target material into the target slot that matches the target material, thus obtaining target video content.

[0104] Furthermore, based on any of the above embodiments, the editing module is configured to: in response to a mismatch between the playback duration and the display duration of the material to be processed, determine an adjustment factor based on the display duration and the playback duration; and adjust the playback speed of the material to be processed according to the adjustment factor to obtain the target material.

[0105] Furthermore, based on any of the above embodiments, the editing module is configured to: calculate the ratio between the playback duration and the display duration, and determine the ratio as the adjustment factor.

[0106] Furthermore, based on any of the above embodiments, the material to be processed is material with a uniform playback speed. The editing module is used to: calculate the product of the adjustment factor and the playback speed to obtain the adjusted target speed; and switch the playback speed of the material to be processed to the target speed to obtain the target material.

[0107] Furthermore, based on any of the above embodiments, the material to be processed is material with multiple variable-speed nodes whose playback speeds are inconsistent. The editing module is used to: for each variable-speed node, calculate the product of the playback speed associated with that variable-speed node and the target multiplier, to obtain the adjusted target multiplier for that variable-speed node. Adjust the playback speed of each variable-speed node to the target multiplier to obtain the target material.

[0108] Furthermore, based on any of the above embodiments, the editing module is configured to: in response to the playback duration of the material to be processed being greater than the display duration, perform a cropping operation on the material to be processed based on the display duration to obtain the target material.

[0109] Further, based on any of the above embodiments, the editing module is configured to: identify at least one highlight segment in the material to be processed using a preset recognition algorithm; determine whether the total duration of the at least one highlight segment matches the display duration; if so, perform a splicing operation on the at least one highlight segment to obtain the target material; if not, obtain a first editing parameter determined by the user for the at least one highlight segment, the first editing parameter including the timestamp of the portion to be deleted in the at least one highlight segment; perform an editing operation on the at least one highlight segment based on the first editing parameter, and splice the edited at least one highlight segment to obtain the target material.

[0110] Furthermore, based on any of the above embodiments, the editing module is configured to: obtain second editing parameters determined by the user for the material to be processed, wherein the second editing parameters include the timestamp of the portion to be deleted in the material to be processed; and perform editing operations on the material to be processed based on the second editing parameters to obtain the target material.

[0111] The device provided in this embodiment can be used to execute the technical solutions of the above method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.

[0112] To implement the above embodiments, this disclosure also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the video processing method as described in any of the above embodiments.

[0113] To implement the above embodiments, this disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements the video processing method as described in any of the above embodiments.

[0114] To implement the above embodiments, this disclosure also provides an electronic device, including: a processor and a memory;

[0115] The memory stores computer-executed instructions;

[0116] The processor executes computer execution instructions stored in the memory, causing the processor to perform the video processing method as described in any of the above embodiments.

[0117] Figure 7This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device 700 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers, portable media players (PMPs), and in-vehicle terminals (such as in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.

[0118] like Figure 7 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0119] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.

[0120] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 709, or installed from storage device 708, or installed from ROM 702. When the computer program is executed by processing device 701, it performs the functions defined in the methods of embodiments of this disclosure.

[0121] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0122] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.

[0123] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.

[0124] Computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0125] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0126] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".

[0127] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0128] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0129] In a first aspect, according to one or more embodiments of the present disclosure, a video processing method is provided, comprising:

[0130] Obtain multiple materials to be processed associated with a target template, wherein the target template includes multiple preset slots, each preset slot is associated with a preset display duration, and the multiple materials to be processed are used to fill the multiple preset slots;

[0131] For each material to be processed, if the playback duration of the material to be processed does not match the display duration of the target slot associated with the material to be processed, then the material to be processed is edited based on the display duration associated with the target slot to obtain the edited target material, wherein the playback duration of the target material matches the display duration.

[0132] The target materials are filled into the target slots that match the target materials to obtain the target video content.

[0133] According to one or more embodiments of this disclosure, the step of editing the material to be processed based on the display duration associated with the target slot to obtain the edited target material includes:

[0134] In response to a mismatch between the playback duration and the display duration of the material to be processed, an adjustment multiplier is determined based on the display duration and the playback duration.

[0135] The playback speed of the material to be processed is adjusted according to the adjustment factor to obtain the target material.

[0136] According to one or more embodiments of this disclosure, determining the adjustment multiplier based on the display duration and the playback duration includes:

[0137] Calculate the ratio between the playback duration and the display duration, and determine the ratio as the adjustment factor.

[0138] According to one or more embodiments of this disclosure, the material to be processed is material with a uniform playback speed;

[0139] The step of adjusting the playback speed of the material to be processed according to the adjustment factor to obtain the target material includes:

[0140] Calculate the product of the adjustment factor and the playback speed to obtain the adjusted target speed.

[0141] The playback speed of the material to be processed is switched to the target speed to obtain the target material.

[0142] According to one or more embodiments of this disclosure, the material to be processed is material with multiple variable speed nodes and inconsistent playback speeds;

[0143] The step of adjusting the playback speed of the material to be processed according to the adjustment factor to obtain the target material includes:

[0144] For each speed-changing node, calculate the product of the playback speed associated with the speed-changing node and the target speed multiplier to obtain the target speed multiplier after the speed-changing node is adjusted.

[0145] Adjust the playback speed of each speed-changing node to the target speed to obtain the target material.

[0146] According to one or more embodiments of this disclosure, the step of editing the material to be processed based on the display duration associated with the target slot to obtain the edited target material includes:

[0147] If the playback duration of the material to be processed is greater than the display duration, then the material to be processed is cropped based on the display duration to obtain the target material.

[0148] According to one or more embodiments of this disclosure, the step of cropping the material to be processed based on the display duration to obtain the target material includes:

[0149] At least one highlight fragment in the material to be processed is identified using a preset recognition algorithm;

[0150] Determine whether the total duration of at least one highlight segment matches the display duration;

[0151] If so, then at least one highlight segment is spliced ​​together to obtain the target material;

[0152] If not, then obtain the first editing parameters determined by the user for the at least one highlight segment, the first editing parameters including the timestamp of the part to be deleted in at least one highlight segment;

[0153] Based on the first editing parameters, the at least one highlight segment is edited, and the edited at least one highlight segment is spliced ​​together to obtain the target material.

[0154] According to one or more embodiments of this disclosure, the step of cropping the material to be processed based on the display duration to obtain the target material includes:

[0155] Obtain the second editing parameters determined by the user for the material to be processed, the second editing parameters including the timestamp of the part to be deleted in the material to be processed;

[0156] The material to be processed is edited based on the second editing parameters to obtain the target material.

[0157] Secondly, according to one or more embodiments of the present disclosure, a video processing apparatus is provided, comprising:

[0158] The acquisition module is used to acquire multiple materials to be processed associated with the target template. The target template includes multiple preset slots, each preset slot is associated with a preset display duration, and the multiple materials to be processed are used to fill the multiple preset slots.

[0159] The editing module is used to perform editing operations on each material to be processed in response to a mismatch between the playback duration of the material to be processed and the display duration of the target slot associated with the material to be processed, based on the display duration associated with the target slot, to obtain the edited target material, wherein the playback duration of the target material matches the display duration.

[0160] The filling module is used to fill each of the target materials into the target slots that match the target materials to obtain the target video content.

[0161] According to one or more embodiments of this disclosure, the editing module is configured to:

[0162] In response to a mismatch between the playback duration and the display duration of the material to be processed, an adjustment multiplier is determined based on the display duration and the playback duration.

[0163] The playback speed of the material to be processed is adjusted according to the adjustment factor to obtain the target material.

[0164] According to one or more embodiments of this disclosure, the editing module is configured to:

[0165] Calculate the ratio between the playback duration and the display duration, and determine the ratio as the adjustment factor.

[0166] According to one or more embodiments of this disclosure, the material to be processed is material with a uniform playback speed;

[0167] The editing module is used for:

[0168] Calculate the product of the adjustment factor and the playback speed to obtain the adjusted target speed.

[0169] The playback speed of the material to be processed is switched to the target speed to obtain the target material.

[0170] According to one or more embodiments of this disclosure, the material to be processed is material with multiple variable speed nodes and inconsistent playback speeds;

[0171] The editing module is used for:

[0172] For each speed-changing node, calculate the product of the playback speed associated with the speed-changing node and the target speed multiplier to obtain the target speed multiplier after the speed-changing node is adjusted.

[0173] Adjust the playback speed of each speed-changing node to the target speed to obtain the target material.

[0174] According to one or more embodiments of this disclosure, the editing module is configured to:

[0175] If the playback duration of the material to be processed is greater than the display duration, then the material to be processed is cropped based on the display duration to obtain the target material.

[0176] According to one or more embodiments of this disclosure, the editing module is configured to:

[0177] At least one highlight fragment in the material to be processed is identified using a preset recognition algorithm;

[0178] Determine whether the total duration of at least one highlight segment matches the display duration;

[0179] If so, then at least one highlight segment is spliced ​​together to obtain the target material;

[0180] If not, then obtain the first editing parameters determined by the user for the at least one highlight segment, the first editing parameters including the timestamp of the part to be deleted in at least one highlight segment;

[0181] Based on the first editing parameters, the at least one highlight segment is edited, and the edited at least one highlight segment is spliced ​​together to obtain the target material.

[0182] According to one or more embodiments of this disclosure, the editing module is configured to:

[0183] Obtain the second editing parameters determined by the user for the material to be processed, the second editing parameters including the timestamp of the part to be deleted in the material to be processed;

[0184] The material to be processed is edited based on the second editing parameters to obtain the target material.

[0185] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;

[0186] The memory stores computer-executed instructions;

[0187] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the video processing method as described in the first aspect and various possible designs of the first aspect.

[0188] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, and when a processor executes the computer-executable instructions, the video processing method described in the first aspect and various possible designs of the first aspect is implemented.

[0189] Fifthly, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the video processing method as described in the first aspect and various possible designs of the first aspect.

[0190] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

[0191] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.

[0192] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.

Claims

1. A video processing method, characterized in that, include: Obtain multiple materials to be processed associated with a target template, wherein the target template includes multiple preset slots, each preset slot is associated with a preset display duration, and the multiple materials to be processed are used to fill the multiple preset slots; For each material to be processed, if the playback duration of the material to be processed does not match the display duration of the target slot associated with the material to be processed, then the material to be processed is edited based on the display duration associated with the target slot to obtain the edited target material, wherein the playback duration of the target material matches the display duration. The target materials are filled into the target slots that match the target materials to obtain the target video content.

2. The method of claim 1, wherein, The step of editing the material to be processed based on the display duration associated with the target slot to obtain the edited target material includes: In response to a mismatch between the playback duration and the display duration of the material to be processed, an adjustment multiplier is determined based on the display duration and the playback duration. The playback speed of the material to be processed is adjusted according to the adjustment factor to obtain the target material.

3. The method of claim 2, wherein, The determination of the adjustment multiplier based on the display duration and the playback duration includes: Calculate the ratio between the playback duration and the display duration, and determine the ratio as the adjustment factor.

4. The method of claim 2, wherein, The material to be processed is material with a uniform playback speed; The step of adjusting the playback speed of the material to be processed according to the adjustment factor to obtain the target material includes: Calculate the product of the adjustment factor and the playback speed to obtain the adjusted target speed. The playback speed of the material to be processed is switched to the target speed to obtain the target material.

5. The method of claim 2, wherein, The material to be processed is material with multiple speed-changing nodes and inconsistent playback speeds; The step of adjusting the playback speed of the material to be processed according to the adjustment factor to obtain the target material includes: For each speed-changing node, calculate the product of the playback speed associated with the speed-changing node and the target speed multiplier to obtain the target speed multiplier after the speed-changing node is adjusted. Adjust the playback speed of each speed-changing node to the target speed to obtain the target material.

6. The method of claim 1, wherein, The step of editing the material to be processed based on the display duration associated with the target slot to obtain the edited target material includes: If the playback duration of the material to be processed is greater than the display duration, then the material to be processed is cropped based on the display duration to obtain the target material.

7. The method of claim 6, wherein, The step of cropping the material to be processed based on the display duration to obtain the target material includes: At least one highlight fragment in the material to be processed is identified using a preset recognition algorithm; Determine whether the total duration of at least one highlight segment matches the display duration; If so, then at least one highlight segment is spliced ​​together to obtain the target material; If not, then obtain the first editing parameters determined by the user for the at least one highlight segment, the first editing parameters including the timestamp of the part to be deleted in at least one highlight segment; Based on the first editing parameters, the at least one highlight segment is edited, and the edited at least one highlight segment is spliced ​​together to obtain the target material.

8. The method of claim 6, wherein, The step of cropping the material to be processed based on the display duration to obtain the target material includes: Obtain the second editing parameters determined by the user for the material to be processed, the second editing parameters including the timestamp of the part to be deleted in the material to be processed; The material to be processed is edited based on the second editing parameters to obtain the target material.

9. A video processing apparatus, comprising: include: The acquisition module is used to acquire multiple materials to be processed associated with the target template. The target template includes multiple preset slots, each preset slot is associated with a preset display duration, and the multiple materials to be processed are used to fill the multiple preset slots. The editing module is used to perform editing operations on each material to be processed in response to a mismatch between the playback duration of the material to be processed and the display duration of the target slot associated with the material to be processed, based on the display duration associated with the target slot, to obtain the edited target material, wherein the playback duration of the target material matches the display duration. The filling module is used to fill each of the target materials into the target slots that match the target materials to obtain the target video content.

10. An electronic device, characterized in that, include: Processor and memory; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the video processing method as described in any one of claims 1 to 8.

11. A computer readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the video processing method as described in any one of claims 1 to 8.

12. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the video processing method as described in any one of claims 1 to 8.