CentOS 6.4-64-bit under compile ffmpeg a few simple steps:
1. Pre-compilation environment preparation;
2. Download the source code;
3. compile, install;
-----------------------------------------------
Below is a description of one of the following:
First, install the necessary environment required:
Command line:
# yum Install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
Make sure the machines are networked
# yum Install yasm (You can also do this without installing the compilation)
Second, install the x264 support Library:
Download libx264 source code, unzip the local (verbose ... )
CD into the x264 directory
Command line: #./configure--enable-shared--disable-asm
# make
#make Install
(You can also rely on x264 's static library, after compiling the head file and. A copy to/usr/local/include and Lib)
Third, install the RTMP support library:
Download rtmp source code, unzip the local
CD into the rtmp directory
You can disable the RTMP internal OpenSSL module before compiling:
Edit the Makefile file in the rtmp directory and librtmp directory Note: #CRYPTO =openssl
Then compile rtmp
Command line : # make
# make install
Four, compile and install FFmpeg:
Download FFmpeg source, unzip the local
CD into the FFmpeg directory configuration Configure
Note: In the execution of configure when prompted "Librtmp not found" error, you can comment out the ffmpeg directory configure file:
Note "#enabled librtmp && require_pkg_config librtmp librtmp/rtmp.h rtmp_socket-lws2_32-lwinmm", the line, and other configuration After you manually add the make file.
Compile below:
Command line : #./configure--enable-static--disable-shared--disable-yasm--enable-memalign-hack--ENABLE-GPL-- enable-libx264--enable-librtmp--extra-cflags=-i/usr/local/include--extra-ldflags=-l/usr/local/lib--prefix=/usr /local
Note: If you annotated the above rtmp, you need to manually modify the Config.mak file under the FFmpeg directory:
Find the "extralibs=" item and add the-lrtmp at the end of it
Continue compiling:
Command line : #make
After compiling successfully ffmpeg even if the compilation is complete, you can perform the following./ffmpeg
If you are prompted that the libx264 library cannot be found, you can manually copy the corresponding library from the x264 directory to the/usr/lib/directory and execute the command line: Ldconfig
Installation:
Command line : #make install
CentOS-6.4 compile and install ffmpeg plus x264 and rtmp