[Kdenlive-devel] Creating Slide shows with Ken Burns effect

Gerhard Hübner Gerhard.Huebner at huebner-technologie.de
Sun Dec 16 23:11:24 UTC 2007


Although this topic might have already been raised some day, I would
like to take on the issue of the missing Ken Burns effect (smooth
panning and zooming inside an image or video) in Kdenlive.

A comprehensive search for free DVD slide show authoring tools returned
only two workable solutions: dvd-slideshow and Kdenlive.

While the dvd-slideshow supports the Ken Burns effect, rendering this
effect is awfully slow, in particular during transitions, and if you are
not happy with the result there is no fast way to change it. The only
solution is to tweak the parameters and re-run the video rendering. The
slcreator GUI is unstable and unscalable, having thrashed my whole
virtual memory after trying to import 50 pictures (not that much IMO).

On the other hand, Kdenlive has a lean and beautiful wysiwyg user
interface for arranging video clips, still images and transitions and is
surprisingly fast and efficient. I tried to simulate the Ken Burns
effect using PIP transitions to a black background but the result looks
miserable as the calculation obviously only involves integer arithmetic,
resulting in a heavy jitter in the image and ugly aliasing artefacts.

My solution would be to develop a filter that performs a linear
transformation depending on the following keyframe parameters:

- horizontal offset
- vertical offset
- zoom factor
- rotation angle (yes, this isn't strictly Ken Burns any more but
mathematically, the operation is the same and the results can be
stunning). The default background would be black if the image would not
cover the entire frame.

The filter parameter editor mask would allow the setting of start/end
keyframe parameters and a preview of the first and last frame of the
filter effect.

Mathematically, I don't see any problems implementing this but I would
like to get some help regarding the API for filters.

If I have understood the structure correctly, the API is within MLT, not
in Kdenlive itself. The classes involved would be mlt_filter and
mlt_frame. Now I need to know how to

- retrieve the pixels from the frame
- write transformed pixels to the new frame
- retrieve keyframe parameters for controlling the effect
- attach the filter editor to the Kdenlive GUI 
- tell the filter whether to perform a fast'n'ugly preview or a
precision (floating point) rendering.

Has anyone tried this before or is there ongoing work in this direction?
If not, I would be happy to try it.

Regards,

Gerhard Huebner






More information about the Kdenlive mailing list