CentOS7安装ffmpeg

2020-05-26  本文已影响0人  景贤游子_小跟班

1、安装步骤如下

wget http://www.ffmpeg.org/releases/ffmpeg-3.1.tar.gz
tar -zxvf ffmpeg-3.1.tar.gz
cd ffmpeg-3.1
./configure --prefix=/usr/local/ffmpeg
make && make install 

2、编译FFmgeg执行./configure 时会报此错误。

nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.
yum install -y yasm

再次编译

./configure --prefix=/usr/local/ffmpeg
make && make install 

3、修改vi /etc/ld.so.conf 内容如下,执行ldconfig 是生效。

include ld.so.conf.d/*.conf
/usr/local/ffmpeg/lib/

4、添加环境变量 vi /etc/profile 末尾追加如下内容

PATH=$PATH:/usr/local/ffmpeg/bin
export PATH
source /etc/profile

5、查看版本

[root@localhost]#  ffmpeg -version
ffmpeg version 3.4.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-28)
configuration: --prefix=/usr/local/ffmpeg
libavutil      55. 78.100 / 55. 78.100
libavcodec     57.107.100 / 57.107.100
libavformat    57. 83.100 / 57. 83.100
libavdevice    57. 10.100 / 57. 10.100
libavfilter     6.107.100 /  6.107.100
libswscale      4.  8.100 /  4.  8.100
libswresample   2.  9.100 /  2.  9.100

到此安装结束,如果对你有帮助,请支持下作者,谢谢了。

上一篇 下一篇

猜你喜欢

热点阅读