mux_media
Multiplex an audio track into a video file or combine separate video and audio streams, with options to replace or add audio and copy video without re-encoding.
Instructions
Multiplex (mux) an audio track into a video file or combine standalone video and audio streams. Supports replacing audio, mixing, and instantaneous stream copy without re-encoding video.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"videoPath": "<videoPath>",
"audioPath": "<audioPath>",
"outputPath": "<outputPath>"
},
"name": "mux_media"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Muxing mode: 'replace' drops existing video audio and uses new audio; 'add' keeps original audio and adds new audio as secondary track. Default: 'replace'. | replace |
| shortest | No | End output when the shorter input stream finishes. Default: true. | |
| audioPath | Yes | Path to the source audio file (.mp3, .wav, .aac, .m4a, etc.) to mux. | |
| videoPath | Yes | Path to the source video file. | |
| outputPath | Yes | Target output video path (.mp4, .mov, or .mkv). | |
| streamCopyVideo | No | Use stream copy (-c:v copy) for instantaneous video multiplexing without quality loss. Default: true. | |
| audioOffsetSeconds | No | Audio delay or advance in seconds. Positive numbers delay audio; negative numbers advance it. Default: 0. | |
| hardwareAcceleration | No | Use hardware-accelerated video encoding when streamCopyVideo is false. Default: true. |