Changes between Version 5 and Version 6 of AACEncodingGuide
- Timestamp:
- 02/02/2013 04:12:04 AM (4 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AACEncodingGuide
v5 v6 3 3 [[PageOutline(2-3, Contents)]] 4 4 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. 6 6 7 FFmpeg can support four AAC-LC encoders (`aac`, `libfaac`, `libfdk_aac`, `libvo_aacenc`) and two AAC-H C encoders (`libaacplus` and `libfdk_aac`). `libaacplus`, `libfaac`, and `libfdk_aac` are considered "non-free", and are therefore non-redistributablemeaning you may have trouble finding a build that supports these. Of course you can resolve this by [[CompilationGuide|compiling ffmpeg]].7 FFmpeg 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]]. 8 8 9 9 ---- … … 49 49 === Constant Bit Rate (CBR) mode ===#fdk_cbr 50 50 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 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.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 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. 52 52 53 53 ==== Examples ==== … … 77 77 This 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). 78 78 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.79 Unfortunately, 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. 80 80 81 81 The following examples are adapted from [[http://ubuntuforums.org/showpost.php?p=12421935&postcount=34|this ubuntuforums post]]. … … 97 97 == Native FFmpeg AAC encoder == 98 98 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]).99 The 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]). 100 100 101 101 ==== Example ==== … … 109 109 == libvo_aacenc == 110 110 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_aacand 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`. 112 112 113 113 ==== Example ==== … … 148 148 === Which encoder should I use? What provides the best quality? === 149 149 150 It depends. For AAC-LC the likely answer is: libfdk_aac > libfaac > FFmpeg AAC ≥ libvo_aacenc.150 It depends. For AAC-LC the likely answer is: `libfdk_aac` > `libfaac` > Native FFmpeg AAC ≥ `libvo_aacenc`. 151 151 152 152 === Should I use AAC-LC or AAC-HE? === 153 153 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 useAAC-LC.154 It 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. 155 155 156 156 {{{#!comment


