How to add all clips from a timeline to playlist

Is there a way to quickly add all the clips in a timeline to the Playlist?

My use case is when dividing raw footage into clips that are worth further processing. I am importing long videos and scrubbing through the timeline and making clips that are worth keeping and deleting the material in between. At the end I have have about 100 small clips worth keeping and which I want to export. Is it really correct that the only way to the get all those clips into the playlist is to add the clipsone at a time? i.e. I Select the clip on the timeline. Press C to copy. Press Esc to shift focus to the Source Viewer and then press Shift+A to add the clip to the playlist.

Is there a set of commands that can select all the clips (Ctrl+A already does this) and add all the selected clips to the playlist? (I guess they should be added in chronological order as they are present on the timeline, but I am not so fussy on that point in my case).

Hi @HotBlack , There’s not an automatic way of doing this as far as I am aware, but just to add you could perform a SLIGHTLY easier set of actions for each clip:

  1. C
  2. Click “source” tab
  3. Drag screen to Playlist.

(C - Source - drag)

Another suggestion - if you are on Windows, you might be able to write an Auto Hotkey script to make the process more automatic.

Well… After all these years, I finally installed AutoHotkey :smile:
I then took hints from your tutorial here, and was able to semi-automate sending Timeline clips to the Playlist.

I first select the first clip, then I press the “H” key on my keyboard, and the script does this:

  1. Copy the clip to the Source (C)
  2. Send the copy to the Playlist (Shift + A)
  3. Move the selection to the following Timeline element (empty space in that case) (Ctrl + RightArrow).
  4. Move the selection again, to the next Timeline element (the next clip) (Ctrl + RightArrow).

Then I press “H” again for each subsequent clip.

Here’s the script:

H::
Loop, 1
{
Send, ^{c}
Sleep 500
Send, +{a}
Sleep 500
Send, ^{Right}
Sleep 500
Send, ^{Right}
}
return

The ½ sec. (Sleep 500) pauses between each steps are not required. I only used them for the sake of the demo video.

I’m sure the script can be improved to make it go through the entire timeline without having to press H on each clip. But I’m not there yet :wink:

Also, I originally installed version 2.0, but when I tried to run the script, I got an alert telling me that it would only work on version 1.XX.

Brilliant, @musicalbox! If this was your first AHK script, then BRAVO! :grin: :+1: :+1:

Try removing the “return” at the end of the script. Also you could add this to the beginning of your script:

 #Requires Autohotkey v2.0  
 SendMode("Event")

Hi @musicalbox, oops, sorry, I gave you the wrong advice. Your script is for version 1 and removing the “return” won’t help or adding the extra text I gave.

Please ignore me. You can either keep using it with V1 or I can convert it to V2 easily. Too late now though, I’ll try to work on it tomorrow.

Thanks for the Autohotkey tip, it works for me too.

However, if there are other users who also have this problem. Would it be possible to make a feature request?

Hi @HotBlack - Glad the AHK script works - however, yes it would be a nice feature. To make a feature request, try changing the category of your thread to “suggestion” - if you can’t, post again and mark it “suggestion”. Unless @shotcut reads this and changes the category himself.

Going back to @musicalbox’s AHK script - I converted it to AHKv2. Note the V1 version works fine still although V1 is being phased out. I’ve actually made two versions -

  1. Script 1: Use for clips which are separate - ie they all have a gap in between them on the timeline.
  2. Script 2: Use for clips which are consecutive - ie they have no gaps in between them on the timeline.

I changed the hotkeys to CTRL + K and CTRL + L btw, just in case users forget to turn the script off after using, which creates big problems when typing “H” …
Shotcut copy clips to playlist MB MusicalBox AHK-v2.ahk.txt (1.1 KB)

(Remove the fake TXT extension)

Just change the “Loop” value to a higher number. Note - I have set the attached scripts to a loop value of “2” so you can test it with just 2 iterations first.

I would leave that in so that the script doesn’t run too fast and overwhelm Shotcut.

Screenshot of my revised script:

I tried your script @jonray.

But with Script 1, I get a problem I also experienced when adding more than one Loop to my script:
Each clip is selected in turns, but the scrip always sends copies of the first clip to the Playlist.

In the demo below I increased the Loops to 5, but I get the same result when it is set to 2.

Script 2 works fine though

Ah, OK, I didn’t nave time to check it properly. Thanks! Weird! I’ll investigate when I get a chance. Bit busy though but I’ll do my best!

Well @jonray, you were right when you said that pauses prevents Shotcut from being overwhelmed.

I added a ½ sec Sleep on the first line of the loop and Script 1 works well now
lqlVglEC3K

If you need to do this your workflow is wrong. I will not be adding this feature to Shotcut.

Hi @shotcut, so here’s my workflow - a friend of mine sends me long .flac audio files with multiple (say 20) pieces performed vintage flute-players from the 1920’s - 1950’s.
I need to separate each piece and export as a Mp3 or WAV.

So I place the .flac onto V1, and split it at the beginning and end of each piece, guided by the waveforms, giving 20 clips.
To export each clip, I click on each in turn and use the “C- source-drag” technique, which places each clip in the playlist.
Then I select “Export all Playlist Bin Items” and Hey Presto .. result! I just need to re-name each Mp3 using the Windows re-naming file feature.
This entails “C-source-drag” 20 times.

(An alternative method is to add a marker (Alt +M) stretching the range of each clip creating 20 markers, then export Marker 1, then Marker 2… etc.
This entails “Alt + M” 20 times, plus “Export Marker n” 20 times - 40 operations).

Are these workflows wrong? Or am I missing something?
With this suggested feature I could perform this in just a few clicks.

However, thankfully the Auto HotKey script works like a dream so I will use that instead, and I thank you for considering it.

Yep.. works now! Thanks.

Add as you go, contrasted with do it all and add them later. Or use the Source player to mark a region, add it to the playlist, and repeat. Both are add-as-you-go but from different work spaces.

“Add as you go” would be the workflow I’d choose in the case described by @HotBlack. It is part of a video editing process called Logging.

Logging: Selecting what footage you would like to extract from the source media and deposit on your local hard drive to be manipulated further in the editing process.

There is even a Shotcut layout preset called Logging (that can be edited to your preference).

Instead of using the Timeline to extract the sub-clips, drag your main clip in the Source panel then:

  1. Move the Playhead to the START position of your first sub-clip
  2. Press the I key on your keyboard.
  3. Move the Playhead to the END position.
  4. Press the O key on your keyboard.
  5. Click on the + button in the Playlist panel (or use Shift+A) to add the sub-clip to the Playlist.

Repeat until all your sub-clips are added to the Playlist.

Good advice folks… thanks @shotcut and @musicalbox. There’s a problem with selecting my mp3 subclips using the source player instead of the timeline, though, because I need to be guided by the waveform to know where to make the splits.
So on this occasion it’s probably back to AHK… but there’s food for thought here, and I have several options. THANK YOU!