Audio Elements
Set matchDuration: true to follow the containing scene or project. The
audio then ends with that timeline (overriding exit) and does not determine
its automatic duration. Short source segments loop to fill the window.
audios adds background music, narration, and sound effects to the project. Audio items belong in audios, not visuals, and do not require a type field.
Interface
interface AudioItem {
src: string;
matchDuration?: boolean;
enter?: number;
exit?: number;
volume?: number;
speed?: number;
audioBegin?: number;
audioEnd?: number;
audioDuration?: number;
}
Required Fields
| Property | Type | Notes |
|---|---|---|
src | string | Remote http or https audio URL. |
Properties
| Property | Default | Range/notes |
|---|---|---|
enter | 0 | Start time on the project timeline. |
exit | project.duration | End time on the project timeline. |
matchDuration | false | Follow the containing project/scene end, overriding exit; excluded from automatic-length calculation. |
audioBegin | 0 | Start point in source audio. |
audioEnd | project or source duration | End point in source audio. |
audioDuration | project or source duration | Source duration hint. |
volume | 1 | 0 to 2; 1 is the original level. |
speed | 1 | 0.1 to 10. |
Examples
All timing fields are in seconds. enter/exit use the containing
project or scene timeline; audioBegin/audioEnd use source-media time.
The examples below are audio item fragments for payload.audios or
payload.scenes[n].audios, not full render requests. See
Timing for trimming, speed, and automatic duration.
Background Music
{
"src": "https://cdn.pixabay.com/audio/2025/03/19/audio_56ae1dae5f.mp3",
"volume": 0.3,
"enter": 0,
"exit": 10
}
Sound Effect
{
"src": "https://cdn.pixabay.com/audio/2025/01/13/audio_c2af364af2.mp3",
"volume": 0.8,
"enter": 2,
"exit": 4
}
Source Segment
{
"src": "https://cdn.pixabay.com/audio/2025/04/21/audio_ed6f0ed574.mp3",
"audioBegin": 10,
"audioEnd": 20,
"volume": 0.5,
"enter": 0,
"exit": 10
}