First install various decoder
1. lame
Lame-3.99.5.tar.gz
Url: http://sourceforge.net/project/showfiles.php? Group_id = 290 & package_id = 309
The installation method is as follows:
1 tar-zxvf lame-3.99.5.tar.gz
2 cd lame: 3.99.5
3./configure -- enable-shared
4 make
5 make install
2. libogg
Libogg-1.3.1.tar.gz
Url: http://www.xiph.org/downloads/
The installation method is as follows:
1./configure
2 make
3 make install
3. libvorbis
Libvorbis-1.3.3.tar.gz
Url: http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
(Libvorbis depends on libogg, so libogg must be installed before libvorbis)
The installation method is as follows:
1./configure
2 make
3 make install
4. xvid
Xvidcore-1.3.2.tar.gz
Url: http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz
The installation method is as follows:
1 tar zvxf xvidcore-1.3.2.tar.gz
2 cd xvidcore-1.3.2/build/generic
3./configure4 make
5 make install
5. x264
Latest_x264.tar.bz2 (the directory contained is a x264-snapshot-20131023-2245)
Url: http://www.videolan.org/developers/x264.html
Ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
The installation method is as follows:
Tar-jxvf latest_x264.tar.bz2
./Configure
Make
Make install
In addition, if you encounter a yasm error, you need to install yasm as follows:
# Cd/usr/local/src/video
# Wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
# Tar xzvf yasm-0.7.1.tar.gz
# Cd yasm-0.7.1
#./Configure-prefix =/usr/local/yasm
# Make & make install
6. libdts
Libdca-0.0.5.tar.bz2
Url: http://www.videolan.org/developers/libdca.html
Installation method:
1 tar-jxvf libdca-0.0.5.tar.bz2
2 cd libdca-0.0.5
3./configure
4 make
5 make install
7. a52
A52dec-0.7.4.tar.gz (This library has not been updated since 2002)
Http://liba52.sourceforge.net/downloads.html
Installation method:
1./configure
2 make
3 make install
8. faad2
Faad2-2.7.tar.gz (file to select this extension)
Http://www.audiocoding.com/downloads.html
Installation method
1 autoreconf-vif
2./configure -- with-mp4v2 -- enable-shared
3 make
4 make install
9. faac
Faac-1.28.tar.gz (file to select this extension)
Http://www.audiocoding.com/downloads.html
Installation method:
1 tar zxvf faac-1.28.tar.gz
2 cd faac-1.28
3./bootstrap
4./configure
5 make
6 make install
10. amr-nb
Amrnb-10.0.0.0.tar.bz2
Http://ftp.penguin.cz/pub/users/utx/amr/ (from here download the latest version)
Installation method:
1./configure
2 make
3 make install
11. amr-wb
Amrwb-7.0.0.1.tar.bz2
Http://ftp.penguin.cz/pub/users/utx/amr/ (from here download the latest version)
Installation method:
1./configure
2 make
3 make install
12. The most critical step is to install ffmpeg
. /Configure -- enable-shared -- prefix =/usr/local/ffmpeg2 -- enable-libmp3lame -- enable-libvorbis -- enable-gpl -- enable-version3 -- enable-nonfree -- enable-pthreads -- enable-libfaac -- enable-libopencore-amrnb -- enable-libopencore-amrwb -- enable-libx264 -- enable-libxvid
-- Enable-postproc -- enable-ffserver -- enable-ffplay
Make
Make install
Then I encountered a new problem: "error while loading shared libraries: xxx. so. x
Solution see http://blog.csdn.net/sahusoft/article/details/7388617
After the installation is complete, the bin, include, share, and lib directories are displayed in/usr/local/ffmpeg2 to verify that ffmpeg is successfully installed, /usr/local/ffmpeg2/bin/ffmpeg-help (note the absolute path here)
Because the PATH/usr/local/ffmpeg2/bin is not added to $ PATH, the permanent addition method is as follows:
# Vim/etc/profile
Add PATH = $ PATH:/usr/local/ffmpeg2/bin
After editing, execute source profile in the/etc directory.
You can solve other similar errors in the same way! _ ^ Solution: ln-s/usr/local/lib/libx264.so. 142/usr/lib/libx264.so. 142 when I reported an error: ffmpeg: error while loading shared libraries: libx264.so. 142 cannot open shared object file: No such file or director