AAC Configuration

AAC is MPEG4 part 3 and it comes with a configuration data before it can be decoded by a decoder. This configuration data can usually be found in the SDP, under audio track -> config. Normally, it is a 2 bytes in hexadecimal. Below is a sample of the information which may be contains in the configuration data.

1210 = 0001 0010 0001 0000

5 bits for object type = 00010 = 2 = AAC low complexity

4 bits for sampling rate = 0100 = 44100hz

4 bit for channel = 0010 = 2 channel

1 bit for frame length flag = 0 for 1024 sample

1 bit for depends on core coder = 0

1 bit for extension flag = 0

frame length flag:
0: Each packet contains 1024 samples
1: Each packet contains 960 samples

The full specification for AudioSpecificConfig is stated in ISO 14496-3 Section

See http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio for complete list.


  1. As Object Type has only 5. How to i represent object type = 39 . I need to send AOT = 39 ,48khz,1 channel. How can i send in config param ? Please help me.

  2. I meant Object Type has only 5 bits. Max of 32 can be sent. how can i send 39 (AAC-ELD)

  3. For AOT > 30, you have to set first 5 bit as AOT = 31. Then, the next 6 bit + 32 represents the AOT value

    5 bits: object type
    if (object type == 31)
    6 bits + 32: object type
    4 bits: frequency index
    if (frequency index == 15)
    24 bits: frequency
    4 bits: channel configuration
    var bits: AOT Specific Config

    See http://wiki.multimedia.cx/index.php?title=MPEG-4_Audio

  4. as per above calculation does config = B98C00 has 960 samples... can you please confirm, i am struck here.

    if i need 1024, i need to send config = B97C00 .. please confirm.

  5. Thanks a lot Thompson for your immediate reply and constant help.

    I am trying to decode AAC LD stream, what i found out from AAC Payload- it has 2 bytes of Frame AU header, followed by two bytes of AU header for each AU unit and than followed by AU Data. I did not find any other values/Field. I am following RFC 3640... Can you please comment on my understand.

    Any softclient/open source which supports AAC LD ?

    Thanks a lot.

  6. AAC LD (AAC low delay) should not affect anything in RFC 3640. In another word, RFC 3640 packet data independently.

    In your case, you seems to have a rtp packets that contains multiple AAC data.

    In that case, your first 2 bytes is AU headers length.

    And since you said that it is a 2 bytes AU header, you are using HBR mode. You should verify this from your sdp. This also means that the first 13 bits of your AU header is your AU data length in bytes.

    If you want to find your first AU data unit, do the following with your RTP packet (just one of the solution off my mind)

    1. Read in first 2 bytes to find out the number of bits that represent the AU headers length. For example, it is 32 bits

    2. Base on point 1, figure out the number of AU headers. For example, since each AU header is 2 bytes, 32 bits / (2 * 8) = 2. That is 2 AU unit

    3. Then, from your first AU header 13 bits, you can figure out the length of the AU data.

    4. Then, extract your first AU data by RTP length - AU header length (2 bytes) - N Au header size (depend on the number of AU headers your have). That will give you the offset of your first AU data. From this offset to the AU data length at point 3, you should be able to get your AAC data.

    VLC support AAC LD if I am not wrong

  7. Thanks, I am depacketizing as you mentioned above. Decoding is succesfull but there is no sound. I am using Fraunhofer library to decode and passing RAW AU frames. it generates no sound.

    Do i need to add any extra information/header to AU Unit and than pass it to decoder or Raw AU frame ?

    VLC does not support AAC, there is ticket opened for it.

    I tried in Mplayer.FAAD decoder.. nothing help . tried hard for AAC LD streamer..

  8. This comment has been removed by the author.

  9. Hi,
    i have one doubt. I captured packets while audio streaming was done with pc. when i see packets for each and every audio packet RTP header+4-Bytes+frame_payload.

    There 4-Bytes is unknown thing for me. Are those 4-Bytes same as AAC_Audio_specific config ??.

    thanks in advance...

  10. I'm sorry, but isn't

    1210 = 0000 0100 1011 1010 ?


    5 bits = 00000 = null
    4 bits = 1001 = 9 = 12000 sampling freq
    4 bits = 0111 = 7 = 7 + 1 channels

    1. No. These are hexadecimal values. It's 0x1210 not 1210 (0x4BA).


Post a Comment

Popular posts from this blog

FFMPEG - Creating timelapse with FFMPEG with JPEG

MP4 File Format Part 1