Transitions are applied in the wrong compositing order

Using 0.7.5 on Ubuntu 9.04 Jaunty x64.

I've found what could be an unintended bugette in the Composite transition. Track #0 contains a watermark title that fades in. The bugette appears to be that whenever a new clip starts (in track #3 in this case) the fade-in of the watermark is repeated.

With several clip transitions in the time-line this makes the watermark appear to be flickering - disappearing suddenly and then fading back in.

Is there a work-around or is this something that can be fixed?

Track #0: key-framed title-clip containing a watermark a.k.a. station ID in top-left corner. The watermark begins fading in at 1 second and is 100% opaque at 5 seconds; Composite with track #3.

Track #1: key-framed title-clip containing vertical scrolling soundtrack credits snapped to the end of the time-line.

Track #2: AVCHD 1920x1080 60i 24mbps (from Canon HF11) with 2-second Dissolve into track #3 at 8 seconds

Track #3: AVCHD 1920x1080 60i 24mpbs (from Canon HF11)

Track #4: Audio soundtrack MP3

After some extensive investigation of this issue with Alberto, including reducing it to a simple demonstration project using colour clips instead of videos we appear to have found the real problem, for which a bug report will result once I'm sure what the actual cause is.

It turns out that a clip transition (in this case a Dissolve, but others exhibit problems too) attached to one of the main programme clips (in track #1, #2, #3, etc.) is applied *after* the watermark in track #0 has been applied to the track it is bound to.

So, in the simple problem example case:

Track #0: title clip with transparent watermark text top-left of frame, lasting the entire project, with Composite transition bound to track #2.

Track #1: Colour clip, yellow, starting at 0:0:0, duration 10 seconds with Dissolve transition at the end.

Track #2 Colour clip, orange, lasting 10 seconds, starting at 0:8:0 (overlaps with track #1 for 2 seconds), duration 10 seconds.

The problem appears to be the order of compositing (a.ka. mixing in MLT jargon) is affected incorrectly when the transition is bound to a track. In fact, I'd go so far as to say that the entire way the transition track binding works is severely at odds with what is expected.

For example, for NLEs with time-line based editing, the convention is that higher tracks (in kdenlive, lower numbered) should be processed *after* all lower tracks: in semi-maths (4 + 3 + 2 + 1) + 0.

This is the assumption I had for the "auto" bind option for transitions and it confused (and still confuses) me previously when title Composite was set to "auto" that the video in tracks #2, #3, #4 etc. were replaced by a black screen when "auto" was set, because it seemed to be doing (4 + 3 + 2) + (1 + 0).

When binding the Composite transition in track #0 to track #2 as in this simple test-case example my expectation is, in the absence of the "auto" binding not being applied after all other tracks had been processed, for it to do (4 + 3) + (2 + 1) + 0 whereas is seems to do (4 + 3) + 1 + (2 + 0)

When a transition is added between the clips in tracks #1 and #2 things get complicated. It now seems to do (4 + 3) + 1 + (2 + 0) + 2tran.

It's this final "2tran" that causes the visual issue I noticed and reported.

Originally I had the watermark title key-frames opacity set to do a 'delayed' fade-in and that was why I thought it was that causing the problem since it is effectively the same as the Dissolve applied to the start of track #2.

In fact it is the Dissolve being applied as a fade-in to the start of track #2 which is why the watermark suddenly disappears when the transition begins and then fades in again. Nothing is repeated on track #0.

Using a different transition, for example the Slide, makes the compositing order problem graphically clear. In this case the watermark is attached to the top left corner of the track #2 clip. When the transition from track #1 to track #2 begins the 2nd clip slides in from the left. It obliterates the watermark still showing over the track #1 clip and, here's the killer example, the watermark slides into the frame from the left towards the end of the transition and is obviously pinned to the track #2 clip's top-left corner.

Now as the title clip in track #0 is bound to track #2 to make the watermark appear in front of track #1 and track #2, this is probably to be expected. However, this leaves a big problem since there is *no way* to apply the watermark over *all* other tracks when "auto" doesn't do this.

The way I would apply a watermark to an entire project is as follows. Create a main project that has the complete video except for the water mark. Then create a second project that uses the main project as a clip and adds the watermark over. See attached files for an example.