所需软件
准备
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel -y
新版还加了下面的cmake freetype-devel mercurial
编译yasm
tar-zxvfyasm-1.2.0.tar.gz
准备
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel -y
新版还加了下面的cmake freetype-devel mercurial
cdfdk-aac-0.1.1autoreconf -fiv ./configure --prefix=usr/local
install
编译FFmpegcd ffmpegPKG_CONFIG_PATH=/usr/local/lib/pkgconfig export PKG_CONFIG_PATH 或把上面2行加到vim~/.bash_profile
source~/.bash_profile./configure --extra-cflags=-I/usr/local/include \ --extra-ldflags=-L/usr/local/lib --bindir=/usr/local/bin \ --extra-libs="-ldl" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libx264 --enable-shared hash -r . ~/.bash_profileecho$PKG_CONFIG_PATH
接着输入ffmpeg检查是否安装成功,
如果出现如下错误:
error while loading shared libraries: libavdevice.so.54
解决方法: