下载
首先在 Index of /releases (ffmpeg.org) 选择你想要的版本。
例如我要下载ffmpeg-6.0.tar.gz,点击下载后上传到Linxu系统中,也可以直接在linux终端使用以下命令进行下载:
wget http://www.ffmpeg.org/releases/ffmpeg-6.0.tar.gz
安装
下载好后解压文件
进入解压出来的文件夹,执行如下命令
./configure --prefix=安装目录
make && make install
例如我的:
./configure --prefix=/www/ffmpeg
make && make install
如果出现如下错误:
nasm/yasm not found or too old. Use --disable-x86asm for a crippled build.
If you think configure made a mistake, make sure you are using the latest
version from Git. If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.libera.chat.
Include the log file "ffbuild/config.log" produced by configure as this will help
solve the problem.
就需要先安装 yasm
同样的先去看最新版本是多少 http://www.tortall.net/projects/yasm/releases/
然后选好版本号,替换到如下命令:
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar -zxvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make && make install
安装好后在去安装ffmpeg
配置环境
vi /etc/profile
# 在最后PATH添加环境变量:
export PATH=$PATH:/www/ffmpeg/bin
# 保存退出
source /ect/profile
重启服务器