sox处理mp3_音频处理常用Linux命令总结(一)
生活随笔
收集整理的這篇文章主要介紹了
sox处理mp3_音频处理常用Linux命令总结(一)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
今天總結(jié)一下常用的linux音頻處理工具
soX -?Sound eXchange
soxi
soxi?常用選項soxi: SoX vUsage: soxi [-V[level]] [-T] [-t|-r|-c|-s|-d|-D|-b|-B|-p|-e|-a] infile1 ...-V[n] Increment or set verbosity level (default is 2)-T With -s, -d or -D, display the total across all given files-t Show detected file-type-r Show sample-rate-c Show number of channels-s Show number of samples (0 if unavailable)-d Show duration in hours, minutes and seconds (0 if unavailable)-D Show duration in seconds (0 if unavailable)-b Show number of bits per sample (0 if not applicable)-B Show the bitrate averaged over the whole file (0 if unavailable)-p Show estimated sample precision in bits-e Show the name of the audio encoding-a Show file comments (annotations) if availableWith no options, as much information as is available is shown foreach given file.查看音頻信息
用法格式:soxi?file.wav例:soxi?D8_999.wavInput?File?????:?'D8_999.wav' # 文件名Channels???????:?1????????????#?通道數(shù):常用有單聲道,雙聲道等Sample?Rate????:?16000????????#?采樣率:常用有8000Hz,16000Hz等Precision??????:?16-bit???????#?采樣位深:常用的有 8-bit, 16-bitDuration???????:?00:00:08.06?=?129000?samples?~?604.688?CDDA?sectorsFile?Size??????:?258kBit Rate : 256kSample Encoding: 16-bit Signed Integer PCM播放音頻
用法格式:播放一遍 play?file.wav播放n遍???play?file.wav repeat n例子:play D8_999.wavD8_999.wav: File Size: 258k Bit Rate: 256k Encoding: Signed PCM??Channels:?1?@?16-bit??#?通道數(shù)以及采樣位深Samplerate: 16000Hz # 采樣率Replaygain: off Duration: 00:00:08.06In:100% 00:00:08.06 [00:00:00.00] Out:356k [ | ] Clip:0Done.修改音頻采樣率
用法格式:sox?inout.wav?-r?samplerate output.wav例:sox D8_999_before.wav -r 8000 D8_999_after.wavsoxi -r D8_999_before.wav16000soxi -r D8_999_after.wav8000將pcm文件轉(zhuǎn)化為wav文件
用法格式:sox?-t?raw?-c?[channal]?-e?signed-integer?-b?[bits]?-r?[samplerate]?[input.pcm]?[output.wav]-t|--type FILETYPE File type of audio-c|--channels?CHANNELS???Number?of?channels?of?audio?data;?e.g.?2?=?stereo-e|--encoding ENCODING Set encoding (ENCODING may be one of signed-integer, unsigned-integer, floating-point, mu-law, a-law, ima-adpcm, ms-adpcm, gsm-full-rate)-b|--bits BITS Encoded sample size in bits-r|--rate RATE Sample rate of audio例:sox?-t?raw?-c?1?-e?signed-integer?-b?16?-r?16000?D8_999.pcm?D8_999.wav將D8_999.pcm文件轉(zhuǎn)化為D8_999.wav通道數(shù)為1采樣位深為16-bit采樣率為16000Hzffmpeg - 音視頻轉(zhuǎn)換工具
視頻中提取音頻
用法格式:ffmpeg?-i?video.mp4?-ar?16000?-ac?1?audio.wav截取一段音頻
用法格式:ffmpeg?-i?input.mp3?-ss?[start_time]?-to?[end_time]?-c?copy?output.mp3[start_time]/[end_time]格式:00:00.00?or?00:00總結(jié)
以上是生活随笔為你收集整理的sox处理mp3_音频处理常用Linux命令总结(一)的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: smarty 引用php类,smarty
- 下一篇: mysql导出数据 程序_mysql导出