Dan,
thank you very much for your reply. My background is Kdenlive, and I think 
about supporting keyframes that stay relative to the end of a transition or a 
keyframable effect, regardless of resizing. So your last sentence is key to me.
I've looked at the animated item code, and my impression is that if I want to 
be able to serialize such keyframes relative to the end I would probably need a 
new element, a flag, in the corresponding data structure. 
Sounds bad to me, as this would break binary compatibility, right?
Is there another way I could implement my desired serialization code 
enhancement? My rationale is that I don't want to keep a separate data 
structure in Kdenlive for each keyframe. My past experience with Kdenlive has 
shown how difficult it is to keep that synchroized with MLT state, and only 
refactoring Kdenlive to avoid such duplicated state has solved all these kind 
of issues.
So, any suggestions as to how I could proceed? Would enhancing the animated 
item code be an option? Are there other, better ways to achieve my goal?
Best regards, Harald 



-------- Ursprüngliche Nachricht --------
Von: Dan Dennedy <d...@dennedy.org> 
Datum: 29.09.16  21:38  (GMT+01:00) 
An: Harald Albrecht <harald.albre...@gmx.net>, mlt-devel@lists.sourceforge.net 
Betreff: Re: [Mlt-devel] serializing animated parameters with keyframes 
relative to end of transition/effect? 

When a MLT property is serialized, if there is a string representation, then it 
is 
used:https://github.com/mltframework/mlt/blob/master/src/framework/mlt_property.c#L675

Therefore, when the property is set by string, as long as nothing changes it, 
it will serialize as then input string. Some property operations clear this 
string (such as any non-anim mlt_properties_set*) or rebuild it including 
mlt_properties_anim_get() (animated 
string):https://github.com/mltframework/mlt/blob/master/src/framework/mlt_property.c#L1286

Details are fuzzy for me right now, but it looks like if you manipulate an 
animation, you need to explicitly serialize it back to a property. Also, 
negative time values are not fully managed and do not serialize back as a 
negative value. 
On Thu, Sep 29, 2016 at 10:08 AM Harald Albrecht <harald.albre...@gmx.net> 
wrote:
Hi,



as far as I understand, the textual representation of animated

properties allows to specify the position of a keyframe as negative,

that is, relative to the end of the effect or transition.



I've also seen that MLT, when encounting such a negative keyframe, it

adds the length of the transition/effect to it, so it's now an absolute

positive frame position.



Now, when I serialize such an MLT network, what will end up in the XML

output? The original animation string? Or are all negative keyframes lost?



Best regards,

Harald







------------------------------------------------------------------------------

_______________________________________________

Mlt-devel mailing list

Mlt-devel@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/mlt-devel


------------------------------------------------------------------------------
_______________________________________________
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel

Reply via email to