CentOS 7 编译安装 ffmpeg

编译安装

下载安装

wget http://ffmpeg.org/releases/ffmpeg-3.4.1.tar.bz2
tar -jxvf ffmpeg-3.4.1.tar.bz2
cd ffmpeg-3.4.1

编译, 安装

./configure --prefix=/usr/local/ffmpeg

# 等待安装完成... NAS 2 分钟编译完成
make -j$(($(nproc) + 1))
make install

设置环境变量

vim /etc/profile

# 在最后PATH添加环境变量
export PATH=$PATH:/usr/local/ffmpeg/bin
# 保存退出
 
# 设置生效
source /etc/profile

# 查看版本
ffmpeg -version

注意事项

若安装过程中出现以下错误

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.freenode.net.
Include the log file “ffbuild/config.log” produced by configure as this will help
solve the problem.

需要安装 yasm

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 -j$(($(nproc) + 1))
make install

原文

[CentOS_7.4]Linux编译安装ffmpeg

最后更新于 2017-12-22
使用 Hugo 构建
主题 StackJimmy 设计