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#
| Argument | Type | Required | Description |
|---|---|---|---|
duration | string | no | A length, at least the end of the last word. Default: that end. |
item_id | string | yes | A caption. |
words | array of object | yes | 1 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):
{
"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.