Skip to content

Commands

item.set_audio

Sets the volume, the fades or the mute flag of a clip or audio item.

Last updated:

Sets the given values. Volume 1, fades of 0 and audio_muted false clear the stored value. audio_muted applies to clip items only. The two fades together cannot be longer than the item.

Arguments#

ArgumentTypeRequiredDescription
audio_mutedbooleannoDrop the audio of a clip.
fade_instringnoFade-in length; 0s removes it.
fade_outstringnoFade-out length; 0s removes it.
item_idstringyesA clip or audio item.
volumenumbernoLinear gain, 0 to 4. min 0; max 4

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": "item.set_audio",
  "args": {
    "fade_in": "1s",
    "fade_out": "0.5s",
    "item_id": "itm_m1n2p3q4r5",
    "volume": 0.8
  }
}

Errors#

E_VALIDATION, E_INVALID_TIME, E_NOT_FOUND, E_TYPE_MISMATCH, E_INVALID_STATE

Scope and phase#

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