Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Want to understand AAC (Read 6821 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Want to understand AAC

Hi all,

I know how MP3 works, but I'm fairly new to AAC. I want to write what I think I understood and would be happy about some corrections or confirmations:

- AAC specifies the data, while MP4, M4A are just containers for AAC
- AAC (like MP3) specifies only the decoding process, so any encoder does its best at encoding and any (standard-conform) AAC-player will play the file.
- AAC plays without being embedded in a container. For special features (gapless) I need a container.

Is that correct? Please enlighten me
weaker

Want to understand AAC

Reply #1
Hi all,

I know how MP3 works, but I'm fairly new to AAC. I want to write what I think I understood and would be happy about some corrections or confirmations:

- AAC specifies the data, while MP4, M4A are just containers for AAC


Correct. M4A is actually the same as MP4, just renamed. This was done by Apple because they thought that users might get confused by .MP4 files (which can contain both audio and video). So they rename MP4 files with video to M4V, with "regular" audio to M4A, copyprotected audio to M4P, audiobooks to M4B, etc. Same container format.

- AAC (like MP3) specifies only the decoding process, so any encoder does its best at encoding and any (standard-conform) AAC-player will play the file.

Yes, but bear in mind that there are three flavours of AAC (LC-AAC, HE-AAC + SBR and HE-AAC + SBR + PS). The latter two are more recent additions to the standard, improving quality at low bitrates (24-64 kbps) and are mainly used for webradio and mobile phones. iTunes/Quicktime for example only understands LC-AAC.
- AAC plays without being embedded in a container. For special features (gapless) I need a container.

For all intents and purposes, AAC-in-MP4 is the standard. iTunes creates them that way by default, as does Nero, as does Winamp, as does Foobar, etc. A "bare" AAC file without a container is possible but rarely used. Some programs will play AAC without the container, others won't - if something says "plays AAC" on the box, it will play AAC-in-MP4 - anything else is not guaranteed.


 

Want to understand AAC

Reply #3
AAC can also exist in ADTS, which has sync headers nearly identical to those in MP3.  It has the main advantage of being streamable.  It usually known as MPEG-2 AAC, although you can stream MPEG-4 AAC in this format also.  SHOUTcast AAC stations use ADTS.

When you hear about "raw" AAC, or see a file with .aac extension, it is usually in ADTS format.

ADTS AAC files created by Winamp are capable of being played back gaplessly in Winamp, so the MP4 file format is not a specific requirement for gapless playback.

Want to understand AAC

Reply #4
When you hear about "raw" AAC, or see a file with .aac extension, it is usually in ADTS format.


"raw" AAC can also be totally headerless AAC frames.

Quote
ADTS AAC files created by Winamp are capable of being played back gaplessly in Winamp, so the MP4 file format is not a specific requirement for gapless playback.


It cannot work correctly in all cases - and I am sure Winamp won't. ADTS simply has no room to store the required information. A container such as MP4 is a requirement unless you want to count on just being lucky.

Want to understand AAC

Reply #5
It cannot work correctly in all cases - and I am sure Winamp won't. ADTS simply has no room to store the required information. A container such as MP4 is a requirement unless you want to count on just being lucky.

It's not stored in the ADTS header.  And, yes, it works correctly.

Want to understand AAC

Reply #6
ADTS AAC files created by Winamp are capable of being played back gaplessly in Winamp, so the MP4 file format is not a specific requirement for gapless playback.

Are you using something like the mp3 INFO header stored into ancillary data? (like Lame)

Want to understand AAC

Reply #7
Thank you for all your replys! It is much clearer to me now. :-)

Want to understand AAC

Reply #8
It cannot work correctly in all cases - and I am sure Winamp won't. ADTS simply has no room to store the required information. A container such as MP4 is a requirement unless you want to count on just being lucky.

It's not stored in the ADTS header.  And, yes, it works correctly.


In that case, why would it depend on ADTS?

Want to understand AAC

Reply #9
Are you using something like the mp3 INFO header stored into ancillary data? (like Lame)

Yes, the delay (encoder+decoder) is stored as ancillary data in the first frame, and the post padding is stored in one of the last frames.

Quote
In that case, why would it depend on ADTS?

I never said it did.  Only that the MP4 file-format (or other container) isn't a requirement for gapless playback.  After all, MP3 can store gapless format and it's containerless.