Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1145949
  • 博文数量: 139
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 1712
  • 用 户 组: 普通用户
  • 注册时间: 2006-03-13 23:10
个人简介

每天进步一点点。

文章分类

全部博文(139)

文章存档

2015年(3)

2014年(11)

2013年(25)

2011年(1)

2009年(3)

2008年(29)

2007年(45)

2006年(22)

分类: Windows平台

2014-06-29 00:26:19

faac是一个AAC的编码器。
它有如下特征:
可移植
比较快
支持LC,Main和LTP
通过Dream可以支持DRM

代码下载地址:


命令行下载地址:

解压到C盘之后,运行faac.exe,得到如下提示


从中可以看出基本的命令格式。
再输入faac.exe --long-help
得到如下结果:
Freeware Advanced Audio Coder
FAAC 1.28

Usage: faac.exe [options] infiles ...

Quality-related options:
  -q Set default variable bitrate (VBR) quantizer quality in percent.
(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.
(max. value 152 kbps/stereo with a 16 kHz cutoff, can be raised
with a higher -c setting).
  -c Set the bandwidth in Hz (default: automatic, i.e. adapts
maximum value to input sample rate).

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 from other applications and utilities. The
same works for stdout as well, so FAAC can pipe its output to
other apps such as a server.
  -o X Set output file to X (only for one input file)
only for one input file; you can use *.aac, *.mp4, *.m4a or
*.m4b as file extension, and the file format will be set
automatically to ADTS or MP4).
  -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 + 1 LFE).
  -X Raw PCM swap input bytes (default: bigendian).
  -I Input multichannel configuration (default: 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 files if they haven't been reordered
already).

MP4 specific options:
  -w Wrap AAC data in MP4 container. (default for *.mp4, *.m4a and
*.m4b)
  -s Optimize MP4 container layout after encoding.
  --artist X Set artist to X
  --writer X Set writer/composer to X
  --title X Set title/track name to X
  --genre X Set genre to X
  --album X Set album/performer to X
  --compilation Mark as compilation
  --track X Set track to X (number/total)
  --disc X Set disc to X (number/total)
  --year X Set year to X
  --cover-art X Read cover art from file X
Supported image formats are GIF, JPEG, and PNG.
  --comment X Set comment to X

Expert options, only for testing purposes:
  --tns   Enable coding of TNS, temporal noise shaping.
  --no-midside Don't use mid/side coding.
  --mpeg-vers X Force AAC MPEG version, X can be 2 or 4
  --obj-type X AAC object type. (LC (Low Complexity, default), Main or LTP
(Long Term Prediction)
  --shortctl X Enforce block type (0 = both (default); 1 = no short; 2 = no
long).
  -r Generate raw AAC bitstream (i.e. without any headers).
Not advised!!!, RAW AAC files are practically useless!!!

Documentation:
  --license Show the FAAC license.
  --help Show this abbreviated help.
  --long-help Show complete help.

  More tips can be found in the audiocoding.com Knowledge Base at
  <


从中可以找到一些比较常用的参数。
-q 用于指定量化质量,默认为VBR模式,100kbps.最小10,最大500.
-b 用于指定平均比特率,默认为152kbps,16khz带宽,可以通过-c命令设置更高的带宽。
-c 用于指定带宽,单位是Hz,默认为自动
-o 用于指定输出文件名称,可以使*.aac, *.mp4, *.m4a or
*.m4b ,程序根据文件扩展名自动设置文件格式为ADTS或者MP4.
-r 指定输出文件格式为 RAW AAC
-P 指定输入文件为Raw PCM (默认为44.1khz,16bit,双声道),默认为关闭。
-R 指定输入的Raw PCM 采样率,默认为44,1khz,最高96khz
-B 指定输入Raw PCM 采样点的大小,默认为16bit,可以使8bit,16bit,24bit或者32bit,还可以使浮点输入。
-C 指定输入的Raw PCM的声道数,默认为2,最大是33+1LEF
-X 输入Raw PCM 字节的大小端交换,实现大小端转换。默认为大端。
-I 输入声道配置,默认为3,4<中间的第三个,LF是第四个>Input multichannel configuration (default: 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 files if they haven't been reordered
already).
 
-w 将AAC数据保存到MP4格式当中,默认文件名称是*.mp4和*.m4a
其余的信息是设定MP4格式的相关信息,不再详细说明。
专业参数项目:
  --tns  使能TNS功能.
  --no-midside 关闭m/s功能
  --mpeg-vers X X是强制指定MPEG版本为2或者4
  --obj-type X   指定AAC对象,默认为:LC (Low Complexity, default), 还可以是:Main 和 LTP
  --shortctl X 强制块类型 (0 = both (default); 1 = no short; 2 = no
long).
  -r 生成 raw AAC 码流。(i.e. without any headers).
Not advised!!!, RAW AAC files are practically useless!!!

从参数可以看出,faac仅仅支持pcm数据输入。
例如,用一个*.wav文件,执行情况如下:



生成的aac文件可以使用支持aac格式的播放器播放。

测试过程中发现,使用单声道的输入,得到了立体声的输出,比较奇怪。


阅读(7722) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~