Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Reserved Commands

Peter Maersk-Moller

Reserved Commands

Updated for version 0.4.5

This page list all the reserved commands in Snowmix. For details for the individual coammands, please see the reference manual

General commands:

Please see the Reference manual for general commands listed there in that section.

            include <file name>
            maxplaces [(strings | fonts | texts | images | imageplaces | shapes | shapeplaces | virtual feeds | audio feeds | audio mixers | audio sinks) <number>]
            message <some text>
            messagef <some text>
            monitor [on | off]
            png write <file name>
            require version <major 1>.<major 2>.<minor>
            select <feed no>
            stack [ list | <feed id> [ <feed id> [ ... ]]]
            stat
            system control port <port number>
            system frame rate <frames/s>
            system geometry <width> <height> <fourcc>
            system host allow [(<network> | <host>)[(<network> | <host>)[ ...]]]
            system info
            system name [<system name>]
            system output buffers <buffer count>
            system output delay <frames>
            system output freeze <number frames to freeze>
            system output info
            system output mode <mode>
            system output reset
            system output status
            system socket [<output socket name>]
            verbose
            quit        // Terminates Snowmix. This also clean up shm alloacted in /run/shm/
Control commands

Please see the Reference manual for command macros listed there in that section.

            command addatline <command name> <line number> <command>
            command afterend <command name>
            command at [[+]<time> <command ........>] // time =  [[hh:]mm:]nn[.nnnnn]
            command create <command name>
            command delete <command name>
            command deleteline <command name> <line number>
            command end
            command help
            command list [<command name>]
            command pointer atline [ <command name> [ <line> ]]
            command pop <command name> [ <count>]
            command push <command name> <command>
            command restart <command name>

The following control commands are only available within commands.

            if <condition>
            else
            endif
            goto <label name>
            next [<number>]
            label <label name>
            loop [<number>]

            <condition> = ['!']<cond> [('||' | '&&') <condition>]
            <cond>      = <feedstate> | <prevstate> | <exist>
            <feedstate> = feedstate(<feed no>,<feed state>) |
            <prevstate> = prevstate(<feed no>,<feed state>) |
            <exist>     = exist(command,<command name>);
            <feed no>   = 0....(2^32)-1
            <feed state>= 'SETUP' | 'PENDING' | 'RUNNING' | 'STALLED' | 'DISCONNECTED'
Video Feed commands
            feed add [<feed no> <feed name>]
            feed buffers
            feed alpha [<feed id> <alpha>]
            feed cutout <feed no> <start col> <start row> <columns> <rows>
            feed geometry <feed no> <width> <height>
            feed help
            feed idle <feed no> <timeout in frames> <idle image file>
            feed info
            feed fast overlay <feed id> <col> <row> <feed col> <feed row> <cut cols> <cut rows> [ <scale 1> <scale 2> [ <par_w> <par_h> [ c ]]]
            feed filter [ <feed no> (fast | good | best | nearest | bilinear | gaussian)]
            feed list [verbose]
            feed live <feed no>
            feed name <feed no> <feed name>
            feed overlay (<id> | <id>..<id> | all | end | <id>..end) [ (<id> | <id>..<id> | all | end | <id>..end) ] ....
            feed par [<feed no> <width> <height>]
            feed pixel [<feed no> <x> <y>]
            feed recorded <feed no>
            feed scale [<feed no> <scale_1> <scale_2>]
            feed shift <feed no> <column> <row>
            feed socket <feed no> <socket name>
Text commands:
            text align [<place id> (left | center | right) (top | middle | bottom) [<rotation>]
            text alpha [<place id> <alpha>]
            text anchor [<place id> (n | s | e | w | c | ne | nw | se | sw)]
            text backgr alpha [<place id> <alpha>]
            text backgr clip [<place id> <clip left> <clip right> <clip top> <clip bottom>]
            text backgr linpat [<place_id> [<fraction> <red> <green> <blue> <alpha>] [ v | h]]
            text backgr move alpha [<place id> <delta alpha> <alpha steps>]
            text backgr move clip [<place id> <delta left> <delta right> <delta top> <delta bottom> <left steps> <right steps> <top steps> <bottom steps>]
            text backgr rgb [<place id> [ <red> <green> blue> [ <alpha> ] ]
            text backgr round [<place id> <left top> <right top> <left bottom> <right bottom>]
            text backgr [<place id> [ <l_pad> <r_pad> <t_pad> <b_pad> [<red> <green> <blue> <alpha>]]]  // <place id> only deletes backgr entry
            text clip [<place id> <clip left> <clip right> <clip top> <clip bottom>]
            text clipabs [<place id> <clip x> <clip y> <clip width> <clip height>]
            text coor [<place_id> <x> <y>]
            text font [<font id> [<font description>]]  // empty string deletes 2entry
            text font available
            text overlay (<place id> | <place id>..<place id> | all | end | <place id>..end) [ ... ]
            text place font [<place id> <font id>]
            text place string [<place id> <string id>]
            text grow <place id> <start len> [<delta grow> [variable]]
            text move alpha [<place id> <delta_alpha> <step_alpha>]
            text move clip [<place id> <delta left> <delta right> <delta top> <delta bottom> <left steps> <right steps> <top steps> <bottom steps>]
            text move coor [<place id> [<delta_x> <delta_y> <step_x> <step_y>]]  // id only removes move entry
            text move rotation [<place id> <delta_rotation> <step_rotation>]
            text move scale [<place id> <delta_scale_x> <delta_scale_y> <step_x> <step_y>]
            text offset [<place id> <offset x> <offset y>]
            text place [<place id> [<string_id> <font_id> <x> <y> [<red> <green> <blue> [<alpha> [(n | s | e | w | c | ne | nw | se | sw)]]]]]  // <place id> only deletes entry
            text repeat move [<place id> <dx> <dy> <end x> <end y>]
            text rgb [<place id> <red> <green> <blue>]
            text rotation [<place id> <rotation>]
            text scale [<place id> <scale_x> <scale_y>]
            text string [<string id> [<string>]]  // empty string deletes entry
            text string concat <dest string id> <string id> [<string id> ...]
            text verbose [<verbose level>]
            text help     // This help list
Image Commands - Basic:
            image align [<place id> (left | center | right) (top | middle | bottom)]
            image alpha [<place id> <alpha>]
            image anchor [<place id> (n | s | e | w | c | ne | nw | se | sw)]
            image clip [<place id> <clip left> <clip right> <clip top> <clip bottom>]
            image coor [<place id> <coor x> <coor y>]
            image filter [<place id> (fast | good | best | nearest | bilinear | gaussian)]
            image geometry [<place id>]
            image image [<place id> <image id>]
            image load [<image id> [<file name>]]  // empty string deletes entry
            image matrix [<place id> <xx> <xy> <yx> <yy> <x0> <y0>]
            image move alpha [<place id> <delta_alpha> <step_alpha>]
            image move clip [<place id> <delta left> <delta right> <delta top> <delta bottom> <left steps> <right steps> <top steps> <bottom steps>]
            image move coor [<place id> <delta_x> <delta_y> <step_x> <step_y>]
            image move offset [<place id> <delta_offset_x> <delta_offset_y> <step_offset_x> <step_offset_y>]
            image move rotation [<place id> <delta_rotation> <step_rotation>]
            image move scale [<place id> <delta_scale_x> <delta_scale_y> <step_x> <step_y>]
            image name [<image id> [<name>]]  // empty string deletes name
            image offset [<place id> <offset x> <offset y>]
            image overlay (<place id> | <place id>..<place id> | all | end | <place id>..end) [ ... ] 
            image place [<place id> [<image id> <x> <y> [(n | s | e | w | c | ne | nw | se | sw)] [(left | center | right) (top | middle | bottom)]]]
            image rotation [<place id> <rotation>]
            image scale [<place id> <scale_x> <scale_y>]
            image source [(feed | image | frame) <image id> <source id> [ <offset x> <offset y> <width> height> [<scale_x> <scale_y> [<rotation> <alpha> [(fast | good | best | nearest | bilinear | gaussian)]]]]]
            image verbose <level>
            image write <image id> <file name>
            image help      // this list
Virtual feed:
            vfeed add [<vir id> [<feed name>]]  // empty <feed name> deletes entry
            vfeed align [<vir id> (left | center | right) (top | middle | bottom)]
            vfeed alpha [<vir id> <alpha>]
            vfeed anchor [<vir id> (n | s | e | w | c | ne | nw | se | sw)]
            vfeed coor [<vir id> <x> <y>]
            vfeed clip [<vir id> <clip w> <clip h> <clip x> <clip y>]
            vfeed filter [<place id> (fast | good | best | nearest | bilinear | gaussian)]
            vfeed geometry [<vir id>]
            vfeed move alpha [<vir id> <delta alpha> <steps>]
            vfeed move coor [<vir id> <delta x> <delta y> <step x> <step y>]
            vfeed move clip [<vir id> <delta clip x> <delta clip y> <delta clip w> <delta clip h> <step x> <step y> <step w> <step y>]
            vfeed move offset [<vir id> <delta offset x> <delta offset y> <step offset x> <step offset y>]
            vfeed move rotation [<vir id> <delta rotation> <step step rotation>]
            vfeed move scale [<vir id> <delta sx> <delta sy> <step sx> <step sy>] 
            vfeed overlay (<id> | <id>..<id> | all | end | <id>..end) [ (<id> | <id>..<id> | all | end | <id>..end) ] ....
            vfeed place rect [<vir id> [<x> <y> <clip w> <clip h> <clip x> <clip y> [<rotation> <scale_x> <scale_y> <alpha>]]]
            vfeed rotation [<vir id> <rotation>]
            vfeed scale [<vir id> <scale_x> <scale_y>]
            vfeed source [(feed | image) <vir id> (<feed id> | <image id>)]
            vfeed help      // this list
Audio feed:
            audio feed add [<feed id> [<feed name>]]  // empty <feed name> deletes entry
            audio feed add silence <feed id> <silence in ms>
            audio feed channels [<feed id> <channels>]
            audio feed ctr isaudio <feed id>
            audio feed delay [<delay in ms>]
            audio feed drop <feed id> <drop in ms>]
            audio feed format [<feed id> (8 | 16 | 24 | 32 | 64) (signed | unsigned | float)]
            audio feed info
            audio feed move volume [<feed id> <delta volume> <delta steps>]
            audio feed mute [(on | off) <feed id>]
            audio feed rate [<feed id> <rate>]
            audio feed status
            audio feed verbose [<verbose level>]
            audio feed volume [<feed id> (- | <volume>) [(- | <volume> ...)]] // volume = 0..MAX_VOLUME
            audio feed help
Audio mixer:
            audio mixer add [<mixer id> [<mixer name>]]
            audio mixer add silence <mixer id> <ms>
            audio mixer drop <mixer id> <ms>
            audio mixer channels [<mixer id> <channels>]
            audio mixer move volume [<feed id> <delta volume> <delta steps>]
            audio mixer mute [(on | off) <mixer id>]
            audio mixer queue <mixer id>
            audio mixer rate [<mixer id> <rate>]
            audio mixer source [(feed|mixer) <mixer id> <source id>]
            audio mixer source [add silence <mixer id> <source no> <ms>]
            audio mixer source [delete <mixer id> <source no>]
            audio mixer source [invert <mixer id> <source no>]
            audio mixer source [map <mixer id> <source no>]
            audio mixer source [maxdelay <mixer id> <source no> <ms>]
            audio mixer source [move volume [<mixer id> <source_no> <delta volume><delta steps>]]
            audio mixer source [mute (on|off) <mixer id> <source no>]
            audio mixer source [pause <mixer id> <source no> <frames>]
            audio mixer source [rmsthreshold <mixer id> <source no> <level>]
            audio mixer source [volume <mixer id> <source no> (-|<volume>) [(-|<volume>) ...]]
            audio mixer start [<mixer id>]
            audio mixer stop [<mixer id>]
            audio mixer verbose [<verbose level>]
            audio mixer volume [<mixer id> (-|<volume>) [(-|<volume>) ...]] // volume = 0..MAX_VOLUME
            audio mixer status
            audio mixer help
Audio sink:
            audio sink add [<sink id> [<sink name>]]
            audio sink add silence <sink id> <ms>
            audio sink channels [<sink id> <channels>]
            audio sink ctr isaudio <sink id> // set control channel to write out audio
            audio sink drop <sink id> <ms>]
            audio sink file <sink id> <file name>
            audio sink format [<sink id> (8 | 16 | 24 | 32 | 64) (signed | unsigned | float) ]
            audio sink move volume [<mixer id> <delta volume> <delta steps>]
            audio sink mute [(on | off) <sink id>]
            audio sink queue <sink id>
            audio sink queue maxdelay <sink id> <max delay in ms>
            audio sink rate [<sink id> <rate>]
            audio sink source [(feed | mixer) <sink id> <source id>]
            audio sink start [<sink id>]
            audio sink status
            audio sink stop [<sink id>]
            audio sink verbose [<verbose level>]
            audio sink volume [<sink id> <volume>] // volume = 0..255
            audio sink help
Basic shape commands:
            shape add [shape id> [<shape name>]]  // shape id alone deletes shape
            shape arc_cw <shape id> <x> <y> <radius> <angle from> <angle to>
            shape arc_ccw <shape id> <x> <y> <radius> <angle from> <angle to>
            shape arcrel_cw <shape id> <x> <y> <radius> <angle from> <angle to>
            shape arcrel_ccw <shape id> <x> <y> <radius> <angle from> <angle to>
            shape clip <shape id>
            shape closepath <shape_id>
            shape curveto <shape id> <x1> <y1> <x2> <y2> <x3> <y3>
            shape curverel <shape id> <x1> <y1> <x2> <y2> <x3> <y3>
            shape feed <shape id> <feed id> <x> <y> <scale x> <scale y>
            shape fill <shape id>
            shape fill preserve <shape id>
            shape filter <shape id> (fast | good | best | nearest | bilinear | gaussian)
            shape help  // list this list
            shape info
            shape image <shape id> <image id> <x> <y> <scale_x> <scale_y>
            shape inshape <shape id> <inshape id>
            shape line width <shape id> <width>
            shape line join <shape id> (miter | round | bevel) [<miter limit>]
            shape line cap <shape id> (butt | round | square)
            shape lineto <shape id> <x> <y>
            shape linerel <shape id> <x> <y>
            shape list <shape id>
            shape mask pattern <shape_id> <pattern id>
            shape moveentry <shape id> <entry id> [<to entry>]
            shape moverel <shape id> <x> <y>
            shape moveto <shape id> <x> <y>
            shape newpath <shape id>
            shape operator <shape id> (clear | source | over | in | out | atop | dest | dest_over | dest_in | dest_out | dest_atop | xor | add | saturate | multiply | screen | overlay | darken | lighten | dodge | burn | hard | soft | difference | exclusion | hsl_hue | hsl_saturation | hsl_color | hsl_luminosity)
            shape overlay <place id> (<place id> | <place id>..<place id> | <place id>..end) ...
            shape paint <shape id> [<alpha>]
            shape pattern add [<pattern id> [<pattern name>]]
            shape pattern radial <pattern id> <cx0> <cy0> <radius0> <cx1> <cy1> <radius1>
            shape pattern linear <pattern id> <x1> <y1> <x2> <y2>
            shape pattern stoprgb <pattern id> <offset> <red> <green> <blue> [<alpha>]
            shape recursion <shape id> <level>
            shape restore <shape id>
            shape rotation <shape id> <relative rotation> [<absolute rotation>]
            shape save <shape id>
            shape scale <shape id> <scale x> <scale y>
            shape source alphaadd <shape id> <value>
            shape source alphamul <shape id> <value>
            shape source rgb <shape id> <red> <green> <blue> [<alpha>]
            shape source rgba <shape id> <red> <green> <blue> [<alpha>]
            shape source pattern <shape_id> <pattern id>
            shape stroke <shape id>
            shape stroke preserve <shape id>
            shape tell scale <shape id>
            shape translate <shape id> <offset x> <offset y>
            shape transform <shape id> <xx> <yx> <xy> <yy> <x0> <y0>
            shape verbose [<level>]
            shape place help
Placed shape commands:
            shape place [<place id> [ <shape id> <x> <y> <scale x> <scale y> [<rotation> [<red> <green> <blue> [<alpha>]]]]] // shape id alone deletes placed shape
            shape place alpha [<place id> <alpha>]
            shape place anchor [<place id> (n | s | e | w | c | ne | nw | se | sw)]
            shape place coor <place id> <x> <y> [<rotation>]
            shape place move alpha <place id> <delta alpha> <steps>
            shape place move coor <place id> <delta x> <delta y> <steps x> <steps y>
            shape place move offset <place id> <delta x> <delta y> <steps x> <steps y>
            shape place move rotation <place id> <delta rotation> <steps>
            shape place move scale <place id> <delta scale_x> <delta scale y> <steps x> <steps y>
            shape place offset <place id> <offset x> <offset y>
            shape place overlay (<id> | <id>..<id> | all | end | <id>..end) [ (<id> | <id>..<id> | all | end | <id>..end) ] ....
            shape place rgb <place id> <red> <green> <blue> [<alpha>]
            shape place rotation <place id> <rotation>
            shape place scale <place id> <scale x> <scale y>
            shape place shape <place id> <shape id>
            shape place status    // list shape placed
Overlay Commands:
            overlay finish [<command name>]
            overlay pre [<command name>]
            *overlay text* - see **text overlay**
            *overlay image* - see **image overlay**
            *overlay virtual feed* - see **virtual feed overlay**

The command 'overlay pre' defines a command macro to be run for each frame at frame rate before other commands are executed. The command macro is executed independently of whether Snowmix has a consumer of video frames. As such it is a reliable place for executing a clock script.

The command 'overlay finish' defines a command macro to be run at frame rate before an output frame is produced. The command macro is not executed if there is no consumer of video frames from Snowmix.

The overlay commands for text, images and virtual feeds can only be used in a command macro and will only have effect if used in the command macro specified by the command 'overlay finish' or a another macro called from that macro.

Tcl interface:
            tcl eval <tcl command>  // evaluate tcl command
            tcl exec <command name> // execute tcl script by command name
            tcl reset                       // delete interpreter and initialize new
            tcl help                        // list this help for tcl commands.
            tcl eval snowmix info audio (feed | sink) (info | status | extended | syntax) (format | ids | maxid | nextavail | <id_list>)
            tcl eval snowmix info audio mixer (info | status | extended | source info | source status | source extended | syntax) (format | ids | maxid | nextavail | <id_list>)
            tcl eval snowmix info command ( names | list | at | syntax ) [ format | <name> ]
            tcl eval snowmix info feed (geometry | status | extended | state | pixel <x> <y> | syntax) (format | ids | maxid | nextavail | <id_list>)
            tcl eval snowmix info image (load | place | move | extended | syntax) (format | ids | maxid | nextavail | <id_list>)
            tcl eval snowmix info text (string | font | place | move | backgr | linpat | syntax) (format | ids | maxid | nextavail | <id_list>)
            // virtual feed not loaded
            tcl eval snowmix info shape (info | list | place | move | alpha) ( format | ids | maxid | nextavail | <id_list> )
            tcl eval snowmix info system (info | status | maxplaces | overlay | syntax) [ format ]
            tcl eval snowmix info shape ( syntax | ( ( info | list | place | move ) ( format | ids | maxid | nextavail | <id_list>) )
            tcl eval snowmix info system (info | status | maxplaces | overlay | syntax) [ format ]
            tcl eval snowmix info (vfeed | virtual feed) (place | move | extended | syntax) (format | ids | maxid | nextavail | <id_list>)
            tcl eval snowmix (parse | parse silent | parses) <snowmix command>

The command tcl eval snowmix parse silent and tcl eval snowmix parses* are identical.


Related

Discussion: Reference manual for general commands
Discussion: Reference mnual for feeds available.
Wiki: Audio
Wiki: Home
Wiki: Reference Audio Feeds
Wiki: Reference Audio Mixers
Wiki: Reference Audio Sinks
Wiki: Reference Cairo Graphics
Wiki: Reference Command
Wiki: Reference Feeds
Wiki: Reference General
Wiki: Reference Images
Wiki: Reference Placed Shapes
Wiki: Reference Shapes
Wiki: Reference Texts
Wiki: Reference Virtual Feeds
Wiki: Reserved Commands
Wiki: Shapes
Wiki: Snowmix Guide
Wiki: Snowmix Tutorials - Scenes
Wiki: Tutorials
Wiki: Video Text