微信录音的amr文件小于1分钟,几十k,使用自己服务器转换比上传到阿里或七牛处理更方便。

 1、安装ffmpeg apt-get install ffmpeg

  2、ffmpeg只有mp3解码没有编码工具,apt-get install libmp3lame-dev 装了这个mp3编码开源第三方库 好像并没什么用

ffmpeg -codecs 查看已经有的编码解码格式

 

卸载:

首先sudo apt-get remove ffmpeg

可以编译安装 ffmpeg 

===============================================================

或者使用sox:

1、sudo apt-get install lame

2、sudo apt-get install sox

3、sudo apt-get install libsox-fmt-mp3

使用如下命令:

sox test.amr test.mp3