Infery.ai
← All tools

Add audio to video

Video

video.add_audio

in: video, audioout: video

Attach an audio track to a video (replace the existing audio or mix with it).

Pricing

Price
6.25 cr / second

Prices in credits (1 credit = $0.01).

Add Audio to Video

Attach an audio track to a video, either replacing the existing audio entirely or mixing it with the audio already present in the video.

When to use

  • Add a voiceover or narration to a silent or muted video clip.
  • Replace a shaky on-camera audio track with a studio-recorded version.
  • Mix in background music alongside the original dialogue/audio.

Inputs & outputs

Input modalityVideo file (URL) + Audio file (URL)
Output modalityVideo file (GCS URL)
Max input duration30 min
Max input size5 GB

Parameters

ParamRequiredDescription
modeno (default replace)replace drops the video's original audio and uses the new track; mix combines both audio tracks.
shortestnoWhen true, trims the output to the length of the shorter of the two inputs.

Examples

Replace the original audio track

{
  "type": "video.add_audio",
  "input": { "video_url": "gs://infery-prod-media/example/input.mp4", "audio_url": "gs://infery-prod-media/example/voiceover.mp3" },
  "params": { "mode": "replace" }
}

Mix a music bed under the existing audio

{
  "type": "video.add_audio",
  "input": { "video_url": "gs://infery-prod-media/example/input.mp4", "audio_url": "gs://infery-prod-media/example/music.mp3" },
  "params": { "mode": "mix", "shortest": true }
}

Related capabilities

  • video.extract_audio — pull the existing audio track out before replacing it
  • video.trim — trim the video or audio to matching lengths beforehand
  • video.pipeline — chain add_audio with other operations in one step

Examples

Replace audio track

{
  "mode": "replace"
}