如何在centos下源码编译安装FFmpeg
学思创
204
首先在官网找到源码下载链接
https://ffmpeg.org/download.html
1、通过wget下载源码包或通过curl下载
wget https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
或者
curl -fsSLOk https://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
2、解压源码包并进入解压后的目录
tar -xvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
3、安装下yasm,安装FFmpeg需要yasm插件;如果不想安装可以直接跳第4步骤
yum install yasm
4、配置;如果没有安装yasm,按照提示加参数跳过
./configure
5、编译并安装
make && make install
安装完成后,可以通过下面命令查看帮助信息
ffmpeg --help
可以查看到版本信息和相关命令格式