Skip to content

Commands

text.add

Adds a text item to a visual track.

Last updated:

Adds a text item. The style is stored exactly as given, including keys equal to the default. x and y are the centre of the item in pixels; without them the item is centred.

Arguments#

ArgumentTypeRequiredDescription
durationstringyesA length of at least 1 frame.
idstringno
startstringyesa time with a unit: "12.5s", "375f" or "00:00:12.500"
styleobjectnoA partial TextStyle.
textstringyesThe text; line breaks are allowed.
track_idstringyesA visual track.
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": "text.add",
  "args": {
    "duration": "2s",
    "id": "itm_s6t7v8w9x0",
    "start": "0s",
    "style": {
      "size": 96
    },
    "text": "Hello",
    "track_id": "trk_f6g7h8j9k0"
  }
}

Errors#

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

Scope and phase#

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