How Add audio to video works
Attach a soundtrack to a silent video or replace an existing one entirely in your browser, with ffmpeg WebAssembly muxing the streams on your device. Drop a video and an audio file (MP3, WAV, M4A, AAC, OGG, and more are all accepted), choose whether to replace the original sound or mix both tracks together, set the added track's volume relative to the original, and decide what to do when the two streams differ in length: stop at the shorter one or loop the audio to cover the full video duration.
The video stream is copied with -c:v copy, so no pixel is re-encoded and quality is lossless. Only the audio track is encoded to AAC, then trimmed to length with -shortest. The result is an MP4 that keeps your original video resolution, frame rate, and visual quality intact.