[转]一个比较全面的FAAC encoder的使用方法
我不高兴每次都在Terminal里面敲faac –long-help,所以干脆就把帮助文件直接拷出来了。
********************************************************************************************************************************
Freeware Advanced Audio Coder
FAAC 1.24
********************************************************************************************************************************
Usage: FAAC.exe [OPTIONS] infiles …
********************************************************************************************************************************
Quality-related options:
-q Set default variable bitrate (VBR) quantizer quality in % (default: 100, averages at approx. 120 kbps VBR for a normal stereo input file with 16 bit and 44.1 kHz sample rate; max. value 500, min. 10).
-b Set average bitrate (ABR) to approximately kbps (default: VBR mode; max. value 152 kbps/stereo with a 16 kHz cutoff, can be raised with a higher -c setting).
-c Set the lowpass cutoff in Hz (default: automatic, i.e. adapts maximum value to input sample rate accoprding to the Nyquist theorem; changes with different -q settings, but can also be set manually; 0 means no cutoff, only for testing purposes).
********************************************************************************************************************************
Input/Output options:
- If you simply use a hyphen/minus sign instead of an input file name, FAAC can encode directly from stdin, thus enabling piping within other applications like foobar2000. The same works for stdout as well, so FAAC can pipe its output to programs like mp4live (streaming live AAC content).
-o X Set output file name to X (only for one input file; you can use *.aac, *.mp4, *.m4a or *.m4b as file extension, and the correct file format MPEG-2 AAC ADTS or MPEG-4 AAC in the MP4 container will be chosen automatically then).
-P Raw PCM input mode (default: off, i.e. expecting a WAV header; necessary for input files or bitstreams without a header; using only -P assumes the default values for -R, -B and -C in the input file).
-R Raw PCM input sample rate in Hz (default: 44100 Hz, max. 96 kHz).
-B Raw PCM input sample size (default: 16, also possible 8, 24, 32 bit fixed or float input).
-C Raw PCM input channels (default: 2, max. 33 + 1LFE).
-X Swap raw PCM input byte order (default: bigendian)
-I Input multichannel configuration (defaultL: 3,4 which means Center is third and LFE is fourth like in 5.1 WAV, so you only have to specify a different position of these two mono channels in your multichannel input file or bitstream if they haven’t been reordered already, e.g. in the decoder).
********************************************************************************************************************************
MP4 specific options (muxing and tagging):
-w Wrap AAC date in MP4 container (default: *.m4a file extension, *.mp4 or *.m4b also possible; enables direct MP4 file writing withou a separate file muxer; necessary for gapless MP4 files and for multiplexing FAAC output with MPEG-4 Systems content in MP4Box from the GPAC project).
–artist “X” Set artist to X, always use quotation marks around tags with spaces.
–writer “X” Set writer to X.
–title “X” Set title to X.
–genre “X” Set genre to X.
–album “X” Set album to X.
–track “X” Set track to X (number/total).
–disc “X” Set disc to X (number/total).
–year “X” Set year to X.
–comment “X” Set comment to X.
–cover-art “X” Read cover art from file X (including path), supported image formats are GIF, JPG and PNG.
–compilation Set compilation flag.
********************************************************************************************************************************
Expert options:
–mpeg-vers X AAC MPEG version, X can be 2 or 4 (default: MPEG-2 for *.aac files, using the -w switch or the *.mp4/*.m4a/*.m4b file extension automatically defaults to MPEG-4).
–obj-type X AAC object type, X can be LC (Low Complexity, default), Main or LTP (Long Term Prediction).
-r Raw AAC output mode (only for testing purposes, creates AAC bitstream without ADTS or other headers similar to the one in a MP4 container, so AAC file properties will not be detected correctly in FAAD2 then).
–no-tns Disable Temporal Noise Shaping
–shortctl X Enforce block type (default: both; 1 = short only; 2 = long only_).\
–no-midside Don’t use M/S matrixing.
Documentation:
--license Show the FAAC license.
--help Show abbreviated help.
--long-help Show complete help.
Recommended Setting: without resampling: resampled at: results in:
-q 150 (-c 22200) ~172 kbps *.aac
-q 125 (-c 19000) ~146 kbps *aac
-q 100 (-c 16000) ~120 kbps *.aac 32 kHz ~112 kbps *.aac
-q 75 (-c 13000) ~93 kbps *.aac 32 kHz ~88 kbps *.aac
-q 50 (-c 10000) ~68 kbps *.aac 22.05 kHz ~58 kbps *.aac
********************************************************************************************************************************
The maximum and minimum -q values, but they are mentioned here to show their limis:
-q 500 (-c 22050) ~277 kbps *.aac
-q 10 (-c 3000) ~26 kbps *.aac 8 kHz ~9 kbps *.aac
********************************************************************************************************************************
Example 1:
faac -b 10 -c 3500 input.wav output.mp4
********************************************************************************************************************************
Other recommendations:
1. Since the implementation fo direct MP4 file writing and tagging in FAAC a lot of handling issues have become easier, e.g. which MPEG flag to use in the AAC ADTS header or "what did Apple and Nullsoft know" and so forth. Now it's possible to create AAC and MP4 files with the internal FAAC options that will most likely play with your preferred player, be it software or hardware, but not necessarily with all available AAC/MP4 players around due to the possible variants in the MPEG-4 Audio standard.
2. The default output file format of FAAC not using any switches is still MPEG-2 AAC ADTS LC which will play on most hardware AAC players like Philips Expanium, Diva GEM and mobile phones from Nokia or ther manufacturers.
3. The does not include the iPod of course that only reads MPEG-4 AAC LC bitstreams in the MP4 container with the file extensions *.m4a, *.m4b and *.m4p (but not the standard *.mp4 extension).
4. Winamp 2.95 came with an own "preliminary AAC support" via Nullsoft's in_mp3.dll which didn't know MPEG-4 AAC or MP4 files either. From v5.02 on Winamp also supports playing audio-only MP4 files with an additional file splitter having the same name as the input plugin from Audiocoding.com (in_mp4.dll) as well as ripping CDs to *.m4a files with a codec from Dolby.
5. MP4Box, a new MP4 file muxer from the open source GPAC project is the first command line app that can create MPEG-4 Systems content without an installed Java VM (unlike mp4tool from the ENST or the IBM Toolkit for MPEG-4). But it cannot multiplex normal AAC files to MP4 like mp4creator, so you have to create a MP4 file with FAAC'S -w or -o option first.
6. If you want to play FAAC files on your Xbox player console, you have to use -o and the *.mp4 file extension, too. because it cannot play plain AAC files either.