Skip to main content
MindStudio
Pricing
Blog About
My Workspace
Video Editing

Mix Audio into Video

The Mix Audio into Video block combines a separate audio file with a video file, producing a merged output saved to a variable of your choosing.

Mix an audio track into a video file

The Mix Audio into Video block combines a separate audio file with a video file, producing a merged output saved to a variable of your choosing. You provide a video URL and an audio URL, and the block handles the mixing process, writing the result to the destination variable you specify. This makes it straightforward to attach narration, background music, or any audio asset to a video within a workflow.

The block exposes several options to control how the mix behaves. By default, any existing audio on the video is discarded, but you can set keepVideoAudio to true to preserve it alongside the new audio track. Both the audio and video gain levels can be adjusted in decibels using audioGainDb and videoGainDb, each defaulting to 0. If the audio track is shorter than the video, the loopAudio option can repeat it automatically to fill the duration.

This block fits into workflows that involve automated video production, such as generating a video asset and then attaching AI-generated voiceover or a music track before delivering the final file. It also supports an intermediateAsset flag, which creates the output asset without surfacing it in the gallery — useful when the mixed video is an intermediate step feeding into further processing rather than a final deliverable.

What you can build

Real-world workflows powered by the Mix Audio into Video block.

Add AI Voiceover to Video

After generating a text-to-speech audio file from a script, mix it into a video clip to produce a narrated output ready for delivery.

Attach Background Music

Combine a silent or muted video with a music track, using audioGainDb to set the appropriate volume level for the final mix.

Preserve Original Video Audio

Mix in a secondary audio track while keeping the video's existing audio by enabling the keepVideoAudio option.

Loop Short Audio Over Long Video

Use the loopAudio option to repeat a short jingle or ambient sound across the full duration of a longer video.

Intermediate Step in Video Pipeline

Set intermediateAsset to true so the mixed video is available for downstream blocks without appearing in the user-facing gallery.

Automated Social Media Clips

In a batch video generation workflow, automatically attach branded audio to each generated clip before publishing.

Ready to add Mix Audio into Video to your workflow?

Get Started Free

Common questions about Mix Audio into Video

What are the required parameters for this block?

The block requires a videoUrl (the URL of the source video), an audioUrl (the URL of the audio track to mix in), and a destinationVar (the variable name where the output URL will be saved).

What does the block return?

The block saves the URL of the mixed video to the variable specified in destinationVar. There is no additional structured output beyond that saved URL.

Does the block keep the original audio that was already on the video?

By default, keepVideoAudio is false, meaning any existing audio on the video is discarded. Setting keepVideoAudio to true preserves the original video audio alongside the newly mixed audio track.

Can I control the volume of the audio or video tracks?

Yes. The audioGainDb and videoGainDb options let you adjust the gain of each track in decibels. Both default to 0, meaning no gain adjustment is applied.

What is the intermediateAsset option used for?

When intermediateAsset is set to true, the mixed video asset is created and stored but hidden from the gallery. This is useful when the mixed video is an intermediate step in a larger workflow rather than a final output intended for end users.

Add Mix Audio into Video to your workflow

Build powerful AI workflows with drag-and-drop blocks. No coding required.