| | 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 | |
| 123 | | == Native FFmpeg AAC encoder == |
| 124 | | |
| 125 | | 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`. This is considered an experimental encoder, so `-strict experimental` or `-strict -2` is required. |
| 126 | | |
| 127 | | ==== Example using `-b:a` ==== |
| 128 | | |
| 129 | | {{{ |
| 130 | | ffmpeg -i input.wav -strict experimental -c:a aac -b:a 240k output.m4a |
| 131 | | }}} |
| 132 | | |
| 133 | | '''Note:''' `-cutoff 15000` was previously recommended for this encoder, but this is now automatically applied since 2012 July. |
| 134 | | |
| 135 | | |
| 136 | | ==== Example using `-q:a` ==== |
| 137 | | |
| 138 | | {{{ |
| 139 | | ffmpeg -i input.wav -strict experimental -c:a aac -q:a 6 output.m4a |
| 140 | | }}} |
| 141 | | |
| 142 | | Effective range for `-q:a` is around 0.1-10. This VBR is experimental and likely to get even worse results than the CBR. If ffmpeg ignores `-q:a` then get a newer build (see ticket #[ticket:1346]). |
| 143 | | |
| 144 | | |
| 145 | | ---- |
| 146 | | |
| 194 | | |
| 195 | | === I get an error about "experimental codecs". What does this mean? === |
| 196 | | |
| 197 | | Some encoders, such as the native FFmpeg AAC encoder (`aac`), are considered experimental and require the addition of `-strict experimental` or `-strict -2` (same thing, different name) to your command as an output option. Otherwise you may see: |
| 198 | | |
| 199 | | {{{ |
| 200 | | The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it. |
| 201 | | }}} |
| 202 | | |
| 203 | | So, for example, given a command line such as: |
| 204 | | |
| 205 | | {{{ |
| 206 | | ffmpeg -i file.avi file.mov |
| 207 | | }}} |
| 208 | | |
| 209 | | you may need to invoke `ffmpeg` as follows for the experimental codec to be enabled: |
| 210 | | |
| 211 | | {{{ |
| 212 | | ffmpeg -i file.avi -strict -2 file.mov |
| 213 | | }}} |
| 214 | | |
| 215 | | ---- |