Snapping doesn't take effect when trimming to close the empty gap between the 1st clip and 2nd clip except when it's done in a certain way

No snapping takes effect when using trimming to close the empty gap between one proceeding clip and one subsequent clip.

Steps to reproduce:

  1. Launch Shotcut.
  2. Enable Toggle snapping if disabled.
  3. Open an image or video.
  4. Create two clips from the image or video and drag them to Timeline. Use one track for now. Also use Split at Playhead in the project instead of Set In and Set Out in the source to create the clips.
  5. Drag the 2nd clip rightward to create a gap between the two clips.
  6. Click on the left edge of the 2nd clip and drag it toward the right edge of the 1st clip.
  7. Snapping doesn’t take effect.

If I drag the right edge of the 1st clip toward the left edge of the 2nd clip, snapping takes effect.

In a multi track timeline, snapping doesn’t take effect either way.
Steps to reproduce this problem:
1)-3) The same
4) Create two clips and drag the 1st clip to Track V1 and the 2nd clip to Track V2.
5) Click on the right edge of the 1st clip and drag it toward the left edge of the 2nd clip.
7) Snapping doesn’t take effect.

I’m presuming that this is a bug because snapping takes effect every time I drag, not trim, one clip toward another.

a) Only tested in Windows 7 64bit.
b) This happens in version 18.08.12, 18.07.02, 18.06.02, 18.05.08, and 18.03.06.
c) This happens on both of my PCs with different CPUs.

d) This happens regardless of the video mode. Changing the resolution or fps didn’t change the outcome.
e) This happens even if the two clips are created from a single file or two different files.

I usually snap to the playhead position.
Works like a charm every time.

I don’t quite understand why someone would stretch a clip in the first place. But the problem you present, it works the same way for me, but not quite sure how it’s a bug though. Just use the playhead for snapping. Using the playhead works so good for snapping, the clip will not move past the playhead.

1 Like

This is much more effective if you’re trying to remove blank space.
Right click anywhere in the blank space. One option: Remove.
Both clips will be snapped together.

The multi-track scenario was reported on Github as well:

These two were fixed for v18.09.

I can confirm that snapping works now where it didn’t. Thanks, Dan.

But now, snapping is so strong that I can hardly trim a clip once it’s snapped to another clip or the playhead. The same issue as

Dragging works well with snapping. It’s strong enough to be noticeable, but not too strong to the point I can’t move. I think I’m expecting the same level of snapping strength in both dragging and trimming.

How can you confirm when 18.09 is not yet released?

I swapped the new Track.js Track.qml, and timeline.qml in github with the old ones in 18.08.14. I think you mentioned that in the other thread.

OK, it still requires some force - not as much as before. I just pushed a new version of Track.js with a lower threshold for the trimming behavior (see SNAP_TRIM var at the top). That is all I am going to do to make it better for now. You can suggest a lower value that you like, and I will try it out.

I’m trying out SNAP_TRIM = 4 now and it’s somewhat close to what I expect. I can move the trimming handle edge easily away from another clip or playhead even when I move the mouse very slowly.

But it leaves the gap, which you mentioned as not a easy fix.

I think for 18.09 it is a good fix. Having no working snap is worse than having one with some incoordination between the cursor and trimming handle.

Isn’t snapping still in effect after I do trimming from the 2nd clip, reach the 1st clip, and move my mouse further to create a transition?

The 72nd line in Track.js:

72 if (i === clip.DelegateModel.itemsIndex || repeater.itemAt(i).isBlank)
72 if (i === clip.DelegateModel.itemsIndex || repeater.itemAt(i).isBlank || repeater.itemAt(i).isTransition)

to disable the snapping effect while a transition is created.

Thank you for pointing that out. I see it was already done for snapTrimOut(), which is used while trimming the out point of the left-hand clip!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.