Examples

Jack McKernan edited this page Dec 23, 2017 · 11 revisions

In the following examples, qaac install directory is assumed to be in the PATH environment variable. If not, you have to say like "C:\path\to\your\qaac.exe" instead of just saying "qaac".

AAC encoding

qaac foo.wav

will generate foo.m4a in the current directory. AAC encoder is selected by default, and TVBR 90, quality 2(highest) is chosen.

If you want to change TVBR quality, specify -V 127 or something.

When --adts option is given, qaac generates an ADTS (so-called "raw") output with .aac extension, instead of m4a. You can feed ADTS output to stdout like the following:

qaac --adts -V63 -o- foo.flac | whatever_program

ALAC encoding

qaac -A foo.wav

will generate foo.m4a, encoded with ALAC.

Encoding multiple files

qaac *.flac -d some_directory

will be handy. Each track is encoded into some_directory.

qaac --concat *.flac -o out.m4a

will encodes whole input into out.m4a. Chapter is inserted for each input track.

Encoding from pipeline

flac -dc foo.flac | qaac -V 100 --ignorelength - -o foo.m4a

Here, - is used instead of input filename, and let qaac read from stdin, instread of ordinary file.

Of course, this example is nonsense -- qaac is capable of reading FLAC files directly.

Encoding Raw PCM

qaac -R --raw-channels=6 --raw-rate=48000 --raw-format=S16B foo.pcm

You must specify sample spec like this.

--raw-channels
the number of channels
--raw-rate
sample rate, in Hz.
--raw-format
[S]igned/[U]nsigned, sample bit width, [L]ittle/[B]ig endian

By default, without options, qaac assumes 2ch, 44100Hz, Signed, 16bit, Little endian.

GUI front-end examples

You only have to know how to specify input and output filename for each front-end. Other things are the same with direct command-line usage.

foobar2000

AAC LC, TVBR 72
-V72 -o %d -
AAC LC, iTunesPlus
-v256 -o %d -
HE-AAC, CVBR 64
--he -v64 -o %d -
ALAC
-A -o %d -

%d is foobar2000's placeholder for output file name. Absence of %s (placeholder for input file name) implies that fb2k will feed input to encoder via pipe instead of temporary file, and "-" directs qaac to read from stdin, which is connected to the pipe.

Since qaac accepts high bit depth sample formats like int32/float32/float64, You can set "Highest BPS supported" to 32.

You might want to optionally add --no-optimize option. --no-optimize directs qaac not to optimize the MP4 container file after encoding. Optimizing is a bit time consuming process for very large files, and it's needless because foobar2000 will also touch encoded file after encoding has finished, to write it's own tags or something.

If you have folder.jpg (or something) in your encoding destination folder, and want to embed it to the result, use the setting like following:

-V 127 --artwork folder.jpg -o %d -

MusicBee

Replace the default neroaac encoder options with qaac options that mimic iTunes encoding. (Edit Preferences->File Converters)

Encoder location should point to qaac.exe or qaac64.exe for both AAC and ALAC.

AAC

Small file size:
-a 96 -q 1 -o [outputfile] -
Standard quality: (iTunes High Quality)
-a 128 -q 1 -o [outputfile] -
High quality: (iTunes Plus)
-v 256 -q 2 -o [outputfile] -
Maximum Quality:
-v 0 -q 2 -o [outputfile] -

ALAC

Max compression:
-A -o [outputfile] -
Std. compression:
-A -o [outputfile] -

Similar to foobar2000's %d, MusicBee denotes its output file with [outputfile].

Exact Audio Copy

Guide on HA wiki: http://wiki.hydrogenaudio.org/index.php?title=EAC_and_QAAC#General_Configuration_for_Encode_ALAC (Note that you need additional -A in the command line option for qaac + ALAC).