Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Examples

nu774 edited this page · 9 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.

Using named pipe

At first, execute something like the following in one command prompt window.

qaac --adts -o \\.\pipe\foo.aac foo.wav

Then, execute something like the following in another command prompt window.

x264 --audiofile \\.\pipe\foo.aac --acodec copy -o bar.mp4 video.avs 

In this example, qaac will create named pipe \\.\pipe\foo.aac, and wait for connection. When second command line is executed, qaac starts encoding and feed to the named pipe. Second command line tells x264 (with audio support built-in) to read audio from \\.\pipe\foo.aac, and just mux it without encoding. x264 doesn't even know if it is a named pipe, but it just works.

You can use arbitrary name for named pipe, but it must start with "\\.\pipe\".

Of course x264 here is just an example. It can be anything. However, it depends on the client program if it really works. Basically speaking, if it requires seeking, or is doing some special treatment on the input filename, named pipe will not work.

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 just 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 -

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).

Doc written by Eyolv André Øverland (in docx format): EACQAAC.zip

Something went wrong with that request. Please try again.