defunkt
29th November 2005, 05:06
Wanted to add AAC encoding to my x264 frontend. Looked at various tools but none really did what I wanted and all had problems with channel ordering so I've written my own .wav reader and implemented the FAAC/Nero/iTunes encoders in the same program.
http://www.ionwerks.net/defunkt/wave2aac/wave2aac.png
Download 2.5MB: http://www.mytempdir.com/288157
Source for the FAAC/Nero Backend: http://www.ionwerks.net/defunkt/wave2aac/wave2aac.zip
Use should be fairly straightforward, command line usage as follows:
Wave2AAC.exe [inputfile] [outputfile] [options]inputfile: Integer PCM wave file required, have really only tested with 16bit. LibFAAC doesn't appear to support 8bit sources.
outputfile: Anything other than an .aac extension is assumed to be an mp4, default is .m4a. To create an .aac file with the Apple encoder MP4Box.exe needs to exist in the program folder. If both inputfile and outputfile are specified on the command line then these fields are locked and the app will exit immediately after encoding has completed (useful when called from another app).
options:
-encoder <1-4>
1 = LibFAAC
2 = Nero 6/7 (Default)
3 = Nero 6/7 (Fast)
4 = iTunes 5/6
Nero Burning ROM must be installed or the appropriate dll's located in the Wave2AAC program folder. Depending on your system you may also need MFC71.dll, MSVCR71.dll, MSVCP71.dll in the program folder or C:\Windows\System\. Hold down the Shift key as you click Encode and search of the local directory will be skipped which I use to allow easy comparison between Nero 6 (installed Nero version) and Nero 7 (.dll's in program folder).
-profile <1-2>
1 = LC AAC
2 = HE AAC
-mode <1-2>
1 = ABR
2 = VBR
-bitrate
Is always passed as kbps/channel which is only approximate when dealing with Nero/FAAC VBR presets. To strike a particular Nero preset use:
Tape: 32
Radio: 48
Internet: 64
Streaming: 80
Normal: 96
Extreme: 112
Audiophile: 128
Transcoding: 160
If inputfile, outputfile AND bitrate are specified on the command line encoding starts immediately and the app quits directly afterwards (intended for batch encoding).
-filter <hertz>
Only LibFAAC currently allows control of the lowpass filter.
-order <# # # # #>
Regardless of the encoder selected the following channel orders are expected:
1 = C
2 = L, R
3 = L, R, C
4 = FL, FR, SL, SR
5 = FL, FR, C, SL, SR
6 = FL, FR, C, LFE, SL, SR
...use the order function if your source file is not already ordered so i.e. -order "3 1 2 6 4 5".
Use the preset -order "AC3" to indicate that the file is in AC3 order (FL, C, FR, SL, SR, LFE) i.e. ex-HeadAC3he, ignored if source doesn't have 6 channels. Use the preset -order "AAC" to indicate that the file is already in AAC order (C, FL, FR, SL, SR, LFE), ignored if source doesn't have 6 channels. Channel ordering not implemented for Apple encoder as iTunes only does mono/stereo - I presume this is still the case if one has QuickTime Pro installed?
http://www.ionwerks.net/defunkt/wave2aac/wave2aac.png
Download 2.5MB: http://www.mytempdir.com/288157
Source for the FAAC/Nero Backend: http://www.ionwerks.net/defunkt/wave2aac/wave2aac.zip
Use should be fairly straightforward, command line usage as follows:
Wave2AAC.exe [inputfile] [outputfile] [options]inputfile: Integer PCM wave file required, have really only tested with 16bit. LibFAAC doesn't appear to support 8bit sources.
outputfile: Anything other than an .aac extension is assumed to be an mp4, default is .m4a. To create an .aac file with the Apple encoder MP4Box.exe needs to exist in the program folder. If both inputfile and outputfile are specified on the command line then these fields are locked and the app will exit immediately after encoding has completed (useful when called from another app).
options:
-encoder <1-4>
1 = LibFAAC
2 = Nero 6/7 (Default)
3 = Nero 6/7 (Fast)
4 = iTunes 5/6
Nero Burning ROM must be installed or the appropriate dll's located in the Wave2AAC program folder. Depending on your system you may also need MFC71.dll, MSVCR71.dll, MSVCP71.dll in the program folder or C:\Windows\System\. Hold down the Shift key as you click Encode and search of the local directory will be skipped which I use to allow easy comparison between Nero 6 (installed Nero version) and Nero 7 (.dll's in program folder).
-profile <1-2>
1 = LC AAC
2 = HE AAC
-mode <1-2>
1 = ABR
2 = VBR
-bitrate
Is always passed as kbps/channel which is only approximate when dealing with Nero/FAAC VBR presets. To strike a particular Nero preset use:
Tape: 32
Radio: 48
Internet: 64
Streaming: 80
Normal: 96
Extreme: 112
Audiophile: 128
Transcoding: 160
If inputfile, outputfile AND bitrate are specified on the command line encoding starts immediately and the app quits directly afterwards (intended for batch encoding).
-filter <hertz>
Only LibFAAC currently allows control of the lowpass filter.
-order <# # # # #>
Regardless of the encoder selected the following channel orders are expected:
1 = C
2 = L, R
3 = L, R, C
4 = FL, FR, SL, SR
5 = FL, FR, C, SL, SR
6 = FL, FR, C, LFE, SL, SR
...use the order function if your source file is not already ordered so i.e. -order "3 1 2 6 4 5".
Use the preset -order "AC3" to indicate that the file is in AC3 order (FL, C, FR, SL, SR, LFE) i.e. ex-HeadAC3he, ignored if source doesn't have 6 channels. Use the preset -order "AAC" to indicate that the file is already in AAC order (C, FL, FR, SL, SR, LFE), ignored if source doesn't have 6 channels. Channel ordering not implemented for Apple encoder as iTunes only does mono/stereo - I presume this is still the case if one has QuickTime Pro installed?