[Kdenlive-devel] Reverse clips?

jb jb at kdenlive.org
Sun Feb 3 11:15:28 UTC 2013


On Saturday 02 February 2013 17.22:37 Steven Boswell II wrote:
> Digging around the Net today, I found out that reversing a clip in kdenlive
> involved first generating an .mlt file that reversed the existing clip,
> i.e. "mlt-melt -profile <profile> framebuffer:<input-clip> reverse=1
> -consumer xml:<output-clip>.mlt".  That worked fine, and I was able to use
> it in kdenlive.
> 
> I would like to see that in the "Clip properties" dialog as a setting, and
> thought it might be a good first project for me.  But I failed at the first
> step -- modifying a .kdenlive file to reverse an imported clip.  From
> diffing two .mlt files, one with a reverse and one without, the difference
> is a line that says "<property name="reverse">1</property>" inside of a
> "producer" block.  I tried putting that line in a producer block in the
> .kdenlive file, some alternate names for "reverse" like
> "meta.media.reverse" and "meta.attr.reverse", and adding a 'reverse="1"'
> attribute to the kdenlive_producer block, but none of them had the desired
> effect.
> 
> Can anyone give me a hint on how to proceed?  Is this project harder than I
> think it is?

Ok, first you need to understand the structure of the .kdenlive project file 
which I must admit is not really documented. I will try to add some 
documentation in the near future.

Basically that is not so simple, because when loading a clip in MLT / 
Kdenlive, you use a producer service.

By default, most clips use the "avformat" producer which is the FFmpeg 
service.

The speed effect itself uses the "framebuffer" producer, instead of "avformat", 
which allows it to reorder the way frames are passed.

So if you want your clip to play backwards, you must have both conditions:
* Use the framebuffer producer
* Set the "reverse" property to 1

I am not sure how easy it is to change the producer of a kdenlive_producer 
entry, will make some tests and let you know (probably tomorrow).

regards
jb













More information about the Kdenlive mailing list