完美解决个人微信音频amr文件与mp3格式互转
1、安装gcc ffmpeg
wget http://downloads.sourceforge.net/lame/lame-3.100.tar.gz
tar -zxvf lame-3.100.tar.gz
cd lame-3.100
./configure --prefix=/usr/local
make && make install
ln -s /usr/local/lib/libmp3lame.so.0.0.0 /usr/lib64/libmp3lame.so.0
wget http://ffmpeg.org/releases/ffmpeg-3.4.1.tar.bz2
tar -jxvf ffmpeg-3.4.1.tar.bz2
cd ffmpeg-3.4.1
./configure --prefix=/usr/local --pkg-config-flags=--static --enable-libmp3lame --disable-x86asm
make && make install
2、安装/silk-v3-decoder
cd /usr/local/soft
wget https://github.com/kn007/silk-v3-decoder/archive/master.zip
unzip master.zip
chmod -R +x /usr/local/soft/silk-v3-decoder-master/
silk-v3-decoder/converter.sh 微信amr文章文件路径名 mp3
3、改造一个encoder脚本,decoder已经有了不用改造了
converter-encoder.sh(请拷贝以下脚本放到silk-v3-decoder-master目录下)
#!/bin/bash
# File: converter.sh
# Date: August 19th, 2016
# Time: 18:56:52 +0800
# Author: http://www.wityx.com/post/824_1_1.html
# Blog: https://kn007.net
# Link: https://github.com/kn007/silk-v3-encoder
# Usage: sh converter.sh silk_v3_file/input_folder output_format/output_folder flag
1、安装gcc ffmpeg
wget http://downloads.sourceforge.net/lame/lame-3.100.tar.gz
tar -zxvf lame-3.100.tar.gz
cd lame-3.100
./configure --prefix=/usr/local
make && make install
ln -s /usr/local/lib/libmp3lame.so.0.0.0 /usr/lib64/libmp3lame.so.0
wget http://ffmpeg.org/releases/ffmpeg-3.4.1.tar.bz2
tar -jxvf ffmpeg-3.4.1.tar.bz2
cd ffmpeg-3.4.1
./configure --prefix=/usr/local --pkg-config-flags=--static --enable-libmp3lame --disable-x86asm
make && make install
2、安装/silk-v3-decoder
cd /usr/local/soft
wget https://github.com/kn007/silk-v3-decoder/archive/master.zip
unzip master.zip
chmod -R +x /usr/local/soft/silk-v3-decoder-master/
silk-v3-decoder/converter.sh 微信amr文章文件路径名 mp3
3、改造一个encoder脚本,decoder已经有了不用改造了
converter-encoder.sh(请拷贝以下脚本放到silk-v3-decoder-master目录下)
#!/bin/bash
# File: converter.sh
# Date: August 19th, 2016
# Time: 18:56:52 +0800
# Author: http://www.wityx.com/post/824_1_1.html
# Blog: https://kn007.net
# Link: https://github.com/kn007/silk-v3-encoder
# Usage: sh converter.sh silk_v3_file/input_folder output_format/output_folder flag