Please do not post the same questions in multiple topics. I answered this at General information - #8 by Gale_Andrews .
No lossy format has perfect quality.
If you are using the “Copy” option in Avidemux (which is sensible) there may be limitations on the audio formats that it will accept for the particular video format. However we will not give technical support for Avidemux or video encoding on the Audacity Forum.
AAC (M4A), AC3 and MP3 all take up approximately the same file size for comparable quality. See: Audacity Manual .
It is fairly generally believed that MP3 needs a slightly larger bit rate and hence file size to sound as “good” as M4A or AC3.
I would tend to use AC3 because the AAC encoder in Audacity is slow and removes a small piece of audio at the end (this is a bug in the AAC encoder used in the rather old version of FFmpeg that Audacity supports, not an Audacity bug).
Gale