Compile FFMpeg in Linux-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Environment: RedHat AS4
1. Obtain ffmpeg first
Download through svn:
Download the SVN client from the http://subversion.tigris.org.
First install the subversion to ensure that apr and apr-util are installed.
Tar zvxf subversion-1.3.2.tar.gz
Cd subversion-1.3.2
./Configure -- with-apr =/usr/local/apr-httpd -- with-apr-util =/usr/local/apr-util-httpd/
Make; make install
At this point, we can use the svn command to obtain the latest ffmpeg.
You will find that an ffmpeg directory automatically appears in your directory, which is the source code you downloaded. We cannot compile ffmpeg so quickly. We need to do some preliminary work if we want ffmpeg to support conversion of more formats.
2. mp3 is supported. linux is of course lame. Download and decompress it.
Cd lame-3.96.1
./Configure -- enable-shared -- prefix =/usr
Make; make install
We recommend that you install it in/usr by default. In this way, ffmpeg compilation can smoothly find library files.
3. Support for Ogg Vorbis:
As4 comes with the corresponding rpm package. You can install the following rpm package
Libvorbis, libvorbis-devel, libogg, libogg-devel
4. Supports xvid x264. Currently, the two most popular high quality compression formats
Xvid compilation and Installation
Wget http://downloads.xvid.org/downloads/xvidcore-1.1.0.tar.gz
Tar zvxf xvidcore-1.1.0.tar.gz
./Configure -- prefix =/usr
Make; make install
The method for obtaining x264 is also svn.
Svn co svn: // svn.videolan.org/x#/trunk x264
Cd x264
./Configure -- prefix =/usr -- enable-shared
Make; make install
5. Support for AC3 and dts Encoding
The as4 system seems to have supported ac3 encoding, as long as the -- enable-a52 -- enable-gpl parameter is added during compilation.
Libdts compilation Parameters
./Configure -- prefix =/usr
Make; make install
6. Support for the mpg4 aac format. Because the server is still targeting mobile user services, we also need to do the support for aac and mpg4 ringtone formats. Here we can install faad2 and faac.
Please download to http://www.audiocoding.com/modules/mydownloads/
FAAD2 Compilation
Cd faad2
Autoreconf-vif
./Configure -- prefix =/usr -- with-mp4v2 -- enable-shared
Make; make install
Faac Compilation
Cd faac
Chmod + x bootstrap
./Bootstrap
./Configure -- prefix =/usr -- with-mp4v2 -- enable-shared
Make; make install
7. Support for 3gp format, which is also supported by many mobile phones. Because mobile phone users are our main users, compilation must be supported.
Add -- enable-amr_nb -- enable-amr_wb parameters when compiling, according to the prompts of the compilation system, so we have to download some files required to compile 3gp.
About 3gp compilation, If You Want To compile -- enable-amr_nb-fixed, it can not be compiled with -- enable-amr_nb at the same time, I do not know the difference between the two in the end, it seems that fixed is a revision, regardless of him, compilation Method:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service