您的位置:首页 > 运维架构 > Linux

CentOS编译安装ffmpeg以及相关编码解码器

2015-02-04 11:24 429 查看

CentOS编译安装ffmpeg是一件很痛苦的过程,因为各种编码器、解码器什么的很繁杂,而且相互依赖关系更复杂。以下是步骤。

安装yasmwget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz tar zxf yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure
make
make install安装frei0r(先安装新版autoconf,这会覆盖掉系统中的旧版本哦)wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz tar zxf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure –prefix=/usr
make
make installwget http://files.dyne.org/frei0r/releases/frei0r-plugins-1.4.tar.gz tar zxf frei0r-plugins-1.4.tar.gz
cd frei0r-plugins-1.4
./configure
make
make install安装gnutls参考:http://blog.creke.net/800.html安装mp3lamewget http://iweb.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz tar zxf lame-3.99.5.tar.gz
cd lame-3.99.5
make
make install安装opencore-amrwget http://iweb.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz tar zxf opencore-amr-0.1.3.tar.gz
./configure –enable-shared
make
make install安装opuswget http://downloads.xiph.org/releases/opus/opus-1.0.2.tar.gz tar zxf opus-1.0.2.tar.gz
cd opus-1.0.2
make
make install安装rtmpdumpwget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz tar zxf rtmpdump-2.3.tgz
cd rtmpdump-2.3
make
make install安装schroedinger(先安装好orc库)wget http://code.entropywave.com/download/orc/orc-0.4.17.tar.gz tar zxf orc-0.4.17.tar.gz
cd orc-0.4.17
./configure
make
make install
/sbin/ldconfigwget http://diracvideo.org/download/schroedinger/schroedinger-1.0.11.tar.gz tar zxf schroedinger-1.0.11.tar.gz
cd schroedinger-1.0.11
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig ./configure
make
make install安装soxr(注:新版libsoxr貌似与当前ffmpeg不兼容,用旧版)yum install -y xz
wget http://hivelocity.dl.sourceforge.net/project/soxr/soxr-0.1.0-Source.tar.xz xz -d soxr-0.1.0-Source.tar.xz
tar xf soxr-0.1.0-Source.tar
cd soxr-0.1.0-Source
./go
cd Release/
make
make install
/sbin/ldconfig安装speex(先安装libogg库)wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz tar zxf libogg-1.3.0.tar.gz
./configure
make
make install
/sbin/ldconfigwget http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz tar zxf speex-1.2rc1.tar.gz
cd speex-1.2rc1
./configure
make
make install安装theora(先安装好libvorbis库和libsdl库)wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz tar zxf libvorbis-1.3.3.tar.gz
./configure
make
make installwget http://www.libsdl.org/release/SDL-1.2.15.tar.gz tar zxf SDL-1.2.15.tar.gz
cd SDL-1.2.15
./configure
make
make install
/sbin/ldconfigwget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2 tar zjf libtheora-1.1.1.tar.bz2
./configure
make
make install安装twolamewget http://downloads.sourceforge.net/twolame/twolame-0.3.13.tar.gz tar zxf twolame-0.3.13
.tar.gz
cd twolame-0.3.13
./configure
make
make install
/sbin/ldconfig安装VisualOn AAC(注:github的tag和master版均无法autoconf,用zeranoe版代替)wget wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/vo-aacenc-0.1.2.tar.xz xz -d vo-aacenc-0.1.2.tar.xz
tar xf vo-aacenc-0.1.2.tar
cd vo-aacenc-0.1.2
./configure
make
make install安装VisualOn AMR-WB(注:github的tag和master版均无法autoconf,用zeranoe版代替)wget http://ffmpeg.zeranoe.com/builds/source/external_libraries/vo-amrwbenc-0.1.2.tar.xz xz -d vo-amrwbenc-0.1.2.tar.xz
tar xf vo-amrwbenc-0.1.2.tar
cd vo-amrwbenc-0.1.2
./configure安装libvpx(注:新版libvpx貌似与当前ffmpeg不兼容,用旧版)wget http://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2 tar jxf libvpx-v1.1.0.tar.bz2
cd libvpx-v1.1.0
./configure
make
make install安装x264wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2 tar jxf last_x264.tar.bz2
cd x264-snapshot-20130311-2245/
./configure –enable-shared
make
make install安装xvidwget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz tar zxf xvidcore-1.3.2.tar.gz
cd xvidcore
cd build/generic
./configure
make
make install最重要的一步——编译安装ffmpeg!wget http://ffmpeg.org/releases/ffmpeg-1.1.3.tar.gz tar zxf ffmpeg-1.1.3.tar.gz
cd ffmpeg-1.1.3
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig ./configure –disable-static –enable-shared –enable-gpl –enable-version3 –enable-bzlib –enable-fontconfig –enable-frei0r –enable-gnutls –enable-libfreetype –enable-libmp3lame –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libopus –enable-librtmp –enable-libschroedinger –enable-libsoxr –enable-libspeex –enable-libtheora –enable-libtwolame –enable-libvo-aacenc –enable-libvo-amrwbenc –enable-libvorbis –enable-libvpx –enable-libx264 –enable-libxvid –enable-zlib
make
make install注1:我在编译安装时参考Windows Build:http://ffmpeg.zeranoe.com/builds/。注2:与Windows Build相比,以下没有选项开启:–enable-libgsm –enable-libilbc -enable-libass –enable-libbluray –enable-libcaca –enable-libopenjpeg –disable-w32threads –enable-avisynth –enable-libxavs

转载:http://blog.creke.net/801.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: