[home] | [using Stuka] | [scripting 1/2] | [scripting 2/2] | [download] |
scripting Stuka (2/2)
overlay( 8mm, 100 ) {
capture( 17, 26, 692, 448 );
}
marker( 4, 1top_3bottom ) {
display( "gh1" );
display( "et1" );
display( "et2" );
..
capture( 17, 26, 692, 448 );
}
marker( 4, 1top_3bottom ) {
display( "gh1" );
display( "et1" );
display( "et2" );
..
You can use an input video as a global overlay for the whole output video frame:
overlay( iid, frame_count ) {
capture( left, top, right, bottom );
}
capture( left, top, right, bottom );
}
Values are set in pixel unit.
The overlay video is a cool feature allowing you, for example, to superimpose some old 8mm video over all your videos, as seen in the sample image above or in the demo video on the main page.
The most important part of the script is the set of markers:
marker( position, layout ) {}
The marker position can be directly extracted from your audio sequencer.
For example a minimum marker list may be:
marker( 1, 1fullscreen ) {
tempo( 75 );
signature( 4, 4 );
display( arnaud_front );
}
marker( 2 ) {}
Which means that we will have a single measure of 4/4 at 75bpm.
tempo( 75 );
signature( 4, 4 );
display( arnaud_front );
}
marker( 2 ) {}
The layout is only optional to determine the last marker of the list (which has to be empty).
For all other markers, layout is mandatory and values can be:
1fullscreen | 1left_1right | 1top_1bottom | 1left_2right | 2left_1right |
1top_2bottom | 2top_1bottom | 2top_2bottom | 1top_3bottom | 3top_1bottom |
2top_3bottom | 3top_2bottom | 3top_3bottom |
For example, if you choose the layout "1top_2bottom", it means that the first display unit will be visible on top, the second one at bottom-left and the third one at bottom-right.
As we've briefly seen before, we can add a lot of commands into the marker:
marker( position, layout ) {
tempo( t );
signature( bc, bu );
separator( size );
effect( type );
display( "iid or gid", cycle );
resize( "iid or gid", size_in_percent );
speed( "iid or gid", speed_ratio );
}
tempo( t );
signature( bc, bu );
separator( size );
effect( type );
display( "iid or gid", cycle );
resize( "iid or gid", size_in_percent );
speed( "iid or gid", speed_ratio );
}
of the current marker and the following ones, until another signature command is encountered.
By default the separator size is 0 (no separator).
The separator is a line with a black brush.
Values can be "fade_in" or "fade_out" to perform some global fading operations,
or "strobe, cycle" to perform some stroboscope effect (see "display" for "cycle" values).
if cycle [optional] is set, a rotation is performed between all the input videos of the group.
cycle value can be "none", "each_measure", "each_beat", "every_2_beats", "every_3_beats", "every_half_beat", "every_quarter_beat" or "every_eighth_beat"
e.g. resize( arnaud_front, 50 ); will perform a x2 zoom onto the image.
e.g. speed( arnaud_front, 0.25 ); will do a smart 1/4 speed stop effect.
tempo and signature commands are mandatory on the first marker of the list.
You must set at least a display command in the marker, except for the end marker.
You can also add some comments into your script, C++ styled :
// hello world