欢迎各位兄弟 发布技术文章
这里的技术是共享的
This guide is meant to walk system administrators through the process of setting up ffmpeg, x264, and the codecs & libraries required to run the CumulusClips on CentOS 5.5 (or higher) and Red Hat (RHEL) Linux. This is helpful if you purchased a VPS or dedicated server to run CumulusClips, or if you’re a hosting company setting up your infrastructure to support CumulusClips. This guide was adapted from the following two guides:
http://www.pawprint.net/news/article/105/Compiling-FFMpeg-on-Centos-5/
http://ubuntuforums.org/showthread.php?t=786095
The version numbers of the various downloads were the latest at the time of this writing (9/17/2011). Please check the respective vendors’ sites to ensure you obtain the latest stable version of each library
Add EPEL Repository to CentOS / RHEL. Only the core and EPEL repositories are required for this guide. This is to obtains the necessary tools for the install process, not the actual codecs & libraries themselves. Those will be compiled from source.
1 2 | rpm -Uvh epel-release-5-4.noarch.rpm |
Remove any of the codecs that were pre-installed.
1 | yum remove libvpx libogg libvorbis libtheora libx264 x264 ffmpeg |
Update your system and install the tools required for compiling and installing all the codecs.
1 2 | yum updateyum install gcc gcc-c++ automake autoconf libtool yasm nasm git subversion |
Temporarily disable your firewalls and SELinux
1 2 3 | iptables -Fservice iptables savevi /etc/selinux/config |
Set the SELinux value to disabled. Make sure your shared library paths are in order
1 2 3 | export LD_LIBRARY_PATH=/usr/local/lib/echo /usr/local/lib > /etc/ld.so.conf.d/custom-libs.confldconfig |
Visit the Xvid site to retrieve the latest version of the codec.
1 2 3 4 5 6 7 | tar -zxf xvidcore-1.3.2.tar.gzcd xvidcore/build/generic./configuremake && make installldconfigcd |
Visit the LAME MP3 Encoder project to obtain their latest version.
1 2 3 4 5 6 7 | tar -zxf lame-3.98.4.tar.gzcd lame-3.98.4./configuremake && make installldconfig cd |
Visit the AudioCoding site for the latest version of the codec.
1 2 3 4 5 6 7 8 | tar -xzf faac-1.28.tar.gzcd faac-1.28./bootstrap./configuremake && make installldconfigcd |
Get the latest version of OpenCore AMR from their repository at SourceForge.
1 2 3 4 5 6 7 | wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gztar -xzf opencore-amr-0.1.2.tar.gzcd opencore-amr-0.1.2./configuremake && make installldconfigcd |
Visit Xiph.org for the latest version of libogg.
1 2 3 4 5 6 7 | tar -xzf libogg-1.3.0.tar.gzcd libogg-1.3.0./configuremake && make installldconfigcd |
Visit Xiph.org for the latest version of Vorbis (libvorbis).
1 2 3 4 5 6 7 | tar -xjf libvorbis-1.3.2.tar.bz2cd libvorbis-1.3.2./configuremake && make installldconfig cd |
Visit Theora.org for the latest version of Theora (libtheora).
1 2 3 4 5 6 7 | tar -xjf libtheora-1.1.1.tar.bz2cd libtheora-1.1.1./configuremake && make installldconfig cd |
1 2 3 4 5 6 | git clone git://git.videolan.org/x264.gitcd x264./configure --enable-staticmake && make installldconfigcd |
1 2 3 4 5 6 7 8 9 | git clone git://git.videolan.org/ffmpeg.git ffmpegcd ffmpeg./configure --enable-version3 --enable-libopencore-amrnb \--enable-libopencore-amrwb --enable-libvpx --enable-libfaac \--enable-libmp3lame --enable-libtheora --enable-libvorbis \--enable-libx264 --enable-libxvid --enable-gpl --enable-postproc \--enable-nonfreemake && make installldconfig |
qt-faststart ships with FFMPEG. No seprate download is required for it. At this point you should still be in the ffmpeg directory.
1 2 3 4 5 | cd toolsmake qt-faststartcp qt-faststart /usr/local/binldconfigcd |