Skip to content

Commands

caption.add

Adds a caption item with timed words.

Last updated:

Adds a caption. Give either words (times relative to the caption, as lengths) or text with a duration: the text is split on whitespace and the words share the duration in proportion to their character counts. x and y are used when the caption style position of the track is custom.

Arguments#

ArgumentTypeRequiredDescription
durationstringnoA length; with text only.
idstringno
linked_itemstringnoThe clip whose speech this transcribes; it need not exist.
startstringyesa time with a unit: "12.5s", "375f" or "00:00:12.500"
textstringnoText to split on whitespace; needs duration.
track_idstringyesA visual track.
wordsarray of objectnoWords with times relative to the caption, as lengths.
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": "caption.add",
  "args": {
    "duration": "48f",
    "id": "itm_s6t7v8w9x0",
    "linked_item": "itm_m1n2p3q4r5",
    "start": "12f",
    "text": "Meet the new editor.",
    "track_id": "trk_a1b2c3d4e5"
  }
}

Errors#

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

Scope and phase#

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