Problem with single effect preset (stack) global keyframe position

Problem description

Problem with Kdenlive effect presets and effect stacks. When I’m saving only single effect as an effect preset - it seems to save keyframe positions as global (i.e. keyframe1 position in the WHOLE sequence). So, obviously, when I’m dragging this preset to the other clip in this sequence which lies ahead or before the original clip I created an effect preset from - it shows 0 or broken keyframes (because they were calculated globally, not locally to the clip itself). However, if I’m creating and “effect stack” preset (just 2 or more effects as a preset) problem vanishes. That’s sounds absurd and either I’m dumb and not getting something or it is clearly a bug with single effect presets, because even adding default Transform effect (which does nothing) fixes the problem. I just don’t want to add “phantom dummy Transform” each time I’m creating an effect, that seems to be dumb.

XML file with single effect

<effect id="testing singular" tag="qtblend" type="customVideo" version="2">
 <name>testing singular</name>
 <description>tesios</description>
 <author>Jean-Baptiste Mardelle</author>
 <features>
  <feature name="tenbit" supported="true"/>
 </features>
 <parameter default="0" name="compositing" paramlist="0;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;6;8" type="list" value="0">
  <name>Compositing</name>
  <paramlistdisplay>Alpha blend,Xor,Plus,Multiply,Screen,Overlay,Darken,Lighten,Color dodge,Color burn,Hard light,Soft light,Difference,Exclusion,Bitwise or,Bitwise and,Bitwise xor,Bitwise nor,Bitwise nand,Bitwise not xor,Destination in,Destination out</paramlistdisplay>
 </parameter>
 <parameter default="0" max="1" min="0" name="distort" type="bool" value="0">
  <name>Distort</name>
 </parameter>
 <parameter default="1" max="1" min="0" name="rotate_center" type="bool" value="1">
  <name>Rotate from center</name>
 </parameter>
 <parameter default="0 0 %width %height 1" name="rect" type="animatedrect" value="632=0 0 1920 1080 1.000000;808$=-782 -440 3484 1960 1.000000">
  <name>Rectangle</name>
 </parameter>
 <parameter compact="1" decimals="2" default="0" max="360" min="-360" name="rotation" notintimeline="1" suffix="°" type="animated" value="632=0;808$=0">
  <name>Rotation</name>
 </parameter>
</effect>

XML of the effect stack with “dummy Transform”

<effectgroup description="" id="testing stack" parentIn="632">
 <description></description>
 <effect id="Testing">
  <property name="rotation">1=0</property>
  <property name="distort">0</property>
  <property name="rect">1=0 0 1920 1080 1.000000</property>
  <property name="rotate_center">1</property>
  <property name="compositing">0</property>
 </effect>
 <effect id="qtblend">
  <property name="rotation">632=0</property>
  <property name="distort">0</property>
  <property name="rect">632=0 0 1920 1080 1</property>
  <property name="rotate_center">1</property>
  <property name="compositing">0</property>
 </effect>
</effectgroup>

If I’m missing something please correct me or maybe that’s a bug I’ve found

Hi @MakeADuke, and welcome to the forum and community.

This does look like a bug indeed, or at least like an inconsistency in handling keyframes between single effects and effect stacks. Please open a bug report, instructions are here.

Keyframes are set with their frame number within the clip they are assigned to. As long as the target clip has the same duration as the source clip, copying effects with keyframes works well. If the target clip has been cut at the start or end, keyframes are lost or sit at the wrong frame.

As part of the Dope Sheet development (see the roadmap) the way keyframes are recorded/managed is being changed so that they stay in the same (relative) position when copying them to other clips.