Changes between Version 5 and Version 6 of Encode/AAC


Ignore:
Timestamp:
Feb 2, 2013, 5:12:04 AM (5 years ago)
Author:
MarkZV
Comment:

minor fixups

Legend:

Unmodified
Added
Removed
Modified
  • Encode/AAC

    v5 v6  
    33[[PageOutline(2-3, Contents)]] 
    44 
    5 [[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. 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. 
     5[[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`, `libvo_aacenc`) and two AAC-HC encoders (`libaacplus` and `libfdk_aac`). `libaacplus`, `libfaac`, and `libfdk_aac` are considered "non-free", and are therefore non-redistributable meaning you may have trouble finding a build that supports these. Of course you can resolve this by [[CompilationGuide|compiling ffmpeg]]. 
     7FFmpeg can support four AAC-LC encoders (`aac`, `libfaac`, `libfdk_aac`, `libvo_aacenc`) and two AAC-HE encoders (`libaacplus` and `libfdk_aac`). `libaacplus`, `libfaac`, and `libfdk_aac` are considered "non-free", and are therefore non-redistributable, meaning you may have trouble finding a build that supports these. Of course you can resolve this by [[CompilationGuide|compiling ffmpeg]]. 
    88 
    99---- 
     
    4949=== Constant Bit Rate (CBR) mode ===#fdk_cbr 
    5050 
    51 These settings target a specific bit rate, with less variation between samples. It will get you slightly lower quality for the bit rate it gives than the VBR mode would; but it gives you greater control over filesize, and it is compatible with the HE-AAC profile. As a rule of thumb, for audible transparency, use 64kb/s for each channel (so 128kb/s for stereo, 384 kb/s for 5.1 surround sound). Set the bit rate with the `-b:a` flag. 
     51These settings target a specific bit rate, with less variation between samples. It will get you slightly lower quality for the bit rate it gives than the VBR mode would; but it gives you greater control over file size, and it is compatible with the HE-AAC profile. As a rule of thumb, for audible transparency, use 64kb/s for each channel (so 128kb/s for stereo, 384 kb/s for 5.1 surround sound). Set the bit rate with the `-b:a` flag. 
    5252 
    5353==== Examples ==== 
     
    7777This is a pair of AAC profiles tailored for low bit rates (version 1 and version 2). AAC-HE version 1 is suited for bit rates below 64kb/s (for stereo audio) down to about 48 kb/s, while AAC-HE version 2 is suited for bit rates as low as 32 kb/s (again, for stereo).  
    7878 
    79 Unfortunately, many devices that can play AAC-LC (the default profile for fdk_aac) simply cannot play either version of AAC-HE, so this is not recommended for surround sound audio, which normally needs to be compatible with such hardware players. If you are only going to play it on your computer, or you are sure that your hardware player supports AAC-HE, you can aim for a bit rate of 160kb/s for version 1, or 128kb/s for version 2. As always, experiment to see what works for your ears. 
     79Unfortunately, many devices that can play AAC-LC (the default profile for `libfdk_aac`) simply cannot play either version of AAC-HE, so this is not recommended for surround sound audio, which normally needs to be compatible with such hardware players. If you are only going to play it on your computer, or you are sure that your hardware player supports AAC-HE, you can aim for a bit rate of 160kb/s for version 1, or 128kb/s for version 2. As always, experiment to see what works for your ears. 
    8080 
    8181The following examples are adapted from [[http://ubuntuforums.org/showpost.php?p=12421935&postcount=34|this ubuntuforums post]]. 
     
    9797== Native FFmpeg AAC encoder == 
    9898 
    99 The native FFmpeg AAC encoder is included with ffmpeg and is does not require an external library like the AAC encoders described here. Note that you will not get as good results as with libfdk_aac. The `-cutoff` option may improve quality according to [http://d.hatena.ne.jp/kamedo2/20120729/1343545890 Quality Assessment of FFmpeg AAC]. This encoder does not currently work with `-q:a`/`-qscale:a` (see ticket #[ticket:1346]). 
     99The native FFmpeg AAC encoder is included with ffmpeg and is does not require an external library like the other AAC encoders described here. Note that you will not get as good results as with `libfdk_aac`. The `-cutoff` option may improve quality according to [http://d.hatena.ne.jp/kamedo2/20120729/1343545890 Quality Assessment of FFmpeg AAC]. This encoder does not currently work with `-q:a`/`-qscale:a` (see ticket #[ticket:1346]). 
    100100 
    101101==== Example ==== 
     
    109109== libvo_aacenc == 
    110110 
    111 !VisualOn AAC encoding library. Requires ffmpeg configuration with `--enable-libvo-aacenc`. This has the advantage of not being non-free, and is included by some distributors, but is a rather poor encoder compared to libfdk_aac and even the native FFmpeg AAC encoder according to [http://d.hatena.ne.jp/kamedo2/20120729/1343545890 Quality Assessment of FFmpeg AAC]. This encoder does not work with `-q:a`/`-qscale:a`. 
     111!VisualOn AAC encoding library. Requires ffmpeg configuration with `--enable-libvo-aacenc`. This has the advantage of not being non-free, and is included by some distributors, but is a rather poor encoder compared to `libfdk_aac` and even the native FFmpeg AAC encoder according to [http://d.hatena.ne.jp/kamedo2/20120729/1343545890 Quality Assessment of FFmpeg AAC]. This encoder does not work with `-q:a`/`-qscale:a`. 
    112112 
    113113==== Example ==== 
     
    148148=== Which encoder should I use? What provides the best quality? === 
    149149 
    150 It depends. For AAC-LC the likely answer is: libfdk_aac > libfaac > FFmpeg AAC ≥ libvo_aacenc. 
     150It depends. For AAC-LC the likely answer is: `libfdk_aac` > `libfaac` > Native FFmpeg AAC ≥ `libvo_aacenc`. 
    151151 
    152152=== Should I use AAC-LC or AAC-HE? === 
    153153 
    154 It also depends. If you require a low audio bitrate, such as ≤ 32kbs/channel, then AAC-HE would be worth considering depending if your player or device can support AAC-HE decoding. Anything higher may benefit more from AAC-LC due to less processing. If in doubt use AAC-LC. 
     154It also depends. If you require a low audio bitrate, such as ≤ 32kbs/channel, then AAC-HE would be worth considering if your player or device can support AAC-HE decoding. Anything higher may benefit more from AAC-LC due to less processing. If in doubt use AAC-LC. All players supporting AAC-HE also support AAC-LC. 
    155155 
    156156{{{#!comment