Merge Audio into Video
merge_audioMerge a video and audio file into a single output, copying the video stream and encoding audio as AAC. Optionally loop short audio and apply loudness normalization.
Instructions
Combine a video file and an audio file into one output file. The video stream is copied without re-encoding; audio is encoded to AAC at the given bitrate. Loops audio shorter than the video when loop is true, and can apply loudness normalization (ffmpeg loudnorm) for YouTube-style targets. Prerequisite: ffmpeg installed. Side effect: overwrites output_path if it already exists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| loop | No | Loop the audio if it is shorter than the video. Default true. | |
| bitrate | No | Audio bitrate in kbps, 8-1024. Default 320. | |
| normalize | No | Apply loudness normalization (loudnorm I=-22 TP=-2 LRA=7). Default false. | |
| audio_path | Yes | Input audio file path. Must exist. | |
| video_path | Yes | Input video file path. Must exist. | |
| output_path | Yes | Output file path. Overwritten if it already exists. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| looped | Yes | True when audio looping was enabled | |
| audioPath | Yes | Absolute input audio path | |
| videoPath | Yes | Absolute input video path | |
| normalized | Yes | True when loudness normalization was applied | |
| outputPath | Yes | Absolute output file path | |
| bitrateKbps | Yes | Audio bitrate applied, in kbps |