音频处理工具 FFmpeg 安装

yum install yasm -y
wget http://ffmpeg.org/releases/ffmpeg-3.3.4.tar.bz2
tar -jxvf ffmpeg-3.3.4.tar.bz2
cd ffmpeg-3.3.4
./configure --enable-shared --prefix=/usr/local/ffmpeg
make
make install
修改文件/etc/ld.so.conf 内容增加/usr/local/ffmpeg/lib/
vim /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib/
使修改生效
ldconfig
执行 /usr/local/ffmpeg/bin/ffmpeg -version
显示
ffmpeg version 3.3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-18)
configuration: --enable-shared --prefix=/usr/local/ffmpeg
libavutil      55. 58.100 / 55. 58.100
libavcodec     57. 89.100 / 57. 89.100
libavformat    57. 71.100 / 57. 71.100
libavdevice    57.  6.100 / 57.  6.100
libavfilter     6. 82.100 /  6. 82.100
libswscale      4.  6.100 /  4.  6.100
libswresample   2.  7.100 /  2.  7.100

ffmpeg安装第三方编码器(encoder)库,ffmpeg编码h264

h264

https://github.com/ShiftMediaProject/x264
./configure --help看看它的帮助信息
./configure --enable-shared --enable-static
make && make install
libx264.so和libx264.a就会复制到/usr/local/lib

mp3lame

下载代码
http://sourceforge.net/projects/lame/files/lame/
./configure 
make && make install

重新编译ffmpeg

./configure --enable-gpl --enable-libx264 --enable-libmp3lame --enable-shared --prefix=/usr/local/ffmpeg
make && make install
修改文件/etc/ld.so.conf 内容增加/usr/local/ffmpeg/lib/
vim /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib/
/usr/local/lib
使修改生效
ldconfig
执行 /usr/local/ffmpeg/bin/ffmpeg -version

转载于:https://my.oschina.net/u/3004226/blog/1546179

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值