[转]一个比较全面的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.

cygwin安装的注意事项

要选安装包的时候千万不要盲目地去按Next,先看看清楚All files的后面是不是Default,如果是的话赶快把它改过来(直接点那个环状箭头就可以了)。最好都改成Install。
当然你也可以根据自己的需要有选择地装,每个包的名称后面的状态都可以改变成Default、Install、Reinstall或者是Uninstall。
我就是因为第一次没改状态,结果cygwin装上去之后gcc的编译器都没装,结果编译faac的源文件的时候老是出错。下次要多加小心了。

解决N81用完PCSuite不能正常停用USB连接的问题

装完PCSuite以后一用,发现当所有操作都完成了之后没办法正常停用USB连接。网上搜了一下方案,大多有两种方式:

  1. 打开windows任务管理器,找到NclRSSrv.exe 和NclUSBSrv.exe两个进程(或者干脆一点,找到所有跟Nokia PCSuite有关的进程)关闭他们就可以安全停用连接了。
  2. 进入“Nokia电脑端套件”。在“设定”=> “管理连接”里,把所有的勾都去掉(尤其是“USB传输线”)。

然后再停用USB端口就可以了。

不过现在还没有一个十全十美的方法来解决这个问题。貌似这个问题是官方的一个BUG,希望在以后的产品中加以改进。

解析文件访问权限

每次打开wiki.ubuntu.com/FilePermissions都是那么慢,因此我决定要把这些文字转写一遍。

    • 用chmod可以修改文件(或文件夹)访问权限:# chmod *** 文件或文件夹
    • ***中的第一个*是现在这个用户访问权限,第二个*是组(Group)的访问权限,第三个*是其他用户的访问权限。
    • 访问权限分:读(read),写(write),执行(execute)。在chmod对应的参数分别是r(或4),w(或2)和x(或1)
    • 用数字表示的时候,7=4+2+1(读、写、执行),6=4+2(读、写),3=2+1(写、执行),5=4+1(读、执行)。(小学的数学……-_-!)
    • 用ls可以查看文件(或文件夹)访问权限:$ ls -l 文件或文件夹
    • 例如: $ ls -l sancho
      -rwxr-xr-x 1 dda dda 13011176 2007-07-24 04:49 sancho
    • -rwxr-xr-x = 现在用户拥有读、写、执行权限 + 组用户拥有读、执行权限 + 其他用户拥有读、执行权限

PS: 真受不了那网速~~

给HP CP8816a注墨

我觉得这个世道实在太乱了。像这种注墨方法其实很简单,但是偏偏网上给出一箩筐假帖子。后来才听说这帮子人心太黑,人家看中的是钱——利润实在太好赚,回收个墨盒,注个墨就可以净赚20!照这样计算,一天至少能赚个40吧,一个月就是1200啊,外快大大的多啊。HP这种大腕儿也不是什么好东西,不就一盒几毫升墨水么?犯得着花一百五六十嘛?马克思果然说的不错,资本主义到这个世界上从头到脚都不干净……~~~
好,废话少说。先亮出我的方法:

  1. 检查旧墨盒型号。首先你得确保你的打印机已经和电脑相连了。打开HP Director[1],看看测出来的墨盒型号是不是正确。本人就是因为之前没检查版本的问题,结果用网上的办法试了半天都没用(当时感觉自己白痴得够可以了…… :( )。
  2. 如果墨盒型号没有什么问题的话,那么就可以开始动手了。这里我们先要做个准备工作(“磨刀不误砍柴工”,当初本人测试网上的方法时,都不得不花大量的时间放在剪胶带纸上……)。工具:剪刀,透明胶带,最好还要有一把尖镊子。
  3. 剪一条3毫米宽的透明胶带和一条6毫米宽的透明胶带备用
  4. 关掉打印机的电源。注意了,我这里给出“关掉电源”的定义:是指按下“启动/重新启动”按钮。不要瞎拔插头哦~
  5. 卸下墨盒。
  6. 看到一个都是触点的面了么?很好,如果喷头朝下的话,那些点看上去会像一个“\W/”形。现在从左往右数,用3毫米宽的那条胶带纸把第二列第一个点遮住。然后把墨盒装回打印机里。
  7. 打开打印机电源。
  8. 打开HP Director[2] => 设置 =>打印机维护 =>墨盒,然后打印机上的“检查墨盒”那一盏灯会变红,同时HP Director[3]就会跳出来:“黑色墨盒安装不正确。”按“确定”关闭对话框。
  9. 关闭打印机电源。
  10. 卸下墨盒。
  11. 仿照步骤6的作法,从右往左数用6毫米宽的那条胶带纸把第一排的前三个点遮住。然后把墨盒装回打印机里。
  12. 打开打印机电源。
  13. 重复步骤8。
  14. 卸下墨盒
  15. 关闭打印机电源。(注意啊,一定要先卸墨盒,再关电源啊~)
  16. 现在把墨盒上的所有胶带纸都卸下来,重新装回打印机
  17. 打开打印机电源
  18. 可能“检查纸张”那盏灯会变红,按“取消”就可以了。

好了,现在墨盒就可以使用了。
当然,事物有其两面性。这种方法也有BUG:

  1. 我的打印机是HP PSC 1118/1218 Series all-in-one,所以有复印功能。但是在使用上述方法后复印功能就失效了。我也不知道什么原因。
  2. 对于用LaTeX2e做的pdf文档,有些排版用的线(比如注释和正文之间的那条线)打不出来。
  3. 在用“最佳”模式打印时,打印出来的居然是蓝色

如果有哪位高手或大侠拔刀相助,敝人不胜感激~~

[1][2][3]:可能是BSP玩的花招,估计弄了个关键字过滤了,在这里先赔个不是,原来的文字是d-i-r-e-c-t-o-r。哎,这什么世道……

今天鼠标又慢了

在复制完18.9GiB的数据后鼠标出现了滞留现象,并且响应时间变长,灵敏度大大降低了。一开始我还是认为是显卡的问题,后来发现显卡工作正常。再想想我这个Ubuntu是用Wubi装的,Wubi利用了虚拟盘的技术,有可能是虚拟机的鼠标没配置好。于是cat /etc/X11/xorg.conf后发现果然在Section Mouse部分简直就是空白。于是赶紧补了几块(参见vmware下的鼠标滚轮问题)。重启后鼠标正常。

QQ for Linux试用

screenshot.png
没看到头像,不能显示自定义备注,不过速度的确快不少。
不过,我还是觉得QfL是个垃圾……感觉对这个公司恶心……

BlogSpot解放了?

不知道是不是个骗局,不过的确不用代理就能上了。

解决登录窗口分辨率过大的问题

装好显卡后发现只能看到登录窗口的左上角,看了帖子后修改的:

  1. 备份:sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_backup
  2. 用自己喜欢的编辑器修改xorg.conf文件:sudo emacs /etc/X11/xorg.conf
  3. 找到Section “Screen”,修改或添加:SubSection “Display”
    Depth 24
    Modes “1280×1024@60″
    EndSubSection

    注:1280×1024@60只是我显示器最适合的分辨率,在这里要改成你的显示器最适合的分辨率
  4. 保存,重启

在用Wubi装Ubuntu之后发现鼠标慢

在用Wubi装Ubuntu之后发现鼠标慢,后来发现我的显卡怎么没测到。xorg.conf显示我的显卡居然为空白,估计是图形加速慢带来的后果,后来我重新在第三方驱动的设置中设置了我的显卡,并且安装了驱动程序,重启后惊人的一幕出现了:
首先是所有的东西(窗口、文本框……只要是框状物)都自动加上了阴影,然后是鼠标比往常快了2倍,所有的窗口跳出的时候都是有动画效果……我无语了
其实我发现我真的很笨……