Skip to Content

mergeAudioWithVideo()

The mergeAudioWithVideo() function lets you merge audio with video files

Example Usage

import {mergeAudioWithVideo} from '@revideo/ffmpeg'; mergeAudioWithVideo('audio.wav', 'visuals.mp4', 'out.mp4');

Arguments

audioPath

Path to the audio file

videoPath

Path to the video file

outputPath

Path to where the merged output file will be saved.

audioCodec?

'aac' | 'libopus'

The audio codec to use for the merged output. Defaults to 'aac'.

Last updated on
© 2026 Haven Technologies, Inc.
mergeAudioWithVideo() – Revideo