|
First, yum install FFmpeg
1. The most lazy way is yum installed automatically resolve dependencies. But no FFmpeg source CentOS default, Enterprise Linux source does not contain additional packages EPEL, you need to manually add the yum source configuration /etc/yum.repos.d/dag.repo:
[Dag]
name = Dag RPM Repository for Red Hat Enterprise Linux
baseurl = http: //apt.sw.be/RedHat/el$releasever/en/$basearch/dag
gpgcheck = 0
enabled = 1
2. Install FFmpeg online
yum -y install ffmpeg
Second, compile and install FFmpeg
yum install FFmpeg source compiler installation effort than the province, but the disadvantages are also obvious, over the old version, the version 0.6.5, the latest version 2.6.3 has been, a lot of old and new parameters vary, there is no legacy support the new format rich.
Source compiler installed FFmpeg great need for patience, the addition of a need to support each format you need to have the appropriate multimedia format development library. The paper version of the software used is its latest edition.
1. Install autoconf
cd / App / src
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.xz
tar xvf autoconf-2.69.tar.xz
cd autoconf-2.69
./configure
make
make install
2. Install automake
cd / App / src
wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.xz
tar xvf automake-1.15.tar.xz
cd automake-1.15
./configure
make
make install
3. Install libtool (FAAC required)
cd / App / src
wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.xz
tar xvf libtool-2.4.6.tar.xz
cd libtool-2.4.6
./configure
make
make install
4. Install yasm support assembly optimized (FFmpeg required)
cd / App / src
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
tar xvf yasm-1.3.0.tar.gz
cd yasm-1.3.0
./configure
make
make install
5. Add Dynamic Link Library Configuration
echo '/ usr / local / lib' >> /etc/ld.so.conf.d/local.conf
6. Install LAME MP3 support library
cd / App / src
wget http://jaist.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar xvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure
make
make install
7. Install Support Library FAAC AAC
make when given: mpeg4ip.h: 126: error: 'char * strcasestr (const char *, const char *)' new statement
Need to modify the common / mp4v2 / mpeg4ip.h 123 lines to 129 lines:
#ifdef __cplusplus
extern "C" {
#endif
char * strcasestr (const char * haystack, const char * needle);
#ifdef __cplusplus
}
#endif
change into:
#ifdef __cplusplus
extern "C ++" {
#endif
const char * strcasestr (const char * haystack, const char * needle);
#ifdef __cplusplus
}
#endif
cd / App / src
wget http://jaist.dl.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.bz2
tar xvf faac-1.28.tar.bz2
cd faac-1.28
./bootstrap
./configure --with-mp4v2
Press # to modify the contents of the foregoing mpeg4ip.h
make
make install
8. Install Support Library opencore-amr AMR
cd / App / src
wget http://jaist.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz
tar xvf opencore-amr-0.1.3.tar.gz
cd opencore-amr-0.1.3
./configure
make
make install
9. Install Universal Music audio encoding format support library libvorbis
# Libvorbis need libogg, install libogg library
cd / App / src
wget http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.xz
tar xvf libogg-1.3.2.tar.xz
cd libogg-1.3.2
./configure
make
make install
cd / App / src
wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz
tar xvf libvorbis-1.3.5.tar.xz
cd libvorbis-1.3.5
./configure
make
make install
10. Install the x264 library supports H.264 video transcoding
cd / App / src
git clone git: //git.videolan.org/x264.git
cd x264
./configure --enable-shared
make
make install
11. Install Xvid library supports MPEG-4 transcoding
cd / App / src
wget http://downloads.xvid.org/downloads/xvidcore-1.3.3.tar.bz2
tar xvf xvidcore-1.3.3.tar.bz2
cd xvidcore / build / generic
./configure
make
make install
12. Install Theora video compression support library
cd / App / src
wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz
tar xvf libtheora-1.1.1.tar.xz
cd libtheora-1.1.1
./configure
make
make install
13. Install the NUT support library
When you install 64-bit Linux systems need to modify config.mak
In the last CFLAGS next line add:
CFLAGS + = -fPIC
Otherwise, when you install FFmpeg make an error:
/usr/local/lib/libnut.a: could not read symbols: Bad value
cd / App / src
svn co svn: //svn.mplayerhq.hu/nut/src/trunk libnut
cd libnut
./configure
make
make install
14. Install VP8 / VP9 codec support library
cd / App / src
git clone http://git.chromium.org/webm/libvpx.git
cd libvpx
./configure --enable-shared
make
make install
15. Install the latest version of FFmpeg
cd / App / src
wget http://ffmpeg.org/releases/ffmpeg-2.6.3.tar.bz2
tar xvf ffmpeg-2.6.3.tar.bz2
cd ffmpeg-2.6.3
./configure --enable-version3 --enable-libvpx --enable-libfaac --enable-libmp3lame --enable-libvorbis --enable-libx264 --enable-libxvid --enable-gpl --enable-postproc - enable-nonfree --enable-avfilter --enable-pthreads --enable-libnut --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-shared
make
make install
ldconfig
16. Install segmenter
git clone https://github.com/johnf/m3u8-segmenter
cd m3u8-segmenter
PKG_CONFIG_PATH = / usr / local / lib / pkgconfig ./configure
make
make install
ln -s / usr / local / bin / m3u8-segmenter / usr / local / bin / segmenter
Third, compile and install Notes
1. may find that when you compile FFmpeg libraries or other support, even if all the relevant dependent also be compiled on, and still make an error, the main reason is due to the dependence of the library version conflict, called compile time yum automatically download and install when you install the old versions of dependent libraries. At this time it is to remove all the old versions of FFmpeg packages and associated dependencies yum install or re-find a new pure system restart the installation or use of the latest Ubuntu Server Edition, the latest version of Ubuntu Server in general is still relatively new version of FFmpeg directly execute the command sudo apt-get install ffmpeg will automatically install FFmpeg and its dependencies.
2. Love specializes in the subject at hand or no extra machines can only honestly have to uninstall the old software, compile and install from scratch. How to remove the old version of yum to install software? We can use yum deplist command to find all the relevant dependent packages, then uninstall all packages in addition to the public outside the package. This method is also applicable to encounter the same problem when you install other similar software.
yum deplist ffmpeg | grep -v ffmpeg | grep provider | awk '{print $ 2}' | sort -u
Pick from the non-public uninstall package names package:
rpm -e --nodeps a52dec dirac dirac-libs faac gsm lame libtheora opencore-amr SDL x264
rpm -e --nodeps $ (rpm -qa | grep -i ffmpeg) |
|
|
|