Skip to content

Interface: MixAudioOptions ​

Options for mixing an external audio track (background music / voice-over) into a video.

Properties ​

PropertyTypeDescription
audioStartTimenumberDelay in milliseconds before the background audio starts, relative to the beginning of the video. Default 0.
backgroundAudioVolumenumberVolume multiplier applied to the background audio track. 1.0 is the original level. Default 1.0.
loopAudiobooleanWhen true, the background audio is looped to cover the whole video. When false, it plays once. The output keeps the video's length either way, except when the video has no audio track and the background audio is shorter: the output then ends with the background audio. Default false.
originalAudioVolumenumberVolume multiplier applied to the video's original audio track. 1.0 keeps it unchanged, 0 effectively removes it (replace mode). Default 1.0.
outputExtstringOutput file extension (e.g. "mp4"). Default "mp4".

Released under the MIT License.