M: i have an AVI and AC3 file. i'd like a cli command using ffmpeg to replace the audio in the avi file with the ac3, preferably with no stream processing, just direct copy.

G: Here’s the cleanest, minimal-processing FFmpeg command for that:

ffmpeg -i input.avi -i input.ac3 -c:v copy -c:a copy -map 0:v:0 -map 1:a:0 output.avi

Explanation:

If you want to replace instead of add, this command ensures only one audio track is kept.

Note: Some AVI containers don’t officially support AC3 audio.
If playback causes issues, use .mkv or .mp4 instead (same command, just change the extension).