Method, device, equipment, storage medium and program product for video editing
Patent Information
- Application Number
- CN202510323403.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2026-09-25
AI Technical Summary
[0004]然而,发明人发现相关技术中至少存在以下技术问题:当视频草稿包括的片段的数量以及转场特效的数量较多时,可能出现转场特效的显示层级低于片段的显示层级的情况,导致显示层级错乱,因此上述视频编辑方法的稳定性较差
[0019]本实施例提供的视频编辑的方法、装置、设备、存储介质及程序产品,该方法包括:响应于片段添加操作,在编辑轨道上添加第一素材片段,其中编辑轨道上相邻两个素材片段中前一个素材片段的显示层级低于后一个素材片段的显示层级;响应于在编辑轨道上第一素材片段与第二素材片段相邻且在时间线上第二素材片段位于第一素材片段之后,在第一素材片段和第二素材片段之间添加转场编辑图标,并将转场编辑图标的显示层级与第二素材片段的显示层级绑定为同一显示层级;响应于在编辑轨道上第一素材片段与第二素材片段相邻且在时间线上第二素材片段位于第一素材片段之前,在第一素材片段和第二素材片段之间添加转场编辑图标,并将转场编辑图标的显示层级与第一素材片段的显示层级绑定为同一显示层级。该技术方案中,由于将转场编辑图标与后一个素材片段的显示层级绑定为同一显示层级,而后一个素材片段的显示层级较高,因此可以避免转场编辑图标被前一个素材片段覆盖,并且,转场编辑图标和素材片段的显示层级也不会受索引值范围的影响,如此,在素材片段数量较多时,不会出现转场特效的显示层级低于素材片段的显示层级的情况,进而避免层级错乱的情况发生,因此提高视频编辑方法的稳定性。
Smart Images

Figure CN122824937A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of video editing technology, and in particular to a video editing method, apparatus, device, storage medium, and program product. Background Technology
[0002] Currently, when editing video drafts using video editing software, transition effects are often added between two adjacent segments of the video draft to improve its display effect.
[0003] In related technologies, to avoid clips obscuring transition effects, a maximum index value is first set, for example, 100. Then, the display levels of clips are sorted from low to high in a forward order, while the display levels of transitions are sorted from high to low in a reverse order. This ensures that the display level of transitions is higher than that of clips.
[0004] However, the inventors have discovered at least the following technical problems in the related technology: when the number of segments and transition effects included in the video draft is large, the display level of the transition effects may be lower than the display level of the segments, resulting in display level disorder. Therefore, the stability of the above video editing method is poor. Summary of the Invention
[0005] This disclosure provides a method, apparatus, device, storage medium, and program product for video editing, which can improve the stability of the video editing method.
[0006] In a first aspect, embodiments of this disclosure provide a video editing method, including:
[0007] In response to a clip addition operation, a first clip is added to the edit track, wherein the display level of the preceding clip is lower than that of the following clip in two adjacent clips on the edit track;
[0008] In response to a first clip and a second clip being adjacent on an editing track and the second clip being located after the first clip on a timeline, a transition editing icon is added between the first clip and the second clip, and the display level of the transition editing icon is bound to the same display level as the display level of the second clip;
[0009] In response to a first clip and a second clip being adjacent on an editing track and the second clip being preceding the first clip on a timeline, a transition editing icon is added between the first clip and the second clip, and the display level of the transition editing icon is bound to the same display level as the display level of the first clip.
[0010] Secondly, embodiments of this disclosure provide a video editing apparatus, comprising:
[0011] An add unit is used to add a first material fragment on an edit track in response to a fragment add operation, wherein the display level of the preceding material fragment is lower than the display level of the following material fragment among two adjacent material fragments on the edit track;
[0012] A video editing unit is configured to, in response to a first clip and a second clip being adjacent on an editing track and the second clip being located after the first clip on a timeline, add a transition editing icon between the first clip and the second clip, and bind the display level of the transition editing icon to the same display level as the display level of the second clip;
[0013] The video editing unit is also configured to, in response to a first clip and a second clip being adjacent on the editing track and the second clip being located before the first clip on the timeline, add a transition editing icon between the first clip and the second clip, and bind the display level of the transition editing icon to the same display level as the display level of the first clip.
[0014] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;
[0015] The memory stores computer-executed instructions;
[0016] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the video editing method as described in the first aspect and various possible designs of the first aspect.
[0017] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the video editing method described in the first aspect and various possible designs of the first aspect.
[0018] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the video editing method described in the first aspect and various possible designs of the first aspect.
[0019] This embodiment provides a video editing method, apparatus, device, storage medium, and program product. The method includes: in response to a clip addition operation, adding a first clip on an editing track, wherein the display level of the preceding clip is lower than the display level of the following clip in two adjacent clips on the editing track; in response to the first clip and a second clip being adjacent on the editing track and the second clip being after the first clip on the timeline, adding a transition editing icon between the first clip and the second clip, and binding the display level of the transition editing icon to the same display level as the display level of the second clip; in response to the first clip and a second clip being adjacent on the editing track and the second clip being before the first clip on the timeline, adding a transition editing icon between the first clip and the second clip, and binding the display level of the transition editing icon to the same display level as the display level of the first clip. In this technical solution, because the transition editing icon is bound to the same display layer as the subsequent clip, and the display layer of the subsequent clip is higher, the transition editing icon can be prevented from being covered by the previous clip. Furthermore, the display layers of the transition editing icon and the clip are not affected by the index value range. Thus, when there are many clips, the display layer of the transition effect will not be lower than the display layer of the clip, thereby avoiding layer disorder and improving the stability of the video editing method. Attached Figure Description
[0020] 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.
[0021] Figure 1 Illustration of video editing methods provided by existing technology Figure 1 ;
[0022] Figure 2 Flowchart of the video editing method provided in the embodiments of this disclosure Figure 1 ;
[0023] Figure 3 Illustration of a video editing method provided in this embodiment of the disclosure Figure 1 ;
[0024] Figure 4 Flowchart of the video editing method provided in the embodiments of this disclosure Figure 2 ;
[0025] Figure 5Illustration of a video editing method provided in this embodiment of the disclosure Figure 2 ;
[0026] Figure 6 Illustration of a video editing method provided in this embodiment of the disclosure Figure 3 ;
[0027] Figure 7 Illustration of a video editing method provided in this embodiment of the disclosure Figure 4 ;
[0028] Figure 8 Illustration of a video editing method provided in this embodiment of the disclosure Figure 5 ;
[0029] Figure 9 This is a schematic diagram of the structure of a video editing apparatus provided in an embodiment of the present disclosure;
[0030] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0031] 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.
[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0033] Currently, when editing video drafts using video editing software, transition effects are often added between two adjacent segments of the video draft to improve its display effect.
[0034] In related technologies, to avoid clips obscuring transition effects, a maximum index value is first set, for example, 100. Then, the display levels of clips are sorted from low to high in a forward order, while the display levels of transitions are sorted from high to low in a reverse order. This ensures that the display level of transitions is higher than that of clips. Specifically, clips with higher display levels overlap clips with those with lower display levels.
[0035] For example, such as Figure 1 As shown, the video draft includes clip 1, clip 2, and clip 3. Transition effect 1 is added between clip 1 and clip 2; transition effect 2 is added between clip 2 and clip 3. The display hierarchy of clips 1, 2, and 3, from lowest to highest, is: 1, 2, 3. The display hierarchy of transition effect 1 and transition effect 2, from highest to lowest, is: 100, 99. This ensures that the display hierarchy of the transitions is higher than that of the clips.
[0036] However, the inventors have discovered at least the following technical problems in the related technology: when the number of segments and transition effects included in the video draft is large, the display level of the transition effects may be lower than the display level of the segments, resulting in display level disorder. Therefore, the stability of the above video editing method is poor.
[0037] To address the technical problems in the existing technology, the inventor's technical concept is as follows: The display level of the transition editing icon is bound to the display level of the subsequent segment, forming a unified structure. Since the display level of the preceding segment is lower than that of the following segment in an editing track, while the display level of the transition editing icon is the same as and higher than that of the preceding segment, the transition editing icon covers the preceding segment without being covered by it.
[0038] Accordingly, the specific steps may include: First, in response to a clip addition operation, adding a first clip on the editing track, wherein the display level of the preceding clip is lower than the display level of the following clip among two adjacent clips on the editing track. Then, in response to the first clip being adjacent to a second clip on the editing track and the second clip being after the first clip on the timeline, adding a transition editing icon between the first and second clips, and binding the display level of the transition editing icon to the same display level as the second clip. Finally, in response to the first clip being adjacent to a second clip on the editing track and the second clip being before the first clip on the timeline, adding a transition editing icon between the first and second clips, and binding the display level of the transition editing icon to the same display level as the first clip. In this technical solution, since the transition editing icon is bound to the same display layer as the subsequent clip, and the display layer of the subsequent clip is higher, the transition editing icon can be prevented from being covered by the previous clip. Furthermore, the display layers of the transition editing icon and the clip are not affected by the index value range. Thus, when there are many clips, the display layer of the transition effect will not be lower than the display layer of the clip, thereby avoiding layer confusion and improving the stability of the video editing method.
[0039] The following describes the specific implementation process of the video editing method and device involved in the embodiments of this disclosure. Some examples are merely illustrative and not intended to limit the scope. The execution subject of the video editing method involved in the embodiments of this disclosure is an electronic device, which may be a terminal, server, etc.
[0040] Figure 2 Flowchart of the video editing method provided in the embodiments of this disclosure Figure 1 ,like Figure 2 As shown, the video editing method may include:
[0041] S201. In response to the clip addition operation, add a first clip on the editing track, wherein the display level of the first clip is lower than the display level of the second clip in two adjacent clips on the editing track.
[0042] In the embodiments of this disclosure, the material fragments may be video fragments or image fragments.
[0043] Optionally, the source material is a video clip; when editing the video draft, video clips can be added or deleted. The editing track allows editing of one or more clips in the video draft, such as adding effects or cutting / editing the clips.
[0044] The display hierarchy of a clip indicates its display priority. Clips with higher display hierarchies over clips with lower display hierarchies.
[0045] In some embodiments, two clips on an edit track being adjacent means that the end time of the previous clip coincides with the start time of the next clip.
[0046] It should be noted that, as Figure 3 As shown, after adding the first clip to the editing track, it can be determined whether a second clip adjacent to the first clip exists. If it exists, a transition editing icon is added via step S202 or step S203; otherwise, no transition editing icon is added.
[0047] S202, In response to the first clip and the second clip being adjacent on the editing track and the second clip being after the first clip on the timeline, a transition editing icon is added between the first clip and the second clip, and the display level of the transition editing icon is bound to the same display level as the display level of the second clip.
[0048] In this embodiment of the disclosure, the fact that the first material segment and the second material segment are adjacent and the second material segment is located after the first material segment on the timeline means that the end time of the first material segment and the start time of the second material segment coincide on the timeline.
[0049] In some embodiments, the transition editing icon can represent the transition state between the first and second clips (with or without a transition), and can also be used to implement editing operations such as adding, deleting, and updating transitions. Optionally, in response to the triggering of the transition editing icon, options to add, delete, and update transitions are displayed. In this case, the editing operations of adding, deleting, and updating transitions can be implemented through these options.
[0050] In this embodiment of the disclosure, since the display level of the transition editing icon is bound to the display level of the second material segment to the same display level, and the display level of the second material segment is higher than the display level of the first material segment, the transition editing icon can be prevented from being covered by the first material segment.
[0051] S203. In response to the first clip and the second clip being adjacent on the editing track and the second clip being located before the first clip on the timeline, a transition editing icon is added between the first clip and the second clip, and the display level of the transition editing icon is bound to the same display level as the display level of the first clip.
[0052] In this embodiment of the disclosure, the first material segment and the second material segment are adjacent on the editing track and the second material segment is located before the first material segment on the timeline: the start time of the first material segment coincides with the end time of the second material segment on the timeline.
[0053] In this embodiment of the disclosure, since the display level of the transition editing icon is bound to the display level of the first material segment to the same display level, and the display level of the first material segment is higher than the display level of the second material segment, the transition editing icon can be prevented from being covered by the second material segment.
[0054] This disclosure provides a video editing method: First, in response to a clip addition operation, a first clip is added to an editing track, wherein the display level of the preceding clip is lower than the display level of the following clip in two adjacent clips on the editing track. Then, in response to the first clip and a second clip being adjacent on the editing track and the second clip being after the first clip on the timeline, a transition editing icon is added between the first and second clips, and the display level of the transition editing icon is bound to the same display level as the display level of the second clip. In response to the first clip and a second clip being adjacent on the editing track and the second clip being before the first clip on the timeline, a transition editing icon is added between the first and second clips, and the display level of the transition editing icon is bound to the same display level as the display level of the first clip. In this technical solution, since the transition editing icon is bound to the same display layer as the subsequent clip, and the display layer of the subsequent clip is higher, the transition editing icon can be prevented from being covered by the previous clip. Furthermore, the display layers of the transition editing icon and the clip are not affected by the index value range. Thus, when there are many clips, the display layer of the transition effect will not be lower than the display layer of the clip, thereby avoiding layer confusion and improving the stability of the video editing method.
[0055] In some embodiments, the transition editing icon is used to perform editing operations such as adding, deleting, and updating transitions. It's important to note that to avoid transition effects affecting the content of the clip itself, the transition duration needs to be controlled. If the transition duration is a significant portion of the clip's length, adding a transition can be refused.
[0056] In some embodiments, the duration of a newly added transition can be set to be no more than a preset multiple of the segment duration. Optionally, when adding a transition, the duration of the newly added transition is no more than half the segment duration. Accordingly, as... Figure 4 As shown, the method also includes:
[0057] S401. In response to an add transition operation triggered by a transition editing icon, determine the transition duration of the transition, the duration of the first clip, and the duration of the second clip.
[0058] Optionally, such as Figure 5 As shown, before adding a transition operation, the transition editing icon is in a no-transition state.
[0059] S402. If half the duration of the first clip is greater than or equal to the transition duration and half the duration of the second clip is greater than or equal to the transition duration, then add a transition between the first clip and the second clip, and update the transition editing icon to show a transition.
[0060] For example, the transition editing icon has a transition status such as... Figure 5 As shown.
[0061] S403. If half the duration of the first clip is less than the transition duration, or half the duration of the second clip is less than the transition duration, then refuse to add a transition.
[0062] In some embodiments, after a cut operation is performed on the first media clip, it is necessary to re-determine whether the transition duration is less than half the duration of the first media clip. Accordingly, the method further includes: in response to the cut operation on the first media clip, determining the media clip duration of the first media clip after the cut operation; if half the media clip duration of the first media clip after the cut operation is less than the transition duration, then deleting the transition between the first media clip and the second media clip, and updating the transition editing icon to a no-transition state.
[0063] For example, the transition editing icon in its no-transition state is as follows: Figure 5 As shown.
[0064] In other embodiments, after cutting the second footage segment, it is necessary to re-determine whether the transition duration is less than half the duration of the second footage segment. Accordingly, the method further includes: in response to the cutting operation on the second footage segment, determining the segment duration of the second footage segment after the cutting operation; if half the segment duration of the second footage segment after the cutting operation is less than the transition duration, then deleting the transition between the first and second footage segments, and updating the transition editing icon to a no-transition state editing icon.
[0065] In this embodiment of the disclosure, when the transition duration constitutes a significant portion of the footage clip's length, adding or deleting the transition is permissible. This prevents the transition effect from negatively impacting the content of the footage clip itself, thereby increasing the flexibility of the video editing method.
[0066] In some embodiments, the display level of a transition is bound to the same display level as the display level of the latter of two adjacent clips. When a clip is added between two adjacent clips, the transition effect can be set to move with the latter clip.
[0067] Optionally, the method further includes: responding to adding a third clip between two adjacent clips, wherein a first transition is added between the two adjacent clips, and the display level of the first transition is bound to the same display level as the display level of the latter clip among the two adjacent clips; moving the first transition between the third clip and the latter clip among the two adjacent clips; and adding a transition editing icon between the former clip and the third clip among the two adjacent clips, and binding the display level of the transition editing icon to the same display level as the display level of the third clip.
[0068] For example, such as Figure 5 As shown, two adjacent segments include segment 1 and segment 2. There is a first transition between segment 1 and segment 2, and the display level of the first transition is bound to the same display level as segment 2. When segment 3 is added between segment 1 and segment 2, the first transition moves along with segment 2. At this time, the first transition is located between segment 3 and segment 2. Simultaneously, a transition editing icon is added between segment 1 and segment 3, and the display level of the transition editing icon is bound to the same display level as segment 3.
[0069] In some embodiments, when a segment is deleted, the transitions bound to that segment are also deleted. Accordingly, the method further includes: in response to a deletion operation for any media segment, determining whether the media segment has a transition bound to the same display level; if so, deleting the media segment and the transition.
[0070] Optionally, there are adjacent first, second, and third material clips on the editing track, and a first transition is added between the first and second material clips, and a second transition is added between the second and third material clips; the method further includes: deleting the third material clip and the second transition in response to a deletion operation on the third material clip.
[0071] For example, such as Figure 6 As shown, two adjacent segments include segment 1 and segment 2. There is a first transition between segment 1 and segment 2, and the display level of the first transition is bound to the same display level as the display level of segment 2. When segment 2 is deleted, the first transition bound to the same display level as segment 2 is also deleted.
[0072] In some embodiments, when deleting a clip, the transition between the clip and an adjacent clip may also be deleted. Accordingly, the method further includes: in response to a deletion operation for any clip, determining whether there is an adjacent clip following the clip on the timeline; if so, deleting the transition between the clip and the adjacent clip.
[0073] Optionally, there are adjacent first material clips, second material clips, and third material clips on the editing track, and a first transition is added between the first material clip and the second material clip, and a second transition is added between the second material clip and the third material clip; the method further includes: deleting the first material clip and the first transition in response to a deletion operation on the first material clip.
[0074] For example, such as Figure 7 As shown, the three adjacent segments are segment 1, segment 2, and segment 3. There is a transition 1 between segment 1 and segment 2, and a transition 2 between segment 2 and segment 3. When segment 1 is deleted, the transition 1 between segment 1 and segment 2 is also deleted.
[0075] In some embodiments, when deleting a segment, it can be determined whether there are adjacent segments before and after the segment. If there are adjacent segments, the transition between the segment and the adjacent segment following the segment is not deleted. The transition is then applied to the two adjacent segments. Accordingly, the method further includes: in response to a deletion operation for any material segment, determining whether there are adjacent material segments before and after the material segment on the timeline; if there are adjacent material segments, deleting the material segment and binding the transition to the material segment following the material segment to the same display level, moving it between the material segment before and the material segment following the material segment.
[0076] Optionally, there are adjacent first, second, and third material clips on the editing track, and a first transition is added between the first and second material clips, and a second transition is added between the second and third material clips; the method further includes: in response to a deletion operation on the second material clip, deleting the second material clip and the first transition, and moving the second transition between the first and third material clips.
[0077] For example, such as Figure 8 As shown, the three adjacent segments are segment 1, segment 2, and segment 3. There is a transition 1 between segment 1 and segment 2, and a transition 2 between segment 2 and segment 3. When segment 2 is deleted, the transition 1 between segment 1 and segment 2 is also deleted. The transition 2 between segment 2 and segment 3 is not deleted; instead, it applies to the transition between segment 1 and segment 3.
[0078] Figure 9 This is a schematic diagram of the structure of the video editing apparatus provided in the embodiments of this disclosure, as shown below. Figure 9 As shown, the video editing device includes:
[0079] Adding unit 901 is used to add a first material fragment on the editing track in response to a fragment adding operation, wherein the display level of the preceding material fragment is lower than the display level of the following material fragment among two adjacent material fragments on the editing track;
[0080] Video editing unit 902 is used in video editing units to add a transition editing icon between the first material clip and the second material clip in response to the first material clip being adjacent to the second material clip on the editing track and the second material clip being located after the first material clip on the timeline, and to bind the display level of the transition editing icon to the same display level as the display level of the second material clip;
[0081] The video editing unit 902 is further configured to, in response to a first material clip and a second material clip being adjacent on the editing track and the second material clip being located before the first material clip on the timeline, add a transition editing icon between the first material clip and the second material clip, and bind the display level of the transition editing icon to the same display level as the display level of the first material clip.
[0082] According to one or more embodiments of this disclosure, the transition editing icon is used to implement editing operations such as adding transitions, deleting transitions, and updating transitions; correspondingly, the device further includes: in response to an add transition operation triggered based on the transition editing icon, determining the transition duration of the transition, the duration of the first material segment, and the duration of the second material segment; if half of the duration of the first material segment is greater than or equal to the transition duration and half of the duration of the second material segment is greater than or equal to the transition duration, then adding a transition between the first material segment and the second material segment, and updating the transition editing icon to a transition-enabled state; if half of the duration of the first material segment is less than the transition duration or half of the duration of the second material segment is less than the transition duration, then refusing to add the transition.
[0083] According to one or more embodiments of this disclosure, the adding unit 901 is further configured to: in response to a cutting operation on the first material segment, determine the material segment duration of the first material segment after the cutting operation; if half of the material segment duration of the first material segment after the cutting operation is less than the transition duration, delete the transition between the first material segment and the second material segment, and update the transition editing icon to a no-transition state.
[0084] According to one or more embodiments of this disclosure, the apparatus further includes: a deletion unit; the deletion unit is configured to, in response to a cutting operation on the second material segment, determine the material segment duration of the second material segment after the cutting operation; if half of the material segment duration of the second material segment after the cutting operation is less than the transition duration, delete the transition between the first material segment and the second material segment, and update the transition editing icon to a no-transition state.
[0085] According to one or more embodiments of this disclosure, the adding unit 901 is further configured to: respond to adding a third material segment between two adjacent material segments, wherein a first transition is added between the two adjacent material segments, and the display level of the first transition is bound to the same display level as the display level of the latter material segment among the two adjacent material segments; move the first transition between the third material segment and the latter material segment among the two adjacent material segments; and add a transition editing icon between the former material segment among the two adjacent material segments and the third material segment, and bind the display level of the transition editing icon to the same display level as the display level of the third material segment.
[0086] According to one or more embodiments of this disclosure, the deletion unit is further configured to: in response to a deletion operation for any material segment, determine whether the material segment has a transition bound to the same display level; if so, delete the material segment and the transition; and / or, in response to a deletion operation for any material segment, determine whether there is an adjacent material segment after the material segment on the timeline; if so, delete the transition between the material segment and the adjacent material segment; and / or, in response to a deletion operation for any material segment, determine whether there are adjacent material segments both before and after the material segment on the timeline; if there are adjacent material segments, delete the material segment and migrate the transition bound to the same display level as the material segment after the material segment to the space between the material segment before and the material segment after the material segment.
[0087] According to one or more embodiments of this disclosure, there are adjacent first material segments, second material segments, and third material segments on an editing track, and a first transition is added between the first material segment and the second material segment, and a second transition is added between the second material segment and the third material segment; the deletion unit is further configured to: delete the first material segment and the first transition in response to a deletion operation on the first material segment; delete the second material segment and the first transition in response to a deletion operation on the second material segment, and move the second transition between the first material segment and the third material segment; delete the third material segment and the second transition in response to a deletion operation on the third material segment.
[0088] refer to Figure 10 The diagram illustrates a structural schematic of an electronic device 1000 suitable for implementing embodiments of the present disclosure. The electronic device 1000 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 radio receivers, personal digital assistants (PDAs), tablet computers, portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 10 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0089] like Figure 10 As shown, the electronic device 1000 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the electronic device 1000. The processing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0090] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic device 1000 to exchange data via wireless or wired communication with other devices. Although Figure 10 An electronic device 1000 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.
[0091] 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 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this disclosure.
[0092] 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.
[0093] 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.
[0094] 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.
[0095] 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).
[0096] 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.
[0097] 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".
[0098] 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.
[0099] In a first aspect, according to one or more embodiments of this disclosure, a method for video editing is provided, comprising:
[0100] In response to a clip addition operation, a first clip is added to the edit track, wherein the display level of the preceding clip is lower than that of the following clip in two adjacent clips on the edit track;
[0101] In response to a first clip and a second clip being adjacent on an editing track and the second clip being located after the first clip on a timeline, a transition editing icon is added between the first clip and the second clip, and the display level of the transition editing icon is bound to the same display level as the display level of the second clip;
[0102] In response to a first clip and a second clip being adjacent on an editing track and the second clip being preceding the first clip on a timeline, a transition editing icon is added between the first clip and the second clip, and the display level of the transition editing icon is bound to the same display level as the display level of the first clip.
[0103] According to one or more embodiments of this disclosure, the transition editing icon is used to implement editing operations such as adding transitions, deleting transitions, and updating transitions; correspondingly, the method further includes: in response to an add transition operation triggered based on the transition editing icon, determining the transition duration of the transition, the duration of the first material segment, and the duration of the second material segment; if half of the duration of the first material segment is greater than or equal to the transition duration and half of the duration of the second material segment is greater than or equal to the transition duration, then adding a transition between the first material segment and the second material segment, and updating the transition editing icon to a transition-enabled state; if half of the duration of the first material segment is less than the transition duration or half of the duration of the second material segment is less than the transition duration, then refusing to add the transition.
[0104] According to one or more embodiments of this disclosure, the method further includes: in response to a cutting operation on the first material segment, determining the material segment duration of the first material segment after the cutting operation; if half of the material segment duration of the first material segment after the cutting operation is less than the transition duration, deleting the transition between the first material segment and the second material segment, and updating the transition editing icon to a no-transition state.
[0105] According to one or more embodiments of this disclosure, the method further includes: in response to a cutting operation on the second material segment, determining the material segment duration of the second material segment after the cutting operation; if half of the material segment duration of the second material segment after the cutting operation is less than the transition duration, deleting the transition between the first material segment and the second material segment, and updating the transition editing icon to a no-transition state.
[0106] According to one or more embodiments of this disclosure, the method further includes: responding to adding a third material segment between two adjacent material segments, wherein a first transition is added between the two adjacent material segments, and the display level of the first transition is bound to the same display level as the display level of the latter of the two adjacent material segments; migrating the first transition between the third material segment and the latter of the two adjacent material segments; and adding a transition editing icon between the former of the two adjacent material segments and the third material segment, and binding the display level of the transition editing icon to the same display level as the display level of the third material segment.
[0107] According to one or more embodiments of this disclosure, the method further includes: in response to a deletion operation on any clip, determining whether the clip has a transition bound to the same display level; if so, deleting the clip and the transition; and / or, in response to a deletion operation on any clip, determining whether there is an adjacent clip after the clip on the timeline; if so, deleting the transition between the clip and the adjacent clip; and / or, in response to a deletion operation on any clip, determining whether there are adjacent clips both before and after the clip on the timeline; if there are adjacent clips, deleting the clip and moving the transition bound to the same display level as the clip after the clip to between the clip before and the clip after the clip.
[0108] According to one or more embodiments of this disclosure, there are adjacent first material clips, second material clips, and third material clips on an editing track, and a first transition is added between the first material clip and the second material clip, and a second transition is added between the second material clip and the third material clip; the method further includes: deleting the first material clip and the first transition in response to a deletion operation on the first material clip; deleting the second material clip and the first transition in response to a deletion operation on the second material clip, and migrating the second transition between the first material clip and the third material clip; and deleting the third material clip and the second transition in response to a deletion operation on the third material clip.
[0109] Secondly, according to one or more embodiments of this disclosure, a video editing apparatus is provided, comprising:
[0110] An add unit is used to add a first material fragment on an edit track in response to a fragment add operation, wherein the display level of the preceding material fragment is lower than the display level of the following material fragment among two adjacent material fragments on the edit track;
[0111] A video editing unit is configured to, in response to a first clip and a second clip being adjacent on an editing track and the second clip being located after the first clip on a timeline, add a transition editing icon between the first clip and the second clip, and bind the display level of the transition editing icon to the same display level as the display level of the second clip;
[0112] The video editing unit is also configured to, in response to a first clip and a second clip being adjacent on the editing track and the second clip being located before the first clip on the timeline, add a transition editing icon between the first clip and the second clip, and bind the display level of the transition editing icon to the same display level as the display level of the first clip.
[0113] According to one or more embodiments of this disclosure, the transition editing icon is used to implement editing operations such as adding transitions, deleting transitions, and updating transitions; correspondingly, the method further includes: in response to an add transition operation triggered based on the transition editing icon, determining the transition duration of the transition, the duration of the first material segment, and the duration of the second material segment; if half of the duration of the first material segment is greater than or equal to the transition duration and half of the duration of the second material segment is greater than or equal to the transition duration, then adding a transition between the first material segment and the second material segment, and updating the transition editing icon to a transition-enabled state; if half of the duration of the first material segment is less than the transition duration or half of the duration of the second material segment is less than the transition duration, then refusing to add the transition.
[0114] According to one or more embodiments of this disclosure, the method further includes: in response to a cutting operation on the first material segment, determining the material segment duration of the first material segment after the cutting operation; if half of the material segment duration of the first material segment after the cutting operation is less than the transition duration, deleting the transition between the first material segment and the second material segment, and updating the transition editing icon to a no-transition state.
[0115] According to one or more embodiments of this disclosure, the method further includes: in response to a cutting operation on the second material segment, determining the material segment duration of the second material segment after the cutting operation; if half of the material segment duration of the second material segment after the cutting operation is less than the transition duration, deleting the transition between the first material segment and the second material segment, and updating the transition editing icon to a no-transition state.
[0116] According to one or more embodiments of this disclosure, the method further includes: responding to adding a third material segment between two adjacent material segments, wherein a first transition is added between the two adjacent material segments, and the display level of the first transition is bound to the same display level as the display level of the latter of the two adjacent material segments; migrating the first transition between the third material segment and the latter of the two adjacent material segments; and adding a transition editing icon between the former of the two adjacent material segments and the third material segment, and binding the display level of the transition editing icon to the same display level as the display level of the third material segment.
[0117] According to one or more embodiments of this disclosure, the method further includes: in response to a deletion operation on any clip, determining whether the clip has a transition bound to the same display level; if so, deleting the clip and the transition; and / or, in response to a deletion operation on any clip, determining whether there is an adjacent clip after the clip on the timeline; if so, deleting the transition between the clip and the adjacent clip; and / or, in response to a deletion operation on any clip, determining whether there are adjacent clips both before and after the clip on the timeline; if there are adjacent clips, deleting the clip and moving the transition bound to the same display level as the clip after the clip to between the clip before and the clip after the clip.
[0118] According to one or more embodiments of this disclosure, there are adjacent first material clips, second material clips, and third material clips on an editing track, and a first transition is added between the first material clip and the second material clip, and a second transition is added between the second material clip and the third material clip; the method further includes: deleting the first material clip and the first transition in response to a deletion operation on the first material clip; deleting the second material clip and the first transition in response to a deletion operation on the second material clip, and migrating the second transition between the first material clip and the third material clip; and deleting the third material clip and the second transition in response to a deletion operation on the third material clip.
[0119] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0120] The memory stores computer-executed instructions;
[0121] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the video editing method as described in the first aspect and various possible designs of the first aspect.
[0122] 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, which, when executed by a processor, implement the video editing method described in the first aspect and various possible designs of the first aspect.
[0123] 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 editing method as described in the first aspect and various possible designs of the first aspect.
[0124] 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.
[0125] 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.
[0126] 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 editing method, characterized in that, The method includes: In response to a clip addition operation, a first clip is added to the edit track, wherein the display level of the preceding clip is lower than that of the following clip in two adjacent clips on the edit track; In response to a first clip and a second clip being adjacent on an editing track and the second clip being located after the first clip on a timeline, a transition editing icon is added between the first clip and the second clip, and the display level of the transition editing icon is bound to the same display level as the display level of the second clip; In response to a first clip and a second clip being adjacent on an editing track and the second clip being preceding the first clip on a timeline, a transition editing icon is added between the first clip and the second clip, and the display level of the transition editing icon is bound to the same display level as the display level of the first clip.
2. The method according to claim 1, characterized in that, The transition editing icon is used to implement editing operations such as adding, deleting, and updating transitions; correspondingly, the method also includes: In response to an add transition operation triggered based on the transition editing icon, the transition duration of the transition, the duration of the first clip, and the duration of the second clip are determined; If half the duration of the first clip is greater than or equal to the transition duration and half the duration of the second clip is greater than or equal to the transition duration, then a transition is added between the first clip and the second clip, and the transition editing icon is updated to a transition-enabled state. If half the duration of the first clip is less than the transition duration, or half the duration of the second clip is less than the transition duration, then the transition is not added.
3. The method according to claim 2, characterized in that, The method further includes: In response to the cutting operation on the first material segment, determine the material segment duration of the first material segment after the cutting operation; If, after the cut operation, half the duration of the first clip is less than the transition duration, then the transition between the first clip and the second clip is deleted, and the transition editing icon is updated to a no-transition state.
4. The method according to claim 2, characterized in that, The method further includes: In response to the cutting operation on the second material segment, determine the material segment duration of the second material segment after the cutting operation; If, after the cut operation, half the duration of the second clip is less than the transition duration, then the transition between the first clip and the second clip is deleted, and the transition editing icon is updated to a no-transition state.
5. The method according to claim 1, characterized in that, The method further includes: In response to adding a third clip between two adjacent clips, wherein a first transition is added between the two adjacent clips, and the display level of the first transition is bound to the same display level as the display level of the latter clip of the two adjacent clips; The first transition is moved between the third clip and the latter of the two adjacent clips, and a transition editing icon is added between the former clip and the third clip, and the display level of the transition editing icon is bound to the same display level as the display level of the third clip.
6. The method according to claim 1, characterized in that, The method further includes: In response to a deletion operation on any clip, determine if the clip is bound to a transition at the same display level; if so, delete the clip and the transition; and / or, In response to a deletion operation on any clip, determine whether there is an adjacent clip following the clip on the timeline; if so, delete the transition between the clip and the adjacent clip; and / or, In response to a deletion operation on any clip, determine whether there are adjacent clips before and after the clip on the timeline; if there are adjacent clips, delete the clip and bind the clip after the clip to the same display level transition, moving it between the clip before and the clip after the clip.
7. The method according to claim 6, characterized in that, The method includes three adjacent clips on an editing track: a first clip, a second clip, and a third clip. A first transition is added between the first clip and the second clip, and a second transition is added between the second clip and the third clip. In response to the deletion operation on the first footage segment, delete the first footage segment and the first transition; In response to the deletion operation on the second clip, the second clip and the first transition are deleted, and the second transition is moved between the first clip and the third clip; In response to a deletion operation on the third footage segment, the third footage segment and the second transition are deleted.
8. A video editing apparatus, characterized in that, The device includes: An add unit is used to add a first material fragment on an edit track in response to a fragment add operation, wherein the display level of the preceding material fragment is lower than the display level of the following material fragment among two adjacent material fragments on the edit track; A video editing unit is configured to, in response to a first clip and a second clip being adjacent on an editing track and the second clip being located after the first clip on a timeline, add a transition editing icon between the first clip and the second clip, and bind the display level of the transition editing icon to the same display level as the display level of the second clip; The video editing unit is also configured to, in response to a first clip and a second clip being adjacent on the editing track and the second clip being located before the first clip on the timeline, add a transition editing icon between the first clip and the second clip, and bind the display level of the transition editing icon to the same display level as the display level of the first clip.
9. 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 editing method as described in any one of claims 1 to 7.
10. 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 editing method as described in any one of claims 1 to 7.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the video editing method as described in any one of claims 1 to 7.