服务报价 | 域名主机 | 网络营销 | 软件工具| [加入收藏]
 热线电话: #
当前位置: 主页 > 开发教程 > linux教程 >

Centos6.8编译安装FFmpeg成功

时间:2016-09-28 18:33来源:未知 作者:最模板编辑 点击:
Centos下安装只需要参考这篇官方教程即可:[Compile FFmpeg on CentOS](https://trac.ffmpeg.org/wiki/CompilationGuide/Centos) 环境:Centos6.8 minimal 64位,说下在原教程上需要注意的几个地方: ### 一、关闭
Centos下安装只需要参考这篇官方教程即可:[Compile FFmpeg on CentOS](https://trac.ffmpeg.org/wiki/CompilationGuide/Centos)
 
环境:Centos6.8 minimal 64位,说下在原教程上需要注意的几个地方:
### 一、关闭SELINUX ###
```
sed -i 's/SELINUX=enforcing/#SELINUX=enforcing/g' /etc/selinux/config
sed -i 's/SELINUXTYPE=targeted/#SELINUXTYPE=targeted/g' /etc/selinux/config
sed -i '$a SELINUX=disabled' /etc/selinux/config
setenforce 0 
```
### 二、libopus git clone很慢,注意等待 ###
### 三、尽量用最新版本 ###
libvorbis版本应该有更新,用最新版本,其他组件也到官方看下,用最新的版本  
[libvorbis](http://downloads.xiph.org/releases/vorbis/)
 
### 四、libvpx:这个步骤有3个坑:###
1. 用官方上的 ``./configure`` 参数根本无法编译通过,最后换成了下方的(加了参数 ``--enable-shared`` ):
```
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --enable-shared
```
2. libvpx的google的git地址无法下载(已fq也无法clone成功),换成了github的(是同步的):
```
git clone --depth 1 https://github.com/webmproject/libvpx.git
```
3. 服务器上安装过lamp或者lnmp,那么libvpx应该是安装过的可以跳过,如下方代码:
```
cd /usr/local/src/libvpx-v1.3.0
./configure --prefix=/usr/local/libvpx --enable-shared --enable-vp9
```
 
### 五、ffmpge安装后无法找到库 ###
安装完成后,输入 ``ffmpge -h`` 提示无法找到 ``libvpx.so.4`` ,需要将 ``/root/ffmpeg_build/lib`` 加入到动态库清单:
```
vi /etc/ld.so.conf.d/ffmpeg.conf
#将 /root/ffmpeg_build/lib 添加进去保存
ldconfig #生效
```
(责任编辑:最模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
栏目列表
热点内容