【CentOS7】安装ffmpeg

【CentOS7】安装ffmpeg

 编译器

yum -y install gcc cc cl

下载解压yasm

cd /ycx
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar -zxvf yasm-1.3.0.tar.gz
mv yasm-1.3.0 yasm
cd /ycx/yasm

安装

./configure --prefix=/ycx/yasm
make && make install

配置

# 编辑
vim /etc/profile
# 追加
PATH=$PATH:/ycx/yasm/bin
export PATH
# 生效
source /etc/profile

报错时进行配置

# 编辑
vim /etc/ld.so.conf
# 追加
/ycx/yasm/lib/
# 生效
ldconfig

 

 

下载解压ffmpeg

cd /ycx
wget http://www.ffmpeg.org/releases/ffmpeg-4.4.tar.gz
tar -zxvf ffmpeg-4.4.tar.gz
mv FFmpeg-n4.4 ffmpeg
cd /ycx/ffmpeg

安装

./configure --prefix=/ycx/ffmpeg
make && make install

配置

# 编辑
vim /etc/profile
# 追加
PATH=$PATH:/ycx/ffmpeg/bin
export PATH
# 生效
source /etc/profile

报错时进行配置

# 编辑
vim /etc/ld.so.conf
# 追加
/ycx/ffmpeg/lib/
# 生效
ldconfig

查看版本

ffmpeg -version

 

posted @ 2023-11-22 10:30  翠微  阅读(73)  评论(0编辑  收藏  举报