Last modified: 2011/8/16
What is this?
qtaacenc is a command-line utility for Windows to encode audio files with QuickTime AAC encoder. It enables us to access the true VBR encoder which is not available in iTunes.
Requirements
- Windows XP or later (?)
- QuickTime 7.6.2 or later
Please install the latest version if you are using the older one. You don't have to install iTunes.
- VC2008 runtime
Will be required on some systems.
How to use
> qtaacenc.exe [options] infile [outfile]
Without any option, qtaacenc encodes the input file with the True VBR mode, quality 65. The output file is saved in the current directory.
You can specify the following options:
- --cbr bitrate
-
Encode the input file in CBR mode. Available bitrate range is 16-320kbps(stereo), 8-256kbps(mono).
- --abr bitrate
-
Encode the input file in ABR mode. Available bitrate range is 16-320kbps(stereo), 8-256kbps(mono).
- --cvbr bitrate
-
Encode the input file in Constrained VBR mode. Available bitrate range is 16-320kbps(stereo), 8-256kbps(mono).
- --tvbr quality
-
Encode the input file in True VBR mode. Available quality range is 0-127. [default]
- --he
-
Enable the high efficiency (HE-AAC) encoder. Cannot be used with True VBR mode.
- --samplerate auto | keep | value
-
Control the samplerate of the output file.
- auto
Automatically choose the optimum samplerate according to the bitrate and quality. [default]
- keep
Keep the original samplerate (if possible).
- value
Specify the preferred samplerate in Hz. Allowed values are: 8000, 11250, 12000, 16000, 22050, 24000, 32000, 44100, 48000
- --fastest
-
Choose the profile for the fastest encoding speed (identical to --fast in the current QT AAC encoder).
- --fast
-
Choose the profile focused on the encoding speed.
- --normal
-
Choose the profile with moderate speed and quality.
- --high
-
Choose the profile focused on the encoding quality. [default]
- --highest
-
Choose the profile for the highest encoding quality (identical to --high in the current QT AAC encoder).
- --title string
-
Set the title tag.
- --artist string
-
Set the artist tag.
- --album string
-
Set the album title tag.
- --albumartist string
-
Set the album artist tag.
- --genre string
-
Set the genre tag.
- --date string
-
Set the release date tag.
- --composer string
-
Set the composer tag.
- --grouping string
-
Set the grouping tag.
- --comment string
-
Set the commnet tag.
- --track number[/total]
-
Set the track number tag.
- --disc number[/total]
-
Set the disc number tag.
- --compilation
-
Set the compilation flag.
- --ignorelength
-
Ignore the size of data chunk when encoding from pipe.
- --quiet
-
Do not print the progress.
Pipe Encoding
By passing - as infile, qtaacenc reads the input file from stdin. This is useful when you want to encode the file from other applications using pipe. In this case, the input format should be RIFF WAVE containing linear PCM.
Examples
> qtaacenc.exe --abr 160 foo.wav
Encode foo.wav with ABR 160kbps, and save as foo.m4a in the current directory.
> qtaacenc.exe --tvbr 100 --highest C:\foo.wav bar.m4a
Encode C:\foo.wav with true VBR quality 100, highest quality profile, and save as bar.m4a in the current directory.
qtaacenc can be used as a custom command-line encoder in foobar2000. See the picture below for the example of configurations.
Any comments or questions are accepted in the thread in Hydrogenaudio. Of course you can directly contact me.
Limitations
- Cannot encode with odd bitrates, like 125kbps [QuickTime-side problem]
Download
This software is distributed under the MIT license. The source code of qtaacenc is included in the archive. Visual Studio 2008 and QuickTime SDK are required to build the project.
Change Log
2011/8/16
- Fixed a file overwriting issue introduced in the last update
2011/8/6
- Fixed a non-ASCII path issue with QuikTime 7.7
2011/4/14
- Changed the minimum required version of QuickTime to 7.6.2
HE-AAC encoding requires 7.6.4 or later.
2010/11/19
- Added a support for MS-DOS style relative path
2010/11/17
- Fixed a bug that the encoder was not configured correctly when the samplerate of the input file was very high (>48kHz?)
2010/11/15
- Fixed a problem that caused an error when a current directory path contained invalid characters for the default character set
Gah, in this case QT changes the current directory path without any notice.
2010/7/25
- Added encoder configuration info to the tool metadata
2010/3/7
- Fixed a problem when the UNC-style path was passed
Note that the maximum path length is still limited to 260 characters due to the limitation of QuickTime API.
2010/3/6
- Fixed a file corruption bug when creating very small files
2010/2/21
- Better multichannel handling when the order info is missing
- Further code cleanup
2010/2/20
- Fixed a crash when the input file did not exist
- Fixed a bug that --samplerate keep option was not accepted for HE-AAC encoding
- Overhaul of some internal routines - now the executable size is almost as half
2010/2/18
- Fixed some problems regarding timescale/duration/gapless info of HE-AAC files
2010/2/17
- Supported HE-AAC encoding
Finally I've found a hack to activate HE-AAC encoder. It is enabled by passing "--he" as a parameter. Note that the true VBR mode is not available in the encoder.
2010/2/12
- Supported multichannel audio files
- Changed the default encoding parameter into TVBR q65
2010/2/11
- Fixed a potential memory corruption bug
2010/2/10
- Added --ignorelength option
This option lets qtaacenc ignore the size of data chunk of the input wave stream when encoding from pipe. This will be useful when you want to pass a huge (>4GB) wave stream using pipe. Note that if the data chunk size is set to zero, qtaacenc reads the stream until EOF without this option.
- Write max bitrate info and encoding parameter metadata (iTunes compatible)
2010/1/24
- Added options to write metadata
- Fixed an issue when encoding 48kHz sources with --samplerate keep option
2010/1/22
2010/1/17
- Added support for the gapless playback information (iTunes compatible manner; foobar2000 also supports it)
2010/1/7
- Added switches to control the output samplerate
- Several bug fixes
Please feel free to link to this page.
E-mail