centos 编译 ffmpeg

#!/bin/bash


mkdir /usr/local/ffmpeg

wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/lame-3.99.5.tar.xz
tar xf lame-3.99.5.tar.xz
( cd lame-3.99.5; ./configure --prefix=/usr/local/ffmpeg --enable-shared; make && make install )


wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
tar xzf faac-1.28.tar.gz
( cd faac-1.28; ./bootstrap; ./configure --prefix=/usr/local/ffmpeg --enable-shared; make && make install )

wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.xz
tar xf libogg-1.3.2.tar.xz
( cd libogg-1.3.2; ./configure --prefix=/usr/local/ffmpeg --enable-shared; make && make install )


wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/libvorbis-1.3.5.tar.xz
tar xf libvorbis-1.3.5.tar.xz
( cd libvorbis-1.3.5; ./configure --prefix=/usr/local/ffmpeg --enable-shared; make && make install )


wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/xvid-1.3.4.tar.xz
tar xf xvid-1.3.4.tar.xz
( cd xvid-1.3.4/build/generic; ./configure --prefix=/usr/local/ffmpeg; make && make install )


wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/libtheora-1.1.1.tar.xz
tar xf libtheora-1.1.1.tar.xz
( cd libtheora-1.1.1; ./configure --prefix=/usr/local/ffmpeg --enable-shared; make && make install )



wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar xzf yasm-1.3.0.tar.gz
( cd yasm-1.3.0; sed -i 's#) ytasm.*#)#' Makefile.in; ./configure --prefix=/usr; make && make install )



wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/x264-20151011-git-7599210.tar.xz
tar xf x264-20151011-git-7599210.tar.xz
( cd x264-20151011-git-7599210; ./configure --prefix=/usr/local/ffmpeg --enable-shared; make && make install )

wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/vo-aacenc-0.1.3.tar.xz
tar xf vo-aacenc-0.1.3.tar.xz
( cd vo-aacenc-0.1.3; ./configure --prefix=/usr/local/ffmpeg --enable-shared; make && make install )





wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/rtmpdump-20140707-git-a1900c3.tar.xz
tar xf rtmpdump-20140707-git-a1900c3.tar.xz
( cd rtmpdump-20140707-git-a1900c3; make SYS=posix; make install )




#字幕
#wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/libass-0.13.0.tar.xz
#tar xf libass-0.13.0.tar.xz
#( cd libass-0.13.0; ./configure --prefix=/usr/local/ffmpeg --enable-shared; make && make install )




wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/speex-1.2rc2.tar.xz
tar xf speex-1.2rc2.tar.xz
( cd  speex-1.2rc2;  ./configure --prefix=/usr/local/ffmpeg --enable-shared --enable-sse;  make && make install )


wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/opencore-amr-0.1.3.tar.xz
tar xf opencore-amr-0.1.3.tar.xz
( cd opencore-amr-0.1.3; ./configure --prefix=/usr/local/ffmpeg --enable-shared; make && make install )




http://ffmpeg.zeranoe.com/builds/source/external_libraries/vo-amrwbenc-0.1.2.tar.xz
tar xf vo-amrwbenc-0.1.2.tar.xz
( cd vo-amrwbenc-0.1.2; ./configure --prefix=/usr/local/ffmpeg --enable-shared; make && make install )




export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/ffmpeg/lib/pkgconfig/"
wget http://ffmpeg.org/releases/ffmpeg-2.8.1.tar.bz2
tar xjf ffmpeg-2.8.1.tar.bz2
( cd ffmpeg-2.8.1; ./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-zlib --enable-bzlib --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libx264 --enable-libxvid --enable-pthreads --enable-pic --enable-openssl --enable-libspeex --enable-librtmp ; make && make install )
#( cd ffmpeg-2.8.1; ./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-version3 --enable-nonfree --enable-shared --enable-zlib --enable-bzlib --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvo-aacenc --enable-libvorbis --enable-libx264 --enable-libxvid --enable-pic --enable-pthreads --enable-libdc1394 --enable-libass --enable-pic --enable-openssl --enable-libtwolame --enable-libspeex --enable-librtmp --enable-libfreetype   )
















#references
# http://blog.chinaunix.net/uid-23069658-id-4018842.html
# http://blog.csdn.net/xiaoliouc/article/details/8424604
# http://ffmpeg.zeranoe.com/builds/

你可能感兴趣的:(centos 编译 ffmpeg)