当前位置:网站首页>ffmpeg将amr格式转成mp3格式
ffmpeg将amr格式转成mp3格式
2022-06-22 12:04:00 【cathy1213】
微信公众号开发中,有涉及到微信语音功能,但是对于amr格式的音频在某些地方无法播放,因此只能想办法转成其他格式,例如mp3。按照此步骤可以安装成功,已经验证通过。
我的系统是centos的;2.5.3的ffpmeg
1.安装系统编译环境
yum install -y automake autoconf libtool gcc gcc-c++
2.编译所需源码包
按照步骤安装即可,但是要注意一点,因为每一步骤中都切换了目录 cd,所以安装下一个源码包时注意cd出去,否则每一个源码包都会在上一个源码包的层级下继续安装。因为我比较菜,已经安装失败过一次了,因此现在走的每一步都比较小心,也不知道是否一定需要cd出去,但是能解决问题就好。
#yasm:汇编器,新版本的ffmpeg增加了汇编代码
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar -xzvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make
make install
#lame:Mp3音频解码
wget http://jaist.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar -xzvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure
make
make install
#amr支持
wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz
tar -xzvf opencore-amr-0.1.3.tar.gz
cd opencore-amr-0.1.3
./configure
make
make install
#amrnb支持
wget http://www.penguin.cz/~utx/ftp/amr/amrnb-11.0.0.0.tar.bz2
tar -xjvf amrnb-11.0.0.0.tar.bz2
cd amrnb-11.0.0.0
./configure
make
make install
#最后
ldconfig
#amrwb支持
wget http://www.penguin.cz/~utx/ftp/amr/amrwb-11.0.0.0.tar.bz2
tar -xjvf amrwb-11.0.0.0.tar.bz2
cd amrwb-11.0.0.0
./configure
make
make install
3.安装FFmpeg
我安装的是2.5.3版本的,上一个安装失败的版本是4.1的,不知道跟版本是否有很大的关系,因为现在急于处理问题,等后面有时间再研究一下4.1版本的
#ffmpeg
wget http://ffmpeg.org/releases/ffmpeg-2.5.3.tar.bz2
tar -xjvf ffmpeg-2.5.3.tar.bz2
cd ffmpeg-2.5.3
./configure --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3 --enable-shared
make
make install
4.输入ffmpeg,出现以下说明安装成功

现在来检验一下是否能成功将amr格式转换成MP3
ffmpeg -i 1.amr 1.mp3

附上我卸载4.1版本的ffmpeg
1.首先找到ffmpeg的位置
whereis ffmpeg => ffmpeg: /usr/local/bin/ffmpeg
2.移除相关文件ffmpeg相关文件
边栏推荐
猜你喜欢

Translate the tutorial Txt file

VS2010中配置cplex12.4教程

PyCharm编写shell脚本无法运行

1961-Check If String Is a Prefix of Array(检查字符串是否为数组前缀)

MAUI使用Masa blazor组件库

Word技巧汇总

Flutter mixed development exercise - large picture of collaborative loading of ever & method channel

LDA学习笔记

OceanBase数据库助力理想汽车智能生产线 可实现30秒内自动恢复

Share 7 free super clear video resource stations! Both editing and collection are practical enough to cry!
随机推荐
DevSecOps: CI/CD 流水线安全的最佳实践
Messari年度报告-2022
磁盘rejecting I/O to offline device故障导致4TB生产数据库无法访问
Oracle用游标分解号码次数
Word技巧汇总
XML file parsed by repo
Find all prime numbers between 100 and 200
如何从数据库层面统计每天业务数据的增长量?
Getting started with fluent Animation: inner and outer reverse ring loading animation
Es aggregation details
客户成员价值分析
隐形交通指挥员:浅述城市轨交信号系统
论文解读——Factorization Meets the Neighborhood: a Multifaceted Collaborative Filtering Model
Getting started with webrtc: 11 In kurento, rtendpoint is used to pull RTP streams for clustering in live broadcast
Démarrer avec l'animation flutter: animation de chargement des anneaux intérieurs et extérieurs inversés
SQl、Oracle剔除重复记录的语句
qt页面布局类的小demo
Heavyweight live | bizdevops: the way to break the technology situation under the tide of digital transformation
[game] Zhou Yu's skills
oracle expdp导出之query转义问题