Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>First of all have a look at this <a href="https://trac.ffmpeg.org/wiki/GuidelinesHighQualityAudio" rel="nofollow">document:</a></p> <p>Dolby Digital: ac3</p> <p>Dolby Digital Plus: eac3</p> <p>MP2: libtwolame, mp2</p> <p>Windows Media Audio 1: wmav1</p> <p>Windows Media Audio 2: wmav2</p> <p>LC-AAC: libfdk_aac, libfaac, aac, libvo_aacenc</p> <p><strong>HE-AAC: libfdk_aac, libaacplus</strong></p> <p>Vorbis: libvorbis, vorbis</p> <p>MP3: libmp3lame, libshine</p> <p>Opus: libopus</p> <p>from the above reading it will be clear to you that in order to encode audio in HE-AAC/ HE-AAC-V2 you have to use libfdk_aac or libaacplus.</p> <p>I will explain how you can do it using libfdk_aac:</p> <p>first make sure you configure ffmpeg along with following options:</p> <p>--enable-libfdk_aac --enable-nonfree</p> <p>now build ffmpeg and try to run the following command and see if it works:</p> <p>$ ffmpeg -i -vcodec copy -acodec libfdk_aac -profile:a aac_he </p> <p>if this works it means libav is linked with libfdk_aac.</p> <p>now in order to use it in the code:</p> <p>open the encoder using the following instructions:</p> <pre><code>AVCodecContext *encoder_ctx; encoder_ctx-&gt;codec_id = AV_CODEC_ID_AAC; encoder_ctx-&gt;sample_fmt = AV_SAMPLE_FMT_S16; encoder_ctx-&gt;profile = FF_PROFILE_AAC_HE; encoder = avcodec_find_encoder_by_name("libfdk_aac"); // if you still try to open it using avcodec_find_encoder it will open libfaac only. avcodec_open2(encoder_ctx, encoder, NULL); </code></pre> <p>Here we go, you have libfdk_aac encoder open ! The profiles which you can use are as given in this <a href="http://ffmpeg.org/doxygen/trunk/libfdk-aacenc_8c_source.html" rel="nofollow">source</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload