centos7.x安装FFMPEG
[root@content yukw]# yum -y install gcc
[root@content yukw]# mkdir /data/{src,service}
[root@content yukw]# cd /data/src
[root@content yukw]# wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
[root@content yukw]# tar xf yasm-1.3.0.tar.gz
[root@content yukw]# cd yasm-1.3.0/
[root@content yukw]# ./configure --enable-shared --prefix=/data/service/yasm
[root@content yukw]# make
[root@content yukw]# make install
[root@content yukw]# cd ..
[root@content yukw]# wget http://www.ffmpeg.org/releases/ffmpeg-4.4.tar.gz
[root@content yukw]# tar xf ffmpeg-4.4.tar.gz
[root@content yukw]# cd ffmpeg-4.4/
[root@content yukw]# ./configure --enable-shared --disable-x86asm --prefix=/data/service/ffmpeg
[root@content yukw]# make
[root@content yukw]# make install
[root@content yukw]# vim /etc/ld.so.conf
include ld.so.conf.d/*.conf
/data/service/yasm/lib/
/data/service/ffmpeg/lib/
[root@content yukw]# ldconfig
[root@content yukw]# /data/service/ffmpeg/bin/ffmpeg -version
ffmpeg version 4.4 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
configuration: --enable-shared --disable-x86asm --prefix=/data/service/ffmpeg
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
[root@content yukw]# vim /etc/profile 添加如下四行
PATH=$PATH:/data/service/ffmpeg/bin
export PATH
PATH=$PATH:/data/service/yasm/bin
export PATH
[root@content yukw]# source /etc/profile
[root@content yukw]# ffmpeg -version