[Kdenlive-devel] XML representation for effects.

Rolf Dubitzky Rolf.Dubitzky at physi.uni-heidelberg.de
Sun Mar 7 22:08:05 UTC 2004


How about the following proposal. I think it is pretty much similar to actual 
SMIL. I recommend: http://www.helio.org/products/smil/tutorial/toc.html
(the doc is very understandable and has lots of nice examples)

Things we should change:

1) remove <inputs> tag. because it is not SMIL and it also 
   redundant if we define:
   inputs are identified via three possible media tags:
    <video> <audio> <img>
   or nested <par>/<seq> tags

2) A scene with two _overlapping_ tracks need to go in a <par> tag,
   NOT into a <seq> tag.

3) <seq> nodes can have arbitrary number of inputs which are just played in
   sequence.

4) <par> nodes can have more than one input. For now, exactly one or two. Not 
   more.

5) the <img> tag requires a 'dur' property to determine its duration.
   It replaces <stillcolor>, but can also take a 'src' roperty and display
   a picture. 

As far as I understand it, that would make examples/single_file_2.veml
almost valid SMIL (modulo some general document structure and the yuvcolor 
property).
Now we need some stuff in addition to this.

6) a way to specify still colors. In SMIL this would be part of the
   animation module, but that is much to complicated for the time being.
   -> use the <img> tag with a 'yuvcolor/rgbcolor' property instead of 'src'

7) specify transitions/effects. In order to seperate the effct tag from the 
   input tag we should call it 'videoeffect' instead of 'video', which is 
   already defined by SMIL. This and the corresponding 'audioeffect' tag
   are allowed inside a <par> node.
   In a <seq> node no effects are allowed.
   The effects must match the number of inputs in the <par> node.


Examples: (already committed to CVS dir examples/ )

1) simple sequence of clips, no effcts
(examples/single_file_2.veml)

<veml>
    <scenelist>
        <seq>
            <video src="../samples/MovieDV-4x3-PAL.avi" />
            <img yuvcolor="#000000" dur="2.3" />
            <video src="../samples/MovieDV-4x3-PAL.avi" clipBegin="0.5" 
clipEnd="1.5" />
        </seq>
    </scenelist>
</veml>


If you look into a kino file, you find that each input is wrapped in a 
seperate <seq> tag. As far as I understand SMIL, this is not necessary. 
Actually the <seq> tags should go into a <body> tag to make valid SMIL.
(You can even skip the <seq> tag alltogether, since <body> is a special form 
of <seq> without parameters. But that is not our prolem.


2) simple effect: examples/invert.veml
    <scenelist>
        <par>
             <video src="../samples/dvgrab-raw-4x3-PAL.dv" />
             <videoeffect name="invert" clipBegin="0.5" clipEnd="1.5" />
        </par>
    </scenelist>


3) transition (i.e. effect with two inputs)

        <par>
             <video src="../samples/dvgrab-raw-4x3-PAL.dv" />
             <video src="../samples/dvgrab-raw-4x3-PAL.dv" begin="5" />
             <videoeffect name="alphablend" begin="5" dur="2" >
                 <amplitude>
                     <keyframe time="0.0">0</keyframe>
                     <keyframe time="2.0">1</keyframe>
                 </amplitude>
             </videoeffect>
        </par>

SMIL defines that all elements in a <par> node start by default at "0". The 
'begin' property defines if the media element starts later.

More complicated scenes are build by nesting <par>/<seq> nodes as media inside 
other <par>/<seq> nodes.

I think this proposal is pretty close to SMIL and is still pretty easy to 
implement and can do everything we need.

What do you think? Did I miss something? These are alot of changes, but I 
guess it's better to make them all at once and make kdenlive and piave talk 
to each other again asap.

Cheers, Rolf

-- 
contacts: www.physi.uni-heidelberg.de/~dubitzky




More information about the Kdenlive mailing list