Blend effect with mlt framework

21 views Asked by At

I have a simple XML/MLT file:

<mlt>
  <producer id="img1" resource="img1.png" />
  <producer id="img2-with-opacity" resource="img2.png" />

  <playlist id="main">
    <entry producer="img1" in="0" out="200" />
  </playlist>

  <playlist id="overlay">
    <blank length="50" />
    <entry producer="img2-with-opacity" in="50" out="100" />
  </playlist>

  <tractor id="track">
    <multitrack>
      <track producer="main" in="0" out="200" />
      <track producer="overlay" in="0" out="200" />

      <transition id="doesnt-matter" mlt_service="frei0r.cairoblend"
                  in="50" out="100" a_track="0" b_track="1">
        <property name="0">0</property>
        <property name="1">normal</property>
      </transition>
    </multitrack>
  </tractor>
</mlt>

My intention is: there's the main track, and the overlay track. I'd like to "blend" them, so in some moments (when there are some active producers in the overlay track), the images from the overlay track (which are properly prepared, with transparency/opacity) should be "added" (blended?) into the main track (the idea is both images should be visible).

My XML/MLT file doesn't work: the images from the overlay are visible, while the main track becomes not visible at all.

What am I doing wrong?

SO requires me to fill this field, so: I have tried many options to this frei0r.cairoblend transition, without any success.

0

There are 0 answers