栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

centos7.6 安装ffmpeg4.2.2

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

centos7.6 安装ffmpeg4.2.2

yum install -y libtheora-devel  libvorbis-devel
yum install -y libtool autoconf automake
yum -y install gnutls gnutls-devel lame lame-devel faac faac-devel

git clone git://github.com/mstorsjo/fdk-aac
cd fdk-aac
aclocal;libtoolize --force;autoconf;autoheader;automake
autoreconf -i
./configure
make install
cd ..


#进入https://sourceforge.net/projects/lame/,下载lame-3.100
tar -zxf lame-3.100.tar.gz
cd lame-3.100
./configure
make
make install
cd..

wget https://www.nasm.us/pub/nasm/releasebuilds/2.14/nasm-2.14.tar.gz --no-check-certificate
tar zxvf nasm-2.14.tar.gz
cd nasm-2.14
./configure
make install
cd..

git clone https://code.videolan.org/videolan/x264.git
cd x264
# 如果不将include和lib安装在/usr/local目录,之后运行ffmpeg命令时可能仍然报错误
./configure --prefix=/usr/x264/ --includedir=/usr/local/include --libdir=/usr/local/lib --enable-shared
make install
cd..



wget http://ffmpeg.org/releases/ffmpeg-4.2.2.tar.bz2
tar -jxvf ffmpeg-4.2.2.tar.bz2 
cd ffmpeg-4.2.2
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-version3 --enable-pthreads --enable-shared --enable-libmp3lame --enable-libx264 --enable-pic --enable-libfdk-aac --enable-openssl --enable-nonfree
make -j24
make install



# vi /etc/profile
// 在profile文件中加入
PATH=$PATH:/usr/local/ffmpeg/bin
export PATH
保存后执行source /etc/profile

运行:$ ffmpeg -v
ffmpeg: error while loading shared libraries: libavdevice.so.58: cannot open shared object file: No such file or directory

执行vi /etc/ld.so.conf
加入
/usr/local/ffmpeg/lib
/usr/lib
/usr/lib64
/usr/local/lib

执行:ldconfig

$ ffmpeg -y -i 4.wmv -vcodec libx264 -qscale 0 -f mp4 video.mp4

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/313156.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号