Period is a decimal separator in some locales.
write to a stream/file. The "SDL" consumer is the popular Simple DirectMedia
Layer audio and video output. The "xml" consumer generates an XML
representation of the service network. That can be played directly due to the
-XML producer plugin. See docs/mlt-xml.txt for more information. The
-"MainConcept DV" consumer refers to the proprietary MLT plugin required to
-use MLT with MainConcept DV, DVCPro, and MPEG codecs. "/dev/dv1394/0" refers
-to a device file for transmitting DV over FireWire using the Linux dv1394 kernel
-module. The "BlueFish444" consumer is another proprietary plugin to use
-the BlueFish444 manufactured SDI video/audio output cards with MLT.
+XML producer plugin. See docs/mlt-xml.txt for more information. "/dev/dv1394/0"
+refers to a device file for transmitting DV over FireWire using the Linux
+dv1394 kernel module.
+
+These examples assume the numeric locale LC_NUMERIC decimal separator is a
+period. Therefore, the demo script sets LC_NUMERIC=C for you, but if you are
+running these manually or learning from them, remember to use the appropriate
+separator for your locale.
+
And now the demos...
#!/bin/bash
export MLT_PROFILE=dv_pal
+export LC_NUMERIC=C
function show_consumers( )
{
if [ "$MLT_CONSUMER" == "xml:" ]
then export XML_CONSUMER="xml:$demo.mlt"
bash $demo -consumer $XML_CONSUMER
- melt +$demo.txt out=100 $demo.mlt $demo.mlt -filter watermark:watermark1.png composite.fill=1 composite.geometry=85%,5%:10%x10%
+ melt +$demo.txt out=100 $demo.mlt $demo.mlt -filter watermark:watermark1.png composite.fill=1 composite.geometry=85%/5%:10%x10%
elif [ "$MLT_CONSUMER" == "xml" ]
then bash $demo -consumer $MLT_CONSUMER | less
else bash $demo -consumer $MLT_CONSUMER
clip3.dv \
-filter \
watermark:clip1.dv \
-composite.start=10%,10%:20%x20% \
-composite.key[33]=30%,70%:25%x25% \
-composite.key[66]=70%,30%:15%x15% \
-composite.end=70%,70%:20%x20% \
+composite.start=10%/10%:20%x20% \
+composite.key[33]=30%/70%:25%x25% \
+composite.key[66]=70%/30%:15%x15% \
+composite.end=70%/70%:20%x20% \
composite.out=100 \
$*
clip1.dv \
-transition \
region:circle \
-composite.geometry="10%,10%:20%x20%;33=30%,70%:25%x25%;66=70%,30%:15%x15%;-1=70%,70%:20%x20%" \
+composite.geometry="10%,10%:20%x20%;33=30%/70%:25%x25%;66=70%/30%:15%x15%;-1=70%/70%:20%x20%" \
composite.out=100 \
composite.softness=0.1 \
a_track=0 \
clip1.dv out=74 \
-track \
-blank 49 clip2.mpeg \
--transition composite:57%,10%:33%x33% end=0%,0%:100%x100% progressive=1 distort=true in=50 out=74 a_track=0 b_track=1 \
+-transition composite:57%/10%:33%x33% end=0%/0%:100%x100% progressive=1 distort=true in=50 out=74 a_track=0 b_track=1 \
-transition mix:-1 in=50 out=74 a_track=0 b_track=1 \
$*
"+My name is Inigo Montoya.txt" out=99 -blank 49 "+Prepare to die!.txt" out=99 \
-track \
-blank 74 "+You killed my father.txt" out=74 \
--transition composite:50%,20%:5%x4% end=10%,20%:80%x12% distort=1 halign=centre valign=centre in=0 out=99 a_track=0 b_track=1 \
--transition composite:0%,70%:100%x10% end=100%,70%:100%x10% in=75 out=149 a_track=0 b_track=2 \
--transition composite:25%,25%:50%x50%! in=150 out=249 a_track=0 b_track=1 \
+-transition composite:50%/20%:5%x4% end=10%/20%:80%x12% distort=1 halign=centre valign=centre in=0 out=99 a_track=0 b_track=1 \
+-transition composite:0%/70%:100%x10% end=100%/70%:100%x10% in=75 out=149 a_track=0 b_track=2 \
+-transition composite:25%/25%:50%x50%! in=150 out=249 a_track=0 b_track=1 \
$*
pango: text=" Breaking News
MLT Rocks the World" bgcolour=0xff000080 out=349 \
-transition mix:0.5 always_active=1 a_track=0 b_track=2 \
--transition composite geometry=50%,15%:37.5%x40% a_track=0 b_track=1 in=0 out=174 \
--transition composite geometry=10%,15%:37.5%x40% a_track=0 b_track=2 in=0 out=199 \
--transition composite geometry="50%,15%:37.5%x40%;-1=0%,0%:100%x100%" a_track=0 b_track=1 in=175 out=199 distort=1 \
--transition composite geometry=10%,65%:90%x20% a_track=0 b_track=3 in=0 out=199 \
--transition composite geometry=10%,65%:90%x20% a_track=1 b_track=3 in=200 out=499 \
+-transition composite geometry=50%/15%:37.5%x40% a_track=0 b_track=1 in=0 out=174 \
+-transition composite geometry=10%/15%:37.5%x40% a_track=0 b_track=2 in=0 out=199 \
+-transition composite geometry="50%/15%:37.5%x40%;-1=0%/0%:100%x100%" a_track=0 b_track=1 in=175 out=199 distort=1 \
+-transition composite geometry=10%/65%:90%x20% a_track=0 b_track=3 in=0 out=199 \
+-transition composite geometry=10%/65%:90%x20% a_track=1 b_track=3 in=200 out=499 \
$*
melt \
clip2.mpeg \
--filter obscure:25%,25%:25%x25%:10x10 in=0 out=68 \
--filter region:circle.png filter=obscure composite.start=55%,25%:12%x50% in=68 out=200 \
+-filter obscure:25%/25%:25%x25%:10x10 in=0 out=68 \
+-filter region:circle.png filter=obscure composite.start=55%/25%:12%x50% in=68 out=200 \
$*
clip2.dv in=200 \
-transition \
composite in=50 out=75 a_track=0 b_track=1 \
-start=0,0:100%x100%:100 \
-end=100%,0:100%x100%:100 \
+start=0/0:100%x100%:100 \
+end=100%/0:100%x100%:100 \
-transition \
composite in=50 out=75 a_track=0 b_track=2 \
-start=-100%,0:100%x100%:100 \
-end=0,0:100%x100%:100 \
+start=-100%/0:100%x100%:100 \
+end=0/0:100%x100%:100 \
-transition \
mix:-1 in=50 out=75 a_track=1 b_track=2 \
$*
melt \
photos/.all.jpg ttl=75 \
-attach crop center=1 \
--attach affine transition.cycle=225 transition.geometry="0=0,0:100%x100%;74=-100,-100:120%x120%;75=-60,-60:110%x110%;149=0:0:110%x110%;150=0,-60:110%x110%;224=-60,0:110%x110%" \
+-attach affine transition.cycle=225 transition.geometry="0=0/0:100%x100%;74=-100/-100:120%x120%;75=-60/-60:110%x110%;149=0/0:110%x110%;150=0/-60:110%x110%;224=-60/0:110%x110%" \
-filter luma cycle=75 duration=25 \
-track music1.ogg \
-transition mix \
melt photos/.all.jpg ttl=100 \
--filter watermark:colour:black reverse=1 composite.geometry="15%,15%:10%,10%;0.1625=0,0:100%x100%;-.1625=;-1=70%,70%:10%x10%" composite.mirror_off=1 composite.cycle=100 composite.fill=1 composite.valign=c composite.halign=c \
+-filter watermark:colour:black reverse=1 composite.geometry="15%/15%:10%/10%;0.1625=0/0:100%x100%;-.1625=;-1=70%/70%:10%x10%" composite.mirror_off=1 composite.cycle=100 composite.fill=1 composite.valign=c composite.halign=c \
$*
-track \
-blank 99 colour:black out=49 -blank 99 colour:black out=49 -blank 99 colour:black out=49 \
-group progressive=1 distort=1 \
--transition composite geometry="0%,0%:100%x100%;25=50%,0%:5%x100%;-1=0%,0%:100%x100%" a_track=1 b_track=0 in=100 out=149 \
--transition composite geometry="0%,0%:100%x100%;25=0%,50%:100%x5%;-1=0%,0%:100%x100%" a_track=1 b_track=0 in=250 out=299 \
--transition composite geometry="0%,0%:100%x100%;25=100%,0%:5%x100%;-1=0%,0%:100%x100%" a_track=1 b_track=0 in=400 out=449 \
+-transition composite geometry="0%/0%:100%x100%;25=50%/0%:5%x100%;-1=0%/0%:100%x100%" a_track=1 b_track=0 in=100 out=149 \
+-transition composite geometry="0%/0%:100%x100%;25=0%/50%:100%x5%;-1=0%/0%:100%x100%" a_track=1 b_track=0 in=250 out=299 \
+-transition composite geometry="0%/0%:100%x100%;25=100%/0%:5%x100%;-1=0%/0%:100%x100%" a_track=1 b_track=0 in=400 out=449 \
$*
-track \
-blank 99 colour:black out=49 -blank 99 colour:black out=49 -blank 99 colour:black out=49 \
-group progressive=1 \
--transition composite:0%,0%:100%x100% key[25]=50%,0%:5%x100% end=0%,0%:100%x100% a_track=1 b_track=0 in=100 out=149 \
--transition composite:0%,0%:100%x100% key[25]=0%,50%:100%x5% end=0%,0%:100%x100% a_track=1 b_track=0 in=250 out=299 \
--transition composite:0%,0%:100%x100% key[25]=100%,0%:5%x100% end=0%,0%:100%x100% a_track=1 b_track=0 in=400 out=449 \
+-transition composite:0%/0%:100%x100% key[25]=50%/0%:5%x100% end=0%/0%:100%x100% a_track=1 b_track=0 in=100 out=149 \
+-transition composite:0%/0%:100%x100% key[25]=0%/50%:100%x5% end=0%/0%:100%x100% a_track=1 b_track=0 in=250 out=299 \
+-transition composite:0%/0%:100%x100% key[25]=100%/0%:5%x100% end=0%/0%:100%x100% a_track=1 b_track=0 in=400 out=449 \
$*
melt clip1.dv \
-track txtField.swf variables="title=My Title&subtitle=The Subtitle" out=120 \
--transition composite geometry="0,0:100%x100%:80%;100=0,0:100%x100%:80%;119=0,0:100%x100%:0" \
+-transition composite geometry="0/0:100%x100%:80%;100=0/0:100%x100%:80%;119=0/0:100%x100%:0" \
a_track=0 b_track=1 out=120 progressive=1 \
$*
out=299 \
-transition \
composite a_track=0 b_track=1 out=299 distort=1 \
-start=0,70%:100%x64:100 \
+start=0/70%:100%x64:100 \
-transition \
composite a_track=0 b_track=2 out=299 titles=1 \
-start=100%,70%:999%x20% \
-end=-299%,70%:999%x20% \
+start=100%/70%:999%x20% \
+end=-299%/70%:999%x20% \
$*
-track \
clip1.dv \
-transition \
- composite start=30%,20%:40%x60% \
+ composite start=30%/20%:40%x60% \
in=50 \
out=199 \
a_track=0 \
b_track=1 \
distort=1 \
-transition \
- composite:0%,75%:100%x20%:0 \
+ composite:0%/75%:100%x20%:0 \
in=50 \
out=199 \
a_track=2 \
b_track=0 \
- key[24]=0%,75%:100%x20%:100 \
- key[-25]=0%,75%:100%x20%:100 \
+ key[24]=0%/75%:100%x20%:100 \
+ key[-25]=0%/75%:100%x20%:100 \
luma=luma1.pgm \
- end=0%,75%:100%x20%:0 \
+ end=0%/75%:100%x20%:0 \
distort=1 \
$*
-track watermark1.png out=1000 \
-track clip3.dv \
-filter greyscale track=2 \
--transition composite:21%,11%:100%x100%:50 end=61%,41%:100%x100% out=99 a_track=3 b_track=1 \
--transition composite:20%,10%:100%x100% end=60%,40%:100%x100% out=99 a_track=3 b_track=0 \
--transition composite:85%,80%:10%x10%:30 out=1000 a_track=3 b_track=2 \
+-transition composite:21%/11%:100%x100%:50 end=61%/41%:100%x100% out=99 a_track=3 b_track=1 \
+-transition composite:20%/10%:100%x100% end=60%/40%:100%x100% out=99 a_track=3 b_track=0 \
+-transition composite:85%/80%:10%x10%:30 out=1000 a_track=3 b_track=2 \
$*
a_track=2 \
b_track=1 \
-transition \
- composite:0%,80%:100%x20% \
+ composite:0%/80%:100%x20% \
distort=1 \
in=100 \
out=299 \
clip2.dv out=1000 \
-track \
watermark1.png out=1000 \
--transition composite fill=1 in=0 out=1000 a_track=0 b_track=1 geometry=85%,5%:10%x10% \
+-transition composite fill=1 in=0 out=1000 a_track=0 b_track=1 geometry=85%/5%:10%x10% \
$*
<property name="fgcolour">0xffffddff</property>
<property name="bgcolour">0x8c101080</property>
<property name="pad">8</property>
- <property name="text"><![CDATA[Ã\8a¾úlÃ\89äºÃ\89Ã\92 qà ö»ÉÉ<
-HÃÃ\89à ~Ã\89Ã\92+à eôÒ`ò÷ +y«ÉKÉ §ÉÉWð~É]]></property>
+ <property name="text"><![CDATA[Ã\8a¾úlÃ\89äºÃ\89Ã\92 qà ö»ÉÉ<
+HÃÃ\89à ~Ã\89Ã\92+à eôÒ`ò÷ +y«ÉKÉ §ÉÉWð~É]]></property>
</producer>
<tractor>
<multitrack>
<property name="mlt_service">composite</property>
<property name="a_track">1</property>
<property name="b_track">0</property>
- <property name="start">-70%,65%:100%x35%:0</property>
- <property name="key[25]">0,65%:100%x35%:100</property>
- <property name="key[125]">0,65%:100%x35%:100</property>
- <property name="end">0,65%:100%x35%:0</property>
+ <property name="start">-70%/65%:100%x35%:0</property>
+ <property name="key[25]">0/65%:100%x35%:100</property>
+ <property name="key[125]">0/65%:100%x35%:100</property>
+ <property name="end">0/65%:100%x35%:0</property>
<property name="halign">centre</property>
<property name="valign">centre</property>
</transition>
mlt_multitrack multitrack = mlt_tractor_multitrack( tractor );
// Create a composite transition
- mlt_transition transition = mlt_factory_transition( "composite", "10%,10%:15%x15%" );
+ mlt_transition transition = mlt_factory_transition( "composite", "10%/10%:15%x15%" );
// Create track 0
mlt_producer track0 = create_playlist( argc, argv );
Initialisation Properties
- string start - in the format X,Y:WxH[:PWxPY]
+ string start - in the format X/Y:WxH[:PWxPY]
- PWxPY is the size of the averaging region in pixels.
- string end - in the format X,Y:WxH[:PWxPY]
+ string end - in the format X/Y:WxH[:PWxPY]
int in - in point
int out - out point
Deprecated Properties
- string start - a geometry specification as X,Y:WxH[!][:mix]
+ string start - a geometry specification as X/Y:WxH[!][:mix]
- X, Y, W, H are assumed to pixel units unless they
have the suffix '%'
- '!' is a shortcut to specify distort, see below.
- mix is always a 2 digit percentage, defaults to 100.
- - default is "85%,5%:10%x10%"
+ - default is "85%/5%:10%x10%"
string end - the ending size and position.
- string key[F] - X,Y:WxH[:mix] - set a key frame for geometry between
+ string key[F] - X/Y:WxH[:mix] - set a key frame for geometry between
the in and out. F is a frame number and can be
negative to make it relative to the out point.
}
// Parse the geometry specification for a given length and normalised width/height (-1 for default)
-// data is constructed as: [frame=]X,Y:WxH[:mix][;[frame=]X,Y:WxH[:mix]]*
+// data is constructed as: [frame=]X/Y:WxH[:mix][!][;[frame=]X/Y:WxH[:mix][!]]*
// and X, Y, W and H can have trailing % chars to indicate percentage of normalised size
+// Append a pair's value with ! to enable distort.
int mlt_geometry_parse( mlt_geometry self, char *data, int length, int nw, int nh )
{
int i = 0;
if ( item.f[0] )
sprintf( temp + strlen( temp ), "%.0f", item.x );
- strcat( temp, "," );
+ strcat( temp, "/" );
if ( item.f[1] )
sprintf( temp + strlen( temp ), "%.0f", item.y );
strcat( temp, ":" );
{
mlt_properties properties = MLT_FILTER_PROPERTIES( this );
this->process = filter_process;
- mlt_properties_set( properties, "start", arg != NULL ? arg : "0%,0%:100%x100%" );
+ mlt_properties_set( properties, "start", arg != NULL ? arg : "0%/0%:100%x100%" );
mlt_properties_set( properties, "end", "" );
}
return this;
this->process = composite_process;
// Default starting motion and zoom
- mlt_properties_set( properties, "start", arg != NULL ? arg : "0,0:100%x100%" );
+ mlt_properties_set( properties, "start", arg != NULL ? arg : "0/0:100%x100%" );
// Default factory
mlt_properties_set( properties, "factory", mlt_environment( "MLT_PRODUCER" ) );
sprintf( key, "%s.", name );
// Just in case, let's assume that the filter here has a composite
- //mlt_properties_set( MLT_FILTER_PROPERTIES( filter ), "composite.geometry", "0%,0%:100%x100%" );
+ //mlt_properties_set( MLT_FILTER_PROPERTIES( filter ), "composite.geometry", "0%/0%:100%x100%" );
//mlt_properties_set_int( MLT_FILTER_PROPERTIES( filter ), "composite.fill", 1 );
// Pass all the key properties on the filter down
test2: $(TARGET)
- melt colour:black -filter watermark:"+mello.txt" composite.geometry="0,0:10%x10%;99=90%,90%" composite.out=99 -filter crop_detect -filter motion_est -filter vismv
+ melt colour:black -filter watermark:"+mello.txt" composite.geometry="0/0:10%x10%;99=90%/90%" composite.out=99 -filter crop_detect -filter motion_est -filter vismv
realtime: $(TARGET)
~/mlt-devel/mlt/src/melt/melt -filter motion_est -filter vismv -consumer sdl rescale=none /media/cdrecorder/BBC.The.Private.Life.Of.Plants.Pt5.Living.Together.DivX505.AC3.www.MVGroup.org.uk.avi in=30000
// Because filter_obscure needs to be rewritten to use mlt_geometry
char geom[100];
- sprintf( geom, "%d,%d:%dx%d", (int)boundry.x, (int)boundry.y, (int)boundry.w, (int)boundry.h );
+ sprintf( geom, "%d/%d:%dx%d", (int)boundry.x, (int)boundry.y, (int)boundry.w, (int)boundry.h );
mlt_properties_set( MLT_FILTER_PROPERTIES( obscure ), "start", geom );
mlt_properties_set( MLT_FILTER_PROPERTIES( obscure ), "end", geom );
}
if( arg != NULL )
mlt_properties_set( MLT_FILTER_PROPERTIES( this ), "geometry", arg );
else
- mlt_properties_set( MLT_FILTER_PROPERTIES( this ), "geometry", "100,100:100x100" );
+ mlt_properties_set( MLT_FILTER_PROPERTIES( this ), "geometry", "100/100:100x100" );
// create an instance of the motion_est and obscure filter
mlt_filter motion_est = mlt_factory_filter( profile, "motion_est", NULL );
if ( transition != NULL )
{
mlt_properties_set_int( MLT_TRANSITION_PROPERTIES( transition ), "distort", 0 );
- mlt_properties_set( MLT_TRANSITION_PROPERTIES( transition ), "geometry", "0,0:100%x100%" );
+ mlt_properties_set( MLT_TRANSITION_PROPERTIES( transition ), "geometry", "0/0:100%x100%" );
// Inform apps and framework that this is a video only transition
mlt_properties_set_int( MLT_TRANSITION_PROPERTIES( transition ), "_transition_type", 1 );
transition->process = transition_process;
mlt_tractor tractor = mlt_field_tractor( field );
// Obtain a composite transition
- mlt_transition transition = mlt_factory_transition( "composite", "10%,10%:15%x15%" );
+ mlt_transition transition = mlt_factory_transition( "composite", "10%/10%:15%x15%" );
// Create track 0
mlt_producer track0 = create_playlist( argc, argv );