]> git.parisson.com Git - promaster.git/commitdiff
init
authoryomguy <yomguy@parisson.com>
Thu, 13 Dec 2012 16:33:29 +0000 (17:33 +0100)
committeryomguy <yomguy@parisson.com>
Thu, 13 Dec 2012 16:33:29 +0000 (17:33 +0100)
14 files changed:
auto_fade.py [new file with mode: 0644]
kdenlive/__init__.py [new file with mode: 0644]
kdenlive/__init__.pyc [new file with mode: 0644]
kdenlive/examples/Avec_Fade.kdenlive [new file with mode: 0644]
kdenlive/examples/Sans_Fade.kdenlive [new file with mode: 0644]
kdenlive/examples/avec_dict.diff [new file with mode: 0644]
kdenlive/examples/avec_dict.txt [new file with mode: 0644]
kdenlive/examples/sans_dict.txt [new file with mode: 0644]
kdenlive/examples/test_avec_orig.kdenlive [new file with mode: 0644]
kdenlive/examples/test_out.kdenlive [new file with mode: 0644]
kdenlive/fade.py [new file with mode: 0644]
kdenlive/fade.pyc [new file with mode: 0644]
kdenlive/xmltodict2.py [new file with mode: 0644]
kdenlive/xmltodict2.pyc [new file with mode: 0644]

diff --git a/auto_fade.py b/auto_fade.py
new file mode 100644 (file)
index 0000000..6a0e639
--- /dev/null
@@ -0,0 +1,10 @@
+
+import sys
+from kdenlive.fade import KdenliveAutoFade
+
+if __name__ == '__main__':
+    path_out = sys.argv[-1]
+    path_in = sys.argv[-2]
+    fade = KdenliveAutoFade()
+    fade.run(path_in, path_out)
+
diff --git a/kdenlive/__init__.py b/kdenlive/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/kdenlive/__init__.pyc b/kdenlive/__init__.pyc
new file mode 100644 (file)
index 0000000..db4ccf1
Binary files /dev/null and b/kdenlive/__init__.pyc differ
diff --git a/kdenlive/examples/Avec_Fade.kdenlive b/kdenlive/examples/Avec_Fade.kdenlive
new file mode 100644 (file)
index 0000000..023ada1
--- /dev/null
@@ -0,0 +1,262 @@
+<?xml version='1.0' encoding='utf-8'?>
+<mlt title="Anonymous Submission" root="/home/pre-barreau/Documents" LC_NUMERIC="fr_FR.UTF-8">
+ <profile width="640" display_aspect_den="9" colorspace="709" frame_rate_den="1" description="HD 360p 24 fps" height="360" display_aspect_num="16" frame_rate_num="24" progressive="1" sample_aspect_num="1" sample_aspect_den="1"/>
+ <producer in="0" out="322767" id="black">
+  <property name="mlt_type">producer</property>
+  <property name="length">322768</property>
+  <property name="eof">pause</property>
+  <property name="resource">black</property>
+  <property name="aspect_ratio">0</property>
+  <property name="mlt_service">colour</property>
+ </producer>
+ <playlist id="black_track">
+  <entry in="0" out="322767" producer="black"/>
+ </playlist>
+ <playlist id="playlist1"/>
+ <producer in="0" out="321690" id="2_2_audio">
+  <property name="mlt_type">producer</property>
+  <property name="length">321691</property>
+  <property name="eof">pause</property>
+  <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+  <property name="meta.media.nb_streams">2</property>
+  <property name="meta.media.0.stream.type">video</property>
+  <property name="meta.media.0.stream.frame_rate">24,000000</property>
+  <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+  <property name="meta.media.0.codec.frame_rate">24,000000</property>
+  <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+  <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+  <property name="meta.media.0.codec.colorspace">601</property>
+  <property name="meta.media.0.codec.name">vp8</property>
+  <property name="meta.media.0.codec.long_name">On2 VP8</property>
+  <property name="meta.media.0.codec.bit_rate">0</property>
+  <property name="meta.attr.0.stream.language.markup">eng</property>
+  <property name="meta.attr.0.stream.title.markup">Video</property>
+  <property name="meta.media.1.stream.type">audio</property>
+  <property name="meta.media.1.codec.sample_fmt">s16</property>
+  <property name="meta.media.1.codec.sample_rate">48000</property>
+  <property name="meta.media.1.codec.channels">2</property>
+  <property name="meta.media.1.codec.name">vorbis</property>
+  <property name="meta.media.1.codec.long_name">Vorbis</property>
+  <property name="meta.media.1.codec.bit_rate">0</property>
+  <property name="meta.attr.1.stream.language.markup">eng</property>
+  <property name="meta.attr.1.stream.title.markup">Audio</property>
+  <property name="seekable">1</property>
+  <property name="meta.media.sample_aspect_num">1</property>
+  <property name="meta.media.sample_aspect_den">1</property>
+  <property name="aspect_ratio">1,000000</property>
+  <property name="audio_index">1</property>
+  <property name="video_index">-1</property>
+  <property name="mlt_service">avformat</property>
+ </producer>
+ <producer in="0" out="321690" id="2_3_audio">
+  <property name="mlt_type">producer</property>
+  <property name="length">321691</property>
+  <property name="eof">pause</property>
+  <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+  <property name="meta.media.nb_streams">2</property>
+  <property name="meta.media.0.stream.type">video</property>
+  <property name="meta.media.0.stream.frame_rate">24,000000</property>
+  <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+  <property name="meta.media.0.codec.frame_rate">24,000000</property>
+  <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+  <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+  <property name="meta.media.0.codec.colorspace">601</property>
+  <property name="meta.media.0.codec.name">vp8</property>
+  <property name="meta.media.0.codec.long_name">On2 VP8</property>
+  <property name="meta.media.0.codec.bit_rate">0</property>
+  <property name="meta.attr.0.stream.language.markup">eng</property>
+  <property name="meta.attr.0.stream.title.markup">Video</property>
+  <property name="meta.media.1.stream.type">audio</property>
+  <property name="meta.media.1.codec.sample_fmt">s16</property>
+  <property name="meta.media.1.codec.sample_rate">48000</property>
+  <property name="meta.media.1.codec.channels">2</property>
+  <property name="meta.media.1.codec.name">vorbis</property>
+  <property name="meta.media.1.codec.long_name">Vorbis</property>
+  <property name="meta.media.1.codec.bit_rate">0</property>
+  <property name="meta.attr.1.stream.language.markup">eng</property>
+  <property name="meta.attr.1.stream.title.markup">Audio</property>
+  <property name="seekable">1</property>
+  <property name="meta.media.sample_aspect_num">1</property>
+  <property name="meta.media.sample_aspect_den">1</property>
+  <property name="aspect_ratio">1,000000</property>
+  <property name="audio_index">1</property>
+  <property name="video_index">-1</property>
+  <property name="mlt_service">avformat</property>
+ </producer>
+ <playlist id="playlist2">
+  <blank length="1138"/>
+  <entry in="0" out="85261" producer="2_2_audio">
+   <filter in="85259" out="85261" id="fadeout">
+    <property name="track">0</property>
+    <property name="window">75</property>
+    <property name="max_gain">20dB</property>
+    <property name="mlt_type">filter</property>
+    <property name="mlt_service">volume</property>
+    <property name="kdenlive_id">fadeout</property>
+    <property name="tag">volume</property>
+    <property name="kdenlive_ix">1</property>
+    <property name="gain">1</property>
+    <property name="end">0</property>
+   </filter>
+  </entry>
+  <entry in="85323" out="321690" producer="2_3_audio">
+   <filter in="85323" out="85325" id="fadein">
+    <property name="track">0</property>
+    <property name="window">75</property>
+    <property name="max_gain">20dB</property>
+    <property name="mlt_type">filter</property>
+    <property name="mlt_service">volume</property>
+    <property name="kdenlive_id">fadein</property>
+    <property name="tag">volume</property>
+    <property name="kdenlive_ix">1</property>
+    <property name="gain">0</property>
+    <property name="end">1</property>
+   </filter>
+  </entry>
+ </playlist>
+ <playlist id="playlist3"/>
+ <playlist id="playlist4"/>
+ <producer in="0" out="321690" id="2_video">
+  <property name="mlt_type">producer</property>
+  <property name="length">321691</property>
+  <property name="eof">pause</property>
+  <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+  <property name="meta.media.nb_streams">2</property>
+  <property name="meta.media.0.stream.type">video</property>
+  <property name="meta.media.0.stream.frame_rate">24,000000</property>
+  <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+  <property name="meta.media.0.codec.frame_rate">24,000000</property>
+  <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+  <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+  <property name="meta.media.0.codec.colorspace">601</property>
+  <property name="meta.media.0.codec.name">vp8</property>
+  <property name="meta.media.0.codec.long_name">On2 VP8</property>
+  <property name="meta.media.0.codec.bit_rate">0</property>
+  <property name="meta.attr.0.stream.language.markup">eng</property>
+  <property name="meta.attr.0.stream.title.markup">Video</property>
+  <property name="meta.media.1.stream.type">audio</property>
+  <property name="meta.media.1.codec.sample_fmt">s16</property>
+  <property name="meta.media.1.codec.sample_rate">48000</property>
+  <property name="meta.media.1.codec.channels">2</property>
+  <property name="meta.media.1.codec.name">vorbis</property>
+  <property name="meta.media.1.codec.long_name">Vorbis</property>
+  <property name="meta.media.1.codec.bit_rate">0</property>
+  <property name="meta.attr.1.stream.language.markup">eng</property>
+  <property name="meta.attr.1.stream.title.markup">Audio</property>
+  <property name="seekable">1</property>
+  <property name="meta.media.sample_aspect_num">1</property>
+  <property name="meta.media.sample_aspect_den">1</property>
+  <property name="aspect_ratio">1,000000</property>
+  <property name="audio_index">-1</property>
+  <property name="video_index">0</property>
+  <property name="mlt_service">avformat</property>
+  <property name="meta.media.frame_rate_num">24</property>
+  <property name="meta.media.frame_rate_den">1</property>
+  <property name="source_fps">24,000000</property>
+  <property name="meta.media.colorspace">601</property>
+  <property name="meta.media.width">640</property>
+  <property name="meta.media.height">360</property>
+  <property name="meta.media.top_field_first">0</property>
+  <property name="meta.media.progressive">1</property>
+ </producer>
+ <playlist id="playlist5">
+  <blank length="1138"/>
+  <entry in="0" out="85261" producer="2_video">
+   <filter in="85259" out="85261" id="fade_to_black">
+    <property name="track">0</property>
+    <property name="start">1</property>
+    <property name="mlt_type">filter</property>
+    <property name="mlt_service">brightness</property>
+    <property name="kdenlive_id">fade_to_black</property>
+    <property name="tag">brightness</property>
+    <property name="kdenlive_ix">1</property>
+    <property name="end">0</property>
+   </filter>
+  </entry>
+  <entry in="85323" out="321690" producer="2_video">
+   <filter in="85323" out="85325" id="fade_from_black">
+    <property name="track">0</property>
+    <property name="start">0</property>
+    <property name="mlt_type">filter</property>
+    <property name="mlt_service">brightness</property>
+    <property name="kdenlive_id">fade_from_black</property>
+    <property name="tag">brightness</property>
+    <property name="kdenlive_ix">1</property>
+    <property name="end">1</property>
+   </filter>
+  </entry>
+ </playlist>
+ <tractor title="Anonymous Submission" global_feed="1" in="0" out="322767" id="maintractor">
+  <property name="meta.volume">1,000000</property>
+  <track producer="black_track"/>
+  <track hide="video" producer="playlist1"/>
+  <track hide="video" producer="playlist2"/>
+  <track producer="playlist3"/>
+  <track producer="playlist4"/>
+  <track producer="playlist5"/>
+  <transition in="0" out="0" id="transition0">
+   <property name="a_track">1</property>
+   <property name="b_track">2</property>
+   <property name="mlt_type">transition</property>
+   <property name="mlt_service">mix</property>
+   <property name="always_active">1</property>
+   <property name="combine">1</property>
+   <property name="internal_added">237</property>
+  </transition>
+  <transition in="0" out="0" id="transition1">
+   <property name="a_track">1</property>
+   <property name="b_track">3</property>
+   <property name="mlt_type">transition</property>
+   <property name="mlt_service">mix</property>
+   <property name="always_active">1</property>
+   <property name="combine">1</property>
+   <property name="internal_added">237</property>
+  </transition>
+  <transition in="0" out="0" id="transition2">
+   <property name="a_track">1</property>
+   <property name="b_track">4</property>
+   <property name="mlt_type">transition</property>
+   <property name="mlt_service">mix</property>
+   <property name="always_active">1</property>
+   <property name="combine">1</property>
+   <property name="internal_added">237</property>
+  </transition>
+  <transition in="0" out="0" id="transition3">
+   <property name="a_track">1</property>
+   <property name="b_track">5</property>
+   <property name="mlt_type">transition</property>
+   <property name="mlt_service">mix</property>
+   <property name="always_active">1</property>
+   <property name="combine">1</property>
+   <property name="internal_added">237</property>
+  </transition>
+ </tractor>
+ <kdenlivedoc profile="/home/pre-barreau/.kde/share/apps/kdenlive/profiles/customprofile0" kdenliveversion="0.8" version="0,85" projectfolder="/home/pre-barreau/kdenlive">
+  <customeffects/>
+  <documentproperties proxyimageminsize="2000" zonein="0" enableproxy="0" zoneout="100" generateproxy="0" zoom="13" verticalzoom="1" proxyextension="ts" position="86442" generateimageproxy="0" proxyminsize="1000" proxyparams="-f mpegts -acodec libmp3lame -ac 2 -ab 92k -ar 48000 -vcodec mpeg2video -g 5 -deinterlace -s 480x270 -b 150k"/>
+  <documentnotes></documentnotes>
+  <profileinfo width="640" display_aspect_den="9" frame_rate_den="1" description="HD 360p 24 fps" height="360" frame_rate_num="24" display_aspect_num="16" progressive="1" sample_aspect_num="1" sample_aspect_den="1"/>
+  <tracksinfo>
+   <trackinfo blind="1" mute="0" locked="0" trackname="Audio 2" type="audio"/>
+   <trackinfo blind="1" mute="0" locked="0" trackname="Audio 1" type="audio"/>
+   <trackinfo blind="0" mute="0" locked="0" trackname="Video 3"/>
+   <trackinfo blind="0" mute="0" locked="0" trackname="Video 2"/>
+   <trackinfo blind="0" mute="0" locked="0" trackname="Video 1"/>
+  </tracksinfo>
+  <kdenlive_producer audio_max="1" id="2" pix_fmt="yuv420p" default_video="0" fps="24" name="crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm" colorspace="601" videocodec="On2 VP8" resource="/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm" default_audio="1" audiocodec="Vorbis" duration="321691" file_hash="78149b6acdabd39af1ab52ea72b5b24a" aspect_ratio="1,000000" channels="2" frequency="48000" video_max="0" type="3" frame_size="640x360" file_size="729776788"/>
+  <markers/>
+  <guides>
+   <guide comment="01:00:00:00" time="3600"/>
+  </guides>
+  <groups>
+   <group>
+    <clipitem track="3" position="86400"/>
+    <clipitem track="0" position="86400"/>
+   </group>
+   <group>
+    <clipitem track="3" position="1138"/>
+    <clipitem track="0" position="1138"/>
+   </group>
+  </groups>
+ </kdenlivedoc>
+</mlt>
diff --git a/kdenlive/examples/Sans_Fade.kdenlive b/kdenlive/examples/Sans_Fade.kdenlive
new file mode 100644 (file)
index 0000000..af3094e
--- /dev/null
@@ -0,0 +1,214 @@
+<?xml version='1.0' encoding='utf-8'?>
+<mlt title="Anonymous Submission" root="/home/pre-barreau/Documents" LC_NUMERIC="fr_FR.UTF-8">
+ <profile width="640" display_aspect_den="9" colorspace="709" frame_rate_den="1" description="HD 360p 24 fps" height="360" display_aspect_num="16" frame_rate_num="24" progressive="1" sample_aspect_num="1" sample_aspect_den="1"/>
+ <producer in="0" out="322767" id="black">
+  <property name="mlt_type">producer</property>
+  <property name="length">322768</property>
+  <property name="eof">pause</property>
+  <property name="resource">black</property>
+  <property name="aspect_ratio">0</property>
+  <property name="mlt_service">colour</property>
+ </producer>
+ <playlist id="black_track">
+  <entry in="0" out="322767" producer="black"/>
+ </playlist>
+ <playlist id="playlist1"/>
+ <producer in="0" out="321690" id="2_2_audio">
+  <property name="mlt_type">producer</property>
+  <property name="length">321691</property>
+  <property name="eof">pause</property>
+  <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+  <property name="meta.media.nb_streams">2</property>
+  <property name="meta.media.0.stream.type">video</property>
+  <property name="meta.media.0.stream.frame_rate">24,000000</property>
+  <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+  <property name="meta.media.0.codec.frame_rate">24,000000</property>
+  <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+  <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+  <property name="meta.media.0.codec.colorspace">601</property>
+  <property name="meta.media.0.codec.name">vp8</property>
+  <property name="meta.media.0.codec.long_name">On2 VP8</property>
+  <property name="meta.media.0.codec.bit_rate">0</property>
+  <property name="meta.attr.0.stream.language.markup">eng</property>
+  <property name="meta.attr.0.stream.title.markup">Video</property>
+  <property name="meta.media.1.stream.type">audio</property>
+  <property name="meta.media.1.codec.sample_fmt">s16</property>
+  <property name="meta.media.1.codec.sample_rate">48000</property>
+  <property name="meta.media.1.codec.channels">2</property>
+  <property name="meta.media.1.codec.name">vorbis</property>
+  <property name="meta.media.1.codec.long_name">Vorbis</property>
+  <property name="meta.media.1.codec.bit_rate">0</property>
+  <property name="meta.attr.1.stream.language.markup">eng</property>
+  <property name="meta.attr.1.stream.title.markup">Audio</property>
+  <property name="seekable">1</property>
+  <property name="meta.media.sample_aspect_num">1</property>
+  <property name="meta.media.sample_aspect_den">1</property>
+  <property name="aspect_ratio">1,000000</property>
+  <property name="audio_index">1</property>
+  <property name="video_index">-1</property>
+  <property name="mlt_service">avformat</property>
+ </producer>
+ <producer in="0" out="321690" id="2_3_audio">
+  <property name="mlt_type">producer</property>
+  <property name="length">321691</property>
+  <property name="eof">pause</property>
+  <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+  <property name="meta.media.nb_streams">2</property>
+  <property name="meta.media.0.stream.type">video</property>
+  <property name="meta.media.0.stream.frame_rate">24,000000</property>
+  <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+  <property name="meta.media.0.codec.frame_rate">24,000000</property>
+  <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+  <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+  <property name="meta.media.0.codec.colorspace">601</property>
+  <property name="meta.media.0.codec.name">vp8</property>
+  <property name="meta.media.0.codec.long_name">On2 VP8</property>
+  <property name="meta.media.0.codec.bit_rate">0</property>
+  <property name="meta.attr.0.stream.language.markup">eng</property>
+  <property name="meta.attr.0.stream.title.markup">Video</property>
+  <property name="meta.media.1.stream.type">audio</property>
+  <property name="meta.media.1.codec.sample_fmt">s16</property>
+  <property name="meta.media.1.codec.sample_rate">48000</property>
+  <property name="meta.media.1.codec.channels">2</property>
+  <property name="meta.media.1.codec.name">vorbis</property>
+  <property name="meta.media.1.codec.long_name">Vorbis</property>
+  <property name="meta.media.1.codec.bit_rate">0</property>
+  <property name="meta.attr.1.stream.language.markup">eng</property>
+  <property name="meta.attr.1.stream.title.markup">Audio</property>
+  <property name="seekable">1</property>
+  <property name="meta.media.sample_aspect_num">1</property>
+  <property name="meta.media.sample_aspect_den">1</property>
+  <property name="aspect_ratio">1,000000</property>
+  <property name="audio_index">1</property>
+  <property name="video_index">-1</property>
+  <property name="mlt_service">avformat</property>
+ </producer>
+ <playlist id="playlist2">
+  <blank length="1138"/>
+  <entry in="0" out="85261" producer="2_2_audio"/>
+  <entry in="85323" out="321690" producer="2_3_audio"/>
+ </playlist>
+ <playlist id="playlist3"/>
+ <playlist id="playlist4"/>
+ <producer in="0" out="321690" id="2_video">
+  <property name="mlt_type">producer</property>
+  <property name="length">321691</property>
+  <property name="eof">pause</property>
+  <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+  <property name="meta.media.nb_streams">2</property>
+  <property name="meta.media.0.stream.type">video</property>
+  <property name="meta.media.0.stream.frame_rate">24,000000</property>
+  <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+  <property name="meta.media.0.codec.frame_rate">24,000000</property>
+  <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+  <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+  <property name="meta.media.0.codec.colorspace">601</property>
+  <property name="meta.media.0.codec.name">vp8</property>
+  <property name="meta.media.0.codec.long_name">On2 VP8</property>
+  <property name="meta.media.0.codec.bit_rate">0</property>
+  <property name="meta.attr.0.stream.language.markup">eng</property>
+  <property name="meta.attr.0.stream.title.markup">Video</property>
+  <property name="meta.media.1.stream.type">audio</property>
+  <property name="meta.media.1.codec.sample_fmt">s16</property>
+  <property name="meta.media.1.codec.sample_rate">48000</property>
+  <property name="meta.media.1.codec.channels">2</property>
+  <property name="meta.media.1.codec.name">vorbis</property>
+  <property name="meta.media.1.codec.long_name">Vorbis</property>
+  <property name="meta.media.1.codec.bit_rate">0</property>
+  <property name="meta.attr.1.stream.language.markup">eng</property>
+  <property name="meta.attr.1.stream.title.markup">Audio</property>
+  <property name="seekable">1</property>
+  <property name="meta.media.sample_aspect_num">1</property>
+  <property name="meta.media.sample_aspect_den">1</property>
+  <property name="aspect_ratio">1,000000</property>
+  <property name="audio_index">-1</property>
+  <property name="video_index">0</property>
+  <property name="mlt_service">avformat</property>
+  <property name="meta.media.frame_rate_num">24</property>
+  <property name="meta.media.frame_rate_den">1</property>
+  <property name="source_fps">24,000000</property>
+  <property name="meta.media.colorspace">601</property>
+  <property name="meta.media.width">640</property>
+  <property name="meta.media.height">360</property>
+  <property name="meta.media.top_field_first">0</property>
+  <property name="meta.media.progressive">1</property>
+ </producer>
+ <playlist id="playlist5">
+  <blank length="1138"/>
+  <entry in="0" out="85261" producer="2_video"/>
+  <entry in="85323" out="321690" producer="2_video"/>
+ </playlist>
+ <tractor title="Anonymous Submission" global_feed="1" in="0" out="322767" id="maintractor">
+  <property name="meta.volume">1,000000</property>
+  <track producer="black_track"/>
+  <track hide="video" producer="playlist1"/>
+  <track hide="video" producer="playlist2"/>
+  <track producer="playlist3"/>
+  <track producer="playlist4"/>
+  <track producer="playlist5"/>
+  <transition in="0" out="0" id="transition0">
+   <property name="a_track">1</property>
+   <property name="b_track">2</property>
+   <property name="mlt_type">transition</property>
+   <property name="mlt_service">mix</property>
+   <property name="always_active">1</property>
+   <property name="combine">1</property>
+   <property name="internal_added">237</property>
+  </transition>
+  <transition in="0" out="0" id="transition1">
+   <property name="a_track">1</property>
+   <property name="b_track">3</property>
+   <property name="mlt_type">transition</property>
+   <property name="mlt_service">mix</property>
+   <property name="always_active">1</property>
+   <property name="combine">1</property>
+   <property name="internal_added">237</property>
+  </transition>
+  <transition in="0" out="0" id="transition2">
+   <property name="a_track">1</property>
+   <property name="b_track">4</property>
+   <property name="mlt_type">transition</property>
+   <property name="mlt_service">mix</property>
+   <property name="always_active">1</property>
+   <property name="combine">1</property>
+   <property name="internal_added">237</property>
+  </transition>
+  <transition in="0" out="0" id="transition3">
+   <property name="a_track">1</property>
+   <property name="b_track">5</property>
+   <property name="mlt_type">transition</property>
+   <property name="mlt_service">mix</property>
+   <property name="always_active">1</property>
+   <property name="combine">1</property>
+   <property name="internal_added">237</property>
+  </transition>
+ </tractor>
+ <kdenlivedoc profile="/home/pre-barreau/.kde/share/apps/kdenlive/profiles/customprofile0" kdenliveversion="0.8" version="0,85" projectfolder="/home/pre-barreau/kdenlive">
+  <customeffects/>
+  <documentproperties proxyimageminsize="2000" zonein="0" enableproxy="0" zoneout="100" generateproxy="0" zoom="3" verticalzoom="1" proxyextension="ts" position="86442" generateimageproxy="0" proxyminsize="1000" proxyparams="-f mpegts -acodec libmp3lame -ac 2 -ab 92k -ar 48000 -vcodec mpeg2video -g 5 -deinterlace -s 480x270 -b 150k"/>
+  <documentnotes></documentnotes>
+  <profileinfo width="640" display_aspect_den="9" frame_rate_den="1" description="HD 360p 24 fps" height="360" frame_rate_num="24" display_aspect_num="16" progressive="1" sample_aspect_num="1" sample_aspect_den="1"/>
+  <tracksinfo>
+   <trackinfo blind="1" mute="0" locked="0" trackname="Audio 2" type="audio"/>
+   <trackinfo blind="1" mute="0" locked="0" trackname="Audio 1" type="audio"/>
+   <trackinfo blind="0" mute="0" locked="0" trackname="Video 3"/>
+   <trackinfo blind="0" mute="0" locked="0" trackname="Video 2"/>
+   <trackinfo blind="0" mute="0" locked="0" trackname="Video 1"/>
+  </tracksinfo>
+  <kdenlive_producer audio_max="1" id="2" pix_fmt="yuv420p" default_video="0" fps="24" name="crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm" colorspace="601" videocodec="On2 VP8" resource="/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm" default_audio="1" audiocodec="Vorbis" duration="321691" file_hash="78149b6acdabd39af1ab52ea72b5b24a" aspect_ratio="1,000000" channels="2" frequency="48000" video_max="0" type="3" frame_size="640x360" file_size="729776788"/>
+  <markers/>
+  <guides>
+   <guide comment="01:00:00:00" time="3600"/>
+  </guides>
+  <groups>
+   <group>
+    <clipitem track="3" position="86400"/>
+    <clipitem track="0" position="86400"/>
+   </group>
+   <group>
+    <clipitem track="3" position="1138"/>
+    <clipitem track="0" position="1138"/>
+   </group>
+  </groups>
+ </kdenlivedoc>
+</mlt>
diff --git a/kdenlive/examples/avec_dict.diff b/kdenlive/examples/avec_dict.diff
new file mode 100644 (file)
index 0000000..9a2376e
--- /dev/null
@@ -0,0 +1,141 @@
+--- sans_dict.txt      2012-12-13 14:33:47.457540336 +0100
++++ avec_dict.txt      2012-12-13 14:33:15.634518355 +0100
+@@ -235,10 +235,70 @@
+   {'attributes': {u'id': u'playlist2'},
+    'children': [{'attributes': {u'length': u'1138'}, 'name': 'blank'},
+     {'attributes': {u'in': u'0', u'out': u'85261', u'producer': u'2_2_audio'},
++     'children': [{'attributes': {u'id': u'fadeout',
++        u'in': u'85259',
++        u'out': u'85261'},
++       'children': [{'attributes': {u'name': u'track'},
++         'cdata': '0',
++         'name': 'property'},
++        {'attributes': {u'name': u'window'},
++         'cdata': '75',
++         'name': 'property'},
++        {'attributes': {u'name': u'max_gain'},
++         'cdata': '20dB',
++         'name': 'property'},
++        {'attributes': {u'name': u'mlt_type'},
++         'cdata': 'filter',
++         'name': 'property'},
++        {'attributes': {u'name': u'mlt_service'},
++         'cdata': 'volume',
++         'name': 'property'},
++        {'attributes': {u'name': u'kdenlive_id'},
++         'cdata': 'fadeout',
++         'name': 'property'},
++        {'attributes': {u'name': u'tag'},
++         'cdata': 'volume',
++         'name': 'property'},
++        {'attributes': {u'name': u'kdenlive_ix'},
++         'cdata': '1',
++         'name': 'property'},
++        {'attributes': {u'name': u'gain'}, 'cdata': '1', 'name': 'property'},
++        {'attributes': {u'name': u'end'}, 'cdata': '0', 'name': 'property'}],
++       'name': 'filter'}],
+      'name': 'entry'},
+     {'attributes': {u'in': u'85323',
+       u'out': u'321690',
+       u'producer': u'2_3_audio'},
++     'children': [{'attributes': {u'id': u'fadein',
++        u'in': u'85323',
++        u'out': u'85325'},
++       'children': [{'attributes': {u'name': u'track'},
++         'cdata': '0',
++         'name': 'property'},
++        {'attributes': {u'name': u'window'},
++         'cdata': '75',
++         'name': 'property'},
++        {'attributes': {u'name': u'max_gain'},
++         'cdata': '20dB',
++         'name': 'property'},
++        {'attributes': {u'name': u'mlt_type'},
++         'cdata': 'filter',
++         'name': 'property'},
++        {'attributes': {u'name': u'mlt_service'},
++         'cdata': 'volume',
++         'name': 'property'},
++        {'attributes': {u'name': u'kdenlive_id'},
++         'cdata': 'fadein',
++         'name': 'property'},
++        {'attributes': {u'name': u'tag'},
++         'cdata': 'volume',
++         'name': 'property'},
++        {'attributes': {u'name': u'kdenlive_ix'},
++         'cdata': '1',
++         'name': 'property'},
++        {'attributes': {u'name': u'gain'}, 'cdata': '0', 'name': 'property'},
++        {'attributes': {u'name': u'end'}, 'cdata': '1', 'name': 'property'}],
++       'name': 'filter'}],
+      'name': 'entry'}],
+    'name': 'playlist'},
+   {'attributes': {u'id': u'playlist3'}, 'name': 'playlist'},
+@@ -367,10 +427,58 @@
+   {'attributes': {u'id': u'playlist5'},
+    'children': [{'attributes': {u'length': u'1138'}, 'name': 'blank'},
+     {'attributes': {u'in': u'0', u'out': u'85261', u'producer': u'2_video'},
++     'children': [{'attributes': {u'id': u'fade_to_black',
++        u'in': u'85259',
++        u'out': u'85261'},
++       'children': [{'attributes': {u'name': u'track'},
++         'cdata': '0',
++         'name': 'property'},
++        {'attributes': {u'name': u'start'}, 'cdata': '1', 'name': 'property'},
++        {'attributes': {u'name': u'mlt_type'},
++         'cdata': 'filter',
++         'name': 'property'},
++        {'attributes': {u'name': u'mlt_service'},
++         'cdata': 'brightness',
++         'name': 'property'},
++        {'attributes': {u'name': u'kdenlive_id'},
++         'cdata': 'fade_to_black',
++         'name': 'property'},
++        {'attributes': {u'name': u'tag'},
++         'cdata': 'brightness',
++         'name': 'property'},
++        {'attributes': {u'name': u'kdenlive_ix'},
++         'cdata': '1',
++         'name': 'property'},
++        {'attributes': {u'name': u'end'}, 'cdata': '0', 'name': 'property'}],
++       'name': 'filter'}],
+      'name': 'entry'},
+     {'attributes': {u'in': u'85323',
+       u'out': u'321690',
+       u'producer': u'2_video'},
++     'children': [{'attributes': {u'id': u'fade_from_black',
++        u'in': u'85323',
++        u'out': u'85325'},
++       'children': [{'attributes': {u'name': u'track'},
++         'cdata': '0',
++         'name': 'property'},
++        {'attributes': {u'name': u'start'}, 'cdata': '0', 'name': 'property'},
++        {'attributes': {u'name': u'mlt_type'},
++         'cdata': 'filter',
++         'name': 'property'},
++        {'attributes': {u'name': u'mlt_service'},
++         'cdata': 'brightness',
++         'name': 'property'},
++        {'attributes': {u'name': u'kdenlive_id'},
++         'cdata': 'fade_from_black',
++         'name': 'property'},
++        {'attributes': {u'name': u'tag'},
++         'cdata': 'brightness',
++         'name': 'property'},
++        {'attributes': {u'name': u'kdenlive_ix'},
++         'cdata': '1',
++         'name': 'property'},
++        {'attributes': {u'name': u'end'}, 'cdata': '1', 'name': 'property'}],
++       'name': 'filter'}],
+      'name': 'entry'}],
+    'name': 'playlist'},
+   {'attributes': {u'global_feed': u'1',
+@@ -482,7 +590,7 @@
+       u'verticalzoom': u'1',
+       u'zonein': u'0',
+       u'zoneout': u'100',
+-      u'zoom': u'3'},
++      u'zoom': u'13'},
+      'name': 'documentproperties'},
+     {'name': 'documentnotes'},
+     {'attributes': {u'description': u'HD 360p 24 fps',
diff --git a/kdenlive/examples/avec_dict.txt b/kdenlive/examples/avec_dict.txt
new file mode 100644 (file)
index 0000000..848ab53
--- /dev/null
@@ -0,0 +1,674 @@
+{'attributes': {u'LC_NUMERIC': u'fr_FR.UTF-8',
+  u'root': u'/home/pre-barreau/Documents',
+  u'title': u'Anonymous Submission'},
+ 'children': [{'attributes': {u'colorspace': u'709',
+    u'description': u'HD 360p 24 fps',
+    u'display_aspect_den': u'9',
+    u'display_aspect_num': u'16',
+    u'frame_rate_den': u'1',
+    u'frame_rate_num': u'24',
+    u'height': u'360',
+    u'progressive': u'1',
+    u'sample_aspect_den': u'1',
+    u'sample_aspect_num': u'1',
+    u'width': u'640'},
+   'name': 'profile'},
+  {'attributes': {u'id': u'black', u'in': u'0', u'out': u'322767'},
+   'children': [{'attributes': {u'name': u'mlt_type'},
+     'cdata': 'producer',
+     'name': 'property'},
+    {'attributes': {u'name': u'length'},
+     'cdata': '322768',
+     'name': 'property'},
+    {'attributes': {u'name': u'eof'}, 'cdata': 'pause', 'name': 'property'},
+    {'attributes': {u'name': u'resource'},
+     'cdata': 'black',
+     'name': 'property'},
+    {'attributes': {u'name': u'aspect_ratio'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'mlt_service'},
+     'cdata': 'colour',
+     'name': 'property'}],
+   'name': 'producer'},
+  {'attributes': {u'id': u'black_track'},
+   'children': [{'attributes': {u'in': u'0',
+      u'out': u'322767',
+      u'producer': u'black'},
+     'name': 'entry'}],
+   'name': 'playlist'},
+  {'attributes': {u'id': u'playlist1'}, 'name': 'playlist'},
+  {'attributes': {u'id': u'2_2_audio', u'in': u'0', u'out': u'321690'},
+   'children': [{'attributes': {u'name': u'mlt_type'},
+     'cdata': 'producer',
+     'name': 'property'},
+    {'attributes': {u'name': u'length'},
+     'cdata': '321691',
+     'name': 'property'},
+    {'attributes': {u'name': u'eof'}, 'cdata': 'pause', 'name': 'property'},
+    {'attributes': {u'name': u'resource'},
+     'cdata': '/home/pre-barreau/kdenlive/Droit priv\xc3\xa9 internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.nb_streams'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.type'},
+     'cdata': 'video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.sample_aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.pix_fmt'},
+     'cdata': 'yuv420p',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.sample_aspect_ratio'},
+     'cdata': '0,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.colorspace'},
+     'cdata': '601',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.name'},
+     'cdata': 'vp8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.long_name'},
+     'cdata': 'On2 VP8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.title.markup'},
+     'cdata': 'Video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.stream.type'},
+     'cdata': 'audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_fmt'},
+     'cdata': 's16',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_rate'},
+     'cdata': '48000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.channels'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.name'},
+     'cdata': 'vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.long_name'},
+     'cdata': 'Vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.title.markup'},
+     'cdata': 'Audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'seekable'}, 'cdata': '1', 'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_num'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_den'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'audio_index'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'video_index'},
+     'cdata': '-1',
+     'name': 'property'},
+    {'attributes': {u'name': u'mlt_service'},
+     'cdata': 'avformat',
+     'name': 'property'}],
+   'name': 'producer'},
+  {'attributes': {u'id': u'2_3_audio', u'in': u'0', u'out': u'321690'},
+   'children': [{'attributes': {u'name': u'mlt_type'},
+     'cdata': 'producer',
+     'name': 'property'},
+    {'attributes': {u'name': u'length'},
+     'cdata': '321691',
+     'name': 'property'},
+    {'attributes': {u'name': u'eof'}, 'cdata': 'pause', 'name': 'property'},
+    {'attributes': {u'name': u'resource'},
+     'cdata': '/home/pre-barreau/kdenlive/Droit priv\xc3\xa9 internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.nb_streams'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.type'},
+     'cdata': 'video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.sample_aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.pix_fmt'},
+     'cdata': 'yuv420p',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.sample_aspect_ratio'},
+     'cdata': '0,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.colorspace'},
+     'cdata': '601',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.name'},
+     'cdata': 'vp8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.long_name'},
+     'cdata': 'On2 VP8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.title.markup'},
+     'cdata': 'Video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.stream.type'},
+     'cdata': 'audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_fmt'},
+     'cdata': 's16',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_rate'},
+     'cdata': '48000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.channels'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.name'},
+     'cdata': 'vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.long_name'},
+     'cdata': 'Vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.title.markup'},
+     'cdata': 'Audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'seekable'}, 'cdata': '1', 'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_num'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_den'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'audio_index'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'video_index'},
+     'cdata': '-1',
+     'name': 'property'},
+    {'attributes': {u'name': u'mlt_service'},
+     'cdata': 'avformat',
+     'name': 'property'}],
+   'name': 'producer'},
+  {'attributes': {u'id': u'playlist2'},
+   'children': [{'attributes': {u'length': u'1138'}, 'name': 'blank'},
+    {'attributes': {u'in': u'0', u'out': u'85261', u'producer': u'2_2_audio'},
+     'children': [{'attributes': {u'id': u'fadeout',
+        u'in': u'85259',
+        u'out': u'85261'},
+       'children': [{'attributes': {u'name': u'track'},
+         'cdata': '0',
+         'name': 'property'},
+        {'attributes': {u'name': u'window'},
+         'cdata': '75',
+         'name': 'property'},
+        {'attributes': {u'name': u'max_gain'},
+         'cdata': '20dB',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_type'},
+         'cdata': 'filter',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_service'},
+         'cdata': 'volume',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_id'},
+         'cdata': 'fadeout',
+         'name': 'property'},
+        {'attributes': {u'name': u'tag'},
+         'cdata': 'volume',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_ix'},
+         'cdata': '1',
+         'name': 'property'},
+        {'attributes': {u'name': u'gain'}, 'cdata': '1', 'name': 'property'},
+        {'attributes': {u'name': u'end'}, 'cdata': '0', 'name': 'property'}],
+       'name': 'filter'}],
+     'name': 'entry'},
+    {'attributes': {u'in': u'85323',
+      u'out': u'321690',
+      u'producer': u'2_3_audio'},
+     'children': [{'attributes': {u'id': u'fadein',
+        u'in': u'85323',
+        u'out': u'85325'},
+       'children': [{'attributes': {u'name': u'track'},
+         'cdata': '0',
+         'name': 'property'},
+        {'attributes': {u'name': u'window'},
+         'cdata': '75',
+         'name': 'property'},
+        {'attributes': {u'name': u'max_gain'},
+         'cdata': '20dB',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_type'},
+         'cdata': 'filter',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_service'},
+         'cdata': 'volume',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_id'},
+         'cdata': 'fadein',
+         'name': 'property'},
+        {'attributes': {u'name': u'tag'},
+         'cdata': 'volume',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_ix'},
+         'cdata': '1',
+         'name': 'property'},
+        {'attributes': {u'name': u'gain'}, 'cdata': '0', 'name': 'property'},
+        {'attributes': {u'name': u'end'}, 'cdata': '1', 'name': 'property'}],
+       'name': 'filter'}],
+     'name': 'entry'}],
+   'name': 'playlist'},
+  {'attributes': {u'id': u'playlist3'}, 'name': 'playlist'},
+  {'attributes': {u'id': u'playlist4'}, 'name': 'playlist'},
+  {'attributes': {u'id': u'2_video', u'in': u'0', u'out': u'321690'},
+   'children': [{'attributes': {u'name': u'mlt_type'},
+     'cdata': 'producer',
+     'name': 'property'},
+    {'attributes': {u'name': u'length'},
+     'cdata': '321691',
+     'name': 'property'},
+    {'attributes': {u'name': u'eof'}, 'cdata': 'pause', 'name': 'property'},
+    {'attributes': {u'name': u'resource'},
+     'cdata': '/home/pre-barreau/kdenlive/Droit priv\xc3\xa9 internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.nb_streams'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.type'},
+     'cdata': 'video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.sample_aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.pix_fmt'},
+     'cdata': 'yuv420p',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.sample_aspect_ratio'},
+     'cdata': '0,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.colorspace'},
+     'cdata': '601',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.name'},
+     'cdata': 'vp8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.long_name'},
+     'cdata': 'On2 VP8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.title.markup'},
+     'cdata': 'Video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.stream.type'},
+     'cdata': 'audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_fmt'},
+     'cdata': 's16',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_rate'},
+     'cdata': '48000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.channels'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.name'},
+     'cdata': 'vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.long_name'},
+     'cdata': 'Vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.title.markup'},
+     'cdata': 'Audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'seekable'}, 'cdata': '1', 'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_num'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_den'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'audio_index'},
+     'cdata': '-1',
+     'name': 'property'},
+    {'attributes': {u'name': u'video_index'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'mlt_service'},
+     'cdata': 'avformat',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.frame_rate_num'},
+     'cdata': '24',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.frame_rate_den'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'source_fps'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.colorspace'},
+     'cdata': '601',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.width'},
+     'cdata': '640',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.height'},
+     'cdata': '360',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.top_field_first'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.progressive'},
+     'cdata': '1',
+     'name': 'property'}],
+   'name': 'producer'},
+  {'attributes': {u'id': u'playlist5'},
+   'children': [{'attributes': {u'length': u'1138'}, 'name': 'blank'},
+    {'attributes': {u'in': u'0', u'out': u'85261', u'producer': u'2_video'},
+     'children': [{'attributes': {u'id': u'fade_to_black',
+        u'in': u'85259',
+        u'out': u'85261'},
+       'children': [{'attributes': {u'name': u'track'},
+         'cdata': '0',
+         'name': 'property'},
+        {'attributes': {u'name': u'start'}, 'cdata': '1', 'name': 'property'},
+        {'attributes': {u'name': u'mlt_type'},
+         'cdata': 'filter',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_service'},
+         'cdata': 'brightness',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_id'},
+         'cdata': 'fade_to_black',
+         'name': 'property'},
+        {'attributes': {u'name': u'tag'},
+         'cdata': 'brightness',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_ix'},
+         'cdata': '1',
+         'name': 'property'},
+        {'attributes': {u'name': u'end'}, 'cdata': '0', 'name': 'property'}],
+       'name': 'filter'}],
+     'name': 'entry'},
+    {'attributes': {u'in': u'85323',
+      u'out': u'321690',
+      u'producer': u'2_video'},
+     'children': [{'attributes': {u'id': u'fade_from_black',
+        u'in': u'85323',
+        u'out': u'85325'},
+       'children': [{'attributes': {u'name': u'track'},
+         'cdata': '0',
+         'name': 'property'},
+        {'attributes': {u'name': u'start'}, 'cdata': '0', 'name': 'property'},
+        {'attributes': {u'name': u'mlt_type'},
+         'cdata': 'filter',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_service'},
+         'cdata': 'brightness',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_id'},
+         'cdata': 'fade_from_black',
+         'name': 'property'},
+        {'attributes': {u'name': u'tag'},
+         'cdata': 'brightness',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_ix'},
+         'cdata': '1',
+         'name': 'property'},
+        {'attributes': {u'name': u'end'}, 'cdata': '1', 'name': 'property'}],
+       'name': 'filter'}],
+     'name': 'entry'}],
+   'name': 'playlist'},
+  {'attributes': {u'global_feed': u'1',
+    u'id': u'maintractor',
+    u'in': u'0',
+    u'out': u'322767',
+    u'title': u'Anonymous Submission'},
+   'children': [{'attributes': {u'name': u'meta.volume'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'producer': u'black_track'}, 'name': 'track'},
+    {'attributes': {u'hide': u'video', u'producer': u'playlist1'},
+     'name': 'track'},
+    {'attributes': {u'hide': u'video', u'producer': u'playlist2'},
+     'name': 'track'},
+    {'attributes': {u'producer': u'playlist3'}, 'name': 'track'},
+    {'attributes': {u'producer': u'playlist4'}, 'name': 'track'},
+    {'attributes': {u'producer': u'playlist5'}, 'name': 'track'},
+    {'attributes': {u'id': u'transition0', u'in': u'0', u'out': u'0'},
+     'children': [{'attributes': {u'name': u'a_track'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'b_track'}, 'cdata': '2', 'name': 'property'},
+      {'attributes': {u'name': u'mlt_type'},
+       'cdata': 'transition',
+       'name': 'property'},
+      {'attributes': {u'name': u'mlt_service'},
+       'cdata': 'mix',
+       'name': 'property'},
+      {'attributes': {u'name': u'always_active'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'combine'}, 'cdata': '1', 'name': 'property'},
+      {'attributes': {u'name': u'internal_added'},
+       'cdata': '237',
+       'name': 'property'}],
+     'name': 'transition'},
+    {'attributes': {u'id': u'transition1', u'in': u'0', u'out': u'0'},
+     'children': [{'attributes': {u'name': u'a_track'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'b_track'}, 'cdata': '3', 'name': 'property'},
+      {'attributes': {u'name': u'mlt_type'},
+       'cdata': 'transition',
+       'name': 'property'},
+      {'attributes': {u'name': u'mlt_service'},
+       'cdata': 'mix',
+       'name': 'property'},
+      {'attributes': {u'name': u'always_active'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'combine'}, 'cdata': '1', 'name': 'property'},
+      {'attributes': {u'name': u'internal_added'},
+       'cdata': '237',
+       'name': 'property'}],
+     'name': 'transition'},
+    {'attributes': {u'id': u'transition2', u'in': u'0', u'out': u'0'},
+     'children': [{'attributes': {u'name': u'a_track'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'b_track'}, 'cdata': '4', 'name': 'property'},
+      {'attributes': {u'name': u'mlt_type'},
+       'cdata': 'transition',
+       'name': 'property'},
+      {'attributes': {u'name': u'mlt_service'},
+       'cdata': 'mix',
+       'name': 'property'},
+      {'attributes': {u'name': u'always_active'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'combine'}, 'cdata': '1', 'name': 'property'},
+      {'attributes': {u'name': u'internal_added'},
+       'cdata': '237',
+       'name': 'property'}],
+     'name': 'transition'},
+    {'attributes': {u'id': u'transition3', u'in': u'0', u'out': u'0'},
+     'children': [{'attributes': {u'name': u'a_track'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'b_track'}, 'cdata': '5', 'name': 'property'},
+      {'attributes': {u'name': u'mlt_type'},
+       'cdata': 'transition',
+       'name': 'property'},
+      {'attributes': {u'name': u'mlt_service'},
+       'cdata': 'mix',
+       'name': 'property'},
+      {'attributes': {u'name': u'always_active'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'combine'}, 'cdata': '1', 'name': 'property'},
+      {'attributes': {u'name': u'internal_added'},
+       'cdata': '237',
+       'name': 'property'}],
+     'name': 'transition'}],
+   'name': 'tractor'},
+  {'attributes': {u'kdenliveversion': u'0.8',
+    u'profile': u'/home/pre-barreau/.kde/share/apps/kdenlive/profiles/customprofile0',
+    u'projectfolder': u'/home/pre-barreau/kdenlive',
+    u'version': u'0,85'},
+   'children': [{'name': 'customeffects'},
+    {'attributes': {u'enableproxy': u'0',
+      u'generateimageproxy': u'0',
+      u'generateproxy': u'0',
+      u'position': u'86442',
+      u'proxyextension': u'ts',
+      u'proxyimageminsize': u'2000',
+      u'proxyminsize': u'1000',
+      u'proxyparams': u'-f mpegts -acodec libmp3lame -ac 2 -ab 92k -ar 48000 -vcodec mpeg2video -g 5 -deinterlace -s 480x270 -b 150k',
+      u'verticalzoom': u'1',
+      u'zonein': u'0',
+      u'zoneout': u'100',
+      u'zoom': u'13'},
+     'name': 'documentproperties'},
+    {'name': 'documentnotes'},
+    {'attributes': {u'description': u'HD 360p 24 fps',
+      u'display_aspect_den': u'9',
+      u'display_aspect_num': u'16',
+      u'frame_rate_den': u'1',
+      u'frame_rate_num': u'24',
+      u'height': u'360',
+      u'progressive': u'1',
+      u'sample_aspect_den': u'1',
+      u'sample_aspect_num': u'1',
+      u'width': u'640'},
+     'name': 'profileinfo'},
+    {'children': [{'attributes': {u'blind': u'1',
+        u'locked': u'0',
+        u'mute': u'0',
+        u'trackname': u'Audio 2',
+        u'type': u'audio'},
+       'name': 'trackinfo'},
+      {'attributes': {u'blind': u'1',
+        u'locked': u'0',
+        u'mute': u'0',
+        u'trackname': u'Audio 1',
+        u'type': u'audio'},
+       'name': 'trackinfo'},
+      {'attributes': {u'blind': u'0',
+        u'locked': u'0',
+        u'mute': u'0',
+        u'trackname': u'Video 3'},
+       'name': 'trackinfo'},
+      {'attributes': {u'blind': u'0',
+        u'locked': u'0',
+        u'mute': u'0',
+        u'trackname': u'Video 2'},
+       'name': 'trackinfo'},
+      {'attributes': {u'blind': u'0',
+        u'locked': u'0',
+        u'mute': u'0',
+        u'trackname': u'Video 1'},
+       'name': 'trackinfo'}],
+     'name': 'tracksinfo'},
+    {'attributes': {u'aspect_ratio': u'1,000000',
+      u'audio_max': u'1',
+      u'audiocodec': u'Vorbis',
+      u'channels': u'2',
+      u'colorspace': u'601',
+      u'default_audio': u'1',
+      u'default_video': u'0',
+      u'duration': u'321691',
+      u'file_hash': u'78149b6acdabd39af1ab52ea72b5b24a',
+      u'file_size': u'729776788',
+      u'fps': u'24',
+      u'frame_size': u'640x360',
+      u'frequency': u'48000',
+      u'id': u'2',
+      u'name': u'crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm',
+      u'pix_fmt': u'yuv420p',
+      u'resource': u'/home/pre-barreau/kdenlive/Droit priv\xe9 internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm',
+      u'type': u'3',
+      u'video_max': u'0',
+      u'videocodec': u'On2 VP8'},
+     'name': 'kdenlive_producer'},
+    {'name': 'markers'},
+    {'children': [{'attributes': {u'comment': u'01:00:00:00',
+        u'time': u'3600'},
+       'name': 'guide'}],
+     'name': 'guides'},
+    {'children': [{'children': [{'attributes': {u'position': u'86400',
+          u'track': u'3'},
+         'name': 'clipitem'},
+        {'attributes': {u'position': u'86400', u'track': u'0'},
+         'name': 'clipitem'}],
+       'name': 'group'},
+      {'children': [{'attributes': {u'position': u'1138', u'track': u'3'},
+         'name': 'clipitem'},
+        {'attributes': {u'position': u'1138', u'track': u'0'},
+         'name': 'clipitem'}],
+       'name': 'group'}],
+     'name': 'groups'}],
+   'name': 'kdenlivedoc'}],
+ 'name': 'mlt'}
diff --git a/kdenlive/examples/sans_dict.txt b/kdenlive/examples/sans_dict.txt
new file mode 100644 (file)
index 0000000..cdac01b
--- /dev/null
@@ -0,0 +1,566 @@
+{'attributes': {u'LC_NUMERIC': u'fr_FR.UTF-8',
+  u'root': u'/home/pre-barreau/Documents',
+  u'title': u'Anonymous Submission'},
+ 'children': [{'attributes': {u'colorspace': u'709',
+    u'description': u'HD 360p 24 fps',
+    u'display_aspect_den': u'9',
+    u'display_aspect_num': u'16',
+    u'frame_rate_den': u'1',
+    u'frame_rate_num': u'24',
+    u'height': u'360',
+    u'progressive': u'1',
+    u'sample_aspect_den': u'1',
+    u'sample_aspect_num': u'1',
+    u'width': u'640'},
+   'name': 'profile'},
+  {'attributes': {u'id': u'black', u'in': u'0', u'out': u'322767'},
+   'children': [{'attributes': {u'name': u'mlt_type'},
+     'cdata': 'producer',
+     'name': 'property'},
+    {'attributes': {u'name': u'length'},
+     'cdata': '322768',
+     'name': 'property'},
+    {'attributes': {u'name': u'eof'}, 'cdata': 'pause', 'name': 'property'},
+    {'attributes': {u'name': u'resource'},
+     'cdata': 'black',
+     'name': 'property'},
+    {'attributes': {u'name': u'aspect_ratio'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'mlt_service'},
+     'cdata': 'colour',
+     'name': 'property'}],
+   'name': 'producer'},
+  {'attributes': {u'id': u'black_track'},
+   'children': [{'attributes': {u'in': u'0',
+      u'out': u'322767',
+      u'producer': u'black'},
+     'name': 'entry'}],
+   'name': 'playlist'},
+  {'attributes': {u'id': u'playlist1'}, 'name': 'playlist'},
+  {'attributes': {u'id': u'2_2_audio', u'in': u'0', u'out': u'321690'},
+   'children': [{'attributes': {u'name': u'mlt_type'},
+     'cdata': 'producer',
+     'name': 'property'},
+    {'attributes': {u'name': u'length'},
+     'cdata': '321691',
+     'name': 'property'},
+    {'attributes': {u'name': u'eof'}, 'cdata': 'pause', 'name': 'property'},
+    {'attributes': {u'name': u'resource'},
+     'cdata': '/home/pre-barreau/kdenlive/Droit priv\xc3\xa9 internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.nb_streams'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.type'},
+     'cdata': 'video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.sample_aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.pix_fmt'},
+     'cdata': 'yuv420p',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.sample_aspect_ratio'},
+     'cdata': '0,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.colorspace'},
+     'cdata': '601',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.name'},
+     'cdata': 'vp8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.long_name'},
+     'cdata': 'On2 VP8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.title.markup'},
+     'cdata': 'Video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.stream.type'},
+     'cdata': 'audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_fmt'},
+     'cdata': 's16',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_rate'},
+     'cdata': '48000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.channels'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.name'},
+     'cdata': 'vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.long_name'},
+     'cdata': 'Vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.title.markup'},
+     'cdata': 'Audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'seekable'}, 'cdata': '1', 'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_num'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_den'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'audio_index'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'video_index'},
+     'cdata': '-1',
+     'name': 'property'},
+    {'attributes': {u'name': u'mlt_service'},
+     'cdata': 'avformat',
+     'name': 'property'}],
+   'name': 'producer'},
+  {'attributes': {u'id': u'2_3_audio', u'in': u'0', u'out': u'321690'},
+   'children': [{'attributes': {u'name': u'mlt_type'},
+     'cdata': 'producer',
+     'name': 'property'},
+    {'attributes': {u'name': u'length'},
+     'cdata': '321691',
+     'name': 'property'},
+    {'attributes': {u'name': u'eof'}, 'cdata': 'pause', 'name': 'property'},
+    {'attributes': {u'name': u'resource'},
+     'cdata': '/home/pre-barreau/kdenlive/Droit priv\xc3\xa9 internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.nb_streams'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.type'},
+     'cdata': 'video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.sample_aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.pix_fmt'},
+     'cdata': 'yuv420p',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.sample_aspect_ratio'},
+     'cdata': '0,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.colorspace'},
+     'cdata': '601',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.name'},
+     'cdata': 'vp8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.long_name'},
+     'cdata': 'On2 VP8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.title.markup'},
+     'cdata': 'Video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.stream.type'},
+     'cdata': 'audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_fmt'},
+     'cdata': 's16',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_rate'},
+     'cdata': '48000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.channels'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.name'},
+     'cdata': 'vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.long_name'},
+     'cdata': 'Vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.title.markup'},
+     'cdata': 'Audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'seekable'}, 'cdata': '1', 'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_num'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_den'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'audio_index'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'video_index'},
+     'cdata': '-1',
+     'name': 'property'},
+    {'attributes': {u'name': u'mlt_service'},
+     'cdata': 'avformat',
+     'name': 'property'}],
+   'name': 'producer'},
+  {'attributes': {u'id': u'playlist2'},
+   'children': [{'attributes': {u'length': u'1138'}, 'name': 'blank'},
+    {'attributes': {u'in': u'0', u'out': u'85261', u'producer': u'2_2_audio'},
+     'name': 'entry'},
+    {'attributes': {u'in': u'85323',
+      u'out': u'321690',
+      u'producer': u'2_3_audio'},
+     'name': 'entry'}],
+   'name': 'playlist'},
+  {'attributes': {u'id': u'playlist3'}, 'name': 'playlist'},
+  {'attributes': {u'id': u'playlist4'}, 'name': 'playlist'},
+  {'attributes': {u'id': u'2_video', u'in': u'0', u'out': u'321690'},
+   'children': [{'attributes': {u'name': u'mlt_type'},
+     'cdata': 'producer',
+     'name': 'property'},
+    {'attributes': {u'name': u'length'},
+     'cdata': '321691',
+     'name': 'property'},
+    {'attributes': {u'name': u'eof'}, 'cdata': 'pause', 'name': 'property'},
+    {'attributes': {u'name': u'resource'},
+     'cdata': '/home/pre-barreau/kdenlive/Droit priv\xc3\xa9 internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.nb_streams'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.type'},
+     'cdata': 'video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.stream.sample_aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.frame_rate'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.pix_fmt'},
+     'cdata': 'yuv420p',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.sample_aspect_ratio'},
+     'cdata': '0,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.colorspace'},
+     'cdata': '601',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.name'},
+     'cdata': 'vp8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.long_name'},
+     'cdata': 'On2 VP8',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.0.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.0.stream.title.markup'},
+     'cdata': 'Video',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.stream.type'},
+     'cdata': 'audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_fmt'},
+     'cdata': 's16',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.sample_rate'},
+     'cdata': '48000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.channels'},
+     'cdata': '2',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.name'},
+     'cdata': 'vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.long_name'},
+     'cdata': 'Vorbis',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.1.codec.bit_rate'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.language.markup'},
+     'cdata': 'eng',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.attr.1.stream.title.markup'},
+     'cdata': 'Audio',
+     'name': 'property'},
+    {'attributes': {u'name': u'seekable'}, 'cdata': '1', 'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_num'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.sample_aspect_den'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'aspect_ratio'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'audio_index'},
+     'cdata': '-1',
+     'name': 'property'},
+    {'attributes': {u'name': u'video_index'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'mlt_service'},
+     'cdata': 'avformat',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.frame_rate_num'},
+     'cdata': '24',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.frame_rate_den'},
+     'cdata': '1',
+     'name': 'property'},
+    {'attributes': {u'name': u'source_fps'},
+     'cdata': '24,000000',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.colorspace'},
+     'cdata': '601',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.width'},
+     'cdata': '640',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.height'},
+     'cdata': '360',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.top_field_first'},
+     'cdata': '0',
+     'name': 'property'},
+    {'attributes': {u'name': u'meta.media.progressive'},
+     'cdata': '1',
+     'name': 'property'}],
+   'name': 'producer'},
+  {'attributes': {u'id': u'playlist5'},
+   'children': [{'attributes': {u'length': u'1138'}, 'name': 'blank'},
+    {'attributes': {u'in': u'0', u'out': u'85261', u'producer': u'2_video'},
+     'name': 'entry'},
+    {'attributes': {u'in': u'85323',
+      u'out': u'321690',
+      u'producer': u'2_video'},
+     'name': 'entry'}],
+   'name': 'playlist'},
+  {'attributes': {u'global_feed': u'1',
+    u'id': u'maintractor',
+    u'in': u'0',
+    u'out': u'322767',
+    u'title': u'Anonymous Submission'},
+   'children': [{'attributes': {u'name': u'meta.volume'},
+     'cdata': '1,000000',
+     'name': 'property'},
+    {'attributes': {u'producer': u'black_track'}, 'name': 'track'},
+    {'attributes': {u'hide': u'video', u'producer': u'playlist1'},
+     'name': 'track'},
+    {'attributes': {u'hide': u'video', u'producer': u'playlist2'},
+     'name': 'track'},
+    {'attributes': {u'producer': u'playlist3'}, 'name': 'track'},
+    {'attributes': {u'producer': u'playlist4'}, 'name': 'track'},
+    {'attributes': {u'producer': u'playlist5'}, 'name': 'track'},
+    {'attributes': {u'id': u'transition0', u'in': u'0', u'out': u'0'},
+     'children': [{'attributes': {u'name': u'a_track'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'b_track'}, 'cdata': '2', 'name': 'property'},
+      {'attributes': {u'name': u'mlt_type'},
+       'cdata': 'transition',
+       'name': 'property'},
+      {'attributes': {u'name': u'mlt_service'},
+       'cdata': 'mix',
+       'name': 'property'},
+      {'attributes': {u'name': u'always_active'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'combine'}, 'cdata': '1', 'name': 'property'},
+      {'attributes': {u'name': u'internal_added'},
+       'cdata': '237',
+       'name': 'property'}],
+     'name': 'transition'},
+    {'attributes': {u'id': u'transition1', u'in': u'0', u'out': u'0'},
+     'children': [{'attributes': {u'name': u'a_track'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'b_track'}, 'cdata': '3', 'name': 'property'},
+      {'attributes': {u'name': u'mlt_type'},
+       'cdata': 'transition',
+       'name': 'property'},
+      {'attributes': {u'name': u'mlt_service'},
+       'cdata': 'mix',
+       'name': 'property'},
+      {'attributes': {u'name': u'always_active'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'combine'}, 'cdata': '1', 'name': 'property'},
+      {'attributes': {u'name': u'internal_added'},
+       'cdata': '237',
+       'name': 'property'}],
+     'name': 'transition'},
+    {'attributes': {u'id': u'transition2', u'in': u'0', u'out': u'0'},
+     'children': [{'attributes': {u'name': u'a_track'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'b_track'}, 'cdata': '4', 'name': 'property'},
+      {'attributes': {u'name': u'mlt_type'},
+       'cdata': 'transition',
+       'name': 'property'},
+      {'attributes': {u'name': u'mlt_service'},
+       'cdata': 'mix',
+       'name': 'property'},
+      {'attributes': {u'name': u'always_active'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'combine'}, 'cdata': '1', 'name': 'property'},
+      {'attributes': {u'name': u'internal_added'},
+       'cdata': '237',
+       'name': 'property'}],
+     'name': 'transition'},
+    {'attributes': {u'id': u'transition3', u'in': u'0', u'out': u'0'},
+     'children': [{'attributes': {u'name': u'a_track'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'b_track'}, 'cdata': '5', 'name': 'property'},
+      {'attributes': {u'name': u'mlt_type'},
+       'cdata': 'transition',
+       'name': 'property'},
+      {'attributes': {u'name': u'mlt_service'},
+       'cdata': 'mix',
+       'name': 'property'},
+      {'attributes': {u'name': u'always_active'},
+       'cdata': '1',
+       'name': 'property'},
+      {'attributes': {u'name': u'combine'}, 'cdata': '1', 'name': 'property'},
+      {'attributes': {u'name': u'internal_added'},
+       'cdata': '237',
+       'name': 'property'}],
+     'name': 'transition'}],
+   'name': 'tractor'},
+  {'attributes': {u'kdenliveversion': u'0.8',
+    u'profile': u'/home/pre-barreau/.kde/share/apps/kdenlive/profiles/customprofile0',
+    u'projectfolder': u'/home/pre-barreau/kdenlive',
+    u'version': u'0,85'},
+   'children': [{'name': 'customeffects'},
+    {'attributes': {u'enableproxy': u'0',
+      u'generateimageproxy': u'0',
+      u'generateproxy': u'0',
+      u'position': u'86442',
+      u'proxyextension': u'ts',
+      u'proxyimageminsize': u'2000',
+      u'proxyminsize': u'1000',
+      u'proxyparams': u'-f mpegts -acodec libmp3lame -ac 2 -ab 92k -ar 48000 -vcodec mpeg2video -g 5 -deinterlace -s 480x270 -b 150k',
+      u'verticalzoom': u'1',
+      u'zonein': u'0',
+      u'zoneout': u'100',
+      u'zoom': u'3'},
+     'name': 'documentproperties'},
+    {'name': 'documentnotes'},
+    {'attributes': {u'description': u'HD 360p 24 fps',
+      u'display_aspect_den': u'9',
+      u'display_aspect_num': u'16',
+      u'frame_rate_den': u'1',
+      u'frame_rate_num': u'24',
+      u'height': u'360',
+      u'progressive': u'1',
+      u'sample_aspect_den': u'1',
+      u'sample_aspect_num': u'1',
+      u'width': u'640'},
+     'name': 'profileinfo'},
+    {'children': [{'attributes': {u'blind': u'1',
+        u'locked': u'0',
+        u'mute': u'0',
+        u'trackname': u'Audio 2',
+        u'type': u'audio'},
+       'name': 'trackinfo'},
+      {'attributes': {u'blind': u'1',
+        u'locked': u'0',
+        u'mute': u'0',
+        u'trackname': u'Audio 1',
+        u'type': u'audio'},
+       'name': 'trackinfo'},
+      {'attributes': {u'blind': u'0',
+        u'locked': u'0',
+        u'mute': u'0',
+        u'trackname': u'Video 3'},
+       'name': 'trackinfo'},
+      {'attributes': {u'blind': u'0',
+        u'locked': u'0',
+        u'mute': u'0',
+        u'trackname': u'Video 2'},
+       'name': 'trackinfo'},
+      {'attributes': {u'blind': u'0',
+        u'locked': u'0',
+        u'mute': u'0',
+        u'trackname': u'Video 1'},
+       'name': 'trackinfo'}],
+     'name': 'tracksinfo'},
+    {'attributes': {u'aspect_ratio': u'1,000000',
+      u'audio_max': u'1',
+      u'audiocodec': u'Vorbis',
+      u'channels': u'2',
+      u'colorspace': u'601',
+      u'default_audio': u'1',
+      u'default_video': u'0',
+      u'duration': u'321691',
+      u'file_hash': u'78149b6acdabd39af1ab52ea72b5b24a',
+      u'file_size': u'729776788',
+      u'fps': u'24',
+      u'frame_size': u'640x360',
+      u'frequency': u'48000',
+      u'id': u'2',
+      u'name': u'crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm',
+      u'pix_fmt': u'yuv420p',
+      u'resource': u'/home/pre-barreau/kdenlive/Droit priv\xe9 internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm',
+      u'type': u'3',
+      u'video_max': u'0',
+      u'videocodec': u'On2 VP8'},
+     'name': 'kdenlive_producer'},
+    {'name': 'markers'},
+    {'children': [{'attributes': {u'comment': u'01:00:00:00',
+        u'time': u'3600'},
+       'name': 'guide'}],
+     'name': 'guides'},
+    {'children': [{'children': [{'attributes': {u'position': u'86400',
+          u'track': u'3'},
+         'name': 'clipitem'},
+        {'attributes': {u'position': u'86400', u'track': u'0'},
+         'name': 'clipitem'}],
+       'name': 'group'},
+      {'children': [{'attributes': {u'position': u'1138', u'track': u'3'},
+         'name': 'clipitem'},
+        {'attributes': {u'position': u'1138', u'track': u'0'},
+         'name': 'clipitem'}],
+       'name': 'group'}],
+     'name': 'groups'}],
+   'name': 'kdenlivedoc'}],
+ 'name': 'mlt'}
diff --git a/kdenlive/examples/test_avec_orig.kdenlive b/kdenlive/examples/test_avec_orig.kdenlive
new file mode 100644 (file)
index 0000000..00dcb68
--- /dev/null
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<mlt LC_NUMERIC="fr_FR.UTF-8" root="/home/pre-barreau/Documents" title="Anonymous Submission">
+       <profile sample_aspect_den="1" display_aspect_num="16" frame_rate_num="24" description="HD 360p 24 fps" progressive="1" display_aspect_den="9" colorspace="709" sample_aspect_num="1" height="360" width="640" frame_rate_den="1" />
+       <producer out="322767" id="black" in="0">
+               <property name="mlt_type">producer</property>
+               <property name="length">322768</property>
+               <property name="eof">pause</property>
+               <property name="resource">black</property>
+               <property name="aspect_ratio">0</property>
+               <property name="mlt_service">colour</property>
+       </producer>
+       <playlist id="black_track">
+               <entry out="322767" producer="black" in="0" />
+       </playlist>
+       <playlist id="playlist1" />
+       <producer out="321690" id="2_2_audio" in="0">
+               <property name="mlt_type">producer</property>
+               <property name="length">321691</property>
+               <property name="eof">pause</property>
+               <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+               <property name="meta.media.nb_streams">2</property>
+               <property name="meta.media.0.stream.type">video</property>
+               <property name="meta.media.0.stream.frame_rate">24,000000</property>
+               <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+               <property name="meta.media.0.codec.frame_rate">24,000000</property>
+               <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+               <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+               <property name="meta.media.0.codec.colorspace">601</property>
+               <property name="meta.media.0.codec.name">vp8</property>
+               <property name="meta.media.0.codec.long_name">On2 VP8</property>
+               <property name="meta.media.0.codec.bit_rate">0</property>
+               <property name="meta.attr.0.stream.language.markup">eng</property>
+               <property name="meta.attr.0.stream.title.markup">Video</property>
+               <property name="meta.media.1.stream.type">audio</property>
+               <property name="meta.media.1.codec.sample_fmt">s16</property>
+               <property name="meta.media.1.codec.sample_rate">48000</property>
+               <property name="meta.media.1.codec.channels">2</property>
+               <property name="meta.media.1.codec.name">vorbis</property>
+               <property name="meta.media.1.codec.long_name">Vorbis</property>
+               <property name="meta.media.1.codec.bit_rate">0</property>
+               <property name="meta.attr.1.stream.language.markup">eng</property>
+               <property name="meta.attr.1.stream.title.markup">Audio</property>
+               <property name="seekable">1</property>
+               <property name="meta.media.sample_aspect_num">1</property>
+               <property name="meta.media.sample_aspect_den">1</property>
+               <property name="aspect_ratio">1,000000</property>
+               <property name="audio_index">1</property>
+               <property name="video_index">-1</property>
+               <property name="mlt_service">avformat</property>
+       </producer>
+       <producer out="321690" id="2_3_audio" in="0">
+               <property name="mlt_type">producer</property>
+               <property name="length">321691</property>
+               <property name="eof">pause</property>
+               <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+               <property name="meta.media.nb_streams">2</property>
+               <property name="meta.media.0.stream.type">video</property>
+               <property name="meta.media.0.stream.frame_rate">24,000000</property>
+               <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+               <property name="meta.media.0.codec.frame_rate">24,000000</property>
+               <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+               <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+               <property name="meta.media.0.codec.colorspace">601</property>
+               <property name="meta.media.0.codec.name">vp8</property>
+               <property name="meta.media.0.codec.long_name">On2 VP8</property>
+               <property name="meta.media.0.codec.bit_rate">0</property>
+               <property name="meta.attr.0.stream.language.markup">eng</property>
+               <property name="meta.attr.0.stream.title.markup">Video</property>
+               <property name="meta.media.1.stream.type">audio</property>
+               <property name="meta.media.1.codec.sample_fmt">s16</property>
+               <property name="meta.media.1.codec.sample_rate">48000</property>
+               <property name="meta.media.1.codec.channels">2</property>
+               <property name="meta.media.1.codec.name">vorbis</property>
+               <property name="meta.media.1.codec.long_name">Vorbis</property>
+               <property name="meta.media.1.codec.bit_rate">0</property>
+               <property name="meta.attr.1.stream.language.markup">eng</property>
+               <property name="meta.attr.1.stream.title.markup">Audio</property>
+               <property name="seekable">1</property>
+               <property name="meta.media.sample_aspect_num">1</property>
+               <property name="meta.media.sample_aspect_den">1</property>
+               <property name="aspect_ratio">1,000000</property>
+               <property name="audio_index">1</property>
+               <property name="video_index">-1</property>
+               <property name="mlt_service">avformat</property>
+       </producer>
+       <playlist id="playlist2">
+               <blank length="1138" />
+               <entry out="85261" producer="2_2_audio" in="0">
+                       <filter out="85261" id="fadeout" in="85259">
+                               <property name="track">0</property>
+                               <property name="window">75</property>
+                               <property name="max_gain">20dB</property>
+                               <property name="mlt_type">filter</property>
+                               <property name="mlt_service">volume</property>
+                               <property name="kdenlive_id">fadeout</property>
+                               <property name="tag">volume</property>
+                               <property name="kdenlive_ix">1</property>
+                               <property name="gain">1</property>
+                               <property name="end">0</property>
+                       </filter>
+               </entry>
+               <entry out="321690" producer="2_3_audio" in="85323">
+                       <filter out="85325" id="fadein" in="85323">
+                               <property name="track">0</property>
+                               <property name="window">75</property>
+                               <property name="max_gain">20dB</property>
+                               <property name="mlt_type">filter</property>
+                               <property name="mlt_service">volume</property>
+                               <property name="kdenlive_id">fadein</property>
+                               <property name="tag">volume</property>
+                               <property name="kdenlive_ix">1</property>
+                               <property name="gain">0</property>
+                               <property name="end">1</property>
+                       </filter>
+               </entry>
+       </playlist>
+       <playlist id="playlist3" />
+       <playlist id="playlist4" />
+       <producer out="321690" id="2_video" in="0">
+               <property name="mlt_type">producer</property>
+               <property name="length">321691</property>
+               <property name="eof">pause</property>
+               <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+               <property name="meta.media.nb_streams">2</property>
+               <property name="meta.media.0.stream.type">video</property>
+               <property name="meta.media.0.stream.frame_rate">24,000000</property>
+               <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+               <property name="meta.media.0.codec.frame_rate">24,000000</property>
+               <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+               <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+               <property name="meta.media.0.codec.colorspace">601</property>
+               <property name="meta.media.0.codec.name">vp8</property>
+               <property name="meta.media.0.codec.long_name">On2 VP8</property>
+               <property name="meta.media.0.codec.bit_rate">0</property>
+               <property name="meta.attr.0.stream.language.markup">eng</property>
+               <property name="meta.attr.0.stream.title.markup">Video</property>
+               <property name="meta.media.1.stream.type">audio</property>
+               <property name="meta.media.1.codec.sample_fmt">s16</property>
+               <property name="meta.media.1.codec.sample_rate">48000</property>
+               <property name="meta.media.1.codec.channels">2</property>
+               <property name="meta.media.1.codec.name">vorbis</property>
+               <property name="meta.media.1.codec.long_name">Vorbis</property>
+               <property name="meta.media.1.codec.bit_rate">0</property>
+               <property name="meta.attr.1.stream.language.markup">eng</property>
+               <property name="meta.attr.1.stream.title.markup">Audio</property>
+               <property name="seekable">1</property>
+               <property name="meta.media.sample_aspect_num">1</property>
+               <property name="meta.media.sample_aspect_den">1</property>
+               <property name="aspect_ratio">1,000000</property>
+               <property name="audio_index">-1</property>
+               <property name="video_index">0</property>
+               <property name="mlt_service">avformat</property>
+               <property name="meta.media.frame_rate_num">24</property>
+               <property name="meta.media.frame_rate_den">1</property>
+               <property name="source_fps">24,000000</property>
+               <property name="meta.media.colorspace">601</property>
+               <property name="meta.media.width">640</property>
+               <property name="meta.media.height">360</property>
+               <property name="meta.media.top_field_first">0</property>
+               <property name="meta.media.progressive">1</property>
+       </producer>
+       <playlist id="playlist5">
+               <blank length="1138" />
+               <entry out="85261" producer="2_video" in="0">
+                       <filter out="85261" id="fade_to_black" in="85259">
+                               <property name="track">0</property>
+                               <property name="start">1</property>
+                               <property name="mlt_type">filter</property>
+                               <property name="mlt_service">brightness</property>
+                               <property name="kdenlive_id">fade_to_black</property>
+                               <property name="tag">brightness</property>
+                               <property name="kdenlive_ix">1</property>
+                               <property name="end">0</property>
+                       </filter>
+               </entry>
+               <entry out="321690" producer="2_video" in="85323">
+                       <filter out="85325" id="fade_from_black" in="85323">
+                               <property name="track">0</property>
+                               <property name="start">0</property>
+                               <property name="mlt_type">filter</property>
+                               <property name="mlt_service">brightness</property>
+                               <property name="kdenlive_id">fade_from_black</property>
+                               <property name="tag">brightness</property>
+                               <property name="kdenlive_ix">1</property>
+                               <property name="end">1</property>
+                       </filter>
+               </entry>
+       </playlist>
+       <tractor out="322767" global_feed="1" in="0" id="maintractor" title="Anonymous Submission">
+               <property name="meta.volume">1,000000</property>
+               <track producer="black_track" />
+               <track hide="video" producer="playlist1" />
+               <track hide="video" producer="playlist2" />
+               <track producer="playlist3" />
+               <track producer="playlist4" />
+               <track producer="playlist5" />
+               <transition out="0" id="transition0" in="0">
+                       <property name="a_track">1</property>
+                       <property name="b_track">2</property>
+                       <property name="mlt_type">transition</property>
+                       <property name="mlt_service">mix</property>
+                       <property name="always_active">1</property>
+                       <property name="combine">1</property>
+                       <property name="internal_added">237</property>
+               </transition>
+               <transition out="0" id="transition1" in="0">
+                       <property name="a_track">1</property>
+                       <property name="b_track">3</property>
+                       <property name="mlt_type">transition</property>
+                       <property name="mlt_service">mix</property>
+                       <property name="always_active">1</property>
+                       <property name="combine">1</property>
+                       <property name="internal_added">237</property>
+               </transition>
+               <transition out="0" id="transition2" in="0">
+                       <property name="a_track">1</property>
+                       <property name="b_track">4</property>
+                       <property name="mlt_type">transition</property>
+                       <property name="mlt_service">mix</property>
+                       <property name="always_active">1</property>
+                       <property name="combine">1</property>
+                       <property name="internal_added">237</property>
+               </transition>
+               <transition out="0" id="transition3" in="0">
+                       <property name="a_track">1</property>
+                       <property name="b_track">5</property>
+                       <property name="mlt_type">transition</property>
+                       <property name="mlt_service">mix</property>
+                       <property name="always_active">1</property>
+                       <property name="combine">1</property>
+                       <property name="internal_added">237</property>
+               </transition>
+       </tractor>
+       <kdenlivedoc profile="/home/pre-barreau/.kde/share/apps/kdenlive/profiles/customprofile0" projectfolder="/home/pre-barreau/kdenlive" version="0,85" kdenliveversion="0.8">
+               <customeffects />
+               <documentproperties position="86442" zonein="0" enableproxy="0" proxyparams="-f mpegts -acodec libmp3lame -ac 2 -ab 92k -ar 48000 -vcodec mpeg2video -g 5 -deinterlace -s 480x270 -b 150k" proxyminsize="1000" zoom="13" generateimageproxy="0" proxyextension="ts" proxyimageminsize="2000" verticalzoom="1" zoneout="100" generateproxy="0" />
+               <documentnotes />
+               <profileinfo sample_aspect_den="1" display_aspect_num="16" description="HD 360p 24 fps" progressive="1" display_aspect_den="9" frame_rate_num="24" sample_aspect_num="1" height="360" width="640" frame_rate_den="1" />
+               <tracksinfo>
+                       <trackinfo blind="1" type="audio" locked="0" trackname="Audio 2" mute="0" />
+                       <trackinfo blind="1" type="audio" locked="0" trackname="Audio 1" mute="0" />
+                       <trackinfo blind="0" locked="0" trackname="Video 3" mute="0" />
+                       <trackinfo blind="0" locked="0" trackname="Video 2" mute="0" />
+                       <trackinfo blind="0" locked="0" trackname="Video 1" mute="0" />
+               </tracksinfo>
+               <kdenlive_producer pix_fmt="yuv420p" channels="2" videocodec="On2 VP8" audio_max="1" name="crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm" default_video="0" colorspace="601" default_audio="1" file_hash="78149b6acdabd39af1ab52ea72b5b24a" aspect_ratio="1,000000" frequency="48000" file_size="729776788" fps="24" frame_size="640x360" duration="321691" resource="/home/pre-barreau/kdenlive/Droit priv&#233; internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm" type="3" id="2" audiocodec="Vorbis" video_max="0" />
+               <markers />
+               <guides>
+                       <guide comment="01:00:00:00" time="3600" />
+               </guides>
+               <groups>
+                       <group>
+                               <clipitem track="3" position="86400" />
+                               <clipitem track="0" position="86400" />
+                       </group>
+                       <group>
+                               <clipitem track="3" position="1138" />
+                               <clipitem track="0" position="1138" />
+                       </group>
+               </groups>
+       </kdenlivedoc>
+</mlt>
diff --git a/kdenlive/examples/test_out.kdenlive b/kdenlive/examples/test_out.kdenlive
new file mode 100644 (file)
index 0000000..0937dfc
--- /dev/null
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
+<mlt LC_NUMERIC="fr_FR.UTF-8" root="/home/pre-barreau/Documents" title="Anonymous Submission">
+       <profile sample_aspect_den="1" display_aspect_num="16" frame_rate_num="24" description="HD 360p 24 fps" progressive="1" display_aspect_den="9" colorspace="709" sample_aspect_num="1" height="360" width="640" frame_rate_den="1" />
+       <producer out="322767" id="black" in="0">
+               <property name="mlt_type">producer</property>
+               <property name="length">322768</property>
+               <property name="eof">pause</property>
+               <property name="resource">black</property>
+               <property name="aspect_ratio">0</property>
+               <property name="mlt_service">colour</property>
+       </producer>
+       <playlist id="black_track">
+               <entry out="322767" producer="black" in="0" />
+       </playlist>
+       <playlist id="playlist1" />
+       <producer out="321690" id="2_2_audio" in="0">
+               <property name="mlt_type">producer</property>
+               <property name="length">321691</property>
+               <property name="eof">pause</property>
+               <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+               <property name="meta.media.nb_streams">2</property>
+               <property name="meta.media.0.stream.type">video</property>
+               <property name="meta.media.0.stream.frame_rate">24,000000</property>
+               <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+               <property name="meta.media.0.codec.frame_rate">24,000000</property>
+               <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+               <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+               <property name="meta.media.0.codec.colorspace">601</property>
+               <property name="meta.media.0.codec.name">vp8</property>
+               <property name="meta.media.0.codec.long_name">On2 VP8</property>
+               <property name="meta.media.0.codec.bit_rate">0</property>
+               <property name="meta.attr.0.stream.language.markup">eng</property>
+               <property name="meta.attr.0.stream.title.markup">Video</property>
+               <property name="meta.media.1.stream.type">audio</property>
+               <property name="meta.media.1.codec.sample_fmt">s16</property>
+               <property name="meta.media.1.codec.sample_rate">48000</property>
+               <property name="meta.media.1.codec.channels">2</property>
+               <property name="meta.media.1.codec.name">vorbis</property>
+               <property name="meta.media.1.codec.long_name">Vorbis</property>
+               <property name="meta.media.1.codec.bit_rate">0</property>
+               <property name="meta.attr.1.stream.language.markup">eng</property>
+               <property name="meta.attr.1.stream.title.markup">Audio</property>
+               <property name="seekable">1</property>
+               <property name="meta.media.sample_aspect_num">1</property>
+               <property name="meta.media.sample_aspect_den">1</property>
+               <property name="aspect_ratio">1,000000</property>
+               <property name="audio_index">1</property>
+               <property name="video_index">-1</property>
+               <property name="mlt_service">avformat</property>
+       </producer>
+       <producer out="321690" id="2_3_audio" in="0">
+               <property name="mlt_type">producer</property>
+               <property name="length">321691</property>
+               <property name="eof">pause</property>
+               <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+               <property name="meta.media.nb_streams">2</property>
+               <property name="meta.media.0.stream.type">video</property>
+               <property name="meta.media.0.stream.frame_rate">24,000000</property>
+               <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+               <property name="meta.media.0.codec.frame_rate">24,000000</property>
+               <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+               <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+               <property name="meta.media.0.codec.colorspace">601</property>
+               <property name="meta.media.0.codec.name">vp8</property>
+               <property name="meta.media.0.codec.long_name">On2 VP8</property>
+               <property name="meta.media.0.codec.bit_rate">0</property>
+               <property name="meta.attr.0.stream.language.markup">eng</property>
+               <property name="meta.attr.0.stream.title.markup">Video</property>
+               <property name="meta.media.1.stream.type">audio</property>
+               <property name="meta.media.1.codec.sample_fmt">s16</property>
+               <property name="meta.media.1.codec.sample_rate">48000</property>
+               <property name="meta.media.1.codec.channels">2</property>
+               <property name="meta.media.1.codec.name">vorbis</property>
+               <property name="meta.media.1.codec.long_name">Vorbis</property>
+               <property name="meta.media.1.codec.bit_rate">0</property>
+               <property name="meta.attr.1.stream.language.markup">eng</property>
+               <property name="meta.attr.1.stream.title.markup">Audio</property>
+               <property name="seekable">1</property>
+               <property name="meta.media.sample_aspect_num">1</property>
+               <property name="meta.media.sample_aspect_den">1</property>
+               <property name="aspect_ratio">1,000000</property>
+               <property name="audio_index">1</property>
+               <property name="video_index">-1</property>
+               <property name="mlt_service">avformat</property>
+       </producer>
+       <playlist id="playlist2">
+               <blank length="1138" />
+               <entry out="85261" producer="2_2_audio" in="0">
+                       <filter out="85261" id="fadeout" in="85259">
+                               <property name="track">0</property>
+                               <property name="window">75</property>
+                               <property name="max_gain">20dB</property>
+                               <property name="mlt_type">filter</property>
+                               <property name="mlt_service">volume</property>
+                               <property name="kdenlive_id">fadeout</property>
+                               <property name="tag">volume</property>
+                               <property name="kdenlive_ix">1</property>
+                               <property name="gain">1</property>
+                               <property name="end">0</property>
+                       </filter>
+               </entry>
+               <entry out="321690" producer="2_3_audio" in="85323">
+                       <filter out="85325" id="fadein" in="85323">
+                               <property name="track">0</property>
+                               <property name="window">75</property>
+                               <property name="max_gain">20dB</property>
+                               <property name="mlt_type">filter</property>
+                               <property name="mlt_service">volume</property>
+                               <property name="kdenlive_id">fadein</property>
+                               <property name="tag">volume</property>
+                               <property name="kdenlive_ix">1</property>
+                               <property name="gain">0</property>
+                               <property name="end">1</property>
+                       </filter>
+               </entry>
+       </playlist>
+       <playlist id="playlist3" />
+       <playlist id="playlist4" />
+       <producer out="321690" id="2_video" in="0">
+               <property name="mlt_type">producer</property>
+               <property name="length">321691</property>
+               <property name="eof">pause</property>
+               <property name="resource">/home/pre-barreau/kdenlive/Droit privé internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm</property>
+               <property name="meta.media.nb_streams">2</property>
+               <property name="meta.media.0.stream.type">video</property>
+               <property name="meta.media.0.stream.frame_rate">24,000000</property>
+               <property name="meta.media.0.stream.sample_aspect_ratio">1,000000</property>
+               <property name="meta.media.0.codec.frame_rate">24,000000</property>
+               <property name="meta.media.0.codec.pix_fmt">yuv420p</property>
+               <property name="meta.media.0.codec.sample_aspect_ratio">0,000000</property>
+               <property name="meta.media.0.codec.colorspace">601</property>
+               <property name="meta.media.0.codec.name">vp8</property>
+               <property name="meta.media.0.codec.long_name">On2 VP8</property>
+               <property name="meta.media.0.codec.bit_rate">0</property>
+               <property name="meta.attr.0.stream.language.markup">eng</property>
+               <property name="meta.attr.0.stream.title.markup">Video</property>
+               <property name="meta.media.1.stream.type">audio</property>
+               <property name="meta.media.1.codec.sample_fmt">s16</property>
+               <property name="meta.media.1.codec.sample_rate">48000</property>
+               <property name="meta.media.1.codec.channels">2</property>
+               <property name="meta.media.1.codec.name">vorbis</property>
+               <property name="meta.media.1.codec.long_name">Vorbis</property>
+               <property name="meta.media.1.codec.bit_rate">0</property>
+               <property name="meta.attr.1.stream.language.markup">eng</property>
+               <property name="meta.attr.1.stream.title.markup">Audio</property>
+               <property name="seekable">1</property>
+               <property name="meta.media.sample_aspect_num">1</property>
+               <property name="meta.media.sample_aspect_den">1</property>
+               <property name="aspect_ratio">1,000000</property>
+               <property name="audio_index">-1</property>
+               <property name="video_index">0</property>
+               <property name="mlt_service">avformat</property>
+               <property name="meta.media.frame_rate_num">24</property>
+               <property name="meta.media.frame_rate_den">1</property>
+               <property name="source_fps">24,000000</property>
+               <property name="meta.media.colorspace">601</property>
+               <property name="meta.media.width">640</property>
+               <property name="meta.media.height">360</property>
+               <property name="meta.media.top_field_first">0</property>
+               <property name="meta.media.progressive">1</property>
+       </producer>
+       <playlist id="playlist5">
+               <blank length="1138" />
+               <entry out="85261" producer="2_video" in="0">
+                       <filter out="85261" id="fade_to_black" in="85259">
+                               <property name="track">0</property>
+                               <property name="start">1</property>
+                               <property name="mlt_type">filter</property>
+                               <property name="mlt_service">brightness</property>
+                               <property name="kdenlive_id">fade_to_black</property>
+                               <property name="tag">brightness</property>
+                               <property name="kdenlive_ix">1</property>
+                               <property name="end">0</property>
+                       </filter>
+               </entry>
+               <entry out="321690" producer="2_video" in="85323">
+                       <filter out="85325" id="fade_from_black" in="85323">
+                               <property name="track">0</property>
+                               <property name="start">0</property>
+                               <property name="mlt_type">filter</property>
+                               <property name="mlt_service">brightness</property>
+                               <property name="kdenlive_id">fade_from_black</property>
+                               <property name="tag">brightness</property>
+                               <property name="kdenlive_ix">1</property>
+                               <property name="end">1</property>
+                       </filter>
+               </entry>
+       </playlist>
+       <tractor out="322767" global_feed="1" in="0" id="maintractor" title="Anonymous Submission">
+               <property name="meta.volume">1,000000</property>
+               <track producer="black_track" />
+               <track hide="video" producer="playlist1" />
+               <track hide="video" producer="playlist2" />
+               <track producer="playlist3" />
+               <track producer="playlist4" />
+               <track producer="playlist5" />
+               <transition out="0" id="transition0" in="0">
+                       <property name="a_track">1</property>
+                       <property name="b_track">2</property>
+                       <property name="mlt_type">transition</property>
+                       <property name="mlt_service">mix</property>
+                       <property name="always_active">1</property>
+                       <property name="combine">1</property>
+                       <property name="internal_added">237</property>
+               </transition>
+               <transition out="0" id="transition1" in="0">
+                       <property name="a_track">1</property>
+                       <property name="b_track">3</property>
+                       <property name="mlt_type">transition</property>
+                       <property name="mlt_service">mix</property>
+                       <property name="always_active">1</property>
+                       <property name="combine">1</property>
+                       <property name="internal_added">237</property>
+               </transition>
+               <transition out="0" id="transition2" in="0">
+                       <property name="a_track">1</property>
+                       <property name="b_track">4</property>
+                       <property name="mlt_type">transition</property>
+                       <property name="mlt_service">mix</property>
+                       <property name="always_active">1</property>
+                       <property name="combine">1</property>
+                       <property name="internal_added">237</property>
+               </transition>
+               <transition out="0" id="transition3" in="0">
+                       <property name="a_track">1</property>
+                       <property name="b_track">5</property>
+                       <property name="mlt_type">transition</property>
+                       <property name="mlt_service">mix</property>
+                       <property name="always_active">1</property>
+                       <property name="combine">1</property>
+                       <property name="internal_added">237</property>
+               </transition>
+       </tractor>
+       <kdenlivedoc profile="/home/pre-barreau/.kde/share/apps/kdenlive/profiles/customprofile0" projectfolder="/home/pre-barreau/kdenlive" version="0,85" kdenliveversion="0.8">
+               <customeffects />
+               <documentproperties position="86442" zonein="0" enableproxy="0" proxyparams="-f mpegts -acodec libmp3lame -ac 2 -ab 92k -ar 48000 -vcodec mpeg2video -g 5 -deinterlace -s 480x270 -b 150k" proxyminsize="1000" zoom="3" generateimageproxy="0" proxyextension="ts" proxyimageminsize="2000" verticalzoom="1" zoneout="100" generateproxy="0" />
+               <documentnotes />
+               <profileinfo sample_aspect_den="1" display_aspect_num="16" description="HD 360p 24 fps" progressive="1" display_aspect_den="9" frame_rate_num="24" sample_aspect_num="1" height="360" width="640" frame_rate_den="1" />
+               <tracksinfo>
+                       <trackinfo blind="1" type="audio" locked="0" trackname="Audio 2" mute="0" />
+                       <trackinfo blind="1" type="audio" locked="0" trackname="Audio 1" mute="0" />
+                       <trackinfo blind="0" locked="0" trackname="Video 3" mute="0" />
+                       <trackinfo blind="0" locked="0" trackname="Video 2" mute="0" />
+                       <trackinfo blind="0" locked="0" trackname="Video 1" mute="0" />
+               </tracksinfo>
+               <kdenlive_producer pix_fmt="yuv420p" channels="2" videocodec="On2 VP8" audio_max="1" name="crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm" default_video="0" colorspace="601" default_audio="1" file_hash="78149b6acdabd39af1ab52ea72b5b24a" aspect_ratio="1,000000" frequency="48000" file_size="729776788" fps="24" frame_size="640x360" duration="321691" resource="/home/pre-barreau/kdenlive/Droit priv&#233; internationnal/DIP_Brute/crfpa-droit-international-prive-cours-08_07_12-13-06-55.webm" type="3" id="2" audiocodec="Vorbis" video_max="0" />
+               <markers />
+               <guides>
+                       <guide comment="01:00:00:00" time="3600" />
+               </guides>
+               <groups>
+                       <group>
+                               <clipitem track="3" position="86400" />
+                               <clipitem track="0" position="86400" />
+                       </group>
+                       <group>
+                               <clipitem track="3" position="1138" />
+                               <clipitem track="0" position="1138" />
+                       </group>
+               </groups>
+       </kdenlivedoc>
+</mlt>
diff --git a/kdenlive/fade.py b/kdenlive/fade.py
new file mode 100644 (file)
index 0000000..ab53fce
--- /dev/null
@@ -0,0 +1,189 @@
+# -*- coding: utf-8 -*-
+#
+# Copyright (c) 2012-2013 Guillaume Pellerin <yomguy@parisson.com>
+
+# This file is part of TimeSide.
+
+# TimeSide is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+
+# TimeSide is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with TimeSide.  If not, see <http://www.gnu.org/licenses/>.
+
+# Author: Guillaume Pellerin <yomguy@parisson.com>
+
+
+from xmltodict2 import *
+
+
+class KdenliveAutoFade(object):
+
+    def __init__(self):
+        self.n_frames = 2
+        self.audio_count = 0
+        self.video_count = 0
+
+    def audio_fade_in(self, frame_out):
+        child = {'attributes': {u'id': u'fadeout',
+        u'in': unicode(int(frame_out)-self.n_frames),
+        u'out': unicode(frame_out)},
+       'children': [{'attributes': {u'name': u'track'},
+         'cdata': '0',
+         'name': 'property'},
+        {'attributes': {u'name': u'window'},
+         'cdata': '75',
+         'name': 'property'},
+        {'attributes': {u'name': u'max_gain'},
+         'cdata': '20dB',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_type'},
+         'cdata': 'filter',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_service'},
+         'cdata': 'volume',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_id'},
+         'cdata': 'fadeout',
+         'name': 'property'},
+        {'attributes': {u'name': u'tag'},
+         'cdata': 'volume',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_ix'},
+         'cdata': '1',
+         'name': 'property'},
+        {'attributes': {u'name': u'gain'}, 'cdata': '1', 'name': 'property'},
+        {'attributes': {u'name': u'end'}, 'cdata': '0', 'name': 'property'}],
+       'name': 'filter'}
+
+        return child
+
+    def audio_fade_out(self, frame_in):
+        child = {'attributes': {u'id': u'fadein',
+        u'in': unicode(frame_in),
+        u'out': unicode(int(frame_in)+self.n_frames)},
+       'children': [{'attributes': {u'name': u'track'},
+         'cdata': '0',
+         'name': 'property'},
+        {'attributes': {u'name': u'window'},
+         'cdata': '75',
+         'name': 'property'},
+        {'attributes': {u'name': u'max_gain'},
+         'cdata': '20dB',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_type'},
+         'cdata': 'filter',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_service'},
+         'cdata': 'volume',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_id'},
+         'cdata': 'fadein',
+         'name': 'property'},
+        {'attributes': {u'name': u'tag'},
+         'cdata': 'volume',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_ix'},
+         'cdata': '1',
+         'name': 'property'},
+        {'attributes': {u'name': u'gain'}, 'cdata': '0', 'name': 'property'},
+        {'attributes': {u'name': u'end'}, 'cdata': '1', 'name': 'property'}],
+       'name': 'filter'}
+
+        return child
+
+
+    def video_fade_in(self, frame_out):
+        child = {'attributes': {u'id': u'fade_to_black',
+        u'in': unicode(int(frame_out)-self.n_frames),
+        u'out': unicode(frame_out)},
+       'children': [{'attributes': {u'name': u'track'},
+         'cdata': '0',
+         'name': 'property'},
+        {'attributes': {u'name': u'start'}, 'cdata': '1', 'name': 'property'},
+        {'attributes': {u'name': u'mlt_type'},
+         'cdata': 'filter',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_service'},
+         'cdata': 'brightness',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_id'},
+         'cdata': 'fade_to_black',
+         'name': 'property'},
+        {'attributes': {u'name': u'tag'},
+         'cdata': 'brightness',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_ix'},
+         'cdata': '1',
+         'name': 'property'},
+        {'attributes': {u'name': u'end'}, 'cdata': '0', 'name': 'property'}],
+       'name': 'filter'}
+
+        return child
+
+
+    def video_fade_out(self, frame_in):
+        child = {'attributes': {u'id': u'fade_from_black',
+        u'in': unicode(frame_in),
+        u'out': unicode(int(frame_in)+self.n_frames)},
+       'children': [{'attributes': {u'name': u'track'},
+         'cdata': '0',
+         'name': 'property'},
+        {'attributes': {u'name': u'start'}, 'cdata': '0', 'name': 'property'},
+        {'attributes': {u'name': u'mlt_type'},
+         'cdata': 'filter',
+         'name': 'property'},
+        {'attributes': {u'name': u'mlt_service'},
+         'cdata': 'brightness',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_id'},
+         'cdata': 'fade_from_black',
+         'name': 'property'},
+        {'attributes': {u'name': u'tag'},
+         'cdata': 'brightness',
+         'name': 'property'},
+        {'attributes': {u'name': u'kdenlive_ix'},
+         'cdata': '1',
+         'name': 'property'},
+        {'attributes': {u'name': u'end'}, 'cdata': '1', 'name': 'property'}],
+       'name': 'filter'}
+
+        return child
+
+    def run(self, path_in, path_out):
+        d = xmltodict(path_in)
+        for attr in d['children']:
+            if 'playlist' in attr['name'] and 'children' in attr:
+                for att in attr['children']:
+                    if 'producer' in att['attributes']:
+                        producer = att['attributes']['producer']
+                        if producer != 'black':
+                            frame_in = att['attributes']['in']
+                            frame_out = att['attributes']['out']
+
+                            if 'audio' in producer:
+                                if not self.audio_count % 2:
+                                    att['children'] = [self.audio_fade_in(frame_out)]
+                                else:
+                                    att['children'] = [self.audio_fade_out(frame_in)]
+                                self.audio_count =+ 1
+
+                            if 'video' in producer:
+                                if not self.video_count % 2:
+                                    att['children'] = [self.video_fade_in(frame_out)]
+                                else:
+                                    att['children'] = [self.video_fade_out(frame_in)]
+                                self.video_count =+ 1
+
+        data = dicttoxml(d)
+        f = open(path_out, 'w')
+        f.write(data.encode('utf-8'))
+        f.close()
+
+
diff --git a/kdenlive/fade.pyc b/kdenlive/fade.pyc
new file mode 100644 (file)
index 0000000..66cb751
Binary files /dev/null and b/kdenlive/fade.pyc differ
diff --git a/kdenlive/xmltodict2.py b/kdenlive/xmltodict2.py
new file mode 100644 (file)
index 0000000..35f7ab1
--- /dev/null
@@ -0,0 +1,398 @@
+# -*- coding: utf-8 -*-
+""" xmltodict(): convert xml into tree of Python dicts.
+
+This was copied and modified from John Bair's recipe at aspn.activestate.com:
+       http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/149368
+"""
+import os
+import string
+import locale
+from xml.parsers import expat
+
+# If we're in Dabo, get the default encoding.
+#import dabo
+#import dabo.lib.DesignerUtils as desUtil
+#from dabo.dLocalize import _
+#from dabo.lib.utils import resolvePath
+#app = dabo.dAppRef
+#if app is not None:
+       #default_encoding = app.Encoding
+#else:
+               #enc = locale.getlocale()[1]
+               #if enc is None:
+                       #enc = dabo.defaultEncoding
+               #default_encoding = enc
+
+# Python seems to need to compile code with \n linesep:
+code_linesep = "\n"
+eol = os.linesep
+default_encoding = 'utf-8'
+default_decoding = 'utf-8'
+
+class Xml2Obj:
+       """XML to Object"""
+       def __init__(self):
+               self.root = None
+               self.nodeStack = []
+               self.attsToSkip = []
+               self._inCode = False
+               self._mthdName = ""
+               self._mthdCode = ""
+               self._codeDict = None
+               self._inProp = False
+               self._propName = ""
+               self._propData = ""
+               self._propDict = None
+               self._currPropAtt = ""
+               self._currPropDict = None
+
+
+       def StartElement(self, name, attributes):
+               """SAX start element even handler"""
+               if name == "code":
+                       # This is code for the parent element
+                       self._inCode = True
+                       parent = self.nodeStack[-1]
+                       if not parent.has_key("code"):
+                               parent["code"] = {}
+                               self._codeDict = parent["code"]
+
+               elif name == "properties":
+                       # These are the custom property definitions
+                       self._inProp = True
+                       self._propName = ""
+                       self._propData = ""
+                       parent = self.nodeStack[-1]
+                       if not parent.has_key("properties"):
+                               parent["properties"] = {}
+                               self._propDict = parent["properties"]
+
+               else:
+                       if self._inCode:
+                               self._mthdName = name.encode()
+                       elif self._inProp:
+                               if self._propName:
+                                       # In the middle of a prop definition
+                                       self._currPropAtt = name.encode()
+                               else:
+                                       self._propName = name.encode()
+                                       self._currPropDict = {}
+                                       self._currPropAtt = ""
+                       else:
+                               element = {"name": name.encode()}
+                               if len(attributes) > 0:
+                                       for att in self.attsToSkip:
+                                               if attributes.has_key(att):
+                                                       del attributes[att]
+                                       element["attributes"] = attributes
+
+                               # Push element onto the stack and make it a child of parent
+                               if len(self.nodeStack) > 0:
+                                       parent = self.nodeStack[-1]
+                                       if not parent.has_key("children"):
+                                               parent["children"] = []
+                                       parent["children"].append(element)
+                               else:
+                                       self.root = element
+                               self.nodeStack.append(element)
+
+
+       def EndElement(self, name):
+               """SAX end element event handler"""
+               if self._inCode:
+                       if name == "code":
+                               self._inCode = False
+                               self._codeDict = None
+                       else:
+                               # End of an individual method
+                               mth = self._mthdCode.strip()
+                               if not mth.endswith("\n"):
+                                       mth += "\n"
+                               self._codeDict[self._mthdName] = mth
+                               self._mthdName = ""
+                               self._mthdCode = ""
+               elif self._inProp:
+                       if name == "properties":
+                               self._inProp = False
+                               self._propDict = None
+                       elif name == self._propName:
+                               # End of an individual prop definition
+                               self._propDict[self._propName] = self._currPropDict
+                               self._propName = ""
+                       else:
+                               # end of a property attribute
+                               self._currPropDict[self._currPropAtt] = self._propData
+                               self._propData = self._currPropAtt = ""
+               else:
+                       self.nodeStack = self.nodeStack[:-1]
+
+
+       def CharacterData(self, data):
+               """SAX character data event handler"""
+               if self._inCode or data.strip():
+                       data = data.replace("&lt;", "<")
+                       data = data.encode(default_encoding)
+                       if self._inCode:
+                               if self._mthdCode:
+                                       self._mthdCode += data
+                               else:
+                                       self._mthdCode = data
+                       elif self._inProp:
+                               self._propData += data
+                       else:
+                               element = self.nodeStack[-1]
+                               if not element.has_key("cdata"):
+                                       element["cdata"] = ""
+                               element["cdata"] += data
+
+
+       def Parse(self, xml):
+               # Create a SAX parser
+               Parser = expat.ParserCreate(default_encoding)
+               # SAX event handlers
+               Parser.StartElementHandler = self.StartElement
+               Parser.EndElementHandler = self.EndElement
+               Parser.CharacterDataHandler = self.CharacterData
+               # Parse the XML File
+               ParserStatus = Parser.Parse(xml, 1)
+               return self.root
+
+
+       def ParseFromFile(self, filename):
+               return self.Parse(open(filename,"r").read())
+
+
+def xmltodict(xml, attsToSkip=[], addCodeFile=False):
+       """Given an xml string or file, return a Python dictionary."""
+       parser = Xml2Obj()
+       parser.attsToSkip = attsToSkip
+       isPath = os.path.exists(xml)
+       errmsg = ""
+       if eol not in xml and isPath:
+               # argument was a file
+               try:
+                       ret = parser.ParseFromFile(xml)
+               except expat.ExpatError, e:
+                       errmsg = _("The XML in '%s' is not well-formed and cannot be parsed: %s") % (xml, e)
+       else:
+               # argument must have been raw xml:
+               if not xml.strip().startswith("<?xml "):
+                       # it's a bad file name
+                       errmsg = _("The file '%s' could not be found") % xml
+               else:
+                       try:
+                               ret = parser.Parse(xml)
+                       except expat.ExpatError:
+                               errmsg = _("An invalid XML string was encountered")
+       if errmsg:
+               raise dabo.dException.XmlException, errmsg
+       if addCodeFile and isPath:
+               # Get the associated code file, if any
+               codePth = "%s-code.py" % os.path.splitext(xml)[0]
+               if os.path.exists(codePth):
+                       try:
+                               codeDict = desUtil.parseCodeFile(open(codePth).read())
+                               desUtil.addCodeToClassDict(ret, codeDict)
+                       except StandardError, e:
+                               print "Failed to parse code file:", e
+       return ret
+
+
+def escQuote(val, noEscape=False, noQuote=False):
+       """Add surrounding quotes to the string, and escape
+       any illegal XML characters.
+       """
+       if not isinstance(val, basestring):
+               val = str(val)
+       if not isinstance(val, unicode):
+               val = unicode(val, default_encoding)
+       if noQuote:
+               qt = ''
+       else:
+               qt = '"'
+       slsh = "\\"
+#      val = val.replace(slsh, slsh+slsh)
+       if not noEscape:
+               # First escape internal ampersands. We need to double them up due to a
+               # quirk in wxPython and the way it displays this character.
+               val = val.replace("&", "&amp;&amp;")
+               # Escape any internal quotes
+               val = val.replace('"', '&quot;').replace("'", "&apos;")
+               # Escape any high-order characters
+               chars = []
+               for pos, char in enumerate(list(val)):
+                       if ord(char) > 127:
+                               chars.append("&#%s;" % ord(char))
+                       else:
+                                       chars.append(char)
+               val = "".join(chars)
+       val = val.replace("<", "&#060;").replace(">", "&#062;")
+       return "%s%s%s" % (qt, val, qt)
+
+
+def dicttoxml(dct, level=0, header=None, linesep=None):
+       """Given a Python dictionary, return an xml string.
+
+       The dictionary must be in the format returned by dicttoxml(), with keys
+       on "attributes", "code", "cdata", "name", and "children".
+
+       Send your own XML header, otherwise a default one will be used.
+
+       The linesep argument is a dictionary, with keys on levels, allowing the
+       developer to add extra whitespace depending on the level.
+       """
+       att = ""
+       ret = ""
+
+       if dct.has_key("attributes"):
+               for key, val in dct["attributes"].items():
+                       # Some keys are already handled.
+                       noEscape = key in ("sizerInfo",)
+                       val = escQuote(val, noEscape)
+                       att += " %s=%s" % (key, val)
+       ret += "%s<%s%s" % ("\t" * level, dct["name"], att)
+
+       if (not dct.has_key("cdata") and not dct.has_key("children")
+                       and not dct.has_key("code") and not dct.has_key("properties")):
+               ret += " />%s" % eol
+       else:
+               ret += ">"
+               if dct.has_key("cdata"):
+                       ret += "%s" % dct["cdata"].decode(default_encoding).replace("<", "&lt;")
+
+               if dct.has_key("code"):
+                       if len(dct["code"].keys()):
+                               ret += "%s%s<code>%s" % (eol, "\t" * (level+1), eol)
+                               methodTab = "\t" * (level+2)
+                               for mthd, cd in dct["code"].items():
+                                       # Convert \n's in the code to eol:
+                                       cd = eol.join(cd.splitlines())
+
+                                       # Make sure that the code ends with a linefeed
+                                       if not cd.endswith(eol):
+                                               cd += eol
+
+                                       ret += "%s<%s><![CDATA[%s%s]]>%s%s</%s>%s" % (methodTab,
+                                                       mthd, eol, cd, eol,
+                                                       methodTab, mthd, eol)
+                               ret += "%s</code>%s"    % ("\t" * (level+1), eol)
+
+               if dct.has_key("properties"):
+                       if len(dct["properties"].keys()):
+                               ret += "%s%s<properties>%s" % (eol, "\t" * (level+1), eol)
+                               currTab = "\t" * (level+2)
+                               for prop, val in dct["properties"].items():
+                                       ret += "%s<%s>%s" % (currTab, prop, eol)
+                                       for propItm, itmVal in val.items():
+                                               itmTab = "\t" * (level+3)
+                                               ret += "%s<%s>%s</%s>%s" % (itmTab, propItm, itmVal,
+                                                               propItm, eol)
+                                       ret += "%s</%s>%s" % (currTab, prop, eol)
+                               ret += "%s</properties>%s"      % ("\t" * (level+1), eol)
+
+               if dct.has_key("children") and len(dct["children"]) > 0:
+                       ret += eol
+                       for child in dct["children"]:
+                               ret += dicttoxml(child, level+1, linesep=linesep)
+               indnt = ""
+               if ret.endswith(eol):
+                       # Indent the closing tag
+                       indnt = ("\t" * level)
+               ret += "%s</%s>%s" % (indnt, dct["name"], eol)
+
+               if linesep:
+                       ret += linesep.get(level, "")
+
+       if level == 0:
+               if header is None:
+                       header = '<?xml version="1.0" encoding="%s" standalone="no"?>%s' \
+                                       % (default_encoding, eol)
+               ret = header + ret
+
+       return ret
+
+
+def flattenClassDict(cd, retDict=None):
+       """Given a dict containing a series of nested objects such as would
+       be created by restoring from a cdxml file, returns a dict with all classIDs
+       as keys, and a dict as the corresponding value. The dict value will have
+       keys for the attributes and/or code, depending on what was in the original
+       dict. The end result is to take a nested dict structure and return a flattened
+       dict with all objects at the top level.
+       """
+       if retDict is None:
+               retDict = {}
+       atts = cd.get("attributes", {})
+       props = cd.get("properties", {})
+       kids = cd.get("children", [])
+       code = cd.get("code", {})
+       classID = atts.get("classID", "")
+       classFile = resolvePath(atts.get("designerClass", ""))
+       superclass = resolvePath(atts.get("superclass", ""))
+       superclassID = atts.get("superclassID", "")
+       if superclassID and os.path.exists(superclass):
+               # Get the superclass info
+               superCD = xmltodict(superclass, addCodeFile=True)
+               flattenClassDict(superCD, retDict)
+       if classID:
+               if os.path.exists(classFile):
+                       # Get the class info
+                       classCD = xmltodict(classFile, addCodeFile=True)
+                       classAtts = classCD.get("attributes", {})
+                       classProps = classCD.get("properties", {})
+                       classCode = classCD.get("code", {})
+                       classKids = classCD.get("children", [])
+                       currDict = retDict.get(classID, {})
+                       retDict[classID] = {"attributes": classAtts, "code": classCode,
+                                       "properties": classProps}
+                       retDict[classID].update(currDict)
+                       # Now update the child objects in the dict
+                       for kid in classKids:
+                               flattenClassDict(kid, retDict)
+               else:
+                       # Not a file; most likely just a component in another class
+                       currDict = retDict.get(classID, {})
+                       retDict[classID] = {"attributes": atts, "code": code,
+                                       "properties": props}
+                       retDict[classID].update(currDict)
+       if kids:
+               for kid in kids:
+                       flattenClassDict(kid, retDict)
+       return retDict
+
+
+def addInheritedInfo(src, super, updateCode=False):
+       """Called recursively on the class container structure, modifying
+       the attributes to incorporate superclass information. When the
+       'updateCode' parameter is True, superclass code is added to the
+       object's code
+       """
+       atts = src.get("attributes", {})
+       props = src.get("properties", {})
+       kids = src.get("children", [])
+       code = src.get("code", {})
+       classID = atts.get("classID", "")
+       if classID:
+               superInfo = super.get(classID, {"attributes": {}, "code": {}, "properties": {}})
+               src["attributes"] = superInfo["attributes"].copy()
+               src["attributes"].update(atts)
+               src["properties"] = superInfo.get("properties", {}).copy()
+               src["properties"].update(props)
+               if updateCode:
+                       src["code"] = superInfo["code"].copy()
+                       src["code"].update(code)
+       if kids:
+               for kid in kids:
+                       addInheritedInfo(kid, super, updateCode)
+
+
+
+#if __name__ == "__main__":
+       #test_dict = {"name": "test", "attributes":{"path": "c:\\temp\\name",
+                       #"problemChars": "Welcome to <Jos\xc3\xa9's \ Stuff!>\xc2\xae".decode("latin-1")}}
+       #print "test_dict:", test_dict
+       #xml = dicttoxml(test_dict)
+       #print "xml:", xml
+       #test_dict2 = xmltodict(xml)
+       #print "test_dict2:", test_dict2
+       #print "same?:", test_dict == test_dict2
diff --git a/kdenlive/xmltodict2.pyc b/kdenlive/xmltodict2.pyc
new file mode 100644 (file)
index 0000000..20f0bd5
Binary files /dev/null and b/kdenlive/xmltodict2.pyc differ