Linux 编译升级 Ffmpeg 步骤
2013-08-01 10:22
309 查看
如果服务器已经安装了一个 Ffmpeg 的话,比如已安装在 /usr/local/ffmpeg 目录。版本升级步骤如下:
1.下载 ffmpeg-*.tar.gz
到 Ffmpeg 官网 https://ffmpeg.org/download.html 挑选你要升级到的版本,然后下载,比如作者下载的是 ffmpeg-2.0.tar.gz。
2.编译安装
tar -zxvf ffmpeg-2.0.tar.gz
cd ffmpeg-2.0
./configure --enable-shared --prefix=/usr/local/ffmpeg
make
make install
3.动态链接库
vi /etc/ld.so.conf
加入:/usr/local/ffmpeg/lib
执行
ldconfig
4.为 Ffmpeg 加入环境变量
vi /etc/profile
加入以下内容:
FFMPEG=/usr/local/ffmpeg
PATH加入:$FFMPEG/bin
5.使修改立即生效
source /etc/profile
执行
ffmpeg -version
打印结果
ffmpeg version 2.0
built on Jul 24 2013 09:59:06 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
configuration: --enable-shared --prefix=/usr/local/ffmpeg
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
证明已升级成功。如果遇到 ffmpeg: error while loading shared libraries: libavdevice.so.55: cannot open shared object file: No such file or directory 之类的错误,请检查第三步是否做好。
1.下载 ffmpeg-*.tar.gz
到 Ffmpeg 官网 https://ffmpeg.org/download.html 挑选你要升级到的版本,然后下载,比如作者下载的是 ffmpeg-2.0.tar.gz。
2.编译安装
tar -zxvf ffmpeg-2.0.tar.gz
cd ffmpeg-2.0
./configure --enable-shared --prefix=/usr/local/ffmpeg
make
make install
3.动态链接库
vi /etc/ld.so.conf
加入:/usr/local/ffmpeg/lib
执行
ldconfig
4.为 Ffmpeg 加入环境变量
vi /etc/profile
加入以下内容:
FFMPEG=/usr/local/ffmpeg
PATH加入:$FFMPEG/bin
5.使修改立即生效
source /etc/profile
执行
ffmpeg -version
打印结果
ffmpeg version 2.0
built on Jul 24 2013 09:59:06 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
configuration: --enable-shared --prefix=/usr/local/ffmpeg
libavutil 52. 38.100 / 52. 38.100
libavcodec 55. 18.102 / 55. 18.102
libavformat 55. 12.100 / 55. 12.100
libavdevice 55. 3.100 / 55. 3.100
libavfilter 3. 79.101 / 3. 79.101
libswscale 2. 3.100 / 2. 3.100
libswresample 0. 17.102 / 0. 17.102
证明已升级成功。如果遇到 ffmpeg: error while loading shared libraries: libavdevice.so.55: cannot open shared object file: No such file or directory 之类的错误,请检查第三步是否做好。
相关文章推荐
- Linux 编译升级 FFmpeg 步骤
- Linux 编译升级 Ffmpeg 步骤
- Linux编译升级Ffmpeg步骤
- Linux 编译升级 Ffmpeg 步骤
- 编译ffmpeg步骤(windows&linux)
- Linux环境下apache阿帕奇安装配置失败报错,编译失败的解决方案,Apache安装升级OpsenSSL步骤
- linux编译升级内核步骤
- centos linux 内核升级,内核编译步骤
- linux 模块编译步骤
- MinGW下简单编译FFmpeg(详细步骤)
- 如何编译Linux内核(编译linux内核的基本步骤)
- linux 模块编译步骤
- ffmpeg,H264库编译后的Demo工程所需操作的步骤
- Linux下编译安装源代码的三个步骤
- linux下gcc编译的步骤
- linux编译ffmpeg2.8.4
- Linux下编译Android平台的ffmpeg库
- 编译制作Linux 3.18内核rpm包(升级centos6.x虚拟机内核)
- linux下php快速升级 5.2.6(1)用yum(2)重新编译安装