Analysis of audio AAC coding

Source: Internet
Author: User

/* *    unsigned long   nsamplerate,        //sample rate in bps*    unsigned long   nchannels,          //channel, 1 mono, 2 for dual channel *    unsigned long   &samplesinput,    //reference, gets the original data length that should be received each time the encoding is called *    unsigned long   & Maxbytesoutput//Pass reference, get the maximum length of AAC data generated each time the code is called *    /faacencopen(samplerate , channels, &samplesinput, &maxbytesoutput);

The original data length that should be received by the known sample rate and channel first for each AAC encoding before using AAC encoding is the third parameter in the code above Samplesinput

There is also the maximum length of the AAC data output per encoding, which is the fourth parameter in the above code Maxbytesoutput

Audio encoding:

int Faacencencode out, enc_size);

In the true audio AAC encoding, the interface uses pcm_buffer[] that is, the raw data entered is equal to the length of the original data received before each AAC encoding should be taken, that is, the Samplesinput

The enc_size is the maximum length of the AAC data that is obtained on each encoding, which is the maxbytesoutput obtained above.

Above out[] size is the length of maxbytesoutput

Note: Only the original PCM data is required for audio encoding, and those timestamps do not have much to do with true AAC encoding. The timestamp may be next to the audio AAC encoded data.

Analysis of audio AAC coding

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.