New Kdenlive Transition "Composite and Transforms"

As part of performance optimizations for the upcoming 16.08 release of Kdenlive, Jean-Baptiste threw in a new (and optimized) transition called "Composite and Transform"...

New Composite and Transform

There's now a new transition on the block, destined for typical compositing purposes, with performance optimizations for some typical usage scenarios.
Note: Before you can use this new transition in your projects, you need to upgrade MLT to a recent git master version first. Otherwise, Composite and Transform won't show up in the transitions list pane. (*)ubuntu users on the Kdenlive beta ppa should see all these updates soon.

The user interface may look boring at a first glance, but long-term Kdenlive users should notice that Composite and Transform now supports the keyframe interpolation modes smooth and discrete besides the existing linear mode. Smooth is especially useful for smooth fades, moves, and rotations.

New transition Composite and Transform.

The rationale for "another" transition is manifold:
  • better performance in the absence of transparency, compared to our trusty Affine transition. This is important as this new transition is going to be used behind the scenes of Kdenlive's timeline for automatic transparent tracks. So far, performance was less than satisfying when there was no transparency in the clips on transparent tracks.
  • no luma bleed as with the rusty Composite transition. However, please note that Composite is still lightning fast as it cuts some corners at the expense of luma bleed.
  • expected alpha compositing behavior, where multiple layers of transparency are used and, in the past, many Kdenlive users hit difficult times using the Affine transition. Please see below for more details and examples.
Internally, from the perspective of MLT, this new transition is named "qtblend". We will visit it more often in our tour of Inside Kdenlive Projects.

Compositing Behavior of Composite and Transform

The new Composite and Transform comes with a default compositing behavior that will better suit especially newcomers: compositing multiple layers where multiple layers have transparency is a well-known stumbling blog to many Kdenlive users. Say, we have three tracks, with a (transparent) title overlay and some (also transparent) graphical overlay on the topmost and middle tracks.

New hands will have a better compositing experience with Composite and Transform.

Simply putting Composite and Transform transitions between each track with the default compositing mode of alpha blend gives the usually intended result:

Easy layered compositing with Composite and Transform.

In contrast, simply putting Affine transitions between each track, without correctly setting the upper transition's track parameter to the lowest track, gives this undesired result:

Affine transitions and alpha transparency: you'll need to use the track parameter.

The reason is that Affine handles transparency in the lower track differently from Composite and Transition in its default setup. Of course, old hands know how to deal with this situation. However, to many Kdenlive users, the new Composite and Transition will be making live much easier for many, many projects, as it gives the expected compositing results right out of the box.

Automatic Timeline Compositing Quality

The upcoming 16.08 release of Kdenlive will also simplify working with automatic composite tracks. In the past, each track above the bottommost video track could be switched individually between transparent and opaque.

Timeline compositing.
However, this leads to unexpected (and difficult to understand) consequences, when switching some tracks to opaque, and others to transparent.

So for the sake of ease of use and non-confusing user interfaces, Kdenlive from 16.08 on will only have a new timeline toolbar item for controlling the timeline compositing mode. The old track-wise composite controls in the track headers are no more.

Note: On existing setups you may need to manually add the new action Track Compositing to your timeline toolbar.
There are three different settings:
  1. None: this is the old Kdenlive timeline behavior, where all tracks are opaque on default and you need to work with transitions every time you need to compose things on different tracks. (This is still my personal preference.)
  2. Preview: for backwards compatibility with older projects, Kdenlive will use the "composite" for transparent tracks as before. However, as mentioned above, the composite transition causes luma bleed.
  3. High Quality: all transparent track timeline rendering is done using the aforementioned, performance-optimized new "qtblend" transition. In contrast to preview quality, this no longer causes any luma bleed when compositing clips on transparent tracks.
There is still some optimization going on with respect to this new transition, so there may be changes before the final Kdenlive 16.08 release.