Lately I’ve been trying to clarify in my mind exactly how certain common MPEG-related audio formats are defined. I think I’ve got this right, but if anyone can offer corrections, they’d be appreciated.
This is the common name for MPEG-1 and MPEG-2, Audio Layer 3, which defines an encoding method. The difference between the MPEG-1 and MPEG-2 variants is just in the sampling rates. It’s audio-only. An “MP3 file” is normally a raw MP3 stream without a container.
MP4 means MPEG-4 Part 14. This is a container format which can hold audio, video, or both. It doesn’t specify the encoding method. In principle you could have an MP3 stream in an MP4 file. The preferred extension for MP4 containers is .mp4, but many others are used to denote specific encodings within MP4 containers.
This is short for MPEG-2 Part 7, Advanced Audio Coding. MPEG-4, Part 7 defines some extensions of it. That’s the encoding; several different containers may be called “AAC files” if they hold an AAC stream. A raw AAC stream file is possible but not common. MP4 is the most common container, so “MP4 audio” and “AAC” are often treated as if they were synonyms. HE-AAC, also known as aacPlus, is an MPEG-4 audio profile. HE-AAC decoders can decode AAC, but not vice versa.