Bug 511055 - Keyframes are sometimes positioned incorrectly when the clip is “moved to the left.” - Keyframes werden teilweise bei "nach links Verschieben" des Clips falsch positioniert.
Summary: Keyframes are sometimes positioned incorrectly when the clip is “moved to the...
Status: RESOLVED NOT A BUG
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Effects & Transitions (other bugs)
Version First Reported In: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2025-10-24 21:51 UTC by fehler-im-programm
Modified: 2025-10-27 16:18 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Projectfile (16.15 KB, application/xml)
2025-10-24 21:51 UTC, fehler-im-programm
Details
Video (504.35 KB, video/mp4)
2025-10-24 21:58 UTC, fehler-im-programm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fehler-im-programm 2025-10-24 21:51:46 UTC
Created attachment 186113 [details]
Projectfile

Flatpak 25.08.02 (However, this is unspecific.)

SUMMARY
Keyframes are sometimes positioned incorrectly when the clip is “moved to the left.”

STEPS TO REPRODUCE
1. Open Attachment
2. Look at the keyframes. 
3. Drag the clip to the left (to 0:00; total length, now 10s instead of 5s).
4. Look at the keyframes again.


OBSERVED RESULT
The first two keyframes have been moved incorrectly. 

1. Keyframe 0:59 (incorrect)
2. Keyframe 1:29 (incorrect)
3. Keyframe 6:30 (correct

EXPECTED RESULT
All Keyframes are moved correctly

1. Keyframe 5:59
2. Keyframe 6:00 
3. Keyframe 6:30.
Comment 1 fehler-im-programm 2025-10-24 21:58:44 UTC
Created attachment 186114 [details]
Video
Comment 2 Bernd 2025-10-27 13:42:27 UTC
Thank you for reporting.

I cannot replicate this behavior using the provided project file (thanks for that, btw). The clip can be moved without change in length/duration, and keyframes are at the same position (relative to the clip's start, but that is the standard behavior).

I used 25.08.2 appimage on Pop!_OS.

Watching your video I noticed that you did not MOVE the clip but dragged the left edge to the left making the clip start earlier and longer in duration. The keyframes now start earlier as well. As stated before, this is the standard behavior because keyframes are positioned relative to the start of the clip. A keyframe set at the end or start of the clip does not get moved when the opposite edge is moved; a keyframe at the end of the clip, however, stays at its relative position, if the right edge is moved. There is always a keyframe at frame 0 of any clip and it stays there regardless.
Comment 3 fehler-im-programm 2025-10-27 15:29:23 UTC
"Watching your video I noticed that you did not MOVE the clip but dragged the left edge to the left making the clip start earlier and longer in duration. The keyframes now start earlier as well."

That's exactly the point when a clip arrives late and therefore has to be moved forward or to the left.

If you drag the clip to the RIGHT, the keyframes remain in the expected position.

So I never understood why moving to the left is treated differently than moving to the right. I thought it was a bug.
Comment 4 Bernd 2025-10-27 16:10:54 UTC
(In reply to fehler-im-programm from comment #3)
> That's exactly the point when a clip arrives late and therefore has to be moved forward or to the left.
There is a difference in MOVING  a clip along the timeline, or dragging one of the edges making it longer or shorter

> If you drag the clip to the RIGHT, the keyframes remain in the expected position.
And that's because keyframes are relative to the START of the clip. So, if you make the clip longer by dragging the right edge, the start position does NOT change, therefore the keyframes' relative distance to the start doesn't change.
 
> So I never understood why moving to the left is treated differently than moving to the right. I thought it was a bug.
If you are dragging the left edge to the left, you are making the clip longer but at the same time changing the start position. Since keyframes maintain a relative distance to the start of the clip, their position changes.

This was the intended behavior at the time of keyframe implementation. And it makes sense because when MOVING the clip to a new position in the timeline while maintaining the overall duration, the keyframes have to MOVE with it. If keyframes were tied to the position in the timeline, moving the clip would change the relative position of the keyframes and even move them out of the clip altogether in case the clip's new position in the timeline doesn't overlap with its previous position.
Comment 5 fehler-im-programm 2025-10-27 16:18:02 UTC
"There is a difference in MOVING  a clip along the timeline, or dragging one of the edges making it longer or shorter"

I meant PULLING the left edge to the left when the clip is too late at the front (as shown in the video).

Moving only makes sense if the clip is too late at the front AND at the back. Moving was not the issue.

I will withdraw the bug report.