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

ADTS file format

hi all,

i'm new to this forum, but have been reading quite a lot of interesting posts on here and it seems like a well informed set of people posting on here 

i've recently been looking at implementing an AAC decoder, and i now have this working (based on the ISO reference code), i'm currently adding ADTS support as it looks like this is what our customers will want. i've got it working and decoding the test streams from mpeg.

(you can get them here: ftp://mpaudconf:adif2mp4@ftp.iis.fhg.de/g...io-conformance/ - the adts streams are in the mpeg2 aac folder)

however i am unable to decode any of the various test streams we have from customers. the test streams i have look like ADTS - they have the ADTS sync word (12 1's) every so often in the file (including at the start), but the rest of the ADTS header doesn't seem right - the layer field seems always to be 2, when all specs i've seen say this must always be 0.

example header that doesn't work is:

1111 1111 1111 - syncword

1 - mpeg 2/4 flag

10 - layer

0 - protection absent

11 - profile obj type

0001 - sampling frequency index

0 - private bit

000 - channel config (Q. - is 0 valid for ADTS channel config? how else would it be calculated?)

0000 - 4 copyright flags

0010 1000 1111 1 - frame length

1000 1010 101 - buffer fullness

01 - num raw data blocks

does anyone know whether that is or isn't a valid ADTS header? are there any other audio file formats that use 12 1's as a sync word?

any help much appreciated!

regards,

will

ADTS file format

Reply #1
To me this header does look like a ADTS header but,

1111 1111 1111 - syncword: unique for ADTS

1 - mpeg 2/4 flag: mpeg 2 AAC

10 - layer: should be 0

0 - protection absent: protection present, which is NOT normal

11 - profile obj type: reserved, meaning NO profile at all

000 - channel config: 0 is NOT a valid choice

From above it looks like the header is wrong.

ADTS file format

Reply #2
sorted this, in case anyone is interested the file wasn't aac under adts at all, it was mpeg1 part 3 (audio) layer 2. mpeg1 audio and mpeg2 bc audio have similar headers to adts, with the 12 1's syncword but many of the other data fields are different...