Ir para o conteúdo

Comandos

caption.set_words

Replaces the words of a caption.

Última atualização:

Esta referência é gerada a partir do programa e está em inglês.

Replaces all words (1 to 60, times relative to the caption, as lengths). The caption lasts until the end of the last word unless duration is given. Line breaks are cleared; keyframes are cut when the caption gets shorter.

Arguments#

ArgumentTypeRequiredDescription
durationstringnoA length, at least the end of the last word. Default: that end.
item_idstringyesA caption.
wordsarray of objectyes1 to 60 words with times relative to the caption, as lengths.

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.set_words",
  "args": {
    "item_id": "itm_s6t7v8w9x0",
    "words": [
      {
        "duration": "12f",
        "start": "0f",
        "text": "Hello"
      },
      {
        "duration": "12f",
        "start": "12f",
        "text": "world"
      }
    ]
  }
}

Errors#

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

Scope and phase#

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