Help us keep the list up to date and submit new video software here.

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or try DVDFab and copy, convert or make Blu-rays and DVDs! :)

Software Home >



qaac is a command line AAC/ALAC encoder frontend based on Apple encoder. Since 1.00, qaac directly uses CoreAudioToolbox.dll. Therefore, QuickTime installation is no more required. However, Apple Application Support is required. AAC-LC, AAC-HE, ALAC encoding are supported.

Free software
Released:Nov 20,2018
File size:2.9MB
3 votes

Rate it


qaac screenshot
Click to enlarge screenshot
Latest version

2.68 (November 20, 2018)


Visit developer's site

Download qaac 2.68  [2.9MB]  [Win]  [Portable]

Download old versions

Download qaac old versions


Free software (Free download and also open source code!)

Supported operating systems


Complete Version history / Release notes / Changelog

[qaac] release 2.68 (refalac 1.68)
posted 12 minutes ago by nu 774

MP4Source: when channel layout is not present in the ALAC magic cookie, defaulting to more appropriate channel layout.
libmp4v2: fixed an issue reading chunk offsets in co64 box (typically present in MP4 file bigger than 4GB).

[qaac] release 2.67 (refalac 1.67)
posted an hour ago by nu 774

Write non-zero avgBitrate field again, for iPod 5G compatibility:,85135.msg957234.html#msg957234

[qaac] release 2.66 (refalac 1.66)
posted 3 hours ago by nu 774

Implemented look-ahead on --drc. The amount of look-ahead is the same as the attack time.

[qaac] release 2.65 (refalac 1.65)
posted 2 hours ago by nu 774

Fixed a FLAC parser issue that picture tag gets lost when picture metadata comes before vorbis comments (thx to Matt Tyson).
Suppress console window title message when -s is specified.
Updated taglib.

[qaac] release 2.64 (refalac 1.64)
posted 2 hours ago by nu 774

Fixed regression of 2.63: HE-AAC frames were incorrectly multiplexed.

[qaac] release 2.63 (refalac 1.63)
posted 6 hours ago by nu 774

Support decoding FLAC in MP4.
AAC decoder: now recognizes 6.1ch/7.1ch AAC channel config constants (11 and 12) defined in 14496-3:2009/Amd 4:2013
Concatenating files with no title tag with --concat now creates empty chapter name (formerly file name was used).
--start now accept negative value. using --start and --delay at the same time is not allowed now. These two options are the same in functionality-wise, except for the reversed sign (For trimming, you use positive value for ---start, and negative value for --delay).
--adts and --concat doesn't allow concatenating files with varying sample format anymore.
External dlls are now loaded in lazy way, which means that they are not loaded until needed.
Increased buffering size for --play to avoid glitches on multi channel files.
--native-resampler now always use dedicated AudioConverter.
CAF: enabled 7.1ch rear AAC output.
AAC in CAF: when chan chunk is not present, get channel layout from kuki chunk.
Named pipe output is removed. I guess it has been rarely used anyway, but if you happen to want it, use .

[qaac] release 2.62
posted an hour ago by nu 774

Add support on Wavpack-DSD file (requires wavpack v5 DLL).

[qaac] release 2.61
posted Oct 2, 2016, 7:14 AM by nu 774

Fix 7.1ch PCE: was incorrectly writing object_type(2) instead of profile(1). AFAIK, this doesn't seem to actually affect decoders because decoders are only interested in channel layouts in PCE, but still it was incorrect, and should be fixed.

[qaac] release 2.60
posted Sep 21, 2016, 3:47 AM by nu 774

Fix: combination of --adts and --concat was generating invalid AAC file.
Changed 7.1ch rear channel layout in favor of Apple QuickTime.
Support new Wavpack v5 64bit API
Update: libsoxr
Update: taglib
qaac was using 3 front + 2 side + 2 back for 7.1ch rear output. However, it turned out that Apple QuickTime cannot handle this, and only recognizes 3 front + 4 back. OTOH, libavcodec couldn't recognize the latter until this patch Anyway it now handles both, so I decided to change 7.1ch rear layout to 3 front + 4 back, which is supported by both of them

[qaac] release 2.59
posted May 10, 2016, 4:30 PM by nu 774

Fix: Was failing encoding mono AAC to AAC.
Support Wavpack v5 interface (with large file support)
Wavpack version 5 is still in alpha state, and DLL is not officially provided. If you want to try it, you have to build it yourself from the source code.

This version of qaac supports both of old and new Wavpack DLL (they are binary compatible). When new functions provided in version 5 library are detected, qaac will use them.

[qaac] release 2.58
posted 4 hours ago by nu 774
Fixed: mono files couldn't be encoded to AAC since 2.56.

[qaac] release 2.57
posted an hour ago by nu 774
New option: --tag-from-file. This option is similar to --tag, but tag value is read from a file. Character encoding is guessed, but you can specify it by --text-codepage.
New option: --copy-artwork. When specified, front cover art is copied from source file. When --artwork is also specified, this option is ignored. Artwork can be resized by --artwork-size.
Better support of tags in files referred from a cuesheet. Now they are also imported.
Disallow decoding FLAC file via libsndfile. If you want FLAC, use libFLAC.
Ogg Vorbis decoding support via libsndfile.

[qaac] release 2.56
posted 36 minutes ago by nu 774
Allow path separators (slash or back slash) in --fname-format, and automatically create directory hierarchy according to the spec given by --fname-format.
Fixed a typo (--tag:geID tag was ignored because of this).
Added debugger output.

[qaac] release 2.55
posted 6 hours ago by nu 774
Yet another UniversalCRT compatibility issue. Since 2.52, qaac couldn't read file formats other than WAV on Windows XP.

[qaac] release 2.54
posted an hour ago by nu 774
Fix: Since 2.52, qaac has been compiled with MSVC14, and couldn't open non WAV files larger than 2GB, because of the C runtime change on MSVC14.

[qaac] release 2.53
posted 2 hours ago by nu 774
Add support of AAC decoding in ADTS/CAF container.
MP4: Fix an decoding issue after seek.
Add support of SBR/PS decoding.

[qaac] release 2.52
posted 5 hours ago by nu 774
Increased MSVC runtime limit of open files to 2048.
qaac tries to open all the input files before encoding. Previously, qaac couldn't open more than 512 files at once due to CRT limit. Now limit is increased to 2048.
Show meaningful error message on CRT level file open error.

[qaac] release 2.51
posted an hour ago by nu 774
Always write zero into avgBitrate field in esds decConfigDescriptor to be spec compliant. Was writing actual average bitrate before (this was automatically done by libmp4v2). The spec says that in case of VBR, is should be zero.
Write iTunes compatible "Encoding Params" tag.
Details on Encoding Params tag.
In this (binary) tag, encoding mode(CBR/ABR/CVBR/TVBR), bitrate, and the codec version is written. As far as I know, this tag is only used by iTunes to show bitrate and show if it is VBR or not.

For the sake of compatibility with iTunes, qaac writes nominal (target) bitrate into this tag, and iTunes will show this value when "Encoding Params" tag is present. Therefore, now the result of -v 256 encoding will always look like "256kbps (VBR)" in iTunes.

On the other hands, other (spec compliant) tools will show actual bitrate.

[qaac] release 2.50
posted 3 hours ago by nu 774
Better support for embedded cuesheet.

When cuesheet is embedded in an input file, qaac was encoding it into an single output file with chapters.

From this version, qaac now splits into multiple tracks by default (same as the case of external cuesheet). If you still want single output, use --concat.

[qaac] release 2.49
posted 2 hours ago by nu 774
Fixed issues on MP4Source:
Fixed handling of Nero style chapters starting from non-zero timestamp (typically inserted by fb2k and old neroaacenc).
Fixed handling of reading MP4 files with multiple elst entries.

[qaac] release 2.48 (refalac 1.48)
posted 10 hours ago by nu 774
Fixed an issue on MP4Source: trailing samples were discarded under certain conditions.

[qaac] release 2.47 (refalac 1.47)
posted 58 minutes ago by nu 774
Large file (>= 4GB) output is now supported. Very long duration (beyond 32bit limit) is also supported, but the latter is not compatible with QuickTime 7.
On very large files, container optimization can take several minutes. You can disable it by --no-optimize.

[qaac] release 2.46 (refalac 1.46)
posted an hour ago by nu 774
Fixed an issue on DLL loading: when a DLL qaac tries to load depends on other missing DLLs, OS was showing a modal dialog which effectively stopped the process until it is closed.
Allow -A option for refalac to be compatible with qaac.

[qaac] release 2.45 (refalac 1.45)
posted 40 minutes ago by nu 774
Added qaac64.exe that works with iTunes 64bit (ver 12.1).
Switched to static C runtime linking. Now you don't need msvcr120.dll and msvcp120.dll anymore.
Minor bug fixes.

[qaac] release 2.44 (refalac 1.44)
posted an hour ago by nu 774
Support avisynth script (avs) input. Like x264 or avs2pipemod, AVS is directly supported through avisynth C interface, not via VfW.

[qaac] release 2.43 (refalac 1.43)
posted 2 hours ago by nu 774
Fix: Write actual number of channels to mp4a box in MP4 container.

[qaac] release 2.42 (refalac 1.42)
posted 5 hours ago by nu 774 [ updated 4 hours ago ]
Add --start and --end option to specify start, end point of the input for partial encode. --start, --end (and --delay) supports 3 ways to describe the point.
[[hh:]mm:]ss[.sss..] : Timestamp described in hours, minutes, and seconds. Parts enclosed by brackets can be omitted. Seconds are parsed as double precision number (64bit float), and you can place arbitrary numbers of digits under the decimal point. You will need enough digits to achieve sample accuracy, depending on the sample rate.
ns : Number of samples, followed by 's'.
mm:ss:fff : Cuepoint in minutes, seconds, and frames(1/75 second), followed by 'f'.
Re-linked 32bit libsoxr.dll not to depend on libgcc_s_sjlj-1.dll. Now it is not included in the archive and you don't need it anymore

[qaac] release 2.41 (refalac 1.41)
posted 4 hours ago by nu 774
Add --limiter. --limiter applies smart limiter that softly clips portions where peak exceeds (near) 0dBFS. Softly means that it applies non-linear filter to surrounding half cycles (nearest zero crossing point to zero crossing point) so that the result fits in under 0dBFS but still is smoothly connected to other parts, resulting in much smaller audible distortion than dumb hard clips.
For CVBR/ABR/CBR mode, bitrate value less than 8 is now treated as "bits per sample". Bitrate is computed as the following:
Bitrate = bits_per_sample * number_of_channels * sample_rate
For example, --cvbr 2 is now equivalent for --cvbr 192 (=2*2*48000) for 2ch, 48kHz case. This can be useful when you want to use CVBR/ABR/CBR and want constant quality setting for varying number of channels or sample rate.
Other minor changes.

[qaac] release 2.40 (refalac 1.40)
posted 6 hours ago by nu 774 [ updated 6 hours ago ]
Fixed new MP4 decoder introduced at 2.39 (found seek related bug, and ALAC has been trimmed too much).

[qaac] release 2.39 (refalac 1.39)
posted 2 hours ago by nu 774
Added dedicated MP4 reader, which supports:

Deconding AAC-LC, MP1/2/3, ALAC (qaac), ALAC (refalac).
Perfectly support files with iTunSMPB and multiple edits. In files with multiple edits, there exist multiple valid spans to be played back. In other words, there are multiple gaps to be skipped. As far as I know, there is NO such software that supports it properly. If you are interested, try

This file contains 3 edits in it. When properly decoded/played, it contains exactly 30 seconds music. However, in this file there are very short 2 gaps to be skipped in the middle as well as first delay and end padding. Therefore, no software other than qaac should play it correctly without pops/clicks exactly in 30 seconds.

[qaac] release 2.38 (refalac 1.38)
posted an hour ago by nu 774
Allow nesting of ${} in --fname-format.
Now you can write something like ${albumartist|${artist}} for example, which means:

When album artist tag is present and non-empty, it evaluates to album artist tag's value.
Otherwise, it evaluates to artist tag's value.

[qaac] release 2.37 (refalac 1.37)
posted 7 hours ago by nu 774
Fixed a bug: AAC in CAF generated by qaac --caf was not playable due to bogus kuki chunk (Descriptors inside of esds box are expected, but qaac was writing bare AudioSpecificConfig).

[qaac] release 2.36 (refalac 1.36)
posted 13 minutes ago by nu 774
2.36 includes some minor fixes:

Improved accuracy of seeking on MP3 files by increased amount of preroll. Still doesn't count how many frames required due to bit-reservoir, but prerolling of 9 frames should be enough...
Fixed bitrate formatting on --format. Has been printing in decimals for 3ch only.
Fixed --stat. Incorrect values were written at the beginning (regression introduced by --num-priming or something).
Updated taglib.

[qaac] release 2.35 (refalac 1.35)
posted 6 hours ago by nu 774
Insert PCE in AAC payload on ADTS output when non standard channel layout such as 4ch(quad), 6ch, 6.1ch is in use.
Support 7.1ch rear for AAC (m4a/adts) by inserting PCE on qaac side. Mapping of 7.1ch rear input to 7.1ch front is dropped.
When non standard channel layout is used, PCE (program config element) is required to describe the channel layout. For MP4 container it is embedded in GASpecificConfig. For ADTS, since there's no such place in the header, PCE has to be periodically inserted in the AAC payload.

Since Apple codec doesn't support ADTS transmux, it does not insert PCE in AAC payload but writes PCE into "magic cookie" that contains GASpecificConfig. On the other hand, qaac has not been modifying AAC bitstream produced by the codec. As a natural consequence, ADTS output with non standard channel layout was lacking PCE support. This issue is fixed on this version.

As a good side effect, I also added support for 7.1ch rear. Before this version, 7.1ch rear input has been mapped to 7.1ch front as a compromise, that is not a very right thing to do. Since 7.1ch front and 7.1ch rear are the same in the AAC channel elements level (both of them are encoded as SCE+PCE+PCE+PCE+LFE), 7.1ch rear can be achieved by encoding as 7.1ch front and inserting PCE afterwards.

Since automatic mapping from 7.1ch rear to 7.1ch front is note dropped, 7.1ch rear input cannot be encoded as ALAC. It is not supported for CAF output too.

If you are a ffmpeg user, note that standard 7.1ch front AAC requires "-strict 1" to decode in the correct channel layout. It is due to historical reason that AAC encoders (including Nero and qaac) has been wildly mapping 7.1ch rear to 7.1ch front.

[qaac] 2.34 build fix
posted 7 hours ago by nu 774
2.34 was built targeting Vista or later by accident (toolset v120 was used instead of v120_xp). If you are using Windows XP SP3, please download

[qaac] release 2.34 (refalac 1.34)
posted an hour ago by nu 774
Added experimental option --num-priming to specify arbitrary number of priming samples between 0 and 2112. This option can only be applicable to AAC LC.

2112 is the default number of priming samples (delay) of Apple encoder. By specifying smaller value, you get shorter delay. --num-priming=0 is equivalent to --no-delay, and in fact, --no-delay is now re-implemented by --num-priming.

1024 or greater should be safe. In many cases, it seems that you can go as low as 576 (=448 + 128, where 448 is the number of borrowed samples from the previous frame for short block case, and 128 is the size of short block) and still be able to achieve perfect gapless playback. However, considering long block case and also the fact that faad (CLI frontend) discards first 1024 samples, setting smaller value than 1024 cannot be said to be always safe.

When number of priming samples is X where X < 576, decoder should not be able to reconstruct first 576 - X samples at least. Therefore, you should avoid it unless that portion of input is known to be silent.

Update on again (v3)
posted 5 hours ago by nu 774
Broken incremental build seems to have also affected refalac.exe (although it doesn't crash). Updated again (shown as v3).

[qaac] release 2.33 (refalac 1.33)
posted an hour ago by nu 774
Implemented smart padding (same as fdkaac) that minimizes the possibility of gapless playback issue.
You can disable this feature by new option --no-smart-padding. However, --no-smart-padding also disables additional padding at the end of HE-AAC stream that has been implemented as a workaround for CoreAudio encoder bug.
Although I don't recommend using --no-smart-padding, it is mandatory when you want bit-identical bitstream output as iTunes (including it's bugs).
Fixed fallback sample rate conversion when libsoxr is not present (was not working exactly as intended).
Improved error messages for the attempt to encode non supported PCM format to ALAC.
Minor fixes and rewriting.

[qaac] release 2.32 (refalac 1.32)
posted 7 hours ago by nu 774
Fixed: --tag apID and --tag akID were written in the long tag format.

[qaac] release 2.31 (refalac 1.31)
posted an hour ago by nu 774
Switch to MSVC12 (Visual Studio 2013). Now you need msvc[r|p]120.dll instead ( included in the zip archive). For the time being you can still able to build qaac with MSVC10, but I may drop MSVC10 support in future in favor of improved C++11 support in MSVC12.
Fixed crash when unknown fourcc was passed to --tag option.
Support --tag purd (purchase date), which seems to have been missing recently (perhaps around 2.28 or so).
Don't write raw ID3v1 genre number to CAF.
Don't write iTunes specific metadata to CAF.
Other minor code rewrites regarding metadata handling.

[qaac] release 2.30 (refalac 1.30)
posted 4 hours ago by nu 774
Fixed regression on 2.29, that was causing miserable failure (ERROR: invalid vector<T> subscript) when reading TAK files.

[qaac] release 2.29 (refalac 1.29)
posted 4 hours ago by nu 774
Fixed regression on 2.28: Tags were not properly copied when --concat was specified on cuesheet input.
Fixed not to exit with failure requesting output filename when --concat was specified with --peak or --play (in which case "output filename" is nonsense).
Some minor improvement and code refactoring.

[qaac] release 2.28 (refalac 1.28)
posted 4 hours ago by nu 774
Add new option: --caf. As the name implies, --caf tells qaac to output to CAF container. (HE-)AAC, ALAC, PCM (-D) are supported. Pipe streaming is supported in case of PCM, that can be used to pass audio as well as tags to fdkaac through pipeline.
(Hopefully) better handling of metadata. Non-standard tags such as performer or ISRC are now copied from input (However, some tags such as replaygain related metadata, ripping log, and cuesheet are blacklisted and not copied).
Support ALAC in CAF input from libsndfile. This will only be used by refalac + very recent libsndfile. qaac has already been supporting input of ALAC in CAF through CoreAudio API.
Fix: take care of zero byte text file input, which resulted in MLang text encoding detection failure.

[qaac] release 2.27 (refalac 1.27)
posted 7 hours ago by nu 774
Now you can set --drc option twice or more, with different parameters. This can be used to obtain more complex effect.

For example, you can use --drc for normal compression, then as a limiter (--drc with high thresh + high ratio + zero attack/release will work something like a limiter, that effectively kills remaining peaks

[qaac] release 2.26 (refalac 1.26)
posted an hour ago by nu 774
Disabled --no-delay on SBR. --no-delay removes several frames at beginning to compensate encoder delay, but it turns out to be problematic for SBR since sbr_header is not present on every frame, and decoder cannot decode SBR until seeing it. Anyway, you should be using LC when delay is important.
I guess VLC cannot decode SBR at the beginning of HE-AAC file having edts because of similar reason. It really needs to read sbr_header -- but probably it just skips to the position described in edts.
Added --drc for dynamic range compression.
About new dynamic range compressor

This is implemented based on "Digital Dynamic Range Compressor Design -- A Tutorial and Analysis", JAES2012.

Takes 5 parameters (threshold, ratio, knee width, attack, release), all of them are common among compressors, so you should be familiar with them.

Note that in this implementation, actual release time will be approximately equals to attack + release. This is by nature of "smooth, decoupling peak detector" in the paper, used by this compressor.

If you want what is called "makeup gain" to compensate attenuation by this compressor, just use --gain.

[qaac] release 2.25 (refalac 1.25)
posted 3 hours ago by nu 774
Fixed HE-AAC gapless playback issue

It seems that CoreAudio HE-AAC encoder finishes too early on HE-AAC encoding, and can result in too small amount of enc_padding. When enc_padding is smaller than 481 (which is the additional decoder delay for SBR), there's no way for decoder to reproduce complete samples, so decoded result will be get shorter.

This is actually a bug of CoreAudio encoder. I can see the very same behavior using iTunes, and when decoding resulting HE-AAC file by iTunes, decoded result is shorter than original.

You can see this by arbitrary 44.1khz 11 sec sample (number of samples=485100), which result in number of padding samples=74, and about 10ms at ending is dropped.

Since I'm using somewhat older iTunes ( and I'm reluctant to upgrading it, I don't know if it's still true for new iTunes, but I believe so since I'm using recent CoreAudioToolbox.

As a workaround, qaac now feeds additional 2048 samples of silence to HE-AAC encoder and edit iTunSMPB so that it reflects original length. As a result, HE-AAC file encoded by qaac will now play gaplessly by iTunes, but it's no more bit-identical with the result of iTunes in case of HE-AAC.

Note that you cannot still play HE-AAC files outside Apple softwares because of this: I'm sorry I should have noticed earlier of this.

[qaac] release 2.24 (refalac 1.24)
posted an hour ago by nu 774
Fix crash on reading unsigned 8bit PCM through libsndfile (for example, Wave64 format).
Fix bogus (non-compliant) sgpd box written on gaplessmode 1 or 2. However, I don't still recommend using it. As far as I know, only iTunes is known to support it well. VLC also supports edts, but it seems VLC decodes first few frames of HE-AAC without SBR when edts is being used.
Support float16 and float24 WAV and Wavpack file. float16 is assumed to be normalize in range [-65536, 65536], which is different from normal [-1,1] for floating point PCM. For details, read this thread on HA:
Show PCM sample format (int8 or something) when --verbose is specified. Both input format and resulting format are shown, the latter might be different due to DSP chain.
Disabled automatic quantization to integer when sample format is converted to float by DSP chain and encoding to ALAC.
Repackaged 64bit libsoxr.dll as libsoxr64.dll. Now refalac64 supports both names (of course it cannot use 32bit version of DLL, so be careful).
Show more meaningful message on write error (MSVCRT assigns EINVAL for broken pipe error, resulting in "invalid parameter" message, which is not quite helpful).
Some code clean up.

[qaac] release 2.23 (refalac 1.23)
posted 3 hours ago by nu 774
Switched from libsoxrate to libsoxr and new libsoxconvolver. Like libsoxr, libsoxconvolver uses SIMD optimized DFT/convolution routine when SSE is available. This library is used for --lowpass, --matrix-preset and --matrix-file. Unlike libsoxrate, libsoxconvolver is 32bit float based.
Add --peak and --play option.
Both doesn't produce output to a file, and cannot be used with other encoding option such as -V, -v, -a, -c, -A, and -D. However, DSP options such as --rate or --lowpass can be used.
--peak just scans input and print peak. Might be useful when you apply some DSP (especially mixing), and want to know resulting peak value before encoding.
--play does what it's name implies (play files using Wave Mapper device). Since qaac is an encoder and not a music player, don't expect much from it. It's just intended for cases when you want to test new custom matrix coefficients or something. --play doesn't automatically convert sample format, nor does remix.
Changed random number generator (used for TPDF dither) to LCG, which is known to be poor in randomness but quite fast, and is enough for just generating white noise for dither.
Don't flush immediately after writing WAV header when writing WAV file to a pipe. This makes pipe rewinding hack of SoX happier, but it seems not perfect. Basically speaking, SoX's pipe rewinding on win32 is nothing but a hack, so don't expect automatic format detecting of SoX to always work. Just use -t wav - or something to avoid unnecessary pipe rewinding.
Some code cleanup.
Fix help messages.
Updated taglib (again).

[qaac] release 2.22 (refalac 1.22)
posted an hour ago by nu 774
Fixed not to write tag when value of tag is empty.
Support loading of libFLAC_dynamic.dll (this name is used by v1.3.0 DLL distributed at Currently, qaac searches libFLAC dll in the following order.
libFLAC_dynamic.dll -> libFLAC.dll -> libFLAC-8.dll
Since 1.3.0 and 1.2.1 DLL are binary compatible within range of use by qaac, you can use any of them.
Tags given by command line option now take precedence over default tool tag written by qaac. As a result, you can override tool tag if you want to (with --tag too:value).
Updated TagLib to github current HEAD.

[qaac] release 2.21 (refalac 1.21)
posted 3 hours ago by nu 774
Fixed an issue of --threading option. There was a possibility of non sample aligned read on the pipe, similar to the problem that was fixed on 2.04 and 2.05.

[qaac] release 2.20 + refalac 1.20
posted 17 minutes ago by nu 774
Add optional libsoxr support. It's basically the same as libsoxrate (both derives from SoX), but is more optimized (fast), and is maintained by a developer of SoX.

When libsoxr.dll is present, now qaac/refalac will use it for sample rate conversion. libsoxr binary is on the cabinet page. Note that you still need libsoxrate when you want --lowpass or mixing option.

libsoxr binary built with GCC doesn't usually work with qaac/refalac due to a few ABI compatibility issues. The binary at cabinet page is built with GCC _with care_.

I have reported this issue to author of libsoxr, so it might be fixed in the future.

Decreased refresh rate of progress on title bar of console window.

Explicitly check presence of BOM when reading text files, since MLang often does a wrong guess even when BOM is present.

[qaac] release 2.19 (refalac 1.19)
posted 4 hours ago by nu 774
Fixed: attempt to set one of stik, rtng, akID, sfID tags caused qaac hang.

Well, actually not hanging but waiting for console input in vain... due to a silly bug calling scanf() instead of sscanf().

Fixed: --tag akID:fra was writing USA country code (not France).

[qaac] release 2.18
posted 4 hours ago by nu 774
Added --sort-args option by request, which sorts filenames given by command line before processing them. Sorting is done simply by Unicode character code, in ascending order.
Fixed to test seekability before estimating input length of raw input. Seems like _filelengti64() doesn't return error on a named pipe.

[qaac] release 2.17 (refalac 1.17)
posted an hour ago by nu 774
Fixed github issue 27 (regression on 1.26). --decode was writing invalid wav file.
Added --gapless-mode option (same as fdkaac).
Interestingly, iTunes seems to support both of iTunSMPB and ISO standard gapless mode. QuickTime supports only the latter. In the past, I thought QT silently assumes 2112 samples of delay. However, it turned out that QT actually looks elst media_time when sbgp and sgpd are present, so it can be used generally (as described in QTFF spec).

[qaac] release 2.16 (refalac 1.16)
posted 34 minutes ago by nu 774
Read and handle multichannel layout of TAK files.
Write fact chunk when decoding into WAVEFORMATEXTENSIBLE format. As far as I can see, even WMP is not in honor of the fact chunk, so this would be pretty much useless. However, since it looks like RIFF/WAV spec require it in WAVEFORMATEXTENSIBLE, this was implemented to be more spec compliant. fact chunk is not written on piped output or WAVEFORMATEX format.
Automatically kill progress message when stderr is connected to nothing.

[qaac] release 2.15 (refalac 2.15)
posted an hour ago by nu 774 [ updated 42 minutes ago ]
Fixed an awful bug of refalac of 2.xx branch. It wasn't encoding in correct frame length (4096 samples) on some cases.
I noticed it when I encoded directly from lossyFLAC (not piped input), which resulted 512 samples-per-frame ALAC file. It seemed playable, but apparently is not a normal/sane ALAC file;
WAV input will be usually fine (including piped input), if none DSP is applied. Direct input from FLAC or other formats might be affected, and Re-encoding is recommended. Only refalac of 2.xx branch is affected. qaac is fine.
Use more strict sharing mode when opening files. Now qaac/refalac doesn't allow other processes to open the output file when qaac/refalac is writing to it. Reading can be shared, but now qaac/refalac cannot open a file for reading when another process is writing to it.

[qaac] release 2.14 (refalac 1.14)
posted 2 hours ago by nu 774
Add --cue-track option to limit tracks to extract from cuesheet, and fixed several minor bugs.

[qaac] release 2.13 (refalac 2.13)
posted 17 minutes ago by nu 774
Gracefully shutdown on console interrupt event (such as Ctrl+C, Ctrl+Break or closing console window).

Gracefully means that it stops encoding immediately as if it were the end of input, and properly finalize the container, therefore resulting file will be playable (until that point).

Of course, it is not that qaac can terminate gracefully in every possible situations. You can always forcefully kill qaac using task manager or something.

[qaac] release 2.12 (refalac 1.12)
posted an hour ago by nu 774
Add --no-delay option. (Read the discussion at HA thread from here).

--no-delay will compensate encoder delay (2112 samples) by prepending silence of 960 samples before sending input to encoder, then trimming 3 AAC frames at beginning (2112 + 960 = 3072 = 1024 * 3, where 1024 is the frame length of AAC. So total amount of delay will be exactly equals to length of 3 AAC frames). Note that these numbers are doubled in case of SBR.

This option is meant for video as a mean to resolve A/V sync issue. The resultant AAC will have exactly zero-delay, but might have pops/clicks at the beginning. Use with care.

[qaac] release 2.11 (refalac 1.11)
posted 41 minutes ago by nu 774
Changed --tag option behavior to be strict. Formerly, when fourcc passed by --tag is unknown, qaac accepted it and wrote it as UTF8 string tag. Now --tag accepts only known tags. This is considered to be more foolproof, since iTunes is known to refuse editing tags when a file contains unknown tag atoms.
Read vorbis comment "WAVEFORMATEXTENSIBLE_CHANNEL_MASK" of FLAC and treat as channel layout.
Fixed a bug: mono AIFF/CAF file with kAudioChannelLabel_Mono in chan chunk could not be read.

[qaac] release 2.10 (refalac 1.10)
posted Dec 25, 2012 4:09 AM by nu 774
Changed --delay option spec. --delay now accepts either duration in time or number of samples. If you are used to timespec of sox, you should be already familiar with it. The format is as following:

In the first case, parts surrounded by brackets can be omitted. So, --delay=100 means 100 seconds, --delay=-10.72 means -10.72 seconds, --delay=02:53.1 means 2 minutes and 53.1 seconds, and so on.

Second case is for number of samples. You just put an integer followed by "s" (means "samples"). --delay=-2112s or something.

HTOA support. Now index 00 of first track in cue sheet is encoded into track 0.
Fixed a bug of cue sheet parser. Last line of cue was ignored if the last line is ending with a white space character other than LF.

[qaac] release 2.09 (refalac 1.09)
posted 5 hours ago by nu 774
Fixed a regression on 2.06, which resulted in failure when non-canonical path was passed by -o option (reported by this post at HA).
Added --fname-from-tag option to generate output file names based on the tags of input files. You can configure output file name more precisely by additionally using --fname-format (which has been an option for cuesheet input only).

[qaac] release 2.08 (refalac 1.08)
posted 56 minutes ago by nu 774
Now copy chapters from ALAC/m4a input (when available).
Delay Nero style chapter point as much as the encoder delay (2112 samples). It seems that Nero AAC encoder was previously using Nero style chapter to signal encoder delay this way, and fb2k is in honor of it.

Note that Nero style chapter is a list of <title, start time> pairs, therefore first chapter can start at arbitrary point, while last chapter goes until the end of the track.

On the other hand, QuickTime style chapter is a list of <title, duration> pairs, therefore first chapter always starts from the beginning of the track, while last chapter can end at arbitrary point.

qaac will write both style chapters (for the sake of compatibility), but these two have subtle difference and incompatibility.

Now writes actual duration into edts. This is done mainly for QuickTime which doesn't look iTunSMPB thingy. Now QuickTime can trim zero-padding and decode sample accurately (whole song / each sub-chapters).

Technically, there's no way to tell the value of encoder delay to QuickTime player. It just silently assumes implicit AAC delay of 2112 samples, and automatically crops that amount from the beginning --- it just works with qaac because qaac is using their encoder. edts is used here in order to just let them trim the trailing zero paddings.

[qaac] release 2.07 (refalac 1.07)
posted an hour ago by nu 774
Fixes for 2.00 regression again.

WAV parser was ignoring data chunk length even if --ignorelength was not specified.
Bogus total length was printed on libsndfile input due to int64_t -> int8_t typo.

[qaac] release 2.06 (refalac 1.06)
posted 53 minutes ago by nu 774
Fixed a bug: when opening non-supported input file, there was a chance that ridiculously too much memory gets allocated and OS hangs (refalac only). This is regression on 2.00, but is basically coming from a weakness of libmp4v2 which can allocate HUGE memory when mp4 box structure is corrupt.

Rewritten 24bit PCM bit packing/unpacking code.

qaac -D 24bit.wav -o - >NUL
is about 3 times faster than before.

qaac] release 2.05 (refalac 1.05)
posted an hour ago by nu 774
Sorry, 2.04 fix was flawed. Re-fixed it.

BTW, The problem on 2.00 was usually quite audible. If you are anxious about it, the apparent evidence of the bug is less number of samples compared to the original.

If you were using simply 16/32bit 2ch input, you might not have met any troubles so far (like me). In this case, sample size (in bytes) is multiple of 2, and probably there's less possibility of partial read breaking in the middle of sample boundary.

[qaac] release 2.04 (refalac 1.04)
posted an hour ago by nu 774
Fixed broken pipe input (regression on 2.00).

When feeding from pipe, there was always a chance that output from some arbitrary point become white noise like.

This was due to switch to lower level I/O routine on 2.00, which can result in "partial read" in case of pipe input. When it is still aligned to sample size boundary, it does no harm. However, when it is not aligned, the succeeding samples get completely out of sync, and result in white noise or something.

The possibility of this problem depends on how sender pushes audio to pipe, and sample size (16bit, 24bit, etc). I didn't notice it until today, but I could reproduce this using cat command as feeder.

[qaac] release 2.02 (refalac 1.02)
posted 2 hours ago by nu 774
Fixed refalac to properly finalize the MP4 container: regression on 2.00.

[qaac] release 2.01 (refalac 1.01)
posted an hour ago by nu 774
Fixed a regression on 2.00: --threading was broken.

[qaac] release 2.00 (refalac 1.00)
posted 5 hours ago by nu 774
This is an experimental (might be unstable) release with many updates, so version was bumped up to 2.00.

Enabled MP3 decoding.
--concat + --adts now accepts multiple inputs with different sample format. Explained later.
Removed --concat-cuesheet, since it's mostly similar to --concat.
Added --no-dither, which turns off automatic dither on quantization.
-b now accepts arbitrary value in 2-32 range. -b32 for WAV output means float format. All other cases are integer.
-N(--normalize) now doesn't use temporary file if the input is seekable.
FLAC file with ID3v2 tag is now accepted (ID3 tag is just skipped and ignored).
Fix crash on reading TAK file with binary tag.
Improve ID3v2 tag handling.
Many refactoring of source code has been done.
Multiple format stream generated by --concat and --adts
Since this requires complete reset of the encoder, zero padding is added at the stream change point.

As far as I know, almost no software player on PC can continue to play such file after the stream format change. In my environment, Windows Media Player 12 is the only exception I know of.

[qaac] release 1.46 (refalac 0.57)
posted 4 hours ago by nu 774
Fixed a regression on 1.45: due to a subttle bug in option parsing code, --concat-cuesheet and --native-resampler were misinterpreted and not working.
Automatic RF64 output on -D (wav output), when file size is unknown or larger than 4G, and output is not connected to a pipe.
In these cases, at first "JUNK" chunk is written to where ds64 chunk goes, and if the file is actually beyond 4G limit at the end of writing, it is rewritten to ds64 chunk. Therefore, if it was actually smaller than 4G, JUNK chunk remains before "fmt " chunk. This is completely valid and legal in RIFF/WAV spec, but some software might get confused when seeing this.
Slight improvement on channel mapping code.
Additional search to mingw DLLs (libFLAC-8.dll and libwavpack-1.dll) When official win32 binaries are not found, these names are also searched.

[qaac] release 1.45 (refalac 0.56)
posted 7 hours ago by nu 774
Add --tag and --long-tag option as generic ways to set tags.

--genre is now translated into "gnre" atom with a ID3v1 genre number if possible.
Replaced libsoxrate.dll binary (for 32bit) to mingw compiled version (--rate runs 10% or so faster in my environment). This is ABI compatible and source code is not changed, so you can use older one. However, due to the nature of floating point math, the resulting data won't be bit-identical between the two binary.
About new tagging options
--tag <fcc>:<value>
writes iTunes defined tag specified by four-char-code. For details of four-char-code, read mp4v2 document. For example, the following:

--tag "soar:suzanne vega"
will put "Sort Artist" tag.

Some tags such as stik or sfID have value of ID numbers. You can set these tags by explicitly giving the number, or corresponding string name. In the case of sfID (country code of iTMS), you can use country name or ISO 3166-1 alpha-3 Code described on the mp4v2 document.


--long-tag <name>:<value>
can be used for arbitrary custom tag.

[qaac] release 1.44 (refalac 0.55)
posted 9 hours ago by nu 774
Fix type_code of iTunSMPB tag data (was using 0, and should be 1). Explained later.
Write up-sampled rate of HE-AAC to moov.trak.mdia.minf.stbl.stsd.mp4a box. This won't affect anything seriously (especially playback). Before this modification, down-sampled rate was written. This modification was done just to imitate the output of iTunes.
Better support on input files whose bit depth are not multiple of 8.
Removed raw printf() message in Apple reference ALAC library, which is a bad design as a library, generally speaking.
First issue is important for those who are using iTunes or iSomething and not using foobar2000. It turned out that:

iTunes doesn't read iTunSMPB with typecode 0. So, gapless playback doesn't work.
foobar2000 fixes typecode of iTunSMPB to 1 when it edits tags. Therefore, if you are encoding via fb2k GUI, or edit tags with fb2k (scan replaygain or something), your files are already get fixed.
There might be other softwares which do the same as foobar2000, but I don't know (not investigated). I wrote a program named fixiTunSMPB (it's on cabinet page) to scan m4a and fix the problem. In order to just check if your file needs fix, try something like the following:

fixiTunSMPB -d -p"*.m4a" "path to your music folder"
This will print the number of files which needs fix like "fix: 10 skip: 20", which means that 10 files needs to be fixed. Alternatively, the following:

fixiTunSMPB -d -v -p"*.m4a" "path to your music folder"
will print with each file names (so output message will be quite long, but you can know which files are exactly affected)

If you actually want to fix it, remove "-d" switch from the command line. But before doing so, it's strongly recommend to make a backup of your scanning folder. Alternatively, of course you can simply install fb2k and let it fix the files (by scanning replaygain or something).

[qaac] release 1.43 (refalac 0.54)
posted 2 hours ago by nu 774
Fixed passband of --rate (sample rate converter of libsoxrate). Regression on 1.40. Default passband was not properly set, and resulted in audibly muffled sound when you do --rate=32000 or something.
Modified transition band width of --lowpass (was unnecessarily small).
Support CAF tag reading (qaac only).

[qaac] release 1.42 (refalac 0.53)
posted 2 hours ago by nu 774
MP4 container minor fix: added "isom" to compatible brands.

[qaac] release 1.41 (refalac 0.52)
posted 2 hours ago by nu 774
Handle format change of ALAC magic cookie on CoreAudioToolbox (shipped with iTunes "qaac -A" didn't work with the new CoreAudioToolbox. qaac 1.41 automatically takes care of both old and new format.
Updated taglib to version 1.8.

[qaac] release 1.40 (refalac 0.51)
posted an hour ago by nu 774 [ updated 38 minutes ago ]
Update libsoxrate to 0.30 (merged update on rate effect of SoX: Speed up on down sampling).
Due to ABI change on libsoxrate.dll, new qaac/refalac is incompatible with older libsoxrate.dll versions.

[qaac] release 1.39 (refalac 0.50)
posted 14 minutes ago by nu 774
Support "REM DISCNUMBER" "REM TOTALDISCS" in cuesheet.
Flush stdio buffer when stdout is connected to a pipe.
Update mp4v2 to svn rev 496.

[qaac] release 0.38 (refalac 0.49)
posted 2 hours ago by nu 774
Updated libsoxrate to 0.21 (merged upstream update on SoX rate effect).
Fixed not to write WAVE_FORMAT_EXTENSIBLE header unnecessarily on WAV output.

[qaac] release 1.37 (refalac 0.48)
posted 6 hours ago by nu 774
Allow optional argument on --compilation. Now --compilation=1 is the same as --compilation, and --compilation=0 is the same as not setting --compilation option.

--compilation=0|1 style will be suited for placeholder and scripting.

[qaac] release 1.36 (refalac 0.47)
posted 4 hours ago by nu 774
Fixed a bug: qaac ../../foo/bar/bazz.cue didn't work (seems PathCombine API doesn't like these kind of relative paths).
Set current active code page as default text encoding for text files (cue sheets or something).

[qaac] release 1.35 (refalac 0.46)
posted 22 minutes ago by nu 774
Updated libsoxrate to 0.2.0 (merged recent upstream update on rate effect). lsx_design_lpf() function decl is changed.

Due to ABI change, new qaac/refalac is incompatible with older libsoxrate.dll and vice versa. Please use the one in the new archive.

[qaac] release 1.34 (refalac 0.45)
posted 26 minutes ago by nu 774
Added optional argument to --native-resampler option of qaac. Without argument, it uses codec default sample rate converter. With argument specified, it uses dedicate AudioConverter of CoreAudio for sample rate conversion. You can configure sample rate converter complexity (line/norm/bats) and quality (0-127). Without --native-resampler specified, and if you have libsoxrate installed, SoX resampler is used.
Changed order of sample rate conversion and lowpass filter. Now lowpass filter is applied before sample rate conversion.
Updated libmp4v2 to svn r490 (the latest).

[qaac] release 0.33 (refalac 0.44)
posted 3 hours ago by nu 774
Fix to accept EXIF artworks.

From 1.26, qaac didn't accept JPEG artworks in EXIF format. This was due to image type checking code of libmp4v2, which only accepts JFIF format with AP0 marker as JPEG image.

[qaac] release 1.32 (refalac 0.43)
posted 2 hours ago by nu 774
When encoding to ALAC and when final internal input format is float, now it will automatically down sampled to 16bit integer format.

Some of DSP options such as --matrix-preset, --matrix-file, --rate, --lowpass will change internal sample format to 32bit float. Since ALAC doesn't support float format, this could not be encoded without converting to integer format with -b.

You can still use -b, but when you don't, from this version it will be automatically converted to 16bit integer format by default. If you want 24 bit output instead of 16, just use -b 24.

[qaac] 1.31 reuploaded
posted 44 minutes ago by nu 774
Reuploaded 1.31 since version number was not updated.

[qaac] release 1.31 (refalac 0.42)
posted 2 hours ago by nu 774
Added --no-matrix-normalize by request. This disables automatic normalization(scaling) on mixer matrix coefficients.
Changed to fetch CoreAudioToolbox.dll version from en-US version resource.
qaac has been showing the same version number as Windows Explorer, with user default locale setting. However, version resource of CoreAudioToolbox has not been properly updated recently on many locales other than en-US (As far as I know, it stays on these locales, even if AAC encoder inside is updated).

[qaac] release 1.30 (refalac 0.41)
posted Feb 15, 2012 3:30 AM by nu 774
Fixed typo of --bits-per-sample(-b) option, and other option explanation.
Fixed/improved some minor Unicode handling.

[qaac] release 1.29 (refalac 0.40)
posted Feb 11, 2012 10:06 PM by nu 774
Fixed chapter length of HE-AAC (they were all doubled from the correct value).

[qaac] release 1.28 (refalac 0.39)
posted Feb 11, 2012 7:10 AM by nu 774
Fixed a bug of the tag processing for --concat on release 1.27.

[qaac] release 1.27 (refalac 0.38)
posted Feb 10, 2012 9:31 PM by nu 774
--concat now insert chapters. Album-related tags are fetched from the first input, and chapters are generated from title tag of each track. If (one of) input is a cuesheet or has embedded cuesheet in it, tracks in the cuesheet are taken into account.

When input is a single cuesheet, --concat works the same as --concat-cuesheet.

[qaac] release 1.26 (refalac 0.37)
posted Feb 9, 2012 4:33 AM by nu 774
Added --concat option. When qaac/refalac take multiple input files (tracks), qaac will encode each of them separately. When --concat is specified, it will encode into a single file.
Unicode console output. Now console message and log file is Unicode. Character encoding of log file and redirected stdout/stderr is UTF-8.
You don't have to change console code page with chcp command. You can stay default codepage, and you can still display unicode character in your console window, if your command prompt is configured to use truetype font.
Fixed a crash on reading bogus chapter file.
Check artwork image file type.
By the way, on HA qaac thread iTunSMPB of QuickTime HE-AAC was reported to be problematic/broken. iTunSMPB is a tag where encoder delay, actual length of content, and padding are described, and is essential for gapless playback. It's not fixable on qaac side.

Typo of version number
posted Feb 6, 2012 5:22 AM by nu 774
Sorry, the release version of the previous post was 1.25 (not 1.26).

[qaac] release 1.26 (refalac 0.36)
posted Feb 4, 2012 9:17 AM by nu 774
Added --concat-cuesheet option.

By default, qaac/refalac encodes into multiple files for cuesheet input (one file per track). When this option is specified, qaac/refalac will now encode into single file, embedding chapter for tracks.

qaac/refalac has been able to handle cuesheet which refers to multiple input files. This remains the same for --concat-cuesheet.

[qaac] release 1.24 (refalac 0.35)
posted Jan 23, 2012 1:03 AM by nu 774
Added --bits-per-sample(-b) option. Convert bits per sample to the specified value (16 or 24). Available for ALAC or WAV output.
Added named pipe support. When the pipe name such as ".pipefoo.wav" is specified as output filename with -o option, qaac now creates the named pipe, and wait for connection. On the other hand, when pipe name is specified as input filename, it's just simply opened (if it is really a named pipe, pipe will be connected by this). This is available for WAV or ADTS output.
More strict syntax sanity checking on cuesheet.
Fix some bug on option handling. --rate was usable but -r was not on refalac. Also, when multiple input file is specified, tagging options didn't work as intended.
In windows, named pipe is created via a special API, and must be created by an end point process ("server"). Name of pipe must start with ".pipe".

On the other hand, another endpoint ("client") can connect to the pipe by just opening it as if it were an ordinary file. Therefore, many software will be able to connect to it. You can use this feature like this:

At first, on one command prompt window, run qaac(or refalac):
qaac -D --matrix-preset=dpl2 5.1ch.flac -o .pipefoo.wav
On another command prompt window, run some client:
lame .pipefoo.wav -o foo.mp3
This is basically the same as just chaining with ordinary (anonymous) pipe. However, it will be useful when passing by named argument is preferred by the client software.

How well named pipe is supported depends on softwares. For example, it seems that mp4box cannot handle named pipe with -add argument.

Basically, if it needs seeking, or is doing some special things on passed file names, named pipe won't work.

[qaac] release 1.23 (refalac 0.34)
posted Jan 19, 2012 6:24 AM by nu 774
Fixed bogus total number of samples printed to the console when sample rate conversion is done.
Refined error/warning messages.
Fixed to refuse files with invalid bits per sample for ALAC.
[qaac] release 1.22 (refalac 0.33)
posted Jan 13, 2012 9:19 AM by nu 774
Fixed a regression on 1.10: qaac -D/refalac -D was writing corrupted channel mask on WAVEFORMATEXTENSIBLE header (when it is used), when input has no channel mask (or value of zero).

[qaac] release 1.21 (refalac 0.32)
posted Jan 13, 2012 7:16 AM by nu 774
Fix: proper handling of zero-length input.

[qaac] release 1.20 (refalac 0.31)
posted Jan 8, 2012 2:59 AM by nu 774
Improved text encoding detection.
mlang seems generally chooses single byte local charset in the first place even if it is actually encoded in UTF-8. Latin-1 case is already taken care of, but in this release I generalized it.
Changed --text-codepage behavior. It has been treated as a "hint", and passed to mlang encoding detector. Now qaac directly use it for converting to Unicode, without any detection/guess.
This is because I found a sample where mlang returns wrong guess even if given correct hint.
Generally speaking, text encoding detection will never be perfect, and sometimes fails. If you have trouble, use --text-codepage. Available codepages are listed at MSDN:

If you don't get the point -- as long as you don't use any of --lyrics, --chapters, cuesheet input, or you are just working with ASCII alphabets, you won't have any troubles.

[qaac] release 1.19 (refalac 0.30)
posted Jan 6, 2012 1:28 AM by nu 774
Fixed a crash on write error inside of destructor (Strictly speaking, abort() is called from C++ runtime, in unhandled exception handler).
Updated libsoxrate.dll to 0.1.2 (Not a functional change. It was just rewritten to be more portable).
[qaac] release 1.18 (refalac 0.29)
posted Jan 1, 2012 2:57 AM by nu 774
Refactored channel layout processing again. Enabled channel layout printing for refalac.

Formerly, channel layout was converted to human readable form via QuickTime/CoreAudio API. I rewrote it on qaac side to be usable from refalac. As a side effect, it became locale-independent. Layout printed on --format is also affected.

[qaac] release 1.17 (refalac 0.28)
posted Dec 31, 2011 6:13 AM by nu 774
Happy new year!

Print channel layout information to console output (qaac, and --verbose only). This feature was missing since 1.00.

[qaac] release 1.16 (refalac 0.27)
posted Dec 25, 2011 10:58 PM by nu 774
Changed "qaac --check" to exit with errorlevel 2 when CoreAudioToolbox not found.
Fixed byteswapping bug of double floating point number, which was causing qaac -D to crash with 64bit big endian input.
Re-enabled ALAC in mov reading with refalac (refalac only).
[qaac] release 1.15 (refalac 0.26)
posted Dec 23, 2011 2:57 AM by nu 774
Added --tmpdir by request. By default qaac uses TMP environment variable. You could override it by changing it, but now you can use this option instead.
Enabled --check on refalac.
[qaac] release 1.14 (+refalac 0.25)
posted Dec 20, 2011 11:15 PM by nu 774
Fixed incorrect definition of 3ch layout in Apple's ALAC implementation, which resulted in incorrect chan chunk on 3ch case.
Improved wave muxer: support sample format conversion on muxer, fixed condition to use WAVEFORMATEXTENSIBLE.
Add some missing input channel layouts defined in CoreAudio. They cannot be directly encoded into AAC or ALAC anyway, but matrix mixer and --chanmask are usable. Of course -D will work.
About AIFF CHAN support by libsndfile
posted Dec 18, 2011 3:43 AM by nu 774
I looked into source code of libsndfile and found that it has very good support on CAF/AIFF CHAN chunk.

AIFF/CAF CHAN support is implemented in chanmap.c. There defined mapping tables from Apple's CHAN chunk (basically it is just a packed struct AudioChannelLayout of CoreAudio), to libsndfile channel layout array.

However, mappings are not defined for some entries (in this case, channel_map member of struct AIFF_CAF_CHANNEL_MAP is set to NULL). Therefore, we cannot obtain channel layout for these cases.

I happened to tested on such case, so I just thought libsndfile doesn't support CHAN chunk. However, it was wrong.

[qaac] release 1.13 (refalac 0.24)
posted Dec 17, 2011 10:13 PM by nu 774
Fixed matrix mixer to work again (regression on 1.11). Was failing when number of channels changed.

Refined progress message display code.

[qaac] release 1.12 (refalac 0.23)
posted Dec 17, 2011 8:26 AM by nu 774
Sorry, fixed a trivial mistake in release 1.11

[qaac] release 1.11 (refalac 0.22)
posted Dec 17, 2011 7:56 AM by nu 774 [ updated Dec 18, 2011 3:32 AM ]
Add decoding mode to qaac (qaac -D)
Generic channel remapping from non-Microsoft order input.
Add ExtAudioFile importer (qaac, and for ALAC codec only).
Add --subtitle. This is iTMF "©st3" tag and documented in iTMF spec. However, it seems even iTunes doesn't use it, and I don't know if anybody using this. I just added this since it is documented in the spec, and TIT3 of ID3 is rather popular.
Fixed refalac to support 3ch encoding
Fixed a bug on progress display: when --native-resampler is on and resampling is done, displayed time was incorrect.
qaac/refalac first reorder channels to Microsoft wave order before DSP chain, then reorder channels again to AAC order, when encoding to AAC/ALAC. This means that when you use --chanmap, --matrix-preset, --matrix-file options, you have to think in Microsoft order.

qaac accepts Apple AIFF/CAF files as well as ALAC in MP4 (for CAF, only LPCM and ALAC are supported). These files can have channel layouts other than Microsoft wave order, and is properly handled. Of course, if it isn't acceptable layout by AAC/ALAC, you can't encode it into AAC/ALAC. Transcoding to WAV will work.

[qaac] release 1.10 (refalac 0.21)
posted Dec 14, 2011 6:19 AM by nu 774
--chanmask and --chanmap are now usable from refalac -D.
AAC and ALAC requires channel layout to be defined. Therefore, when input channel layout is not recognizable, qaac/reflac picks some default depending on the number of channels. Read usage page for more details about this.

On the other hand, refalac -D now preserves the original channel layout information (if it can). If channel mask is not present in the source, output channel mask stays zero.

Of course, when you remix with matrix mixer, layout information is lost. If you want them, you have to explicitly provide it with --chanmask.

Added ad-hoc anti-denormal processing in libsoxrate when down-converting double to float.
Since qaac currently doesn't use IIR filters, I think this would not be of much importance anyway, at least for usual cases.

[qaac] matrix mixer documentation bug
posted Dec 13, 2011 4:52 AM by nu 774
Though nobody is using this feature, anyway...

You cannot use "j" to express imaginary unit in the matrix mixer spec for qaac/refalac. Instead, use 1j or 1.0j. Similarly, use -1j instead of -j.

libsoxrate v0.10
posted Dec 11, 2011 6:50 AM by nu 774
Fixed libsoxrate to treat number of samples with 64bit integer.

SoX is using size_t to count samples, which is 32bit unsigned integer in 32bit Windows world. 32bit is usually enough (It's limit is more than 12 hours long, even in 96kHz format). However, it was inconsistent with qaac implementation, which uses 64bit.

[qaac] release 1.09 (+refalac 0.20)
posted Dec 10, 2011 7:31 PM by nu 774
Merged modifications by Peter (author of foobar2000) into ALAC encoder/decoder.
Fixed usage message of refalac (--no-optimize, --gain, --normalize were usable, but missing from usage message).
Support for Wavpack correction file (*.wvc) of hybrid mode.
Make threading optional, and add --threading. Threading is disabled by default.
Even if --threading is specified, refalac -D doesn't use threads for encoding. Also, if your PC has only one core, threading is not enabled.
1.08 archive updated, but you don't have to download it again
posted Dec 8, 2011 1:34 AM by nu 774 [ updated Dec 8, 2011 1:34 AM ]
I noticed that I have named the directory for x86 binaries in the 1.08 archive as "x32" by mistake. Therefore I just renamed directory name and re-uploaded it.

In case you've noticed the re-uploaded new archive, you don't have to download it again. It's just a directory name change.

[qaac] release 1.08 (refalac 0.19)
posted Dec 5, 2011 3:10 AM by nu 774 [ updated Dec 5, 2011 5:28 PM ]
Add --gain option. You can specify gain adjustment in decibel. "--gain -3.5" decreases gain by 3.5dB.
Automatic sample format conversion to integer (and decreasing bit depth) on ALAC encoding.
Decoding(+ DSP) and encoding run in separated thread on multi-core machine.
--verbose now outputs some verbose message (mostly concerning DSP options)
Allow id3v1 genre number for --genre option
If you enable one of DSP options (--gain, --rate, --lowpass, --matrix-preset, --matrix-file), audio sample format will be automatically converted to 32bit float. On AAC encoding, it's just passed to the encoder, and it's transparent to users' point of view. However, if you encode into ALAC, now it will be down-converted to integer format (bit depth will be either 16 or 24, depending on the original input format). 16bit case will be dithered with TPDF. On the other hand, refalac -D will just output 32bit float WAV in this case.

Anyway, these DSP usually has a possibility of clipping. Since --normalize will adjust each track differently, --gain will be more preferable for music, when you want to prevent clipping.

Threading introduced on this version is rather simple. As said above, just decoding and encoding run in parallel... it might get 1.5x or so faster than before (when decoding is slow or some DSP is enabled), but no more.

[refalac] 0.18
posted Dec 1, 2011 4:46 AM by nu 774
0.17 was writing wrong data chunk length in wave header (a bit longer than actual). Refixed wave muxer.

[refalac] 0.17
posted Nov 30, 2011 7:06 AM by nu 774
Fixed a bug: 0.16 fix for wave muxer was incomplete and still problematic.

By the way, if you can't find x64 build of libsndfile-1, libFLAC, and wavpackdll for refalac64, you can download (my build) from cabinet page.

x86 version and x64 version of these libraries and MSVC runtime(msvcr100 and msvcp100) share the same file name, so take care when you install them.

[refalac] AMD64 build
posted Nov 28, 2011 1:56 AM by nu 774
Added experimental AMD64(x64) build of refalac (and libsoxrate). Uploaded as

Of course you need x64 build of libsndfile-1.dll, libFLAC.dll and wavpackdll.dll if you want to use them. TAK decoding cannot be supported with 64bit build, since tak_deco_lib is 32bit only.

Also, now you can compile qaac/refalac without QuickTime SDK. QuickTime headers(headers only) were still in use for some CoreAudio/CoreFoundation data types and function definitions. However, since they are not compatible with x64, I decided to switch to qaac private headers.

[refalac] 0.16
posted Nov 27, 2011 2:23 AM by nu 774
Fixed a wave muxer bug: when piping wave output in decoding mode to another process, 1 extra byte was written at the end of data chunk.

[qaac] release 1.07
posted Nov 25, 2011 2:56 AM by nu 774 [ updated Dec 14, 2011 1:36 AM ]
Added configurable matrix mixer.
Now DSP options are usable on refalac (--rate, --lowpass, --normalize, --delay, --matrix-preset, --matrix-file). These are not usefull for ALAC encoding, but you might want to use with refalac -D. Please not that --rate, --lowpass, --normalize and remixing will all produce 32bit float PCM.
Fixed automatic wave ignorelength detection. It was not working as intended.
About matrix mixer
You can use mixer either by --matrix-preset or --matrix-file option. In both cases, you have to prepare a text file containing matrix spec.

You can directly pass the pathname of matrix file with --matrix-file. On the other hand, --matrix-preset searches from pre-defined directories. As the name implies, this is designed so that you can create your own preset files, and specify with their name.

"--matrix-preset=foo" searches the following files, in the following order.

%HOME%.qaacmatrixfoo.txt (%HOME% is environment variable. Be careful a dot before qaac)
%APPDATA%qaacmatrixfoo.txt (%APPDATA% is Application Data directory for the login user. Be careful a dot is not here)
(path to qaac directory)matrixfoo.txt
The file format is very simple, and is like the following:

1 0 0.7071
0 1 0.7071
This a 2x3 matrix, and can be used for 3ch to 2ch downmix. Each row corresponds to output channels (L and R). Similarly, each column corresponds to input channels (L, R, and C). You have to separate each column by one or more space/tabs.

With this matrix, each output channel will be calculated from input as following:

L = 1 * L + 0 * R + 0.7071 * C
R = 0 * L + 1 * R + 0.7071 * C
Actually, each element in the matrix will be automatically "normalized" to prevent clipping. However, you are usually encouraged to use --normalize anyway, when you do remixing.

The following is one more example.

1 0 0.7071 0 -0.87178j -0.4899j
0 1 0.7071 0 0.4899j 0.87189j
This is 2x6 matrix, therefore can be used for downmixing 6ch to 2ch.

Here, imaginary value with "j" is used. You can use real value, or pure imaginary value like this(with j), for each matrix element. Real value means gain of the channel. Imaginary value means 90 degree phase shifting, and it's real coefficient means gain of the channel.

If you want to achieve the pure effect of phase shift, try something like this:

This 1x1 matrix transforms mono input to mono output, applying 90 degree phase shift, known as Hilbert transform.

[qaac] release 1.06
posted Nov 23, 2011 4:13 AM by nu 774
Fixed a vulnerability in Apple ALAC decoder, which might lead to heap exploitation.
Reinstated --rate auto|keep. Now --rate auto will work again. Default is --rate keep.
[qaac] release 1.05
posted Nov 22, 2011 2:25 AM by nu 774
Fixed a bug: --rate without libsoxrate.dll was not working, and causing immediate crash (regression since 1.00).
Added --lowpass option. Use this when you want lower cutoff than Apple encoder default. This is based on SoX sinc filter, and processed before passing audio to the encoder. Works only when libsoxrate.dll is installed.
libsoxrate is updated to 0.08.
Other minor refactoring to code.
[qaac] release 1.04
posted Nov 14, 2011 11:58 PM by nu 774
Added --delay option. Take delay amount in integer milliseconds. When positive, specified amount of silence is prepended. When negative, specified length is truncated from the beginning.
--normalize (-N) now works as general normalization function independent from --rate. This forces two pass, and creates HUGE temporary file for large input. This is just a simple peak normalization, and usually not recommended for music (EBU R128 or replaygain is much better).
Switched to use taglib for parsing APEv2 tag in tak file.
[qaac] release 1.03
posted Nov 13, 2011 7:57 AM by nu 774
Fixed --format. Printed bitrate range was incorrect since 1.00.

Fixed wave muxer (for refalac -D) to properly update riff/data chunk size when finishing write, in case of length is not predictable beforehand. Also fixed to pad data chunk when it's size is not even.

Updated to automatically work in ignorelength mode when wave input data chunk size is equal to zero. At least ffmpeg seems to set zero as data chunk size, when sending to pipe and length is not predictable.

[qaac] release 1.02
posted Nov 11, 2011 10:31 PM by nu 774 [ updated Nov 11, 2011 10:42 PM ]
Add CoreAudio AudioFile API importer, as a replacement of QuickTime importer. Now you can directly read AIFF and Sun/AU files without libsndfile-1.dll. As a bonus, AIFF CHAN chunk (undocumented feature used by Apple, to specify channel layout) is properly handled.
refalac -D now accepts input formats other than ALAC.
refalac -D is decoding mode, but actually, you can think of this as wave encoding mode (Though I don't know it has any use).
Better handling of UTF-8 encoded text file, which consists of latin characters only. It seems mlang tends to pick latin-1 code page first for this kind of text file.
Fixed to remove BOM from mlang decoded result. This is basically regression introduced when mlang text encoding detector was applied. mlang doesn't remove BOM from the beginning.
Add --text-codepage option. When automatic character encoding detection by mlang fails and you get something wrong in the resulting tags, you can use this to give hint to it. Code page is a number used in MS Windows to specify character encoding. 1252 is for Latin-1, 65001 for UTF-8.
By the way, from 1.00, qaac doesn't support mingw compilation (probably nobody cares, I think). qaac 1.00 uses implicit lazy loading (delay-load) feature of recent MSVC, for CoreAudio DLLs.
[qaac] release 1.01 + 0.99
posted Nov 9, 2011 9:44 AM by nu 774
Fixed a bug: When you encode from wave file, reported length is way longer than the actual length, and looks as if encoding has finished in the middle (Actually, encoding finishes at correct length, and the result file is correctly encoded).

1.01 is the newest CoreAudio version, and 0.99 is back-ported QuickTime version.

[qaac] release 1.00
posted Nov 9, 2011 4:52 AM by nu 774
This is a very experimental release.

In this version, qaac directly accesses CoreAudioToolbox, and doesn't depend on QuickTime anymore. However, qaac still requires "Apple Application Support" libraries (This is the same as iTunes 10.5).

You need the most recent Apple Application Support, which is shipped with QuickTime 7.7.1, or iTunes 10.5. AAC-HE encoder is not available with older versions.

Since QuickTime importer is not usable, you need libsndfile-1.dll for directly reading AIFF files or something (This restriction might be removed in future). Also, if you want --artwork-size, you need Windows Imaging Component.

--remix was removed, since matrix mixer was a builtin feature of SCAudio, and not CoreAudio.

Older QuickTime version is in "qt" branch at github repository.

[qaac] release 0.98
posted Nov 8, 2011 6:06 AM by nu 774 [ updated Nov 8, 2011 4:41 PM ]
Fixed sampling rate index of ADTS header (regression on 0.95).

The most significant bit of sampling rate index in the ADTS header was always 0 since 0.95. As a result, incorrect ADTS header was generated in the following case:

32000Hz in AAC-HE
8000Hz, 11025Hz, 12000Hz, 16000Hz in AAC-LC
[qaac] release 0.97
posted Nov 7, 2011 5:54 PM by nu 774
Fixed handling of continuous carriage returns in text files or lyrics tag.
Use mlang for text character encoding detection. This is used for cue sheets, lyrics, and chapter files.
In windows world, you will rarely see text files with CR as line terminator. However, iTunes uses CR for lyrics by default.

qaac accepts CR, LF, and CR+LF for line terminator of text file or lyrics tag, and normalizes lyrics to CR+LF. This is different from default of iTunes, but iTunes seems to be able to handle it fine, and it's more friendly to many of Windows tag editors.

mlang is a multi-language support library used by Internet Explorer. It should be better than previous ad-hoc character encoding detection.

[qaac] release 0.96
posted Nov 3, 2011 7:24 PM by nu 774
Added decoding mode to refalac (-D option). ALAC decoding code change also affects qaac, so qaac is also updated.

[refalac] 0.04
posted Nov 2, 2011 9:04 AM by nu 774
Optimized again (Just made byte swap functions inlined).

[qaac] release 0.95
posted Nov 2, 2011 6:28 AM by nu 774
Fixed crash on MP4 file creation failure.
A bit of optimization of reference ALAC encoder implementation (Just replaced leading zero bit counter to asm-based one).
Modified to generate ADTS header from magic cookie.
[refalac] 0.02
posted Oct 30, 2011 7:41 PM by nu 774
Updated refalac.exe to 0.02 (--fast was not working in v0.01 as expected). Please download Basically refalac.exe will be updated with qaac.exe, and packed in qaac's archive. Therefore, this is a special case.

[qaac] release 0.94
posted Oct 30, 2011 6:48 PM by nu 774
Removed alacdec.exe.
Included refalac.exe. This is an ALAC encoder based on opensource ALAC reference implementation by Apple. This works without QuickTime, and of course ALAC only. refalac shares source code with qaac, so many (not all) features of qaac are available.
Allow multichannel ALAC encoding. However, this is only experimental, so please don't use this feature. In fact, I don't even know if it is playable (I know even QuickTime player doesn't recognize channel layout of this multichanel ALAC in m4a). Information welcome.
Fixed long standing random file opening error due to silly misusage of sf_open_fd() things of libsndfile.
Raised priority of built-in wave parser. It will be always tried first, if --raw is not specified.
Modified built-in wave parser to automatically ignore length when data chunk length is not multiple of blockalign (=bytes per audio frame. 4 for 2ch 16bit PCM).
For example, when you input from foobar2000 via pipe, foobar2000 sets 4294967295 as data chunk length -- which is a fake value, and usually not multiple of blockalign. Therefore, qaac will now work the same as if --ignorelength was specified. However, don't rely on this feature too much.
Added --chapter option to add chapter from a text file. Chapter text format is same as mp4chaps or subler. It's described at here. Both of QT style/Nero style chapters are inserted.
Removed --rate keep/auto. --rate auto was not working recently anyway. This is because sample rate setting affects available bitrate, and qaac at first sets up sample rate (before setting bitrate).
Therefore, now --rate only accepts literal sample rate in Hz. If you want to down sample for low bit-rate settings, use --rate 32000 or something.
Updated console title display/progress display message.
[qaac] use --ignorelength for pipe input
posted Oct 30, 2011 7:51 AM by nu 774
I found a problem in libsndfile handling code of qaac, which can cause random open error.

I will fix it in the next release. At present, please use --ignorelength when you input from pipe, if you have libsndfile-1.dll installed.

[qaac] release 0.93
posted Oct 27, 2011 2:15 AM by nu 774
[NEW] Added --artwork-size option to specify artwork size (in pixels). If the artwork (passed by --artwork) is larger than this, it's scaled down to this size.
For image processing, WIC(Windows Imaging Component) is first tried. If it's not present in your system, QuickTime graphics importer/exporter component is used. Usually either of the two will work, unless you are using QTportable and running on Windows XP without WIC installation.
[MOD] Removed needless write to intermediate file after MP4 optimizing has finished.
[qaac] release 0.92
posted Oct 23, 2011 7:01 PM by nu 774
Fixed --tvbr -q1. This was not working properly on 0.91, and now it works.
Fixed reported crash on 0.91.
lyrics and artworks loading error are now non-fatal (qaac doesn't stop on it).
Fixed slight memory leaks when working on CoreFoundation dictionaries.
Use QT official QTMetaData API for ALAC metadata parsing (formerly qaac was using mp4v2).
More proper Magic Cookie parsing code as ES descripter.
0.91 had very strange behavior (from my point of view). -q setting (0,1,2) is just the same as QT internal value. Therefore, qaac just passes the value to QuickTime as it is. In other words, it's transparent to qaac, and qaac doesn't handle each cases specially. I could reproduce -q1 bug with debug build, therefore I could use debugger. Of course quality/TVBR setting value was not broken on qaac's side.

Therefore, on 0.91, for some reason SCAudio's internal state is very likely broken on -q1 setting. This might have something to do with another crash report on 0.91 (I received a crash dump from the reporter, and it was crashing in the CoreAudioToolBox.dll, when kQTSCAudioPropertyID_CodecSpecificSettingsArray property is set. This property is used to configure AAC encoder (strategy, bitrate, quality).

On 0.92, qaac resets SCAudio's internal state before setting CodecSpecificSettingsArray, using SCGetSettingsAsAtomContainer() and SCSetSettingsAsAtomContainer() API. These API is usually used to save/load encoder configuration, but can be used for my purpose.

[qaac] about 0.91
posted Oct 23, 2011 1:49 AM by nu 774
0.91 was reported to have bug on "--tvbr -q1" (please read the post here

Also, b66pak has reported me that 0.91 crashes, though currently I cannot reproduce it in my environment, and have been investigating.

For now, please use 0.90 instead of 0.91.

[qaac] release 0.91
posted Oct 15, 2011 11:21 AM by nu 774
Added support for 7.1ch (FL FR FC LFE FLC FRC SL SR)
Print input and output channel layout.
Changed the way to handle bitrate option. Now qaac doesn't deny invalid bitrate, but choose closest value.
Changed TAK CPU flag to CPU_Any.
For mono output, changed value of channel property in moov.trak.mdia.minf.stbl.stsd.mp4a to 1 . For stereo and multichannel cases, the value is 2 (same as previous versions). As far as I can see, no AAC decoder is using this value. According to ISO 14496-12, this property is said to be either 1 or 2. Therefore, this is not a very useful property anyway (though neroaacenc seems to set real number of channels here).
More minor changes and refactoring to code.
[qaac] release 0.90
posted Oct 13, 2011 3:34 AM by nu 774
Refined QuickTime importer (MovieAudioExtraction). Now qaac and alacdec can decode multichannel ALAC in MOV container (if you have such files).
Refined parsing code for magic cookie of ALAC.
[qaac] release 0.89
posted Oct 9, 2011 7:30 PM by nu 774
re-fixed side channel assignment for --remix.

I was informed that in DTS-HD core stream, SL/SR are simply mapped to BL/BR, respectively. Therefore, qaac --remix will obey it. 7.1 to 5.1 remix will be now the same with DTS-HD.

New rule will be like the following:

SL, SR are mapped to BL and BR.
If side channels are not present, BL and BR stay the same. Otherwise, they are mapped to Rls and Rrs, respectively.
In fact, this mapping scheme is the same with 7.0 and 8.0 treatment by qaac. Therefore it's simple and consistent.

Technical details (you don't have to read this)
QuickTime/CoreAudio uses a struct named AudioChannelLayout to specify input, and output channel layouts.

It has a member named mChannelLayoutTag, and mChannelBitmap. mChannelLayoutTag holds a named tag like kAudioChannelLayoutTag_Quadraphonic (which stands for quad), or other tag to indicate how the struct describes channel layout. mChannelBitmap contains the channel bitmap (channel mask). It's the same with wave channel mask, and it's used when mChannelLayoutTag == kAudioChannelLayoutTag_UseChannelBitmap.

These are enough for usual cases to describe the layout. Therefore, qaac has been using these members only. However, AudioChannelLayout has more flexible way to describe the layout using a member named mChannelDescriptions array.

I observed and found the following facts (though this is not documented):

Basically, mChannelDescriptions array is ignored when mChannelLayoutTag is not kAudioChannelLayoutTag_UseChannelDescriptions.
However, even if mChannelLayoutTag is like kAudioChannelLayoutTag_AAC_7_1 (which completely describes the layout), the remixer looks into mChannelDescriptions array. If it is present, remixer uses them rather than the mChannelLayoutTag.
As you know, qaac reorders input to AAC layout before feeding it to QT encoder, and lets QT know that input layout is (already) in AAC layout.

Therefore, mChannelLayoutTag must be one of the named AAC layout, for both input and output channel layout. In this way, QT doesn't do any channel mapping job if it is buggy version or not. However, AAC layout is rather restricted, and cannot describe the exact layout of input.

Using mChannelDescriptions array, I can pass more exact layout to QuickTime -- at least to the remixer, as I have observed. I noticed better remix result can be obtained by this. Therefore, I started to tweak around it. Recent changes were about mChannelDescriptions array setting.

So, qaac now sets both of mChannelLayoutTag, and mChannelDescriptions. The latter is used only when you do --remix.

[qaac] release 0.88
posted Oct 8, 2011 10:09 PM by nu 774
TAK input support.
Rewrite channel mapping code again, to provide better --remix result.
You need tak_deco_lib.dll to use TAK inport (as other inputs, this is optional).

--remix now works slightly better than 0.87. When you remix 7.1ch source into 5.1ch with a mask FL FR FC LFE BL BR SL SR, it will be like the following:
FL -> L, FR -> R, FC -> C, LFE -> Lfe, BL -> Ls, BR -> Rs, SL -> L, SR -> R

Basically, --remix follows the rule like this:

All channels other than SL/SR are passed to QT as they are.
If BL/BR are not present in the input, SL/SR are mapped to BL/BR.
If BL/BR are present in the input, SL/SR are mapped to "Wide Left" and "Wide Right".
Wide Left, Wide Right are predefined channel label in QuickTime; They don't collide with other common channel labels, and simply rendered as L/R in the remixed result.

[qaac] release 0.87
posted Oct 8, 2011 1:40 AM by nu 774 [ updated Oct 8, 2011 1:40 AM ]
Added --remix option, and removed old --downmix. I will explain this later.
Fixed to use prefixed pathname only when path is really long.
Fixed to correctly handle a line starting with @ in the qaac.reg file. @ means default value entry in the key.
Updated taglib to 1.7.0
About --remix option
With --downmix, you could remix into mono or stereo. With --remix, you can remix into arbitary channel layout which QuickTime AAC encoder allows.

However, you can't increase number of channels with --remix, except for --remix stereo (You can use --remix stereo to mono input).

Also, remixing to a layout with same number of channels is not allowed. That is, --remix 4.0 for quad input is not allowed. Also, --remix 5.1 for 6.0ch input is not allowed (both have 6 channels).

Possible output channel layout is the following:

mono, stereo, quad, 4.0, 5.0, 5.1, 6.0, 6.1, 7.0, 7.1, 8.0, auto

Most of the above should be obvious. "4.0" means "C L R Cs".

"auto" is a magic option. When you say --remix auto, qaac automatically picks 5.1 or stereo, depending on the source.

Known problems/restrictions
QuickTime doesn't use "side" channels. In QuickTime world, 7.0 and 8.0 uses rear surround, while 7.1 uses front center.

That is, 7.1 uses 5ch on front, 2ch on rear, plus LFE. This is different from the most common 7.1ch layout, and this also affects remixing.

You can feed 7.1ch input with the layout "FL FR FC LFE BL BR SL SR" to qaac. However, as I have said, it is encoded as "C Lc Rc L R Ls Rs Lfe".

You might not notice any problem from this 7.1ch AAC. It will depend on decoder and your speaker settings.

However, when you do remix, you will notice the problem. If you do "--remix 5.1" to this input, the result will be like the following:

FL/FR is mapped to C+L/C+R
SL/SR is mapped to L/R
BL/BR is mapped to Ls/Rs
Yes, no real side channels here. You might expect SL is mapped to L+Ls, but it is wrong... This is due to the QuickTime spec, and inevitable.

[qaac] release 0.86
posted Oct 5, 2011 8:48 AM by nu 774
Accept WAVE_FORMAT_EXTENSIBLE with dwChannelMask 0 with builtin wave parser.
Accept LPCM format with QuickTime importer. By this change, you can now read AIFF by default, without libsndfile-1.dll.
Some minor changes concerning command line option handling and error message.
QuickTime importer (MovieAudioExtraction) can also read formats like MP3 and AAC, but qaac explicitly denies them. That's because QT importer seems no to take care about encoder delays and padding of lossy formats. Therefore, silece are padded at the beginning and ending for formats like MP3.

Anyway, I don't want to encourage people to re-encode from lossy formats, so I won't implement these things.

[qaac] release 0.85
posted Oct 3, 2011 7:24 AM by nu 774
By request from an user, added --lyrics option to import lyrics from a file.

Like iTunes, only unsynchronized lyrics are supported. That is, just a simple text without timestamp information. In ID3, USLT tag is used for that purpose.

This file can be encoded in UTF-8/UTF-16 (with BOM), UTF-8 (without BOM), or the default encoding in your locale (codepage). qaac simply tries in this order. I haven't explained before, but cue sheet is treated the same way.

As you can see, default locale encoding (like Windows-1252) is only tried after UTF-8 has failed. If your input is not actually in Unicode, and contains invalid byte sequence for UTF-8, it's OK. Otherwise, you will get something wrong.

About mono HE encoding
posted Oct 3, 2011 2:46 AM by nu 774
b66pak reported me that mono HE AAC (encoded by qaac) is decoded into stereo. Though this is not qaac's fault, I investigated it anyway.

It seems that:

QuickTime player displays it as mono HE.
neroaacdec and ffmpeg decode it into stereo WAV.
As for neroaacenc, both of neroaacdec and ffmpeg decode the result into mono WAV.
faad decodes both of QT/nero result into stereo WAV.
When you remux the result of neroaacenc into ADTS with ffmpeg, then decode it with ffmpeg, the result is *stereo*.
I can only access ffmpeg source code, therefore I ran ffmpeg with debugger and observed what's happening. I found the following:

QT encoded result contains only SCE (single channel element) + SBR payload. That is, it seems really mono.
QT doesn't explicity signal PS(parametric stereo) flag in the GASpecificConfig, while neroaacenc does. PS flag is optional. However, if SBR is on and PS flag is not present, PS is assumed to be on. This is the reason why ffmpeg decodes it into stereo. Probably so does nero.
GASpecificConfig is contained in MP4 stsd box. As for ADTS header, there's no place for SBR extension. This might be the reason why ffmpeg produces stereo from ADTS file (I didn't investigate on this, so I say *might*).

I'm not an AAC expert, therefore I don't comment on this further (like which is correct, whose bug, etc).

As for qaac, it doesn't touch inside of AAC bitstream and GASpecificConfig. Therefore, qaac has nothing to do with this.

[qaac] release 0.84
posted Oct 2, 2011 6:38 PM by nu 774
Fixed -A to work again (regression on 0.83; command line option parser was *always* denying -A, sigh...).

[qaac] release 0.83
posted Oct 2, 2011 3:47 AM by nu 774
Added --formats option. "qaac --formats" prints available AAC formats (LC/HE, sample rate, channel layout, available bitrate for CBR/ABR/CVBR) to stdout, and exits. I'm sorry but this takes several seconds.
Added support for 6ch FL FR FC BC SL SR.
Enabled upsampling for AAC with --rate. It's ridiculous to upsample and encode to AAC , but I removed the (technically unnecessary) restriction. Though you can't change sample rate to arbitrary value anyway... see the result of qaac --formats.
Fixed minor bug concerning command line option handling.
Use QT API to check channel layout availability for AAC encoder (especially for HE).
[qaac] release 0.82
posted Sep 30, 2011 10:21 AM by nu 774
Fixed ALAC --downmix stereo to work again (regression on 0.81)

[qaac] release 0.81
posted Sep 29, 2011 8:03 PM by nu 774
0.80 fix was incomplete; --he --downmix still was not working for 5ch and 7ch, so fixed it. Also added more proper error message when you try to feed input whose channel layout is not supported by HE encoder.

Sorry for recent unstable status. Automatic channel mapping is like two guys (QuickTime and qaac) working/racing on the same thing. This is really bad software design... If QT mixer was doing his job, this was unnecessary. Moreover, what QT does is completely undocumented, therefore something like boxing in the darkness.

Anyway, I rewrote mapping code again to be more cleaner and saner, at least to me.

[qaac] release 0.80
posted Sep 29, 2011 7:28 AM by nu 774
Fixed default mapping for 7.1ch without channel mask (regression on v0.77)

[qaac] release 0.79
posted Sep 29, 2011 1:20 AM by nu 774
Fixed HE downmixing; 5ch, 6ch, 6.1ch, 7ch, 8ch is not directly supported by HE encoder. However, it was also failing even *with* downmixing (regression on recent changes).
Enabled qaac channel mapper for downmixing, and ALAC.
libsoxrate.dll is updated to 0.07.
It seems that QT downmixer doesn't work properly for arbitrary channel layout -- even for ALAC.

When you feed 8ch FL FR FC BL BR BC SL SR with --downmix stereo, SL and SR disappears and muted from the result. Same effect with AAC encoder (this is the reason why qaac is not only reordering channels but is actually remapping for AAC).

On the other hand, qaac-remapped layout (for AAC) seems also good for QT downmixer, and also works for ALAC. Therefore, I enabled qaac channel mapper for downmixing, and ALAC.

Of course, When you specify --native-chanmapper, these features are disabled.

[qaac] release 0.78
posted Sep 28, 2011 2:44 AM by nu 774
Output DLL versions on --check.
Fixed sattle problem in libsoxrate.dll, which was causing crash on some cases (now it is 0.06).
[qaac] release 0.77 reupload
posted Sep 26, 2011 7:55 PM by nu 774
Binary in the archive was a bit old, and printed old version (0.76).

Please download

[qaac] release 0.77
posted Sep 25, 2011 11:47 PM by nu 774
Added --chanmask option. --chanmask takes integer mask value, or 0. If mask value is specified, channel mask in the source is overriden with the specified value. If value is 0, it means channel mask in the source is ignored, and qaac picks the default channel layout. You can specify mask value by ordinary decimal digits, or hex digits prefixed with 0x.
Fixed 3ch automatic downmix to work again (regression in 0.75)
Fixed 7ch and 8ch layout. SL, SR goes to Ls and Rs, while BL, BR goes to Rls and Rrs, respectively. This may sound strange, but by this modification, at least qaac -> neroaacdec roundtrip preserves the original order.
Accept 4ch FC FLC FRC BC, and 6.1ch FL FR FC LFE BC SL SR.
qaac has now implemented much of channel mapping; It does not only rearrange to AAC order, but also map channels to be coherent with QT layout (like SL, SR -> BL, BR).

Therefore, even if you are using older CoreAudioToolbox.dll, you are now encouraged not to use --native-chanmapper.

[qaac] about 7ch and 8ch
posted Sep 24, 2011 6:06 PM by nu 774
It seems Implementation of 7ch and 8ch in release 0.76 is problematic, so don't use them. In the future I will disable them.

QuickTime assigns FLC(Lc) and FRC(Rc) for 7.1ch, while Rls and Rrs are assigned for 7ch and 8ch. Rls and Rrs are abbrev for RearSurroundLeft and RearSurroundRight, respectively.

Rls and Rrs have no corresponding values in commonly used chanmask(bitmap). They are just different.

The following is the current problem:

qaac only accepts as SL and SR, but SL and SR are mapped to Rls and Rrs. Therefore, it *always* breaks layout. This seems to be inevitable from the spec or limitation of QT.
with --native-chanmapper, currently qaac directly passes original channel bitmap to QT with kAudioChannelLayoutTag_UseChannelBitmap specified. Usually, if corresponding WAV/AC3 layout constant exists in the CoreAudioType.h, qaac rather uses it (like kAudioChannelLayoutTag_MPEG_5_1_A). However, in this case, no suitable constant exists, therefore bitmap is used.
As SL and SR are not used for 6ch/8ch AAC by QT, they just disappears (muted) from the result.
without --native-chanmapper, qaac reorders layout before encoding and passes kAudioChannelLayoutTag_AAC_[7|8]_0 to QT. Therefore, all channels are at least audible. However, resulting layout is doubtful.
[qaac] release 0.76
posted Sep 24, 2011 10:51 AM by nu 774
Added support for 6.0ch (FL FR FC BL BR BC), 7.0ch (FL FR FC BL BR SL SR), 8.0ch (FL FR FC BL BR BC SL SR). Number of channels for these layout are the same with 5.1ch, 6.1ch, and 7.1ch, respectively. Therefore, you need explicit channel mask for these input. Without channel mask, qaac assumes 5.1ch, 6.1ch, and 7.1ch.
Updated libsoxrate.dll (v0.04).
Updated progress display code.

[qaac] release 0.75
posted Sep 23, 2011 7:36 PM by nu 774
Added --normalize (-N) option, and changed default behavior not to normalize in 2-pass after sample rate conversion. If you want to normalize, use -N. Anyway, normalize is done only when sample rate conversion with libsoxrate takes place.
Re-enabled 4ch L R C Cs. Now it works correctly.
libsoxrate.dll was also updated to 0.03. Just overwrite with the one in the 0.75 archive.
About 4ch layout(technical details)

I said 4ch default layout is not supported by QT, but I was wrong. QT selects 4ch quad as it's output layout by default, even if you set C L R Cs as input layout. It seems that QT takes only number of channels into account, when it selects output layout as a default mapping.

However, by manually resetting the output layout after that, C L R Cs was accepted, and resulting bitstream was correct.

This might sound like having to do with the 7.6.9 channel mapping problem, but this was a different monster.

About 6.0ch an 8.0ch

In CoreAudioTypes.h, AAC_6_0 and AAC_Octagonal constants are also defined. Therefore they seems to be supported by QT AAC encoder.

However, corresponding constants of MPEG side (WAV/AC3 layout) are not defined, therefore they are not currently supported by qaac (might be supported in the future).

[qaac] libsoxrate updated
posted Sep 23, 2011 4:33 AM by nu 774
If you have already downloaded, please download and replace the old libsoxrate.dll. If you haven't yet, is the new archive.

From this version, I have included version resource in the libsoxrate.dll. Therefore, it's version number is visible from explorer property window.

[qaac] release 0.74
posted Sep 22, 2011 9:21 PM by nu 774 [ updated Sep 22, 2011 9:25 PM ]
Fixed ADTS channel config for 4ch(quad) from 4 to 0.

[qaac] release 0.73
posted Sep 22, 2011 7:47 AM by nu 774
Accept L R SL SR as 4ch quad.
Changed resampler implementation from libspeexdsp to sox. If you want to try it, place libsoxrate.dll to the same directory with qaac. If you don't want it, just don't install it, or use --native-resampler option as before. libspeexdsp is not needed , or working anymore.
The following is technical details, therefore you don't have to read it.

Official libsox seems to be built as only static lib for Win32, therefore qaac cannot link to it (for license issue). I heard that it is by implementation reason (such as massive usage of global variables).

Therefore, I picked only rate converter part from sox, and built DLL as libsoxrate. It's code is on my github repos (independent from qaac repos).

Original sox source was using OpenMP. However, my implementation is just for qaac and portability is not important (though you can use it if you want). Therefore, I directly implemented with Win32 native thread for parallel filter processing for each channels, in order to minimize thread spawning overhead of OpenMP implementation. Also, I had to rewrite FFT caching code (originally it was using global variables).

[qaac] release 0.72
posted Sep 20, 2011 11:35 AM by nu 774 [ updated Sep 20, 2011 11:57 AM ]
Disabled 4ch L R C S and 6.1ch L R C LFE BC SL SR, as I said in the previous post.
Divided two 7.1ch mapping (chanmask 0xff and chanmask 0x63f).
chanmask 0xff uses FLC and FRC, while chanmask 0x63f uses SL and SR.

chanmask 0xff is compatible with ISO's implicit 7.1ch layout. Therefore, if input has explicit chanmask 0xff, qaac now maps to FC FLC FRC FL FR BL BR LFE, as before.

QT only allows ISO's implicit layout for 7.1ch AAC, therefore strictly speaking chanmask 0x63f cannot be correctly encoded. However, chanmask 0x63f (SL/SR instead of FLC/FRC) is so common, therefore qaac allows it, and reorder as FC FL FR SL SR BL BR LFE. If input doesn't have explicit chanmask, qaac treats it as chanmask 0x63f.

In short, when chanmask of input is 0xff, qaac will behave the same with before 0.69. Otherwise, behavior remains the same with recent versions. Yes, this may seem inconsistent, but this is a current compromise plan. Anyway, thanks to b66pak for suggestions.

[qaac] more on multichannel AAC
posted Sep 20, 2011 1:29 AM by nu 774
Today, I've inspected AAC bitstream with faad2 + MSVC debugger. I've also checked ISO 13818-7.

In 13818-7, implicit speaker mapping is defined in the following table. This mapping is assumed when PCE (program config element) is not present.

From this table, you will see the following:
AAC's default for 4ch is not quadraphonic, but FC FL FR BC. foobar2000 might not be seeing PCE.
There's no default for 6.1ch.
The wording for 7.1ch default is ambiguous. This might be the reason why the interpretation varies with implementations. However, I began to think that QT's order is correct.
The following is the result what I observed from encoded result using faad2 + debugger. I'm just a novice, and not an AAC specialist. However, from what I can see, produced bitsteam is quite reasonable and correct. I wonder why faad frontend shows up such mysterious things for 6.1ch, while libfaad parses bitstream correctly. Is there something I'm missing?

channelsESDS channel configPCEelements in raw data block
num_back_channels:2CPE, CPE
5.1ch6not presentSCE, CPE, CPE, LFE
7.1ch7not presentSCE,CPE,CPE,CPE,LFE
[qaac] current status of multichannel encoding
posted Sep 18, 2011 9:58 PM by nu 774
Here is the summary of current multi-channel encoding status.

Basically, I tried the following tools.

faad (CL frontend) shows AAC channel config layout to console. faad can decode multichannel AAC, but channel order is basically not rearranged -- except for 5.1ch.
ffmpeg correctly decodes multichannel AAC into WAVEFORMATEXTENSIBLE wave file, with channel mask.
neroaacdec correctly decodes multichannel AAC, into WAVE_FORMAT_PCM wave file, without channel mask.
QuickTime player shows up channel layout with movie inspector.
foobar2000 (I tried playback only).
3ch (L R C)
Not supported by QT AAC encoder. qaac automatically downmix to stereo.
4ch (FL FR FC BC)
It seems that QT AAC encoder forces 4ch-quad, therefore the result is wrong. In future release, qaac will not accept this layout.
4ch (FL FR BL BR, quad)
Mapping of foobar2000 seems to be wrong. QT recognizes as "4ch" (layout is not shown). Other tools seems fine.
5ch (FL FR FC BL BR)
Not supported by HE encoder. faad correctly recognizes as C FL FR BL BR, but decodes in that order. Other tools seems fine.
5.1ch (FL FR FC LFE BL BR, chanmask 0x3f)
No problem.
5.1ch (FL FR FC LFE SL SR, chanmask 0x60f)
qaac treats this as FL FR FC LFE BL BR.
6.1ch (FL FR FC LFE BL BR BC, chanmask 0x13f)
Not supported by HE encoder. Doubtful. faad recognizes as FL FR FL FR FL FR BL. ffmpeg shows waring, and result is wrongly mapped. mapping of foobar2000 is also wrong. QT player and neroaacdec seems to correctly handle this.
6.1ch (FL FR FC LFE BC SL SR, chanmask 0x70f)
qaac currently accepts this, but result is wrong. In future this layout will be disabled.
7.1ch (FL FR FC LFE BL BR FLC FRC, chanmask 0xff)
qaac maps this to FC FL FR FLC FRC BL BR LFE, and faad correctly recognizes this. but QT player recognizes as C Lc Rc L R Ls Rs LFE (same with CoreAudioTypes.h definition). neroaacdec, ffmpeg, foobar2000 seems fine with qaac's order. I cannot check the effect of the "swapping" of front and side by QT. I can only listen stereo downmixed result with QT player...
7.1ch (FL FR FC LFE BL BR SL SR, chanmask 0x63f)
qaac treats this as FL FR FC LFE BL BR FLC FRC.
[qaac] release 0.71
posted Sep 18, 2011 1:00 AM by nu 774
Fixed resampling to work again (regression on 0.66)
Added --check option (show QT version, etc.)
Updated mp4v2 to r485
Refined usage of intermediate file for container optimization. Now qaac doesn't re-open intermediate file. Therefore retry code introduced in 0.70 has become unnecessary.
Also, now qaac uses real temporary file (with FILE_ATTIBUTE_TEMPORARY and FILE_FLAG_DELETE_ON_CLOSE) for intermediate file. They are written under Windows temp dir (Users/$user/AppData/Local/Temp or somewhere). As FILE_FLAG_DELETE_ON_CLOSE is set, they are removed even when qaac crashes.
For this modification, qaac currently cannot use vanilla libmp4v2.
[qaac] release 0.70
posted Sep 17, 2011 9:44 AM by nu 774
Refined mp4 muxing code, and added retry when re-opening intermediate tmp file.

By default (without --no-optimize), when you run qaac like:

qaac foo.wav
qaac first encodes foo.wav into foo.m4a.tmp, then copies to foo.m4a with optimized order.

I suspect re-opening the intermediate file (foo.m4a.tmp) after encoding could have failed. Therefore, I simply added retry for it (though in my environment I haven't met such failure).

Ideally, this re-opening is not necessary. This is done just for implementation reason... libmp4v2 just requires it for optimizing.

[qaac] release 0.69
posted Sep 17, 2011 12:43 AM by nu 774
Fixed 7.1ch mapping. It seems to have been wrong.
Treat bitrate 0 as "higest bitrate available", for ABR, CBR, and CVBR. Actual bitrate value would vary on the other settings (LC or HE, number of channels...).
Changed --he default to --cvbr 0
Relaxed DLL loading directory. qaac now just forbids current directory as DLL search target, therefore you can place them anywhere in the PATH environment.
Removed CR from console title message (which was appeared as square in Windows XP).
Added percent to progress message.
About 7.1ch mapping

In QT SDK's CoreAudioTypes.h, constants named kAudioChannelLayoutTag_MPEG_7_1_B and kAudioChannelLayoutTag_AAC_7_1 are defined for 7.1ch AAC, and commented as "C Lc Rc L R Ls Rs LFE (doc: IS-13818-7 MPEG2-AAC Table 3.1)".

qaac has been following this. However, C L R Lc Rc Ls Rs LFE seems to be correct... (Front L/R and Side L/R are swapped). I couldn't find table 3.1 commented in the header, but it seems AAC channel configuration should be ordered as center -> front -> side -> back -> LFE.

Some informations:

Using foobar2000/neroaacdec as AAC decoder, WAV -> AAC -> WAV round trip preserves 7.1ch channel mapping with this modification.
CoreAudioToolbox (older one) seems to have been also broken with 7.1ch mapping. Therefore, even if you are using older CoreAudioToolbox, you'd better not to use --native-chanmapper for 7.1ch encoding.
If you are in doubt, you can still use your own mapping with --chanmap. Suggestions or informations are welcome.

[qaac] release 0.68
posted Sep 14, 2011 5:25 AM by nu 774
It seems that QT7.7 can properly downmix multichannel audio, therefore disabled auto channel remapping of AAC when --downmix is specified, so as to reduce remapping cost. Downmixing is done with QuickTime native mixer.

Fixed 7.1ch source's layout again. This modification has an impact only when you use --downmix with 7.1ch sources.

On this version, when downmixing to stereo, side left will be positioned at left, side right will be at right. On Previous version, they were positioned more near around center.

[qaac] release 0.67
posted Sep 13, 2011 8:04 PM by nu 774
Changed default chanmap for 7.1ch source without explicit channel mask. This doesn't affect AAC encoding. However, by this change, position of side left / side right changes when you are encoding 7.1ch source without explicit channel mask into 2ch ALAC with --downmix option.
Fixed console title progress to work when --silent specified.
[mp4fpsmod] v0.15
posted Sep 12, 2011 9:39 PM by nu 774
Added better progress message.

[qaac] release 0.66
posted Sep 12, 2011 6:03 PM by nu 774
Enabled "--downmix stereo" for ALAC. You could encode only stereo files into ALAC. However, from this version, you can at least use --downmix. For mono files, --downmix stereo will also work to produce dual-mono result.
Refined progress message of resampling (when rate conversion with libspeexdsp takes place).
Update console window title with encoding progress.
[qaac] release 0.65
posted Sep 11, 2011 6:50 PM by nu 774
Fixed importing problem with Mono file with ext wav header, channel mask 0x04 (center). ALAC can only work on 2ch anyway, but this problem seems to have been long standing there (though such file would be rather rare).

Added ETA to progress message.

[qaac] release 0.64
posted Sep 11, 2011 8:24 AM by nu 774 [ updated Sep 11, 2011 8:36 AM ]
Enabled tagging options to work for cuesheet input (Previously they were just ignored).

Now, you can give any of tagging options when you are feeding cuesheet or multiple input files. However, same value is applied to all songs, therefore use this feature with care. Probably --artwork option will be the one useful case.

[qaac] release 0.63
posted Sep 10, 2011 6:26 PM by nu 774
Fixed problem in --downmix option. Thanks to b66pak, as always, for reporting this.

This was found only when you specified --downmix to downmix multichannel source into mono/stereo, and source contains explicit channel mask (for WAV files, this means that it's in extensible format).

Also I have uploaded fixed qaac_sample.reg, which contains qaac.reg. Previous one didn't work for HE encoding.

[qaac] release 0.62
posted Sep 9, 2011 9:46 PM by nu 774
Fixed cuesheet importing to work again (regression on 0.58).

[qaac] release 0.61
posted Sep 6, 2011 5:49 PM by nu 774
Sorry for inconvenience, fixed bugs in previous releases.

Channel remapping of 0.58 was insufficient for 7.1ch, and fixed now. 7.1 audio has two similar mapping (L R C LFE Ls Rs Lc Rc) and (L R C LFE Ls Rs Rls Rrs), and only the latter with explicit channel mask was working.
0.59 and 0.60 cannot live without qaac.reg. Now qaac works fine without it.
I have not explained much, but qaac.reg is basically for portable QuickTime, which is recently discussed in hydrogenaudio's qtaacenc topic. It was developed by lvqcl, and my modification basically do the same with his modification to qtaacenc/qaac side, except that mine depends on the external registry setting (qaac.reg).

lvqcl's hack is an interesting idea, but very fragile to QuickTime version changes. I'm not willing to pay effort to portabilize every version of QuickTime, therefore I don't support portable QuickTime itself. However, *you* can build such environment at your own risk, with registry overriding hack.

You might be required different registry settings for different versions of QuickTime, therefore I introduced more generic solution with qaac.reg.

[qaac] release 0.60
posted Sep 6, 2011 6:43 AM by nu 774
Added PID to volatile registry tree (came in release 0.59).

[qaac] release 0.68
posted Sep 14, 2011 5:25 AM by nu 774
It seems that QT7.7 can properly downmix multichannel audio, therefore disabled auto channel remapping of AAC when --downmix is specified, so as to reduce remapping cost. Downmixing is done with QuickTime native mixer.

Fixed 7.1ch source's layout again. This modification has an impact only when you use --downmix with 7.1ch sources.

On this version, when downmixing to stereo, side left will be positioned at left, side right will be at right. On Previous version, they were positioned more near around center.

[qaac] release 0.67
posted Sep 13, 2011 8:04 PM by nu 774
Changed default chanmap for 7.1ch source without explicit channel mask. This doesn't affect AAC encoding. However, by this change, position of side left / side right changes when you are encoding 7.1ch source without explicit channel mask into 2ch ALAC with --downmix option.
Fixed console title progress to work when --silent specified.
[mp4fpsmod] v0.15
posted Sep 12, 2011 9:39 PM by nu 774
Added better progress message.

[qaac] release 0.66
posted Sep 12, 2011 6:03 PM by nu 774
Enabled "--downmix stereo" for ALAC. You could encode only stereo files into ALAC. However, from this version, you can at least use --downmix. For mono files, --downmix stereo will also work to produce dual-mono result.
Refined progress message of resampling (when rate conversion with libspeexdsp takes place).
Update console window title with encoding progress.
[qaac] release 0.65
posted Sep 11, 2011 6:50 PM by nu 774
Fixed importing problem with Mono file with ext wav header, channel mask 0x04 (center). ALAC can only work on 2ch anyway, but this problem seems to have been long standing there (though such file would be rather rare).

Added ETA to progress message.

[qaac] release 0.64
posted Sep 11, 2011 8:24 AM by nu 774 [ updated Sep 11, 2011 8:36 AM ]
Enabled tagging options to work for cuesheet input (Previously they were just ignored).

Now, you can give any of tagging options when you are feeding cuesheet or multiple input files. However, same value is applied to all songs, therefore use this feature with care. Probably --artwork option will be the one useful case.

[qaac] release 0.63
posted Sep 10, 2011 6:26 PM by nu 774
Fixed problem in --downmix option. Thanks to b66pak, as always, for reporting this.

This was found only when you specified --downmix to downmix multichannel source into mono/stereo, and source contains explicit channel mask (for WAV files, this means that it's in extensible format).

Also I have uploaded fixed qaac_sample.reg, which contains qaac.reg. Previous one didn't work for HE encoding.

[qaac] release 0.62
posted Sep 9, 2011 9:46 PM by nu 774
Fixed cuesheet importing to work again (regression on 0.58).

[qaac] release 0.61
posted Sep 6, 2011 5:49 PM by nu 774
Sorry for inconvenience, fixed bugs in previous releases.

Channel remapping of 0.58 was insufficient for 7.1ch, and fixed now. 7.1 audio has two similar mapping (L R C LFE Ls Rs Lc Rc) and (L R C LFE Ls Rs Rls Rrs), and only the latter with explicit channel mask was working.
0.59 and 0.60 cannot live without qaac.reg. Now qaac works fine without it.
I have not explained much, but qaac.reg is basically for portable QuickTime, which is recently discussed in hydrogenaudio's qtaacenc topic. It was developed by lvqcl, and my modification basically do the same with his modification to qtaacenc/qaac side, except that mine depends on the external registry setting (qaac.reg).

lvqcl's hack is an interesting idea, but very fragile to QuickTime version changes. I'm not willing to pay effort to portabilize every version of QuickTime, therefore I don't support portable QuickTime itself. However, *you* can build such environment at your own risk, with registry overriding hack.

You might be required different registry settings for different versions of QuickTime, therefore I introduced more generic solution with qaac.reg.

[qaac] release 0.60
posted Sep 6, 2011 6:43 AM by nu 774
Added PID to volatile registry tree (came in release 0.59).

[qaac] release 0.59
posted Sep 6, 2011 5:53 AM by nu 774
Added registry overriding feature. This is very tricky and dangerous, so I strongly recommend you not to use this feature, if you don't know what you are doing, and what for.

What is done

When a file named qaac.reg is found in the same directory with qaac.exe, qaac loads it. Then, mirrors them under HKEY_CURRENT_USERSOFTWAREqaac of the system registry. They are marked volatile, and usually removed when qaac.exe finishes.

Then, qaac redirects all access to HKEY_LOCAL_MACHINE from qaac process to HKEY_CURRENT_USERSOFTWAREqaac. This redirection is limited to qaac process, therefore it doesn't do any harm to others.

About qaac.reg file

qaac.reg is an ordinary Windows registry export file, which you can obtain using export command of regedit.exe.

This is something like the following:

Windows Registry Editor Version 5.00

"ProResDecoderPath"="C:Program Files (x86)QuickTimeQTSystemAppleProResDecoder.qtx"
"InstallDir"="C:Program Files (x86)QuickTime"
"QuickTime.qts folder"="C:Program Files (x86)QuickTimeQTSystem"
As you can see, this is very similar to ordinary ini files. Registry key name is described in [], and value name, data pair follows.

Value name is enclosed with double quotes. Value data is also enclosed with double quotes when it is an ordinary string and has type REG_SZ. Otherwise, type identifier (like hex or dword) comes, and data follows after colon.

In value name or data, backslash () is used as an escape character. Therefore, you must write twice when you want backslash.

Finally, you can use non-official type identifier. You can write like the following:

Here, "eval" is the qaac-specific identifier. When qaac sees this, qaac evaluates this as if it were written like the following:

That is, qaac expand the word enclosed in ${}. Only "qaacdir" is supported for now, and this evaluates to directory of qaac.exe.

[qaac] release 0.58
posted Sep 4, 2011 5:17 AM by nu 774
Added workaround for multichannel audio problem.

From this version, qaac rearranges input to AAC order, tells QuickTime that channel layout is (already) in AAC order, and feeds them to QuickTime.

This new behavior can be disabled with --native-chanmapper option.

You can use with/without --native-chanmapper for older, non-buggy version of QuickTime.

Newer QuickTime doesn't re-order channels, therefore it works fine.

Older QuickTime checks channel layout passed via API, but it's already in AAC order, therefore QuickTime doesn't reorder by itself. This is what you want.

[qaac] release 0.57
posted Sep 2, 2011 8:01 PM by nu 774
Added --chanmap option to force channel order. For example, "--chanmap 2,1" swaps L and R channel of 2ch stereo.

You can use "--chanmap 3,1,2,5,6,4" to force 5.1ch AC3 ordered input (L R C LFE Ls Rs) to AAC order (C L R Ls Rs LFE), in case you are using newer CoreAudioToolbox.dll (>=

In 7.1 case, you can use "--chanmap 3,7,8,1,2,5,6,4".

This was introduced as a workaround for recent channel mapping problem of CoreAudioToolbox. I strongly recommend you to confirm/test your result when you try this option.

[qaac] release 0.56
posted Sep 2, 2011 5:51 PM by nu 774
Re-implemented --log and --silent behavior to be more sane.

When you specify --silent, console message will be killed except when you specified wrong options (usage message is shown in this case).
When you specify --log FILENAME, log message (basically the same with console message) will be written to the file with FILENAME. This will be always written, even if you specified --silent.
[qaac] release 0.55
posted Aug 31, 2011 10:15 PM by nu 774
Added support for other than 44.1k inputs via cue sheets. Time formats of cue sheet is MM:SS:FF, where FF is 1/75 seconds, and 588 samples for CDDA (588 = 44100 / 75). Previously qaac was using constant 588 for cue sheet inputs, therefore it didn't work with non-CDDA inputs.
A little modification to console progress message. Encoding speed (5.1x or something) was added to working progress too.
[qaac] release 0.54
posted Aug 30, 2011 8:35 PM by nu 774
Fixed: display proper encoding speed on --ignorelength (Bug in 0.53)

[qaac] release 0.53
posted Aug 29, 2011 11:41 PM by nu 774
Added codec name/codec component version info to console message and tool tag. This is localized for implementation reason (QuickTime returns localized strings depending on the system locale, and qaac just uses it).
Added elapsed time to console message (This is pure AAC/ALAC encoding time, not including mp4 muxing).
[qaac] release 0.52
posted Aug 28, 2011 8:37 PM by nu 774
Better Vorbis tag support (for FLAC inputs). Accepts both of "albumartist" /"album artists", "totaltracks"/"tracktotal", "totaldiscs"/"disctotal".

Added encoded samples/total samples to log output (when --log specified).

By the way, about multichannel encoding and CoreAudioToolBox.dll issue, you may find useful reading Hydrogenaudio's qtaacenc topic.

In short,

Different version of CoreAudioToolbox.dll produces different AAC output (not binary identical), therefore you'd better use newer version for ordinary 2ch encoding. I also found that older CoreAudioToolbox.dll doesn't work with new iTunes.
You can place CoreAudioToolbox.dll to the same directory with qtaacenc/qaac (instead of public AppleApplicationSupport directory) to force loading it. This depends on MS Windows' DLL search order, and somewhat like the well-known DLL hijacking technic, but it should at least work.
There also written how to get and extract CoreAudioToolbox.dll itself in the forum.

[qaac] release 0.51
posted Aug 23, 2011 8:27 PM by nu 774
Added --artwork option to add cover arts.

You can specify --artwork more than two times to embed multiple artworks. Artworks are embedded in the specified order.

[qaac] release 0.50
posted Aug 23, 2011 6:53 AM by nu 774
Removed unwanted progress message with carriage returns from logfile (when --log option is given).

[qaac] release 0.49
posted Aug 20, 2011 7:17 PM by nu 774
Improved progress display message on console (number of audio samples to HH:MM:SS format).

[qaac] release 0.48
posted Aug 20, 2011 2:39 AM by nu 774
Added better embedded cuesheet support (FLAC/Wavpack source).

If the given flac/wavpack file has a CUESHEET tag,

qaac generates Nero/QuickTime compatible chapters according to cuesheet information (song title/length).
qaac copies the original album related tags from the original flac/wavpack tags, and then overwrite them with metadata in the cuesheet (new feature implemented in this release).
Currently, This kind of all-songs-in-one-file-with-chapters encoding is only activated for the file with CUESHEET tag.

It seems that at least QuickTime player and foobar2000 can read chapters written by qaac. However, iTunes can only read AAC chapters (The chapter menu is disabled for ALAC).

About QuickTime 7.7
posted Aug 3, 2011 8:22 PM by nu 774
I tried QT 7.7 for Windows today, which includes CoreAudioToolBox.dll

It seems that still has the same problem with multichannel audio.

I have replaced this with older CoreAudioToolBox, and it seems to still work with 7.7 components (at least in my usage).

Technically speaking, at QuickTime API/interface level, channel mapping is still working correctly. That is, I have confirmed the output channel layout of / is configured correctly (same with, at QuickTime API level. Therefore, I think newer CoreAudioTookBox just ignores output channel layout which is passed from QuickTime API. For this reason, there's no workaround from user side of the QuickTime API...

[mp4fpsmod] v0.14
posted Jun 13, 2011 9:22 AM by nu 774
Fixed build issue with gcc (issue #1 at github repos).

[mp4fpsmod] v0.13
posted May 31, 2011 8:05 PM by nu 774
Enabled optimize-only execution with the command line like the following:

mp4fpsmod -x orig.mp4 -o dst.mp4
[mp4fpsmod] v0.12
posted May 22, 2011 10:24 PM by nu 774
Fixed media duration calculation: Duration was a bit too long when the movie contains B-frames and -c (DTS compression) is not used.

[mp4fpsmod] v0.11
posted May 22, 2011 5:52 PM by nu 774
Added -d option, for audio delay.

Delay can be positive or negative integer value, in milliseconds. When you specify -d with -c (DTS compression), delay is achieved with time codes shifting. Without -c, edts/elst is used.

For details, consult the readme at github.

Catalin NC helped me a lot with suggesting/testing on this version. Thanks.

[mp4fpsmod] v0.10
posted May 10, 2011 9:46 PM by nu 774
Fixed a bug in the timecodes exporting code with -p option: extracted timecodes were completely wrong (all zero) for the movies without ctts box (that is, no B-frames used).

[mp4fpsmod] v0.09
posted May 7, 2011 7:15 PM by nu 774
Added -p option: timecodes_v2 output support.
DTS compression with -c now works without fps editing options. Without -r or -t, original mp4's timecode is used.
If none of -c, -r, -t, -p are specified, original mp4 is read, and just saved in the ftype/moov/mdat order.
[qaac] release 0.47
posted May 2, 2011 2:21 AM by nu 774 [ updated May 2, 2011 8:02 AM ]
Finally fixed to properly handle resampling filter latency of libspeexdsp. It's a bit of pain, as libspeexdsp seems to lack well-defined way of signaling end of input... Thanks to lvqcl, who helped me out about this.

In the new achive, libspeexdsp_vc10.dll is included. Somehow, the official dll doesn't export functions named speex_resampler_get_{input|output}_latency(), which provide latency informations produced by the filters. On the other hand, this custom built one in the archive exports them (just added their name to def file, and compiled).

Therefore, I recommend you to use libspeexdsp_vc10.dll in the archive. However, if you want, the official one still works. qaac v0.47 searches libspeexdsp_vc10.dll first, and if it doesn't exist, just fallback to the official libspeexdsp.dll.

When running with official dll, qaac uses "guess" approach to obtain latency, instead of calling speex_resampler_get_input_latency() function. Therefore, output length of two approaches might slightly differ by one or few samples. It's resampled from the original anyway, and I don't think this difference is important, nor audible.

[qaac] new resampler in 0.46 still buggy
posted May 1, 2011 7:55 PM by nu 774
I'm sorry, v0.46's resampler still had a problem. libspeexdsp's resampler has output latency by default. In 0.46, I have removed reading zero samples at the beginning (by suggestion of lvqcl). However, at the same time, small amount of samples at the end are dropped due to the latency...

Until I fix it, please don't use new libspeexdsp resampler feature.

[qaac] release 0.46
posted Apr 30, 2011 9:06 PM by nu 774
Fixed the bug addressed in the previous post (zero samples were needlessly appended at the beginning with the new resampler, which caused slight delay..)

Better handling of temporary files used in the resampler code. Modified to directly call CreateFileW() with FILE_ATTRIBUTE_TEMPORARY, FILE_FLAG_DELETE_ON_CLOSE flags. With this modification, they will be removed even when qaac was killed or something.

Temporary files are also used for the MP4 box optimization purpose, but this remains unchanged, therefore has probability to leave garbage tempfile remained in the encoding target directory.

[qaac] Don't use new resampler in 0.45
posted Apr 30, 2011 7:51 PM by nu 774
Bug in the new resampler code was reported, and I'm just investigating now. So, please don't use it. You can just use v0.44 instead. If you are using v0.45, read the following.

If you don't resample at all, it's OK and do you no harm. When qaac does resampling, it's visible if you are running qaac from command line. Of course you can confirm with samplerate of the encoded result.

Finally, you can deactivate v0.45's new resampler either by removing libspeexdsp.dll from qaac dir, or with --native-resampler option.

qaac does resampling in the following cases:

Input's samplerate is not allowed by the AAC spec. For example, 44.1k and 48k are OK, while 96k is not allowed for AAC-LC.
You specified very low target bitrate, or quality value.
You intentionally specified --rate option.
[qaac] release 0.45
posted Apr 30, 2011 12:52 AM by nu 774
Added libspeexdsp resampler. To activate this, download win32 binary from, and place libspeexdsp.dll (not libspeex.dll) to the same directory with qaac.

Also added mp4v2 project.h to github repos, which was long missing... If you have experienced build issue or difficulty, please let me know.

[qaac] release 0.44
posted Apr 28, 2011 2:36 AM by nu 774
Fixed to write more proper value to sample description(stsd) box for ALAC encoding.

samplesize property now reflects audio's bit depth (16 or 24).
samplerate property is a 16bit integer value, therefore not large enough to hold real sample rate greater than 65535. qaac has been setting least significant bits there (by just letting it overflow), and now set most significant bits. That is, for 96k sample, previously 30464 (= 0xffff & 96000) was set, and now 48000 is set. (iTunes seems to always set 44100 for ALAC, so I believe nobody refers this property anyway...).
[qaac] release 0.43
posted Apr 12, 2011 6:51 AM by nu 774
Re-enabled FLAC metadata reading.

This is degradation at release 0.40; The official libsndfile-1.dll is FLAC enabled, therefore qaac was reading FLAC files with not libFLAC.dll but libsndfile-1.dll since release 0.40, when both DLLs are installed.

[mp4fpsmod] v0.08
posted Apr 8, 2011 10:54 PM by nu 774
Fixed DTS compression code.
Removed needless boost dependency.
[qaac] release 0.42
posted Apr 7, 2011 8:08 PM by nu 774
Fixed a degradation: ADTS streaming to stdout was not working since 0.38.

[qaac] release 0.41
posted Apr 2, 2011 8:56 PM by nu 774
Supported command line argument globbing(wildcard) for mingw build.
Fixed to re-encode libmp4v2 origin utf-8 error messages.
alacdec: Refined usage message.
alacdec: Fixed to call setlocale() (Couldn't properly handle non-ascii char messages without setlocale()...)
alacdec: Supported mingw build.
[qaac] release 0.40
posted Mar 31, 2011 9:52 PM by nu 774
Dropped libsamplerate due to license incompatibility issue.
Removed DLLs from the When you want to input files with these libraries, please read usage page, and follow the instruction. You cant use DLLs in the 0.39 distribution, as at least file names are different.
(For example, qaac 0.39 loads libFLAC_vc10.dll, while qaac 0.40 loads libFLAC.dll).

[mp4fpsmod] v0.07
posted Mar 29, 2011 2:37 AM by nu 774
Updated mp4v2 to svn r458.
Added -c option for DTS compression. By default, mp4fpsmod uses edts/elst box to describe the initial CTS delay. with -c option, mp4fpsmod will set smaller DTS value for first several frames, and minimizes the delay.
[qaac] release 0.39
posted Mar 27, 2011 8:46 AM by nu 774
Updated libmp4v2 to svn-r458
Updated libsndfile to 1.0.24
Updated sources to be compatible with mingw, and added Makefile for it (though not much tested, and I don't recommend you to build qaac with mingw...)
[qaac] release 0.38
posted Mar 21, 2011 9:54 PM by nu 774
Supported path names longer than MAX_PATH limit.

Technically, qaac has been using unicode path names with no limitation with path name length internally. However, qaac couldn't handle very long file name due to Windows API limitation.

In API level, very long file names are required to be prefixed with "?" for ordinary path names, or "?UNC" for UNC path names. qaac has not been taking care of that.

I implemented the prefix handling in this release, so most of functions now allow very long path names.

However, QuickTime's QTNewDataReferenceFromFullPathCFString() API denies such long paths and result in pathTooLongErr. Therefore, ALAC decoding still doesn't work for very long path names.

[qaac] v0.37, [mp4fpsmod] v0.06
posted Feb 22, 2011 9:44 PM by nu 774
Updated mp4v2 to newest svn-r455.

[qaac] release 0.36
posted Feb 16, 2011 10:55 PM by nu 774
Fixed alacdec.exe to load libFLAC_vc10.dll (FLAC encoding feature was broken since qaac has swiched to VC10...)
Better vorbis comment support.
Now qaac/alacdec handles totaltracks, totaldiscs tag.
Now alacdec converts m4a gnre atom (which contains integer index) into named genre comment.
[qaac] release 0.35
posted Feb 16, 2011 10:30 AM by nu 774
release 0.34 modification was insufficient. dropped still remaining libid3tag code, and fixed up AIFF ID3 genre importing.
Fixed to write "gnre" atom as BT_IMPLICIT (compatibility with iTunes)
[qaac] release 0.34
posted Feb 16, 2011 8:03 AM by nu 774
Dropped libid3tag(GPL) and switched to TagLib, due to GPL's incompatibility with MPLv1.1 (which is mp4v2's license).

I'm not a native English speaker, and lawyerish English is too difficult to me...

[qaac] release 0.33
posted Feb 5, 2011 1:41 AM by nu 774
Fixed the way to pick AAC encoder bit rate table entry.

Technically, QuickTime AAC encoder uses not literal bit rate value, but index of bit rate table, for configuring the encoder.

You can see this table by specifing CBR/ABR/CVBR and impossible bit rate value (say, 0) like:

qaac --cvbr 0 foo.wav
CVBR bit rate table consists of bit rate ranges, and each ranges has some overlaps, therefore has ambiguity:

1: 64 - 72
2: 72 - 82
3: 80 - 91
4: 96 - 109
5: 112 - 127
6: 128 - 145
7: 144 - 164
8: 160 - 182
9: 192 - 228
10: 224 - 266
11: 256 - 305
12: 288 - 343
13: 320 - 381
See? when you specify

qaac --cvbr 256 ,...
qaac has been selecting the index 10 (224 - 266). However, it seems to be 11 (256 - 305) is proper selection (iTunes and qtaacenc seems to choose the latter).

Therefore, I fixed qaac to follow them. This impacts only the CVBR case. TVBR doesn't use bit rate. CBR and ABR use different table, and there's no ambiguity with them.

However, if you were using with CVBR, be careful.

[qaac] release 0.32
posted Feb 3, 2011 10:44 PM by nu 774
Modified to abort when detected FLAC decoder error (formerly, qaac just silently treated FLAC decoder error as end of file).
Switched to BSD's getopt implementation (due to incompatibility of MPL and GPL). As before, I've modified it to use wchar_t for Unicode capability.
Fixed usage message.
[qaac] release 0.31
posted Feb 2, 2011 5:30 AM by nu 774
Implemented resampler using libsamplerate (SecretRabbitCode).

This is activated by placing libsamplerate_vc10.dll in the same directory with qaac.exe. If you don't want this, just don't install this dll, or specify --native-resampler command line option.

Resampling is usually not recommended. However, resampling happens on the following cases:

QuickTime cannot encode with the source's sample rate (due to AAC spec limitation).
You specified --rate 48000 or something.
You specified --rate auto, and the target bit rate or TVBR quality is low enough for QuickTime to decide down-sampling.

follow up about AAC channel mapping: 2
posted Jan 30, 2011 7:17 PM by nu 774 [ updated Feb 5, 2011 2:27 AM ]
I found the channel mapping problem was brought by CoreAudioToolbox.dll, version 7.9.4.

Strictly speaking, this is not a QuickTime component, but is one of "Apple Application Support" components, which is installed under "C:/Program Files/Common Files/Apple/Apple Application Support".

Upon QuickTime 7.6.9 installation, by simply replacing this dll with older version, channel mapping problem was fixed and everything seemed to be working properly (QuickTime 7.6.8 package contains CoreAudioToolBox version 7.9.3).
Though I don't recommend you to do this, if you don't know what you are doing.

[qaac] release 0.30
posted Jan 29, 2011 8:59 PM by nu 774
Inportant bug fix with ALAC encoder

Fixed issue #13 at github:
When the source's total sample length is exactly multiple of 4096, qaac produced 4096 samples longer output (silence was added to the last) -- that is, it was not bit-exact.

I'm sorry, I introduced this bug from Apple's sample program named "scaudiocompress", which I referred to.

In the above special case, the way used by scaudiocompress (and qaac) misjudged final ALAC encoder ouput.

Encoder API named SCAudioFillBuffer() tells the caller how many samples are contained in the encoded packet, via a struct member named AudioStreamPacketDescription.mVariableFramesInPacket. It's usally more than zero for ALAC, and zero for AAC.

However, in the above special case, ALAC finally puts zero to it. And seeing zero, qaac chose AAC's logic to find out the number of sample frames in the packet (it's always constant for AAC). Of course, it was completely wrong -- It's ALAC, and not AAC.

[qaac] follow-up report about multichannel audio
posted Jan 28, 2011 1:29 AM by nu 774
I downloaded older version of QuickTime from, and tested each of them.

The result was, version up to 7.6.8 is OK. Only the newest version 7.6.9 is broken with AAC channel mapping. I have reported this to Apple with Apple BugReporter.

For now, I recommend you to use versions before 7.6.8, if multichannel encoding matters to you.

[mp4fpsmod] v0.05
posted Jan 26, 2011 7:54 PM by nu 774 [ updated Jan 26, 2011 8:07 PM ]
Fixed to update movie duration, when the duration has become shorter with fps change.

Movie duration was updated *if* video track's duration has grown to bigger size, but was not rewritten if it has become shorter. (Due to my misunderstanding to libmp4v2's function).

[qaac] Don't use for multi channel audio encoding
posted Jan 26, 2011 7:04 AM by nu 774 [ updated Jan 26, 2011 8:03 PM ]
I found that in the recent version of QuickTime (at least for 7.6.9), QuickTime's channel mapping behavior seems to be BROKEN or at least CHANGED, therefore qaac produces wrongly mapped output.

I'm sorry, but I don't know the exact QuickTime version which causes this. At least it worked properly on 7.6.5 and 7.6.6, and broken on 7.6.9. If you know something about this, please let me know.

For now, please don't encode multichannel sources with qaac, until this will be fixed, and unless you are using working version of QuickTime. Ordinary 2ch stereo encoding is OK.

Technically, when you feed multichannel source with standard MPEG order (like L R C LFE Ls Rs), qaac just pass it to QT encoder as it is, and just tell QuickTime the order (like kAudioChannelLayoutTag_MPEG_5_1_A). Then, QT AAC encoder nicely re-mapped it into AAC order (in this case, C L R Ls Rs LFE).

But now, this remapping feature by QT AAC encoder seems to be broken, or at least behaves differently.

[qaac] release 0.29
posted Jan 26, 2011 4:51 AM by nu 774 [ updated Jan 26, 2011 5:08 AM ]
Enabled 3ch input for AAC encoding. QuickTime AAC encoder doesn't accept 3ch sources, therefore qaac has also denied them.
From this version, qaac just accepts 3ch sources, and automatically down-mix them into 2ch, with warning message.
Without libsndfile and --ignorelength not specified, qaac couldn't encode WAV sources, and this was not what I meant.
Fixed to handle WAV sources without libsndfile when --ignorelength is not specified.
[mp4fpsmod] v0.04
posted Jan 25, 2011 6:20 PM by nu 774
Fixed timeScale calculation so media duration not to exceed signed 32bit integer limit.

[qaac] release 0.28
posted Jan 25, 2011 5:36 PM by nu 774
This is very important bug fix for ALAC encoder

ALAC encoder randomly crashed due to heap corruption, for some input sources. It seems this is triggered by some specific sources, which contain hard part for ALAC encoder, and the output packet size is very close to uncompressed raw PCM size.

If I believe the QuickTime's property kQTSCAudioPropertyID_MaximumOutputPacketSize, ALAC encoder's maximum output bytes for ordinary 2ch 16bit audio, 4096 sample frame is 16392. This is 4096 * 2 * 2, and equals to uncompressed PCM size. Therefore, when it reaches to 16392, it means that this packet could not be compressed at all, in size.

In my observation, ALAC doesn't exceed the limit. It always stays under 16388 or so. However, when it is near around that, it *does* overwrite the output buffer beyond the size, and result in the caller process's heap corruption (when the output buffer is allocated in the heap).

In this release, I doubled the buffer size, and this version is using 32784, instead of 16392. This is not a *good* work around, but it seems to work for now...

[qaac] release v0.27a
posted Jan 23, 2011 5:37 PM by nu 774
libFLAC_vc10.dll in the release 0.27 package was problematic, so replaced with new one. If you have already installed v0.27, you can just download and replace older one with it.

The problem is: libFLAC_vc10.dll in 0.27 was implicitly linked to ogg_vc71.dll (which was used in the previous version, but not in the new archive).

[mp4fpsmod] v0.03
posted Jan 21, 2011 6:43 PM by nu 774
I opened this new project at github recently.

In v0.02, -t option for reading timecode_v2 file was added.
In v0.03, -x option for optimizing timecode entries in the timecode_v2 file was added.
Documents and source codes are at github. Win32 binary can be downloaded at cabinet page.

release 0.27
posted Jan 21, 2011 1:09 AM by nu 774
Switched to MSVC10. Source codes are slightly modified to work with MSVC10. However, in function, this is the same with v0.26.

I put C/C++ runtime DLLs of MSVC10 in the archive, so now you don't have to worry about them.

msvcr100.dll and msvcp100.dll are generally installed under System32 (or SysWOW64) directory, but you can place them in the same directory with qaac.exe.

release 0.26
posted Dec 15, 2010 3:05 AM by nu 774
Fixed issue #6 in github: when source file contains a tag, and the same tag value is supplied with command line option, source's one was taken and embedded in the result file.
Included new version of libsndfile(1.0.23)
Invalid path characters list was incomplete, therefore some characters like ">", "|" were added (for cuesheet encoding + automatic path name generation).
alacdec.exe 0.25a
posted Nov 28, 2010 5:36 AM by nu 774
New alacdec.exe with FLAC encoding support had a minor bug when encoding 24bit ALAC into FLAC, therefore released new alacdec.exe as

release 0.25
posted Nov 28, 2010 2:43 AM by nu 774
Enabled 24bit ALAC encoding.
Added FLAC output support in alacdec.exe (use -F option). This might be handy when you want to keep tags in the original ALAC file. alacdec copies most of the major tags into result FLAC file.
release 0.24
posted Nov 23, 2010 7:47 AM by nu 774
Fixed the issue #3 (at github):
Combination of --ignorelength + cuesheet input was buggy. In this case, encoded song started from wrong position, and had wrong length.

release 0.23
posted Nov 22, 2010 10:20 AM by nu 774
I'm sorry, release 0.21 didn't fixed the tool tag duplication bug for cue sheet input case. Therefore, I re-fixed the problem.

release 0.22
posted Nov 22, 2010 7:04 AM by nu 774
Enabled simple user-defined file name formatting for cue sheet input. You can specify format with new --fname-format option.

By default, format "${tracknumber}${title& }{$title}" is used, and this will generate file named like previous versions.

I will explain format strings spec in the usage page.

release 0.21
posted Nov 22, 2010 12:57 AM by nu 774
When encoding multiple files at once, encoder settings like "TVBR 127" were repeated in the "tool" tag.

release 0.20
posted Nov 20, 2010 12:38 AM by nu 774
DLLs like libsndfile_vc71.dll are now optional and dynamically loaded. They are still in the release archive, but You don't have to put them if you don't need them (especially when you are using qaac via foobar2000 or something).

qaac now load DLLs from it's install directory only, therefore if you want them, place them in the same directory with qaac.exe.

I cleaned up the source tree, added VisualStudio project file, and placed them at github repository. Now the building process would be much easier, I hope.

release 0.19
posted Nov 16, 2010 7:15 PM by nu 774
Fixed a bug:
When processing CUE sheet as an input, which contains a track named like "Mr. bug", qaac produces "Mr.m4a".

I mean, the track name's part after dot was treated as an extension, and replaced with "m4a".

re-reuploaded 0.18 as 0.18_2
posted Nov 3, 2010 4:11 AM by nu 774
I'm very sorry to have bothered you. qaac.exe in 0.18_1 still reports 0.17.

Please download 0.18_2.

re-uploaded release 0.18
posted Nov 2, 2010 1:32 AM by nu 774
I'm sorry. qaac-0.18 reports it's version as 0.17. I re-uploaded 0.18 as

release 0.18
posted Oct 11, 2010 8:30 AM by nu 774
Updated libmp4v2 to svn trunk r399. I have rewritten some modules due to the libmp4v2's interface change.

Thanks to Jeremy Noring -- libmp4v2's developer, some of my patches were merged into libmp4v2's trunk.

r399 needs a slight modification to work with qaac, therefore qaac 0.18 still depends on my custom build of libmp4v2. However, I hope I will soon be able to use vanilla libmp4v2.

release 0.17
posted Oct 7, 2010 8:28 PM by nu 774
I'm sorry, I've written but forgot to open the change log for the previous release (0.16).

New release 0.17 fixed a bug in 0.16 --adts mode:

0.16, with --adts option specified, generated a file named like foo.aac.tmp, not foo.aac

release 0.16
posted Aug 29, 2010 6:14 AM by nu 774
Added --no-optimize option. By default, qaac optimizes the MP4 container after encoding has finished. "optimize" means arranging MP4 box in a better order for playing and eliminating unneeded free areas. However, when you run qaac from foobar2000(or something), it will rewrite the MP4 container afterward. In this case, optimizing with qaac will be useless and just a time consuming process.
Fixed a problem:
When running from dbPoweramp, qaac produced 8.3 DOS-like filename.
It seems that dbPoweramp uses some trick to pass the outfilename to the CLI encoder.

dbPoweramp first creates 0 bytes file with usual long file name, then pass 8.3 DOS format short file name to CLI encoder as a command line. This is maybe in order to avoid the trouble around unicode filenames, which many CLI encoder can't handle correctly.

Therefore, CLI encoder tries to open the file using the 8.3 DOS file name. In Windows file system, this is considered to be identical with the original long file name, therefore original file -- which dbPoweramp has created -- is opened for writing. This is what dbPoweramp expects.

As for qaac, qaac uses a temporary file to optimize the MP4 container file after encoding. Therefore, qaac finally "renames" to the file name passed as a command line (which is a 8.3 DOS-like short file name). And, this result in the 8.3 filename problem, which you don't expect.

release 0.15
posted Aug 11, 2010 8:05 AM by nu 774
Important bug fix release.

libmp4v2's MP4 optimize function was using temporary file in an inadequate manner by default, and causing problems below:

Same temporary filename was used between multiple instances of qaac, which resulted in a failure at the end of the encoding stage.
Tempfile's directory was fixed to "..", which means you might have failed encoding if ".." was not writable.
release 0.14
posted Aug 8, 2010 6:34 PM by nu 774 [ updated Aug 8, 2010 6:36 PM ]
Added --downmix option for downmixing multichannel source into mono/stereo.

release 0.13
posted Jul 27, 2010 6:52 PM by nu 774
Adopted qtaacenc's new feature -- Encoder configs are embedded into metadata.

release 0.12
posted Jul 1, 2010 9:24 AM by nu 774
Fixed a bug in the wav parser for --ignorelength option.

release 0.11
posted Jun 29, 2010 12:42 AM by nu 774
Added --nice option for setting lower process priority. In fact, qaac ran at the lowest(idle) priority up to this version. From now on, normal priority is the default, and you can specify --nice if you want qaac run at idle priority.
Added --ignorelength option. This is for PCM wav source only, and ignore the "data" chunk size. Sometimes you may have to set this if you want to feed qaac from pipeline.

release 0.10
posted Jun 4, 2010 3:53 AM by nu 774
Removed junk MP4 box( from the MP4 output, which was produced by libmp4v2.

By this fix, now aacgain can open qaac's MP4 output (Programs like foobar2000, QuickTime and mp4box could open MP4 files produced by qaac with no problem, but I found aacgain couldn't open it).

release 0.09
posted May 21, 2010 8:02 PM by nu 774
Now I fixed the problematic "--rate" code.

In release 0.08 post, I've written of QT 7.6.5 specific problem, but it was not. Therefore, I think this version will work in QT 7.6.5 (although I can't test it).

Don't use release 0.08
posted May 21, 2010 7:26 PM by nu 774
I'm sorry. I'm working to fix it now. Please use 0.07.

release 0.08
posted May 20, 2010 7:13 PM by nu 774
Bugfix: Enabled "--rate" option on TVBR mode.

By this fix, on QuickTime 7.6.5, you might get lower quality output than you specified by "--tvbr" option. On 7.6.6, it should work OK. Therefore, I strongly recommend upgrading QuickTime if you are using 7.6.5.

(I've already upgraded to 7.6.6 and I have no working environment with 7.6.5, so I can't reproduce the problem on 7.6.5, sorry. This is why I used the wording... "might".)

posted May 12, 2010 7:05 PM by nu 774
I'm sorry. Yesterday's package didn't include qaac.exe and alacdec.exe. I have re-uploaded it now.

release 0.07
posted May 11, 2010 10:45 PM by nu 774
Fixed a bug: -d option didn't work for cuesheet input.

release 0.06
posted May 11, 2010 8:10 AM by nu 774
Added ADTS output mode(AAC only). This can be used for streaming output to stdout, but tagging is not supported here.

release 0.05
posted May 9, 2010 5:06 AM by nu 774
Added cue sheet(*.cue) input support(experimental).

qaac foo.cue
will encode each track into separate m4a files.

release 0.04
posted Apr 21, 2010 4:05 AM by nu 774 [ updated Apr 21, 2010 4:26 AM ]
Now qaac can handle files when the current directory name contains unicode characters.

I found QuickTime for Windows intentionally changes caller process's current working directory, when it containes some of unicode characters. It makes caller process's path handling really CONFUSED, and I think this is really EVIL.

More acculatly, QuickTime dislikes characters which can't be dealt with ANSI version of Windows API under the current codepage. For example,

C:MusicflacMúm> qaac foo.flac
resulted in failure if you are using Japanese version of Windows.
I tried to take care of it, but it might be incomplete. You can avoid this problem by not running qaac in such current-dirs.

release 0.03
posted Mar 16, 2010 9:51 AM by nu 774 [ updated Mar 16, 2010 10:02 AM ]
Added embedded Cuesheet support for FLAC/Wavpack one-file-per-album source. foobar2000 style is expected (global metadeta are embedded as ordinary tags, others are embedded in "cuesheet" tag).

Read song titles and durations from embedded cuesheet, and write into M4A as MP4 chapters, like foobar2000 does. qaac writes both QT style and Nero style chapters, therefore foobar2000 and QuickTime / iTunes will handle them alright.

release 0.02
posted Mar 7, 2010 5:23 AM by nu 774 [ updated Mar 7, 2010 5:35 AM ]
Added simple ALAC decoder, alacdec.exe. Can decode ALAC into WAV, using QuickTime API.
Divided BIG import libs for the source tree into an extra zip archive.
Modified progress message display code (not important).
Hide changelog

Sections/Browse similar tools

Guides and How to's

Acronyms / Also Known As


Download qaac Portable download from the Download links under Download and Download other versions!

Share software

Facebook    Twitter    Reddit    LinkedIn    Pinterest    Google+    Email

Notify me when software updated or report software

Email me when it has been updated    Report this software (dead link/new version)  

3 reviews, Showing 1 to 3 reviews

Plz tell me, How to use it with Audacity. I searched evryhwhere but no working method is found

Review by Rahul on Dec 18, 2018 Version: qaac 2.68 OS: Windows 8 64-bit Ease of use: 7/10 Functionality: 7/10 Value for money: 10/10 Overall: 7/10

No comments. Rating it only.

Review by WinSpirit on Feb 16, 2018 Version: 2.65 OS: Windows 10 64-bit Ease of use: 10/10 Functionality: 10/10 Value for money: 10/10 Overall: 10/10

Even though I hate bloatware, installing the Apple Application Support stuff is not much worse than having Java or .Net Framework 2.0 on your HDD.

This CLI front-end does work, and this post means a big Thank-You to the author.

Review by El Heggunte on Jun 9, 2012 Version: 1.37 OS: WinXP Ease of use: 8/10 Functionality: 10/10 Value for money: 10/10 Overall: 9/10

3 reviews, Showing 1 to 3 reviews

1 tool hits, Showing 1 to 1 tools

NEW SOFTWARE= New tool since your last visit
NEW VERSION= New version since your last visit
NEW REVIEW= New review since your last visit
NEW VERSION= New version

Type and download
NO MORE UPDATES? = The software hasn't been updated in over 2 years.
NO LONGER DEVELOPED = The software hasn't been updated in over 5 years.
RECENTLY UPDATED = The software has been updated the last 31 days.
Freeware = Download Free software.
Freeware/Trialware = Download Free software but some parts are trial/shareware.
Free software = Download Free software and also open source code.
Free software/Trialware = Download Free software and also open source code but some parts are trial/shareware.
Freeware/Ads = Download Free software but supported by advertising, usually with a included browser toolbar. It may be disabled when installing or after installation.
Free software/Ads = Free Download software and open source code but supported by advertising, usually with a included browser toolbar. It may be disabled when installing or after installation.
Trialware = Also called shareware or demo. Free Trial version available for download and testing with usually a time limit or limited functions.
Payware = No demo or trial available.
Portable version = A portable/standalone version is available. No installation is required.
v1.0.1 = Latest version available.
Download beta = It could be a Beta, RC(Release Candidate) or an Alpha / Nightly / Unstable version of the software.
Download [15MB] = A direct link to the software download.
[Win] = Windows download version. It works on 32-bit and 64-bit Windows.
[Win64] = Windows 64-bit download version. It works only on 64-bit Windows.
[Mac] = Mac download version. It works on 32-bit and 64-bit Mac OS.
[Mac64] = Mac OS download version. It works only on 64-bit Mac OS.
[Linux] = Linux download version.
[Portable] = Portable version. No installation is required.
[Ad-Supported] = The software is bundled with advertising. Be careful when you install the software and disable addons that you don't want!
Visit developers site = A link to the software developer site.
Download (mirror link) = A mirror link to the software download. It may not contain the latest versions.
Download old versions = Free downloads of previous versions of the program.
Download 64-bit version = If you have a 64bit operating system you can download this version.
Download portable version = Portable/Standalone version meaning that no installation is required, just extract the files to a folder and run directly.
Portable version available = Download the portable version and you can just extract the files and run the program without installation.
Old versions available = Download old versions of the program.
Version history available = Complete changelog on our site.
Windows = Windows version available.
Mac OS = Mac OS version available.
Linux = Linux version available.
Our hosted tools are virus and malware scanned with several antivirus programs using

Rating from 0-10.

Browse software by sections
All In One Blu-ray Converters (11)
All In One DVD Converters (15)
All In One MKV to MP4/Blu-ray/UHD (11)
All In One Video Converters (24)
Animation (3D/2D Animation) (11)
Audio Editors (16)
Audio Encoders (73)
Audio Players (15)
Authoring (Blu-ray/UHD/AVCHD) (20)
Authoring (DivX) (5)
Authoring (DVD) (32)
Authoring (SVCD/VCD) (10)
Bitrate Calculators (7)
Blu-ray to AVI/MKV/MP4 (15)
Blu-ray to Blu-ray/AVCHD (10)
Burn (CD,DVD,Blu-ray) (23)
Camcorders/DV/HDV/AVCHD (33)
Capture TV/DVD/VCR (32)
CD/DVD/Blu-ray recovery (3)
Codec Packs (7)
Codec/Video Identifiers (30)
Codecs (65)
Decrypters (Blu-ray Rippers) (9)
Decrypters (DVD Rippers) (14)
DigitalTV/DVB/IPTV (38)
DVD to AVI/DivX/XviD (16)
DVD to DVD (21)
DVD to MP4/MKV/H264/H265 (16)
ISO/Image (16)
Linux Video Tools (141)
MacOS Video Tools (189)
Media (Blu-ray/DVD/CD) (9)
Media Center/HTPC (39)
Other Useful Tools (131)
Photo Blu-ray/DVD/SlideShow (9)
Portable (Mobile/PSP) (35)
Region Free Tools (5)
Screen capture / Screen recording (24)
Screenshots / Thumbnails (12)
Subtitle Editors (64)
Video De/Multiplexers (56)
Video Editors (Advanced/NLE) (33)
Video Editors (Basic) (49)
Video Editors (H264/MP4/MKV/MTS) (19)
Video Editors (MPG/DVD) (18)
Video Editors (WMV/AVI) (16)
Video Encoders (AVI/WMV) (39)
Video Encoders (H264/H265/MP4/MKV) (45)
Video Encoders (MPG/DVD) (25)
Video Encoders / Converters (151)
Video Frameservers (9)
Video Players (40)
Video Repair/Fix (21)
Video Scripting (11)
Video Streaming (22)
Video Streaming Downloaders (77)
Virtualdub Tools (11)

Search   Contact us   Privacy Policy   About   Advertise   Forum   RSS Feeds   Statistics   Software   

Site layout: Default Classic Blue