Add audio tracks to a video¶
The multi-track audio feature adds alternative audio tracks to a video — useful for multiple languages (dubs), accessibility, or offering viewers a choice such as a director's commentary. Viewers pick the track from the player's settings menu.
Uploading alternate audio tracks¶
Adding alternate audio tracks is not yet possible through the GUI.
Use the "Upload audio track" ⧉ endpoint — a multipart form with three fields:
| Field | Meaning |
|---|---|
file | The audio file, at most 100 MB. Any common audio format works — the file is probed, and rejected only if it contains no audio stream. |
title | The track's label shown to viewers in the player (up to 64 characters). |
lang_code | The track's language as a BCP 47 code (e.g. en, pt-BR). |
Prerequisites and behavior¶
- The video must already be playable (processed); otherwise the request fails with
422 video_not_ready. Audio tracks can't be added to a fast clip. - Upload audio that matches the video's duration: a longer file is cut to the video's length.
- The track encodes asynchronously. Its
statusstarts atqueued, becomesreadywhen it's playable, orerroredif the encode fails for good. - Uploaded tracks have
type: alternate; the video's own audio is theembeddedtrack. Alternate tracks keep a downloadableoriginal_link. - Auto-generated captions are per audio track — a specific alternate track can be captioned by passing its id to the caption endpoint, and deleting an audio track also deletes the captions generated from it. See auto-generated captions.