-- linux 安装 FFmpeg
首先安装编译环境,如果系统有就不用安装了。
yum install -y automake autoconf libtool gcc gcc-c++
yum install yasm
yum install make
yum install svn
如果还需要其他的软件就按照下面的方式安装。
yum search **
yum install **
到此,我们就可以通过svn命令获取最新的ffmpeg了
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
你会发现在你所在的目录,自动出现一个ffmpeg的目录,就是你下载的源代码。
切换到ffmpeg目录下,执行以下命令。
./configure --prefix=/usr (-- yum install yasm 报错执行)
make
-- 如果出现错误:
libavcodec/x86/h264_qpel_mmx.c: Assembler messages:
libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp'
libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp'
需要把libavcodec/x86/h264_qpel_mmx.c中的"g"替换为“rm”即可解决
vim libavcodec/x86/h264_qpel_mmx.c
进入命令行模式,输入: %s/"g"/"rm"/g 即可全部替换。
make install
FFmpeg安装
最新推荐文章于 2019-11-18 00:29:17 发布