Skip to main content
Version: Next 🚧

Audio

Veena can loop one audio file across the full video or a selected scene-time interval.

render(import.meta.url, MyScene, {
output: "./output/story.mp4",
audio: {
source: "./assets/music/raag-pahadi.mp3",
start: 0,
end: 12,
volume: 0.4,
},
});

Passing only a string plays from scene time zero through the video:

audio: "./assets/music/background.mp3"

Rules​

  • start defaults to 0.
  • end defaults to the video duration.
  • The source loops for the requested interval.
  • volume is linear from 0 to 1 and defaults to 1.
  • A missing file is ignored, allowing optional local/private music.
  • Audio is mixed during MP4 export and is not played in preview.
  • PNG output cannot include audio.

Relative paths are resolved from the current working directory.