Removing multiple gaps on a single track

Hi. I’m not neither by far, a professional video editor; my use for this app is more video trimming than editting, and trimming for me generally requires just one track (generated by the “trimmable” video). Recently, I was trimming a long recording (2.5 hours), and before that, I registered all time “markers” from it, I mean, I watched this video on a player, and registered the beggining time for all parts of my interest, on notepad. I needed to split video exactly on those times, so removing clip couldn’t be done, because all time markers would disarray; so I used lift tool for not to mess the time markers. But obviously when I did that, It was generated gaps, and like my video is big, resulted on many many gaps.
So, I know that to delete any gap, I just need to click over that gap to place track cursor on it, and press delete, but ¿How can do this massively?¿Is there any way to remove multiple gaps at once in one track (and with that, “shrink” this track with only the parts of interest, of course)?
I hope you can understand my doubt and please apologize my bad english.

An easy way would be to “split-delete” in reverse time order. e.g. if you need to split and delete at times 3 minute, 8 minutes and 16 minutes, do so in reverse order 16 minutes, 8 minutes then 3 minutes. That way you don’t affect (mess with) the split-delete times.

Thank for reply. Ok, but I´m not concerned to keep time markers, I have covered that; what I want is a way to split-delete massively. I know I can do that by holding control key and clicking over the erasable clips, and when finalized that, just press delete key. But, on my project, that would be very time consuming task, because of the size of the video file. Also as I said, I recently discovered the lift function, that deletes undesired clips without moving time markers, but creating empty track spaces, gaps. So I want to know if there is any way to detect those gaps and delete them all at once (and thus rearrange the desired clips sequentially one each other… you understand)

There is no way to do what you are asking (selecting all the blank areas). The way I would do it is (working from the end of the track to the begiinning):

  • Move the playhead, split
  • Move the playhead, split
  • Select the section for deletion
  • Press the Ripple Delete icon (the minus sign ‘-’ above the playhead)
1 Like

oh, ok! i got it. Thank you.

Hi @camilogil ,

If you feel adveturous you could use Auto Hotkey.

I just wrote an autohotkey script which deletes each gap automatically if you have 5 clips with a gap in between each.

Here’s a video of it in action (no commentary). I have put 5 colour clips on track V1. I just press CTRL/M and it deletes all the gaps as if by magic!

To use it you have to be on Windows and have Auto HotKey installed. (Free app).

Copy the text below and paste it into a simple text editor, eg. Notepad. Save the file something like Sotcut remove gaps.ahk (it must have the .ahk extenstion).
Right-click it and select “run script”.
In Shotcut, select the FIRST clip and double-click it to make sure the playhead is at the beginning.

Then just type CTRL/M and 5 gaps should be removed automatically.
Note: the script has a loop of 5. You can change this, so if you have 100 gaps, just change 5 to 100 and run the script again!

How it works: it’s simply a sequence of sotcut keyboard shortcuts carried out one after the other. I’ve notated each line to tell you what it does.
Things you should also know:
To suspend the script, press CTRL/Q.
To exit the script, press CTRL/W.
The “hotkey” or “trigger” is set as CTRL/M but that can be changed - eg SHIFT/J would be +J::
NB you MUST begin by selecting the FIRST clip and double-click it to make sure the playhead is at the beginning.
Here’s the script:

 SetKeyDelay, 400
 SetNumLockState , on
 ; ^ =ctrl  +=shift  !=alt
 ^q::suspend
 ^w::exitapp
 
 ^m::
 loop, 5  {		    ;set the no.of times the script is repeated
 send, ^{right}		;Types CTRL/right arrow to select the gap
 sleep, 200		    ;Pause for 200ms to allow Shotcut to respond
 send, x			;Types x (ripple delete the gap)
 send, !{right}		;Types ALT/right arrow to move playhead to end of next clip
 send, {right}		;Types right arrow to move playhead one frame
 send, ^{space}		;Types CTRL/Space to select clip under playhead
 }
 return