赞
踩
若本文中# wget下载报错(用wget下载https链接内容时报错:无法本地校验颁发者的权限。 要以不安全的方式连接至 ,使用“--no-check-certificate”),可直接下载通过宝塔,或其它方式上传至linux虚拟机(我的是/home/soft/ffmpeg目录)
1.安装gcc
# yum install -y gcc
2.安装yasm编译器
进入http://yasm.tortall.net/releases/Release1.3.0.html,下载yasm-1.3.0.tar.gz,
或者
# wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
解压yasm
# tar -zxvf yasm-1.3.0.tar.gz
进入解压目录
# cd yasm-1.3.0
编译和安装
# ./configure
# make
# make install
查看安装结果
# yasm --version
3.安装bzip2用于解压
# yum install -y bzip2
4.安装nasm
# wget https://www.nasm.us/pub/nasm/releasebuilds/2.14/nasm-2.14.tar.bz2
# tar -jxvf nasm-2.14.tar.bz2
# cd nasm-2.14
# ./configure
# make & make install
# nasm --version
5. 安装x264
http://www.videolan.org/developers/x264.html,下载
或者
# git clone https://code.videolan.org/videolan/x264.git
或者
#git clone http://git.videolan.org/git/x264.git
#cd x264
#./configure --enable-shared
#make & make install
6. 安装fdk-aac
#git clone https://github.com/mstorsjo/fdk-aac.git
或者
https://sourceforge.net/projects/opencore-amr/files/fdk-aac/
#./configure
#make & make install
7 安装ffmpeg
https://ffmpeg.org/,下载
或者
# git clone https://git.ffmpeg.org/ffmpeg.git
# cd ffmpeg
# ./configure --enable-gpl --enable-version3 --enable-pthreads --enable-shared --enable-libx264 --enable-pic --enable-libfdk-aac --enable-openssl --enable-nonfree
# make & make install
# ffmpeg -version
8.问题
执行编译ffmpeg ./configure时,异常:
warwning: using libx264 without pkg-config
解决办法1:下载pkg-config-0.29.2.tar.gz,地址:https://www.freedesktop.org/wiki/Software/pkg-config/
# tar zxvf pkg-config-0.29.2.tar.gz
或者 git clone https://gitlab.freedesktop.org/pkg-config/pkg-config.git
# cd pkg-config-0.29.2
# ./configure --with-internal-glib
# make
# make check
# make install
# pkg-config –-version
其他问题可参考
https://blog.csdn.net/weixin_43317914/article/details/124740357
x265部分(x265部分此处并未测试,以备后期)
X265下载地址https://www.videolan.org/developers/x265.html
https://blog.csdn.net/weixin_42955871/article/details/111907265
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。