Nero AAC Encoder usage
neroAacEnc does support HE-AAC and HE-AAC v2 via -he
and -hev2
parameters.
This encoder is (still?) considered to be the best encoder quality wise. Nero offers it free of charge but doesn't give support for it. One problem you will encounter with large files like 5.1 WAV is the file size limitation. It is not due to this encoder being crippleware, but how to handle large numbers in a program. To workaround this you need to pipe the input with another program to the encoder and use the -ignorelength
parameter. If you input format is already WAV the following should work:
cat $myfile | neroAacEnc -q 0.5 -he -ignorelength -if - -of $myencodedfile
You can also use avconv
(formerly known as ffmpeg
, now forked and with the CLI tool being renamed) to do the conversion to WAV.
avconv -i $myfile -f wav - | neroAacEnc -q 0.3 -he -ignorelength -if - -of $myencodedfile
Note that the resulting file is a MP4 with a AAC stream in a MP4 container, not a raw AAC stream. You can extract the raw stream with MP4Box
from the gpac
package if you want to.
Nero AAC quality setting
The quality setting depends on the profile you use. With LC-AAC you can go up to -q 1.0
. HE-ACC is limited to -q 0.5
, I think, and HE-AAC v2 even lower. This is due the techniques behind those profiles that are centered around low bitrates. Using -q 0.5
will result in a file larger than common AC3 6ch audio from a DVD, using -q 0.3
will cut the file size in half.
Advice for codec and quality choice on multichannel audio
The situation is (still?) really messy, which is why there exist no easy to use GUI like Handbrake. The most efficient codec is HE-AAC v2 but it is not well supported in Ubuntu, due to licensing/patent issues in some countries. Vorbis is good too, but less efficient. Multichannel mapping should be fixed in the latest LTS release (12.04, it wasn't in 10.04). Leaving out MP3, AC3 comes in third place. FLAC is 4th on efficiency and the most supported lossless format. DTS is a complete looser and should be also left out, like MP3. Convert to FLAC if you can.
So if you have AC3 encoded audio, you probably leave it at that if the device and container format supports it. The chart for supported media formats on Android might be helpful.
Appendix: neroAacEnc help file
Usage:
neroAacEnc [options] -if <input-file> -of <output-file>
Where:
<input-file> : Path to source file to encode.
The file must be in Microsoft WAV format and contain PCM data.
Specify - to encode from stdin.
Note that multiple input files can be specified, they will be
encoded together into a single output file with chapter marks
indicating source file divisions.
<output-file> : Path to output file to encode to, in MP4 format.
==== Available options: ====
Quality/bitrate control:
-q <number> : Enables "target quality" mode.
<number> is a floating-point number in 0...1 range.
-br <number> : Specifies "target bitrate" mode.
<number> is target bitrate in bits per second.
-cbr <number> : Specifies "target bitrate (streaming)" mode.
<number> is target bitrate in bits per second.
When neither of above quality/bitrate options is used,
the encoder defaults to equivalent of -q 0.5
Multipass encoding:
-2pass : Enables two-pass encoding mode.
Note that two-pass more requires a physical file as input,
rather than stdin.
-2passperiod : Overrides two-pass encoding bitrate averaging period,
<number> : in milliseconds.
: Specify zero to use least restrictive value possible (default).
Advanced features / troubleshooting:
-lc : Forces use of LC AAC profile (HE features disabled).
-he : Forces use of HE AAC profile (HEv2 features disabled).
-hev2 : Forces use of HEv2 AAC profile
Note that the above switches (-lc, -he, -hev2) should not be
used; optimal AAC profile is automatically determined from
quality/bitrate settings when no override is specified.
-ignorelength : Ignores length signaled by WAV headers of input file.
Useful for certain frontends using stdin.
The version of abcde under Xenial is quite capable but some extra applications are needed as well as abcde itself:
sudo apt-get install abcde lame eyed3 glyrc imagemagick cdparanoia flac
Now to create great quality mp3s and flacs at the same time (with album art also downloaded) the following simple commandline is required:
abcde -o 'flac:-8,mp3:-b 320' -G
abcde will ask you a few questions and then you can sit back while your CD is converted into 2 of the most popular audio formats today :).
Full disclosure: I was formerly one of the maintainers of abcde.
Best Answer
Under Xenial Xerus the best choice is to use fdkaac:
Then the following syntax should be helpful, all examples are for Constant Bitrate Mode (CBR) although I have included a section at the bottom concerning Variable Bitrate Mode (VBR):
1. AAC-LC
For a single file try this:
and for a directory of wav files try the following:
Tested and working well on my system.
2. HE-AAC
For a single file try this:
and for a directory of wav files try the following:
Tested and working well on my system.
3. AAC-HEv2
For a single file try this:
and for a directory of wav files try the following:
Tested and working well on my system.
4. VBR Note:
If you wish to use Variable Bitrate (VBR) mode instead of Constant Bitrate (CBR) simply omit the
--bitrate
setting and use--bitrate-mode
instead.bitrate-mode
takes a setting from 1 to 5 with a higher value producing a higher bitrate.Further Reading: