centos7安装ffmpeg v4.1

发布时间 2023-09-21 00:06:44作者: JeromePowell

 

yum install -y gcc nasm libxcb

mkdir -p /usr/local/ffmpeg
wget https://johnvansickle.com/ffmpeg/release-source/ -O ffmpeg-4.1.tar.xz
tar -xf ffmpeg-4.1.tar.xz
cd ffmpeg-4.1
./configure --enable-shared --prefix=/usr/local/ffmpeg
make -j8 && make install

vim /etc/ld.so.conf 

# 追加写入/usr/local/ffmpeg/lib/

ldconfig
vim /etc/profile

#环境变量
PATH=$PATH:/usr/local/ffmpeg/bin
export PATH

source /etc/profile

# /usr/local/ffmpeg/bin/ffmpeg -version
ffmpeg version 4.1 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
configuration: --enable-shared --prefix=/usr/local/ffmpeg
libavutil      56. 22.100 / 56. 22.100
libavcodec     58. 35.100 / 58. 35.100
libavformat    58. 20.100 / 58. 20.100
libavdevice    58.  5.100 / 58.  5.100
libavfilter     7. 40.101 /  7. 40.101
libswscale      5.  3.100 /  5.  3.100
libswresample   3.  3.100 /  3.  3.100