[Kdenlive-devel] image clips improvements

Carsten Pfeiffer gisl at leonde.de
Thu Jan 11 23:00:05 UTC 2007

On Saturday 30 December 2006 19:23, jb wrote:


> I just checked and in fact the streched resizing is done by Kdenlive. By
> default, MLT proportionally resizes the image, which is of course probably
> better.
> Kdenlive adds an "aspect_ratio" parameter to the image producer so that it
> is streched to completely fill the project's frame size. (you can find this
> in docclipavfile.cpp line 383 for clips showed on the clip monitor and in
> clipmanager.cpp line 599 for the timeline clips)

Indeed. Simply removing those calls makes it work pretty nicely. The images 
are scaled properly and have a black background. Are you going to remove 
these in SVN?

> When MLT resizes the image, it does not fill the borders with another
> color. Instead it creates a video clip with the image size.
> Let's say you have an image with size 200x576, the resulting image clip
> will keep this size. The problem is that if you attempt to make a push
> transition between a normal clip and this image clip, you will get weird
> results since the transition movements are defind in % of a frame.

Hmm, I couldn't notice any problems in the transitions I tried. It all looked 

> The best solution would probably be as you suggested to offer an option in
> the MLT image producers to fill the borders of an image with a definable
> color. If you want to have a look, there are 2 main image producers in MLT:
> pixbuf found at: modules/gtk2/producer_pixbuf.c and
> qimage found at: modules/qimage/producer_qimage.c

I hacked the qimage producer for a start but it seems to me that mlt still 
resizes the frame, as it automatically inserts a "normalizing" resize filter, 
which calculates an appropriate frame size based on producer (image size) and 
consumer (output size) (in filter_resize.c). That way, the qimage producer 
always gets a request in refresh_qimage() with a width and height that are 
different from the output size. So it can never create an image of the output 
size, e.g. to fill the background in black.


More information about the Kdenlive mailing list