Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

{kdenlive} How do I join two adjacent clips into one in kdenlive?

Suppose I made a mistake: I cut a clip into two using the scissor tool, and I did it off by a few frames. I want to undo the mistake and join the clips together again and split them at the right frame.

Please assume the case where a simple Undo won't work due to how broken the undo functionality is in kdenlive.

I have searched high and low, and found lots of answers that boil down to "you don't really need this, because for each and every thing you could possibly need it for, you can achieve the same goal without joining the clips together". Yes, it's possible, but its cumbersome and workaroundy and every subsequent operation on the affected time range requires twice as many clicks and twice as many attention registers.

I will accept an authoritative negative answer to the effect of "this is just not possible, full stop", coming from an expert who knows kdenlive through and through. Knowledge of impossibility is valuable. I will then know that I must be more careful to avoid the problem. For example, whenever I split a clip, I could back the uncut version on an unused track: a manually maintained undo stack. STILL better than constantly grouping and ungrouping and having to remember what must be grouped and what not.

like image 583
Szczepan Hołyszewski Avatar asked Dec 30 '17 13:12

Szczepan Hołyszewski


2 Answers

I found a very simple solution that was surprisingly difficult to discover due to my wrong way of thinking about clips.

TL;DR the solution if you cut a clip in two at the wrong frame:

  1. trust me and boldly delete the second clip
  2. resize the first clip so that it ends where the second clip ended (key observation: this does not "stretch" the clip!)
  3. cut it again at the right frame

Step 2 does not "stretch time" in the first clip. It only moves the clip's end position, which is just a time index into the source media. This is the "way of thinking about clips" part: they are "time windows" into the source media, and by moving a clip's right edge further to the right you are not making it play the same range of frames over a longer time, you are just making it play more frames from the source media.

Of course it is also possible to set a time scale for a clip but there's different UI for that.

like image 188
Szczepan Hołyszewski Avatar answered Sep 28 '22 05:09

Szczepan Hołyszewski


I can't confirm but it really looks like kdenlive can't do this. I've only started using kdenlive today, but spent most of it searching for how to do this. But I found a way which I hope helps, by manually editing the .kdelive save file. If you save it, make a cut, then save as a different .kdenlive file, you can see the difference, e.g:

@@ -316,7 +317,8 @@
   <entry out="8395" producer="1_playlist5" in="8342"/>
   <entry out="8701" producer="1_playlist5" in="8420"/>
   <entry out="8926" producer="1_playlist5" in="8779"/>
-  <entry out="10934" producer="1_playlist5" in="8958"/>
+  <entry out="10188" producer="1_playlist5" in="8958"/>
+  <entry out="10934" producer="1_playlist5" in="10189"/>
   <entry out="10960" producer="1_playlist5" in="10944"/>
   <entry out="11398" producer="1_playlist5" in="11193"/>
   <entry out="11629" producer="1_video" in="11427"/

The in and out values seem to be frame numbers. So if you have a cut to remove, you'd need to somehow convert the timestamp of it to frame numbers to find it in the file, then replace the 2 lines with 1, with the in and out values set appropriately.

Obviously this isn't suitable for regular use but as a one off it can get rid of annoying cuts without having to throw the project away and start over.

like image 39
ldarby Avatar answered Sep 28 '22 06:09

ldarby