Clips are misaligned with playhead by a few frames when snapping

What is your operating system?

What is your Shotcut version (see Help > About Shotcut)?

Can you repeat the problem? If so, what are the steps?
To reproduce the problem:

  • Find a 15 minute or longer clip (I used a generated 15 min 30fps clip, with each frame uniquely numbered.)
  • Add clip to a new track
  • Zoom timeline out to show whole clip.
  • Enable snap (i.e. magnet icon is ON)
  • Add marker-1 at known frame number (6:00;00, frame 10,800)
  • Add nearby marker-2 at known frame number (6:10;00, frame 11,100)
  • Split clip at marker-1
  • Drag clip-2 to the right, so it is out the way
  • Move playhead to marker-2
  • Drag clip-2 back to the left. Snap to playhead on marker-2.
  • Zoom as far as possible into playhead and check frame alignment.
  • Expected: clip-2 first frame snaps precisely to playhead
  • Actual: clip-2 snaps to a few frames away from playhead.

Further info:

  • Snap misalignment seems to vary by the zoom level, when dragging to snap.
  • I’ve seen 1 - 6 frames misalignments in various tests.
  • Misalignment is sometimes before the playhead & sometimes after. Factors driving whether it is before or after are unknown.

Further complication:

  • User may see unwanted, unexpected transition effects, when subsequently dragging clip-1.
  • This happens if the misaligned clip-2 is a few frames before the playhead
  • When clip-1 is dragged, it may snap correctly to the playhead, and so overlap with clip-2. Which in turn automatically generates the unwanted transition.

Video showing the problem is available here:


  • Make a first snap at preferred timeline zoom
  • Regards this first snap as approximate
  • Zoom in to maximum and make a second snap.