[原创]命令行实现MP3音频压制

[原创]命令行实现MP3音频压制

8KB的NT命令脚本实现任意格式视频一键转换为MP3

相关篇—— [原创]命令行实现RMVB视频压制


频格式多种多样,格式互转的软件也多的不计其数。这篇文章讲述一种便捷的方法,在安装了合适的解码器以及Lame encoder和bepipe之后,使用一个8KB的Windows NT命令脚本既可以实现任意格式的音品文件拖放转换为MP3音频。
我制作这个脚本的目的是,我想在手机上听歌,而且希望音质可以,同时码率不要太高,这样不会占用太大的储存空间,解码的压力也比较轻。因此,这个脚本设计成转换成统一的MP3格式。

需求:
20MB磁盘空间(主要为安装解码器用);性能较好的CPU

核心的工作原理:
在安装ffdshow解码器之后,各种主流音频格式都可以通过系统的解码组件解码,因此使用AVISynth提供音频流成为可能;Lame可以读取绝大多数格式的音频文件,但是本身的音频预处理功能较为有限,相比之下,AVISynthesizer可以对音频流进行内容丰富的改动,故采用此软件,为制作定制音频提供接口;然而Lame不能直接读取avs脚本,所以需要bepipe这个辅助软件(我找了好几个星期才找到这个20KB的小东西……),它读取avs脚本,然后将脚本的音频流输送到Lame的General Input接口,接着就可以编码了。

设计效果:
在做好前期准备以后,任何时刻转换音频只需要使用一个文件:gen_mp3.cmd。可以通过三种方式启动:一,拖动欲转换视频的图标,放到gen_mp3.cmd上面,立即启动转换;二,通过命令行启动,类似于拖放;三,通过命令行启动,没有任何等待,错误信息记录在磁盘文件中,即实现无人值守的批处理压制。另外,如果直接双击启动脚本,又有两个功能:自动生成文件列表(txt文件),打开编辑脚本(自动备份),以及显示版本信息。

流程大致分如下几步:
一,环境变量初始化,设置调用的文件位置、音频属性等;
二,检查输入是否有误:文件名应为扩展到驱动器的完整路径名,目的文件夹中应不包含同名的MP3文件,在批处理环境下每个调用语句只允许一个文件,拖拽启动时同时拖拽的文件应不多于八个;
三,检查无错后,进行avs编译。如果输入文件为avs脚本,则直接引用。
四,启动bepipe和Lame。
五,压制结束,删除临时文件。

前期准备——安装AVISynth,ffdshow,LAME encoder,和bepipe:
一,AVISynth,这个提供从媒体文件到压制软件的传输通道。使用版本2.57。
二,ffdshow,这个是一步到位的解码器,可以打开绝大多数主流媒体文件。使用版本ffdshow-rev1900_20080315_xxl

AVISynth以及ffdshow的下载:

http://cid-eaacf9754046f850.skydrive.live.com/embedrowdetail.aspx/applications/Avisynth|_257.rarhttp://cid-eaacf9754046f850.skydrive.live.com/embedrowdetail.aspx/applications/ffdshow-rev1900|_20080315|_xxl.rar

三,LAME,这个是一切事情的起点……使用版本3.96.1。关于LAME的更多信息,在此不多叙述,请访问其网站。LAME version 3.96.1 (http://lame.sourceforge.net/)
四,bepipe,这是不知道什么人写的一个好东西,把avs的数据流传送到General Input,20KB搞定一切,赞`Lame和bepipe这两个东西都是直接解压缩即可,不需要安装。建议存放在字符比较简单的路径下。

Lame以及bepipe的下载:

http://cid-eaacf9754046f850.skydrive.live.com/embedrowdetail.aspx/applications/lame-3.96.1.ziphttp://cid-eaacf9754046f850.skydrive.live.com/embedrowdetail.aspx/applications/bepipe.rar

声明:
这里使用到的四个软件,都是免费软件,在不谋取商业利益的前提下,你可以对它们做任何事情。


后期准备——初始化gen_mp3.cmd:

gen_mp3.cmd下载:

http://cid-eaacf9754046f850.skydrive.live.com/embedrowdetail.aspx/applications/gen|_mp3.rar

或者把下面代码保存成文本文件,再更改扩展名为cmd:

***

@echo off
setlocal EnableDelayedExpansion

::*****************initialization
set MEDIATARGET=F:exchangemp3
set LAME="D:musicEAClame-3.96.1lame.exe"
set BEPIPE="D:musicbepipe.exe"
set coreversion=gen_mp3 0.2a    code last updated ^: 2009-5-17 17^:17
set RemainAVSfile=0
set silent=n
set queuenum=0

:: just for fun!
title %coreversion%
color 0e
mode con lines=100

:: generate time and date string.
for /f "tokens=1-3 delims=/- " %%a in (‘date /t’) do set "gendatetime=%%a%%b%%c"
for /f "tokens=1-2 delims=:" %%a in (‘time /t’) do set "gendatetime=%gendatetime%%%a%%b"

::check

call :chkifrun

if "%~1"=="" goto :chsfunc

if /i "%~1"=="-b" (
set silent=s
if not "%~3"=="" call :terminate 03 !silent!
shift
)

if /i "%~x1"==".txt" (
call :filelstb "%~1"
goto :end
)

if not "%~1"=="%~dp1%~nx1" (
call :terminate 01 "%~1" %silent%
goto :end
)

::generate task queue

  set i=1
  :qprocess
   set "que!i!=%~1"
   set "qun!i!=%~n1"
   shift
   set /a quenum+=1
   if %quenum% GTR 50 (echo too many files – "!que%i%!" && pause>nul && endlocal && exit /b)
   set /a i+=1

  if "%~1" NEQ "" goto :qprocess

::head of batch

:begin
cls

set current=!que%quenum%!
set currentn=!qun%quenum%!
set currentn=%currentn:(=-%
set currentn=%currentn:)=-%

if exist "%MEDIATARGET%%currentn%.mp3" (
call :terminate 02 "%currentn%" %silent%
goto :end
)

::print queue list

  echo Task Queue list ^: && echo.
  for /l %%i in (1,1,%quenum%) do echo !que%%i!
  echo ——————————————————
  echo.

::composing job file

echo.
echo gen_mp3 started^: %time:~,8% && echo %coreversion% && echo.
echo Source file is && echo %current% && echo.

call :compavs "%current%" "%MEDIATARGET%temp.avs"
attrib "%MEDIATARGET%temp.avs" +h
echo job file finished.

::start lame.exe and check error after coding

echo.&&echo starting Lame…

REM note
REM the following line contains a usage of LAME. for more details of LAME^, please refer to lame.exe

%BEPIPE% –script "Import(^%MEDIATARGET%temp.avs^)" | %LAME% – -m j -q 1 –vbr-new -b 32 -B 192 -T -c -o -p –lowpass 20 –tt "%currentn%" –tc "gen_mp3.dtm.Scorp" %MEDIATARGET%temp.mp3

if ERRORLEVEL 1 (
echo.&&echo.&&echo.
echo An error has occured during the Lame producing step.
echo Check your media file, it may be corrupt.
pause>nul
attrib "%MEDIATARGET%temp.avs" -h
goto :directly_end
)

::end of batch

echo.&&echo processing work complete.
echo Cleaning any temporary file generated by this batch….
call :timewait 3

if "%RemainAVSfile%"=="0" (
del "%MEDIATARGET%temp.avs" /ah
) else (
attrib "%MEDIATARGET%temp.avs" -h
ren "%MEDIATARGET%temp.avs" "%currentn%.avs"

)
ren "%MEDIATARGET%temp.mp3" "%currentn%.mp3"

:end
if %quenum% GTR 1 (
set /a quenum-=1
goto :begin
)

:: the following line is for compatibility of error-checking in Lame producing step.
:directly_end

endlocal
exit /b

:: ***************sub commands**************************************************************

::compose avs file
:: usage – call :compavs ["%~1"] [target avs file | "%MEDIATARGET%temp.avs"]

:compavs

echo start parsing job file..

set AvsIncludeFile=%1
set AvsIncludeFile=%AvsIncludeFile:"=%

if "%AvsIncludeFile%" NEQ "NULL" (
  >%2 echo # automatically generated by gen_mp3
  >>%2 echo DirectShowSource^("%AvsIncludeFile%"^,audio^=true^)
)

if /i "%AvsIncludeFile:~-4%"==".avs" (
  echo Input file is a script, Directly quote it.
  >>%2 echo Import^("%AvsIncludeFile%"^)
goto :eof
)

goto :eof

::print error or help info
:: usage – call :teminate [errorcode] [type char "s" for silent batch]
:: error code –
:: 00 about this batch file
:: 01 not full path
:: 02 target file already existing
:: 03 too many strings in batch mode

:terminate

set erroroutputfile=%MEDIATARGET%error.log
set corruptedfilename=%2
set corruptedfilename=%corruptedfilename:"=%

if %1==01 (
set errorinfo=bad file name "%corruptedfilename%" – MUST FULL path
)

if %1==02 (
set errorinfo=file "%corruptedfilename%" already existing in target folder – %MEDIATARGET%
)

if %1==03 (
set errorinfo=too many strings^^^! only "-b" is supported.
)

cls
if /i "%3"=="s" (
echo %errorinfo%
echo %errorinfo%>>%MEDIATARGET%error.log
echo an error has occured and this window will be closed after 5 seconds…
call :timewait 5
) else (
echo %errorinfo%
pause>nul
echo.
echo *** about this batch file… ***
echo.
echo this is a batch file devoted to processing media file.
echo  it can convert a music file in any regular format to MP3 file.
echo  also audio streams in a video can also be processed^,
echo  but I havn’t focused on this function.
echo  i develop it in order to replay music on my Moto ZN5.
echo gen_mp3 uses these modules –
echo  AVISynthezier,
echo  bepipe – a brigde joining AVS script to Lame encoder.
echo  Lame ^(or its codecs, registered to system environment^),
echo  ffdshow ^(or any other DirectShow loadable decoders^),
echo  and last and most important a WinXP environment!
echo.
echo.
echo DO NOT DO ANYTHING ILLEGAL !!!
echo %coreversion%
echo.
echo how to use – simply DRAG video file to gen_mp3 icon — max 8 files
echo command line format – gen_mp3 FILENAME^(MUST FULL path^)
echo batch script integration –
echo  add command CALL before gen_mp3 and string -b after it, sample^:
echo  call gen_mp3 -b "H:DocumentMy MusicRomanza.mp3"
pause>nul
)

goto :eof

::generate txt-format file list
:: usage – call :filelstb "%~1"

:filelstb

echo Is it a file list^? Automatically read it..
echo.
for /F "usebackq tokens=*" %%i in (%1) do (
  >>"%MEDIATARGET%batch%gendatetime%.cmd" echo call gen_mp3 -b %%i
)
echo batch run script generated –
echo "%MEDIATARGET%batch%gendatetime%.cmd"
echo please run this by yourself!
echo.
pause>nul

goto :end

::wait for some time
:: usage – call :timewait [sec]

:timewait
>nul ping 127.0 -n %1

goto :eof

::print feature table if gen_mp3 is run after double click

:chsfunc
set extendedfeature=NULL
:chsfunc1
echo gen_mp3 running after double clicked ^:^)
echo features – && echo.
echo CFG    Edit gen_mp3.cmd
echo LST    generate file list
echo.

if not "%extendedfeature%"=="NULL" echo invalid input!
call :getinput extendedfeature What_do_you_want^?

if /i "%extendedfeature%"=="lst" (
  echo.
  call :getinput directory drag_your_target_here
  set directory=!directory:"=!

  pushd "!directory!"
  for /r %%f in (*) do (
   echo "%%~dpnxf">>"%MEDIATARGET%filelist%gendatetime%.txt"
   echo %%~dpnxf
  )
  popd

  echo.
  echo Now file list generated^:
  echo %MEDIATARGET%filelist%gendatetime%.txt
  pause>nul

  endlocal
exit
)
if /i "%extendedfeature%"=="cfg" (
  >nul del "%~dpn0.bak" /ahr
  >nul copy "%~0" "%~dpn0.bak" /y
  >nul attrib "%~dpn0.bak" +h +r
  echo automatically backuped.
  call :timewait 2
  start notepad gen_mp3.cmd
  endlocal
exit
)

if /i "%extendedfeature%"=="ad" (
  call :d2v_help
  endlocal
exit
)

cls
goto :chsfunc1

::get input
:: usage – call :getinput [target variable]

:getinput
set getinput_temp=
set getinput_question=%2
set /p getinput_temp=%getinput_question:_= %   
if not defined getinput_temp goto :getinput
set %1=%getinput_temp%

goto :eof

::Check if gen_mp3 is working.
:: usage – call :chkifrun

:chkifrun

if exist "%MEDIATARGET%temp.avs" (
  echo File temp.avs exists in target folder^!
  echo Perhaps another batch of gen_mp3 is working right now.
  pause>nul
  endlocal
  exit
) else goto :eof

***

用记事本打开gen_mp3.cmd(方法:右键选“编辑”或在记事本中选择菜单项“文件〉打开”)。接下来要进行一些必要的设置。

首先请对记事本做一些设置:打开“格式”菜单,去掉“自动换行”前面的钩;再打开“查看”菜单,选上“状态栏”前面的钩,这样你可以在记事本窗口的最下面看到光标所在的行号Ln和列号Col。

一,设置LAME和bepipe的安装目录。
位于第六行和第七行(Ln 6和Ln7,下略),需要修改的是等号后面的字符串。就是包含Lame.exe / bepipe.exe的那个目录,你自己装在那儿就写上去,注意用英文双引号括起来。

二,设置临时文件和生成mp3文件的存放目录。
在第五行。需要修改的是等号后面的字符串。这个目录需要你自己指定,它是用来存放自动生成的两个脚本文件,和压制生成的mp3文件的,我推荐你在一个大的分区里新建一个文件夹。
注意两点,一,完整的文件名不能包含中文、标点符号以及其他一切特殊字符,最好也不要带空格,这样做是因为某些程序可能不支持空格和全角字符,如果你用了汉字之类的东西的话,在运行时可能会报错(非法操作);二,路径要从驱动器开始,写完整,最后加上个反斜杠“”,比如G:exchangemp3。


准备完成之后,你就可以尝试压制音频了——

第一种方式:直接拖拽。把音频文件的图标拖动到gen_mp3.cmd的图标上,这有点像你在把文件放到文件夹里的时候,把文件的图标拖动到文件夹的图标上的操作。每次拖动最多支持五十个文件,多了报错。所有你需要做的就是这么简单,拖动!

第二种方式:命令行启动。也简单得很,输入命令行gen_mp3加上一个空格,再加上音频文件的完整路径(用英文双引号括起来)即可,比如:
gen_mp3 "H:DocumentMy MusicRomanza.mp3"

第三种方式:批处理脚本启动。要在gen_mp3之前加call命令,之后加参数-b,示例:
call gen_mp3 -b "H:DocumentMy MusicRomanza.mp3"
这样将禁用所有报错显示,错误信息输出存放在文本文件err.log中,也就是“缄默模式(silent mode)”,你可以写另一个脚本,里面包含许多个call,保存后双击运行就不用再管了,gen_mp3会处理完所有的文件!

第四种方式:双击启动。这样不能压制音频,而是两个功能:自动生成txt格式的文件列表、自动备份脚本后打开记事本编辑脚本。

关于版本:
现在贴的是0.2a,勤的话三天两头就改写一次代码,因为这个gen_mp3是直接抄袭了前面的文章gen_core,所以应该问题不大。我用它压制了三百多个文件,没问题的。

关于速度:
我的笔记本是Dell Vostro 1400,T8100,1G内存,转换音频大概是20倍的速度,也就是一秒钟处理二十秒钟音频数据。还算比较快的`比好多转换软件要快吧,因为这里用的是avs脚本,在脚本阶段对音频流进行处理,速度是比较快的。另外,考虑过是否使用双线程同时处理的问题,因为Lame在编码时,如果是双核CPU的话,他的资源占用率最高达到50%,剩下一半用不了。但使用批处理实现这个功能。。不大容易,所以就多等一点时间吧“


txt文件列表 – 自动生成文件列表、文件列表转换成批处理列表

效果:第一次运行,通过拖动文件夹的图标,生成该文件夹的文件列表(文本文档)。
       第二次运行,通过拖动文件列表,生成call gen_mp3 -b的批处理(参考上面的“第三种方式”)。

使用方法:
Step 1. 自动生成文件列表。双击gen_mp3,按提示输入LST后回车,再按提示,把欲生成文件列表的文件夹图标,直接拖动到命令行窗口中,若成功则显示该目录的路径。然后按回车,自动生成文件列表,格式为文本文档(TXT)。
Step 2. 修剪文件列表,把不需要的文件剔除。
Step 3. 把文件列表文件的图标,直接拖动到gen_mp3上面(就像处理音频文件一样),gen_mp3自动生成对应的命令行调用批处理,直接运行即可。

关于MP3音频参数的解释:

在调用lame的时候使用了如下参数:
%LAME% – -m j -q 1 –vbr-new -b 32 -B 192 -T -c -o -p –lowpass 20 –tt "%currentn%" –tc "gen_mp3.dtm.Scorp" %MEDIATARGET%temp.mp3

解释一下部分参数,第一个横杠代表输入为General Input,-m j代表joint stereo,-q 1代表高质量降噪,–vbr-new –b 32 –B 192 代表采用VBR编码,码率32-192kbps。–lowpass 20代表20kHz低通滤波器。这个,可以参考lame打印出来的帮助信息。

LAME version 3.96.1 (http://lame.sourceforge.net/)

usage: lame [options] <infile> [outfile]

    <infile> and/or <outfile> can be "-", which means stdin/stdout.

RECOMMENDED:
    lame -h input.wav output.mp3

OPTIONS:
  Input options:
    -r              input is raw pcm
    -x              force byte-swapping of input
    -s sfreq        sampling frequency of input file (kHz) – default 44.1 kHz
    –bitwidth w    input bit width is w (default 16)
    –mp1input      input file is a MPEG Layer I   file
    –mp2input      input file is a MPEG Layer II  file
    –mp3input      input file is a MPEG Layer III file
    –nogap <file1> <file2> <…>
                    gapless encoding for a set of contiguous files
    –nogapout <dir>
                    output dir for gapless encoding (must precede –nogap)
    –nogaptags     allow the use of VBR tags in gapless encoding

  Operational options:
    -m <mode>       (s)tereo, (j)oint, (f)orce, (m)ono 
                    default is (s) or (j) depending on bitrate
                    force = force ms_stereo on all frames.
    -a              downmix from stereo to mono file for mono encoding
    –freeformat    produce a free format bitstream
    –decode        input=mp3 file, output=wav
    -t              disable writing wav header when using –decode
    –comp  <arg>   choose bitrate to achive a compression ratio of <arg>
    –scale <arg>   scale input (multiply PCM data) by <arg>
    –scale-l <arg> scale channel 0 (left) input (multiply PCM data) by <arg>
    –scale-r <arg> scale channel 1 (right) input (multiply PCM data) by <arg>
    –replaygain-fast   compute RG fast but slightly inaccurately (default)
    –replaygain-accurate   compute RG more accurately and find the peak sample
    –noreplaygain  disable ReplayGain analysis
    –clipdetect    enable –replaygain-accurate and print a message whether
                    clipping occurs and how far the waveform is from full scale
    –preset type   type must be "medium", "standard", "extreme", "insane",
                    or a value for an average desired bitrate and depending
                    on the value specified, appropriate quality settings will
                    be used.
                    "–preset help" gives more info on these

  Verbosity:
    –disptime <arg>print progress report every arg seconds
    -S              don’t print progress report, VBR histograms
    –nohist        disable VBR histogram display
    –silent        don’t print anything on screen
    –quiet         don’t print anything on screen
    –brief         print more useful information
    –verbose       print a lot of useful information

  Noise shaping & psycho acoustic algorithms:
    -q <arg>        <arg> = 0…9.  Default  -q 5
                    -q 0:  Highest quality, very slow
                    -q 9:  Poor quality, but fast
    -h              Same as -q 2.   Recommended.
    -f              Same as -q 7.   Fast, ok quality

  CBR (constant bitrate, the default) options:
    -b <bitrate>    set the bitrate in kbps, default 128 kbps
    –cbr           enforce use of constant bitrate

  ABR options:
    –abr <bitrate> specify average bitrate desired (instead of quality)

  VBR options:
    -v              use variable bitrate (VBR) (–vbr-old)
    –vbr-old       use old variable bitrate (VBR) routine
    –vbr-new       use new variable bitrate (VBR) routine
    -V n            quality setting for VBR.  default n=4
                    0=high quality,bigger files. 9=smaller files
    -b <bitrate>    specify minimum allowed bitrate, default  32 kbps
    -B <bitrate>    specify maximum allowed bitrate, default 320 kbps
    -F              strictly enforce the -b option, for use with players that
                    do not support low bitrate mp3
    -t              disable writing LAME Tag
    -T              enable and force writing LAME Tag

  ATH related:
    –noath         turns ATH down to a flat noise floor
    –athshort      ignore GPSYCHO for short blocks, use ATH only
    –athonly       ignore GPSYCHO completely, use ATH only
    –athtype n     selects between different ATH types [0-4]
    –athlower x    lowers ATH by x dB
    –athaa-type n  ATH auto adjust types 1-3, else no adjustment
    –athaa-loudapprox n   n=1 total energy or n=2 equal loudness curve
    –athaa-sensitivity x  activation offset in -/+ dB for ATH auto-adjustment

  PSY related:
    –short         use short blocks when appropriate
    –noshort       do not use short blocks
    –allshort      use only short blocks
    –cwlimit <freq>  compute tonality up to freq (in kHz) default 8.8717
    –notemp        disable temporal masking effect
    –nssafejoint   M/S switching criterion
    –nsmsfix <arg> M/S switching tuning [effective 0-3.5]
    –interch x     adjust inter-channel masking ratio
    –ns-bass x     adjust masking for sfbs  0 –  6 (long)  0 –  5 (short)
    –ns-alto x     adjust masking for sfbs  7 – 13 (long)  6 – 10 (short)
    –ns-treble x   adjust masking for sfbs 14 – 21 (long) 11 – 12 (short)
    –ns-sfb21 x    change ns-treble by x dB for sfb21
    –shortthreshold x,y  short block switching threshold, x for L/R/M channel, y for S channel
  Noise Shaping related:
    –substep n     use pseudo substep noise shaping method types 0-2

  experimental switches:
    -X n[,m]        selects between different noise measurements
                    n for long block, m for short. if m is omitted, m = n
    -Y              lets LAME ignore noise in sfb21, like in CBR
    -Z [n]          toggles the scalefac-scale and subblock gain feature on
                    if n is set and minus, only scalefac-scale is enabled

  MP3 header/stream options:
    -e <emp>        de-emphasis n/5/c  (obsolete)
    -c              mark as copyright
    -o              mark as non-original
    -p              error protection.  adds 16 bit checksum to every frame
                    (the checksum is computed correctly)
    –nores         disable the bit reservoir
    –strictly-enforce-ISO   comply as much as possible to ISO MPEG spec

  Filter options:
    -k              keep ALL frequencies (disables all filters),
                    Can cause ringing and twinkling
  –lowpass <freq>        frequency(kHz), lowpass filter cutoff above freq
  –lowpass-width <freq>  frequency(kHz) – default 15% of lowpass freq
  –highpass <freq>       frequency(kHz), highpass filter cutoff below freq
  –highpass-width <freq> frequency(kHz) – default 15% of highpass freq
  –resample <sfreq>  sampling frequency of output file(kHz)- default=automatic

  ID3 tag options:
    –tt <title>    audio/song title (max 30 chars for version 1 tag)
    –ta <artist>   audio/song artist (max 30 chars for version 1 tag)
    –tl <album>    audio/song album (max 30 chars for version 1 tag)
    –ty <year>     audio/song year of issue (1 to 9999)
    –tc <comment>  user-defined text (max 30 chars for v1 tag, 28 for v1.1)
    –tn <track>    audio/song track number (1 to 255, creates v1.1 tag)
    –tg <genre>    audio/song genre (name or number in list)
    –add-id3v2     force addition of version 2 tag
    –id3v1-only    add only a version 1 tag
    –id3v2-only    add only a version 2 tag
    –space-id3v1   pad version 1 tag with spaces instead of nulls
    –pad-id3v2     pad version 2 tag with extra 128 bytes
    –genre-list    print alphabetically sorted ID3 genre list and exit
    –ignore-tag-errors  ignore errors in values passed for tags

    Note: A version 2 tag will NOT be added unless one of the input fields
    won’t fit in a version 1 tag (e.g. the title string is longer than 30
    characters), or the ‘–add-id3v2’ or ‘–id3v2-only’ options are used,
    or output is redirected to stdout.

MS-Windows-specific options:
    –priority <type>     sets the process priority:
                               0,1 = Low priority (IDLE_PRIORITY_CLASS)
                               2 = normal priority (NORMAL_PRIORITY_CLASS, default)
                               3,4 = High priority (HIGH_PRIORITY_CLASS))
    Note: Calling ‘–priority’ without a parameter will select priority 0.

  Platform specific:
    –noasm <instructions> disable assembly optimizations for mmx/3dnow/sse

MPEG-1   layer III sample frequencies (kHz):  32  48  44.1
bitrates (kbps): 32 40 48 56 64 80 96 112 128 160 192 224 256 320

MPEG-2   layer III sample frequencies (kHz):  16  24  22.05
bitrates (kbps):  8 16 24 32 40 48 56 64 80 96 112 128 144 160

MPEG-2.5 layer III sample frequencies (kHz):   8  12  11.025
bitrates (kbps):  8 16 24 32 40 48 56 64 80 96 112 128 144 160


– END –

Advertisements
  1. #1 by Young on 五月 23, 2009 - 9:47 上午

    有个韩国人的软件,JetAudio,或者是用Foobar,Foobar和JetAduio都是基于Lame,具体不知,速度还行,操作也方便,不过要佩服一下你这种自己动手的精神,赞一个选。

  2. #2 by dtm on 五月 24, 2009 - 7:14 上午

    JetAudio很久以前用过,不知道现在做成什么样了。用软件固然可以,但是只要是用软件,就得加载GUI吧,图形界面多占资源啊,1G内存本来就不够用……而且还得点吧,点好几次才行,不如拖动来得爽……第三就是软件得装啊,程序很大的……此三原因是我为什么写CMD 很小很可爱。。。

Log in or fill out contact info to leave a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: