yum install -y automake autoconf libtool gcc gcc-c++
安装yasm,ffmpeg编译中为了提高编译速度,使用了汇编指令,于是需要使用这个工具。
wget
tar xzfv yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
make
make install
export "PATH=$PATH:$HOME/bin"
Install Aacenc
wget
tar xzvf vo-aacenc-0.1.2.tar.gz
cd vo-aacenc-0.1.2
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
wget
tar -zxvf faac-1.28.tar.gz
cd faac-1.28
./configure
make
会出现
mpeg4ip.h:126: error: new declaration ‘char* strcasestr(const char*, const char*)’
vim faac-1.28/common/mp4v2/mpeg4ip.h +123
删除char *strcasestr(const char *haystack, const char *needle);
修改前:
#ifdef __cplusplus
extern "C" {
#endif
char *strcasestr(const char *haystack, const char *needle);
#ifdef __cplusplus
}
#endif
修改为:
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
}
#endif
然后
make install
wget
tar zxvf lame-3.98.4.tar.gz
cd lame-3.98.4
./configure --prefix=/usr
make all
wget
tar xzvf libogg-1.3.1.tar.gz
cd libogg-1.3.1
./configure
make
make install
安装x264
git clone git://git.videolan.org/x264.git
cd x264
make
make install
install -m 644 x264.h /usr/local/include
install -m 644 x264_config.h /usr/local/include
install -m 644 libx264.a /usr/local/lib
install -m 644 x264.pc /usr/local/lib/pkgconfig
ranlib /usr/local/lib/libx264.a
wget
tar xzvf libvorbis-1.3.4.tar.gz
cd libvorbis-1.3.4
./configure
make
make install
wget --no-check-certificate
tar -jxvf ffmpeg-2.8.2.tar.bz2
cd ffmpeg-2.8.2
./configure --extra-cflags="-l/usr/local/include" --extra-ldflags=-l/usr/local/lib --enable-gpl --enable-nonfree --enable-postproc --enable-avfilter --enable-pthreads --enable-libxvid --enable-libx264 --enable-libmp3lame --enable-libfaac --disable-ffserver --disable-ffplay --enable-libvorbis --disable-ffplay --enable-shared --arch=x86_64
阅读(2382) | 评论(0) | 转发(0) |