Bug when trimming clips with I and O on timeline

What is your operating system?

Windows 11

Shotcut v. 26.4.30

I noticed erratic behavior when trimming clips on the timeline with I (In) and O (Out). It’s a little complex to explain in words so I made a demo. In certain circumstances, Pressing O on a clip on V2 seems to extend a clip on V1 to make it 4 minutes long.

At the critical point to understand the issue at 25 seconds the user activity is erratic and difficult to follow. It looks like you press O at the same time you are trimming the in point of a clip. Please try to use words. Sometimes the video is difficult for me to follow. Often, I need to download it and load it in Shotcut to be able to step back and forth frame by frame to see what people are trying to show—because the web player is too crude. That can create a friction and cause me to ignore the report.

1 Like

Scenario 1. The trim functions are sensitive to the current track BTW, but it did the wrong thing obviously because the newly requested out point was invalid (same as the in point for the clip under the playhead on the current track).

1 Like

Ok, sincere apologies, Dan, I take your point about the video being hard to follow. I will try to put my steps into words in future. I’ll do it asap. Thanks for accepting the bug.

Hi @shotcut, so here is Scenario 1 again, this time in words (steps to reproduce). Is it easier to understand than my video?

This time, the incorrect behaviour occurred earlier in the process than in my video.

1. Put 3 clips on timeline (V1).

2. Select the middle clip.

3. Move it up to V2 by dragging it upwards.

4. Extend it to the right so it goes past clip 3, by dragging the right hand edge.

5. Click on the timeline time bar somewhere above clip 2.

6. Seek Next.

7. Press O for Out.

Clip 3 (on track V1) extends into a 4-minute long clip.

(Expected - Clip 2 should have trimmed at the outpoint, Clip 3 should have remained as it is).

This is kinda scenario 2, a variation:

1. Put 3 clips on timeline (V1).

2. Select the first clip.

3. Move it up to V2 by dragging upwards.

4. Extend it to the right by dragging the right-hand edge, so it goes past the start of clip 2.

5. Click on the time bar of the timeline, somewhaer above clip 1.

6. Seek Next.

7. Press O for Out.

Again, Clip 2 extends into a 4-minute clip, pushing clip 3 to the right.

Exepected: Clip 1 should have trimmed at the outpoint, Clip 2 should have reamined as it is.

Both scenarios are the same, just different steps to get there but the steps do not matter much. It is simpler:

  • add a clip to timeline
  • trim its out point
  • seek to the start of the clip
  • press O
  • the clip becomes full length

It should be either ignored or make the clip a single frame. A single frame is valid, but probably not what the user wanted resulting in a surprising glitch when viewing the export made worse because single frame clips are so hard to see on the timeline.

But part of your confusion comes from not seeming to be aware of current track and that it has a major role in this along with playhead rather than selected clip. The workaround to this problem is to change the current track to the one containing the clip you are targeting:

However, your examples illustrate probably a related bug: when moving a clip to another track it does not change the current track to the target track. The clip you dragged is still selected, but the current track did not update. Meanwhile, simply selecting a clip on another track does change current track. That is inconsistent.

1 Like

For me, you have hit the nail on the head there, @shotcut. Yes, I totally agree that when a clip is moved to and another track, and it stays selected, then the current track should be updated accordingly - just as it does when a clip is selected, not moved. Thank you for considering addressing it. It would solve my confusion! :+1:

You are right again, @shotcut. I agree entirely, having the clip suddenly extend to its full length (or 4 minutes, if it is an image) is very confusing, and also making it a single frame would also be problematic. Would you consider making it so it is ignored if this happens? I think that would be a sensible improvement.

Of course, seeking the start of a clip and then pressing O is an illogical process, but users might do this by mistake and then wonder why the clip suddenly extends.

1 Like

Both bugs here fixed for the next version 26.6

1 Like

That’s wonderful, @shotcut. Thank you very much. :+1: I’ll check out the nightly build.