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: AAC file header (Read 13487 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

AAC file header

I saw a description for the AAC file header here:
http://www.audiocoding.com/wiki/index.php?page=AAC , but I could not find how can I get the bitrate/duration from the ADTS header? Does anybody know a better description?

And another question: what encoder uses the ADIF header?

Please help...

AAC file header

Reply #1
Count the number of frames, then you'll know the filesize, samplerate and number of frames, with that you can calculate the bitrate.
There's no easier way I believe, unless someone here has a good suggestion?

Menno

AAC file header

Reply #2
BTW: ADTS is the same as the headers in MP3, so you should be able to use about the same code (mind the emphasis bits for MPEG-2).

ADIF is supported by PsyTEL and very old versions of FAAC too (before it had ADTS support). Also, the FhG command line encoders use it by default and all the ISO reference AAC files have an ADIF header.

Menno

AAC file header

Reply #3
> menno: Count the number of frames

Should I read the whole file trough? There must be a better solution, I think...

 

AAC file header

Reply #4
How much samples does an AAC frame contain?

AAC file header

Reply #5
AAC files always have 1024 samples per frame.
In MP4 files it can be 960 too, but I guess you're not working on that yet?

Menno

AAC file header

Reply #6
What solution are you thinking of? There is no way of telling the number of frames in a VBR file without going through the whole file. There's also no extra header available for that.

Menno

AAC file header

Reply #7
How the ACC-Plugin for Winamp get the duration? It doesn't scan the whole file for calculating the number of frames.

AAC file header

Reply #8
Yes it does, check aacinfo.c.
It can also be set to check 30 seconds for example and take the average bitrate of that.

Menno

AAC file header

Reply #9
Where can I find the source of the AAC-Plugin for Winamp?


AAC file header

Reply #11
Quote
Originally posted by menno
AAC files always have 1024 samples per frame.
1024 samples per frame, per channel

AAC file header

Reply #12
Right! :-)

AAC file header

Reply #13
BTW: Upto channel_configuration == 6 the number of channels is the same as the channel_configuration.
I'll try to add some more info about the headers on the wiki soon.

Menno

AAC file header

Reply #14
Where can I download AAC examples with ADIF header?


AAC file header

Reply #16
I would like to implement support for AAC files in my project MPEG Audio Collection , therefore I asked for the info.

1) What kind of AAC files are there?
2) Where can I find other ACC encoders (like FhG etc.)?
3) I need ACC examples (various encoders, modes etc.) - for in-depth tests.

AAC file header

Reply #17
The ISO reference files found at that at&t website should cover everything. You will not find the FhG encoder that creates AAC files.
There are three different AAC formats possible (4 actually but let's not get into that):
RAW
ADIF
ADTS

You will not be able to extract any info from RAW files unless you decode them (which would make binary distribution of your program illegal). ADIF and ADTS I told about, you can find more info on http://www.audiocoding.com/wiki.

Menno

AAC file header

Reply #18
How can I get the sampling rate from the ADIF header?

AAC file header

Reply #19
Sampling rate is taken from the sampling_frequency_index in the program_config_element.
I updated the ADIF page to describe this program_config_element:
http://www.audiocoding.com/wiki/index.php?page=ADIF

Menno

AAC file header

Reply #20
Thank you!

AAC file header

Reply #21
Aah its cool to see you're adding AAC support to your MAC program  Thanks JF!
< w o g o n e . c o m / l o l >

AAC file header

Reply #22
I would like to get a sample encoded with the FhG ACC coder. Where can I download one?

AAC file header

Reply #23
If you send me an email, I can send you some.

Menno

AAC file header

Reply #24
> menno: If you send me an email, I can send you some.

jfaul at gmx dot de