What is FFmpeg?
FFmpeg is an open source, free cross-platform video and audio streaming solution that belongs to free software, with a LGPL or GPL license (depending on the component you choose). It provides a complete solution for recording, converting, and streaming audio and video. It contains a very advanced audio/video codec library Libavcodec, in order to ensure high portability and codec quality, Libavcodec Many codec are developed from scratch.
FFmpeg is developed under the Linux platform, but it can also be compiled and run in other operating system environments, including Windows, Mac OS x.
FFmpeg is an open-source computer program that can be used to record, convert digital audio, video, and turn it into a stream. It includes the current leading audio/video coding library Libavcodec.
What is Jave?
The JAVE (Java Audio Video Encoder) class library is a Java language wrapper for a ffmpeg project. Developers can use Jave to convert video and audio between different formats. For example, the AVI into MPEG animation, and so on ffmpeg can be done in the JAVE have a corresponding method.
Because of the project needs, today found a lot of information on the server installed FFmpeg, the middle encountered a lot of problems, it will install the process and the problems encountered in a record, convenient next installation.
Linux system version:
LSB Version:: core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64: Printing-4.0-noarch
Distributor Id:centos
Description:centos Release 6.2 (Final)
release:6.2
Codename:final
Download the required package:
Lame-3.99.5.tar.gz
: http://download.csdn.net/detail/tonylllz/8130303
Libogg-1.1.3.tar.gz
: http://download.csdn.net/detail/tonylllz/8140185
Libvorbis-1.1.2.tar.gz
: http://download.csdn.net/detail/tonylllz/8140981
Xvidcore-1.1.3.tar.gz
: http://download.csdn.net/detail/tonylllz/8130305
Yasm-1.2.0.tar.gz
: http://download.csdn.net/detail/tonylllz/8141119
last_x264.tar.bz2
: http://download.csdn.net/detail/tonylllz/8130309
Libdca-0.0.2.tar.gz
: http://download.csdn.net/detail/tonylllz/8140985
A52dec-0.7.4.tar.gz
: http://download.csdn.net/detail/tonylllz/8141129
Faad2-2.7.tar.gz
: http://download.csdn.net/detail/tonylllz/8141143
Faac-1.26.tar.gz
: http://download.csdn.net/detail/tonylllz/8141153
amrnb-11.0.0.0.tar.bz2
: http://download.csdn.net/detail/tonylllz/8141183
amrwb-11.0.0.0.tar.bz2
: http://download.csdn.net/detail/tonylllz/8141001
ffmpeg-2.4.3.tar.bz2
: http://download.csdn.net/detail/tonylllz/8130313
The first thing to install a variety of decoders
1, lame
Package: lame-3.99.5.tar.gz
Installation Step instruction:
<!-- lang: shell -->tar zxvf lame-3.99.5.tar.gz
CD lame-3.99.5
./configure–enable-shared–prefix=/usr
Make
Make install
2, Libogg
Package: libogg-1.1.3.tar.gz
Installation Step instruction:
<!-- lang: shell -->tar zxvf libogg-1.1.3.tar.gz
CD libogg-1.1.3
./configure–prefix=/usr
Make
Make install
3, Libvorbis
Package: libvorbis-1.1.2.tar.gz
Installation Step instruction:
<!-- lang: shell -->tar zxvf libvorbis-1.1.2.tar.gz
CD libvorbis-1.1.2
./configure–prefix=/usr
Make
Make install
4, XviD
Package: xvidcore-1.1.3.tar.gz
Installation Step instruction:
<!-- lang: shell -->tar zxvf xvidcore-1.1.3.tar.gz
CD Xvidcore-1.1.3/build/generic
./configure–prefix=/usr
Make
Make install
5, x264
When installing x264, the system prompts the configuration to be unsuccessful when the environment is configured because x264 needs to be compiled with Yasm and the yasm version is at least 1.2
So we need to install Yasm first.
Yasm Bag: yasm-1.2.0.tar.gz
To install yasm steps:
<!-- lang: shell -->cd /usr/local/bin
mkdir yasm
CD-
Tar zxvf yasm-1.2.0.tar.gz
CD yasm-1.2.0
./configure–prefix=/usr/local/bin/yasm path= $PATH:/usr/local/bin/yasm/bin
Make
Make install
After the YASM installation is complete, we start to install the x264
x264 Bag: last_x264.tar.bz2
<!-- lang: shell -->tar jxvf last_x264.tar.bz2
CD x264-snapshot-20141105-2245
./configure–prefix=/usr–enable-shared–disable-asm
Make
Make install
6, LIBDCA
Package: libdca-0.0.2.tar.gz
Installation Step instruction:
<!-- lang: shell --> tar zxvf libdca-0.0.2.tar.gz cd libdca-0.0.2 ./configure --prefix=/usr make make install
7, A52
Package: a52dec-0.7.4.tar.gz
Installation Step instruction:
<!-- lang: shell -->tar zxvf a52dec-0.7.4.tar.gz
CD a52dec-0.7.4
./configure–prefix=/usr
Make
Make install
8, Faad2
Package: faad2-2.7.tar.gz
Installation Step instruction Faac-1.26.tar.gz
<!-- lang: shell -->tar zxvf faad2-2.7.tar.gz
CD faad2-2.7
Autoreconf-vif
./configure–prefix=/usr–with-mp4v2–enable-shared
Make
Make install
9, FAAC
Package: faac-1.26.tar.gz
Installation Step instruction:
<!-- lang: shell -->tar zxvf faac-1.26.tar.gz
CD FAAC
./bootstrap
./configure–prefix=/usr
Make
Make install
10, AMR-NB
Package: amrnb-11.0.0.0.tar.bz2
Installation Step instruction:
<!-- lang: shell -->tar jxvf amrnb-11.0.0.0.tar.bz2
CD amrnb-11.0.0.0
./configure–prefix=/usr–enable-shared
Make
Make install
11, AMR-WB
Package: amrwb-11.0.0.0.tar.bz2
Installation Step instruction:
<!-- lang: shell -->tar zxvf amrwb-11.0.0.0.tar.bz2
CD amrwb-11.0.0.0
./configure–prefix=/usr
Make
Make install
When the above decoder is complete, we start to install FFmpeg
Package: ffmpeg-2.4.3.tar.bz2
Installation Step instruction:
<!-- lang: shell -->tar zxvf ffmpeg-2.4.3.tar.bz2
CD ffmpeg-2.4.3
./configure–prefix=/usr–enable-gpl–enable-shared–enable-libmp3lame–enable-libvorbis–enable-libopencore-amrnb– Enable-libopencore-amrwb–enable-version3
If the configuration indicates that the current system's YASM version is too low, add –disable-yasm
That is:./configure–prefix=/usr–enable-gpl–enable-shared–enable-libmp3lame–enable-libvorbis–enable-libopencore-amrnb –enable-libopencore-amrwb–disable-yasm–enable-version3
Make
Make install
During the manual installation process, I encountered a: Error:libopencore_amrnb not found at compile time. But no matter I use Yum or other methods, there is no way to install the LIBOPENCORE-AMRNB and LIBOPENCORE-AMRWB package, so I chose to install the ffmpeg with Yum, and I found that when the Yum installed the two packages are downloaded successfully, Want to have to know how to solve the friend you leave a message ~ Of course you can install through Yum after the re-manual configuration installed into the FFmpeg configuration you need.
Here, some people can install the ffmpeg directly using Yum,
① Open Vim/etc/yum.repos.d/dag.repo
Add the following:
<!-- lang: shell -->dag]
Name=dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
Gpgcheck=1
Enabled=1
② Installation Instructions
<!-- lang: shell --> [[email protected] yum.repos.d]# yum install ffmpeg ffmpeg-devel Is this ok [y/N]: y [[email protected] yum.repos.d]# yum install ffmpeg ffmpeg-devel mencoder mplayer flvtool2 lame ffmpeg-php Is this ok [y/N]: y
The advantage of installing FFmpeg by manually compiling runs is that you can configure the parameters as needed.
After the installation is complete, we can execute the instructions to try.
/usr/bin/ffmpeg-i/linling1/austin/4b51d1cbfdf34f4fa7283cfc7310eb36_0.3gpp-f Mp3-acodec libmp3lame/linling1/ Austin/4b51d1cbfdf34f4fa7283cfc7310eb36_f.mp3
If prompted when executing the instruction:
Ffmpeg:error while loading shared libraries:libavdevice.so.53
This is because the program cannot find the shared library file according to the default shared library path, just perform the next ldconfig instruction
This article refers to:
http://yezi.iteye.com/blog/139399
Http://blog.chinaunix.net/uid-26212859-id-3256667.html
http://blog.csdn.net/dyllove98/article/details/8892487
Complete installation of ffmpeg (including various decoders) under Linux