-
Notifications
You must be signed in to change notification settings - Fork 43
Examples
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".
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
qaac -A foo.wav
will generate foo.m4a, encoded with ALAC.
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.
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.
At first, execute something like the following in one command prompt window.
qaac --adts -o \\.\pipe\foo.aac foo.wav
Secondly, 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.
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.
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.
-A -o %d -
This is an example for ALAC encoding. %d is foobar2000's placeholder for output file name. Here "-" is used for input, which tells qaac to use pipe input.
You might want to add --no-optimize option here. --no-optimize tells 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 -
Eyolv André Øverland has kindly written and sent me a good documentation. You can download the doc as the zip archive (it's in docx format): EACQAAC.zip
EAC has changed it's placeholder format in the recent version, and this doc is for the newer version.
-A -o [outfile] -
This is for ALAC. [outfile] is placeholder for output file name, and "-" is used for pipe input.