不是做android啊!
準備用speex做音頻編碼,軟編碼啊,之前研究過嵌入式設備編碼10s中的文件大概需要30min左右,後來對.configure 進行配置後去掉 float api 配置後編碼速率提升了。
Usage: speexenc [options] input_file output_file
Encodes input_file using Speex. It can read the WAV or raw files.
input_file can be:
filename.wav wav file
filename.* Raw PCM file (any extension other than .wav)
- stdin
output_file can be:
filename.spx Speex file
- stdout
Options:
-n, --narrowband Narrowband (8 kHz) input file 窄帶(8K)輸入
-w, --wideband Wideband (16 kHz) input file 寬帶(16K)輸入
-u, --ultra-wideband "Ultra-wideband" (32 kHz) input file 超寬帶(32K)輸入
--quality n Encoding quality (0-10), default 8 編碼質量(0-10),默認8
--bitrate n Encoding bit-rate (use bit-rate n or lower) 編碼 bit-rate (使用 bit-rate n 或者 更低)
--vbr Enable variable bit-rate (VBR) 啓用可變比特率
--vbr-max-bitrate Set max VBR bit-rate allowed 設置允許的最大可變比特率
--abr rate Enable average bit-rate (ABR) at rate bps 在rate bps使平均比特率(ABR)
--vad Enable voice activity detection (VAD) 啓用語音活動檢測(VAD)
--dtx Enable file-based discontinuous transmission (DTX) 啓用基於文件的不連續傳輸(DTX)
--comp n Set encoding complexity (0-10), default 3 設置編碼複雜度(0-10),默認爲3
--nframes n Number of frames per Ogg packet (1-10), default 1 每的Ogg包的幀號(1-10),默認爲1
--denoise Denoise the input before encoding 在編碼之前降噪輸入
--agc Apply adaptive gain control (AGC) before encoding 在編碼之前應用自適應增益控制(AGC)
--skeleton Outputs ogg skeleton metadata (may cause incompatibilities) --comment Add the given string as an extra comment. This may be 添加給定的字符串作爲額外的註釋。
used multiple times
--author Author of this track
--title Title for this track
-h, --help This help
-v, --version Version information
-V Verbose mode (show bit-rate)
Raw input options:
--rate n Sampling rate for raw input
--stereo Consider raw input as stereo
--le Raw input is little-endian
--be Raw input is big-endian
--8bit Raw input is 8-bit unsigned
--16bit Raw input is 16-bit signed
Default raw PCM input is 16-bit, little-endian, mono
More information is available from the Speex site: http://www.speex.org
Please report bugs to the mailing list `[email protected]'.
[root@localhost bin]# ./configure --prefix=/opt/speex_2014 --enable-shared --enable-fixed-point --disable-float-api --host=mipsel-linux --enable-static --with-ogg=/opt/ogg/ CC=mipsel-linux-gcc
配置完成。