Changes between Version 42 and Version 43 of Encode/AAC


Ignore:
Timestamp:
Jan 30, 2016, 7:10:56 AM (3 years ago)
Author:
Kamedo2
Comment:

The assertion of native aac better than fdk is too bold. https://hydrogenaud.io/index.php/topic,111085/topicseen.html

Legend:

Unmodified
Added
Removed
Modified
  • Encode/AAC

    v42 v43  
    55[[http://en.wikipedia.org/wiki/Advanced_Audio_Coding|Advanced Audio Coding (AAC)]] is the successor format to MP3, and is defined in MPEG-4 part 3 (ISO/IEC 14496-3). It is often used within an MP4 container format; for music the .m4a extension is customarily used. The second-most common use is within MKV (Matroska) files because it has better support for embedded text-based soft subtitles than MP4. The examples in this guide will use the extensions MP4 and M4A.
    66
    7 FFmpeg can support four AAC-LC encoders (`aac`, `libfaac`, `libfdk_aac`) and two AAC-HE encoders (`libaacplus` and `libfdk_aac`). The licenses of `libaacplus`, `libfaac`, and `libfdk_aac` are not compatible with the GPL, so the GPL does not permit distribution of binaries containing code licensed under these licenses when GPL-licensed code is also included. Therefore these encoders have been designated as "non-free", and you cannot download a pre-built ffmpeg that supports them. This can be resolved by [[CompilationGuide|compiling ffmpeg]] yourself.
     7FFmpeg can support three AAC-LC encoders (`aac`, `libfaac`, `libfdk_aac`) and two AAC-HE encoders (`libaacplus` and `libfdk_aac`). The licenses of `libaacplus`, `libfaac`, and `libfdk_aac` are not compatible with the GPL, so the GPL does not permit distribution of binaries containing code licensed under these licenses when GPL-licensed code is also included. Therefore these encoders have been designated as "non-free", and you cannot download a pre-built ffmpeg that supports them. This can be resolved by [[CompilationGuide|compiling ffmpeg]] yourself.
    88
    99See also [[Encode/HighQualityAudio]] for general guidelines on FFmpeg audio encoding (which also includes a comparison of which AAC encoder is best quality).
     
    1111----
    1212
    13 == Native FFmpeg AAC encoder ==
    14 
    15 The native FFmpeg AAC encoder. This is currently the highest-quality AAC encoder available in FFmpeg and does not require an external library like the other AAC encoders described here. Results are usually as good or better than libfdk_aac at 128kbps but will occasionally sound worse below 96kbps. This is the default AAC encoder. The only drawback is that this encoder does not support the AAC-HE profile yet.
    16 
    17 ==== Example using `-b:a` ====
    18 
    19 {{{
    20 ffmpeg -i input.wav -b:a 160k output.m4a
    21 }}}
    22 
    23   '''Note:''' `-strict experimental` was previously required for this encoder, but is unneeded since December 2015.
    24 
    25 
    26 ==== Example using `-q:a` ====
    27 
    28 {{{
    29 ffmpeg -i input.wav -strict experimental -c:a aac -q:a 3 output.m4a
    30 }}}
    31 
    32 Effective range for `-q:a` is around 0.1-10. This VBR is experimental and likely to get even worse results than the CBR.
    33 
    34 
    35 ----
    36 
    3713== libfdk_aac ==#fdk_aac
    3814
    39 The Fraunhofer FDK AAC codec library. Requires ffmpeg to be configured with `--enable-libfdk-aac` (and additionally `--enable-nonfree` if you're also using `--enable-gpl`). But beware, it defaults to a low-pass filter of around 14kHz ([[http://wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC#Bandwidth|details]]). If you want to preserve higher frequencies, use `-cutoff 18000`.  Adjust the number to the upper frequency limit you prefer.
     15The Fraunhofer FDK AAC codec library. This is currently the highest-quality AAC encoder available with ffmpeg. Requires ffmpeg to be configured with `--enable-libfdk-aac` (and additionally `--enable-nonfree` if you're also using `--enable-gpl`). But beware, it defaults to a low-pass filter of around 14kHz ([[http://wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC#Bandwidth|details]]). If you want to preserve higher frequencies, use `-cutoff 18000`.  Adjust the number to the upper frequency limit you prefer.
    4016
    4117Detailed information about the FDK AAC library (not FFmpeg specific) can be found at the [[http://wiki.hydrogenaud.io/index.php?title=Fraunhofer_FDK_AAC|Fraunhofer FDK AAC]] page in the HydrogenAudio Knowledgebase.
     
    145121----
    146122
     123== Native FFmpeg AAC encoder ==
     124
     125The native FFmpeg AAC encoder. This is currently the second highest-quality AAC encoder available in FFmpeg and does not require an external library like the other AAC encoders described here. This is the default AAC encoder.
     126
     127==== Example using `-b:a` ====
     128
     129{{{
     130ffmpeg -i input.wav -b:a 160k output.m4a
     131}}}
     132
     133  '''Note:''' `-strict experimental` was previously required for this encoder, but is unneeded since December 2015.
     134
     135
     136==== Example using `-q:a` ====
     137
     138{{{
     139ffmpeg -i input.wav -c:a aac -q:a 2 output.m4a
     140}}}
     141
     142Effective range for `-q:a` is around 0.1-2. This VBR is experimental and likely to get even worse results than the CBR.
     143
     144----
     145
    147146== libvo_aacenc ==
    148147
     
    183182=== Which encoder should I use? What provides the best quality? ===
    184183
    185 For AAC-LC the likely answer is: Native FFmpeg AAC encoder (`aac`) >= `libfdk_aac` > `libfaac`.
     184For AAC-LC the likely answer is: `libfdk_aac` > Native FFmpeg AAC encoder (`aac`) > `libfaac`.
    186185
    187186=== Should I use AAC-LC or AAC-HE? ===