Skip to content

Commands

shape.add

Adds a rectangle, rounded rectangle or ellipse to a visual track.

Last updated:

Adds a shape item with the given size in pixels before scale. Colours are hex or a template colour name like "$accent"; radius is for rounded_rect only. x and y default to the frame centre.

Arguments#

ArgumentTypeRequiredDescription
durationstringyesA length of at least 1 frame.
fillstringnoA colour; default #FFFFFF.
heightnumberyesPixels before scale, above 0.
idstringno
radiusnumbernoPixels, 0 or more; rounded_rect only.
shaperect, rounded_rect, ellipseyes
startstringyesa time with a unit: "12.5s", "375f" or "00:00:12.500"
stroke_colorstringnoA colour; default #000000.
stroke_widthnumbernoPixels, 0 or more.
track_idstringyesA visual track.
widthnumberyesPixels before scale, above 0.
xnumberno
ynumberno

Example#

As one operation of an edit batch (the edit tool of MCP, vukem-video edit --ops, or POST /api/v1/projects/{id}/edit):

JSON
{
  "op": "shape.add",
  "args": {
    "duration": "3s",
    "fill": "#ff0000",
    "height": 200,
    "shape": "rect",
    "start": "0s",
    "track_id": "trk_f6g7h8j9k0",
    "width": 400
  }
}

Errors#

E_VALIDATION, E_INVALID_TIME, E_NOT_FOUND, E_TYPE_MISMATCH, E_ID_EXISTS, E_LIMIT, E_OVERLAP

Scope and phase#

Scope edit, phase alpha. Run vukem-video command:help shape.add for the same description from the binary.