ffmpeg – How to merge Audio and Video file into one

Based on this answer the command you can use is something like:

ffmpeg -i video.mp4 -i audio.aac -c:v copy -c:a copy output.mp4

This will get video file video.mp4, merge it with audio file audio.aac w/o reencoding the formats (the copy parameter)

If you want to use other audio format you can use command like:

ffmpeg -i video.mp4 -i audio.aac -c:v copy -c:a mp3 output.mp4

Or you can use different container

ffmpeg -i video.mp4 -i audio.aac -c:v copy -c:a copy -f mkv output.mkv

Read more here: Source link