FFmpeg is one of open source multimedia framework, can do to decode encode, transcode, mux, demux, stream, filter and play easy way that done by human and machines have created.  It is a very fast conversion of video and audio, resize video, merge subtitle and video,  also can grab from a live audio/video source with high quality polyphase filter. 

We have already discussed install FFmpeg, This post content help to install and configure on another way. 

#yum install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

# yum groupinstall -y "Development Tools"

# # yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig wget opencv zlib-devel dbus-devel lua-devel zvbi libdvdread-devel  libdc1394-devel libxcb-devel xcb-util-devel libxml2-devel mesa-libGLU-devel pulseaudio-libs-devel alsa-lib-devel libgcrypt-devel qt-devel gsm-devel

Set dynamic linked libraries Path for Linux user a system of shared libraries, add the file lines into ld.so.conf file,
 
# vim /etc/ld.so.conf

include ld.so.conf.d/*.conf
/usr/local/lib
/usr/lib
# ldconfig

Create a repository with name of dag.repo and install following package,
 
# vim /etc/yum.repos.d/dag.repo

[dag]
name=DAG RPM Repository
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

 
# rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

# yum install ffmpeg ffmpeg-devel ffmpeg-libpostproc

The following packages are you need to install as you like to conversion format,

LIBOGG:

LIBOGG is open standard container format maintained by the Xiph.Org Foundation.
 
# cd /usr/local/src

# wget http://downloads.xiph.org/releases/ogg/libogg-1.2.2.tar.gz

# tar zxvf libogg-1.2.2.tar.gz

# cd /usr/local/src/libogg-1.2.2

#./configure --enable-static --enable-shared && make clean && make && make install

# ldconfig

LIBVORBIS:
 
# cd /usr/local/src

# cd /usr/local/src

# wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.gz

# tar zxvf libvorbis-1.3.2.tar.gz

# cd /usr/local/src/libvorbis-1.3.2

# ./configure --enable-static --enable-shared && make clean && make && make install

YASM:

Yasm is a software, that helps to be a complete rewrite of the NASM assembler. Download the YASM package by git command,
 
# cd /usr/local/src

# git clone git://github.com/yasm/yasm.git

# cd yasm

# ./autogen.sh

# ./configure

# make

# make install

LIBX264:

x264 is a open source software library for encoding video streams into the H.264/MPEG-4 AVC format.
 
# cd /usr/local/src

# git clone git://git.videolan.org/x264

# cd x264

# ./configure --enable-shared --disable-asm

# make

# make install

Also try with following steps,

How to quickly compile FFmpeg with libx264,
 
# cd /usr/local/src

# git clone git://source.ffmpeg.org/ffmpeg.git

# cd ffmpeg

# ./configure --enable-gpl --enable-libx264

# make

# make install

# ldconfig


AMR:

AMR is a software program,  3GP is a configured  version of the MPEG-4 Part 14 (MP4) container format, developed to reduce storage and bandwidth requirements in order to accommodate mobile phones.
 
#cd /usr/local/src

# wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz

# tar zxf opencore-amr-0.1.2.tar.gz

# cd /usr/local/src/opencore-amr-0.1.2

# ./configure && make clean && make && make install

Freetype-2.6

The FreeType2 package contains a library which allows applications to properly render TrueType fonts. 
 
# cd /usr/local/src

# wget http://downloads.sourceforge.net/freetype/freetype-2.6.tar.bz2

# tar -xf freetype-2.6.tar.bz2 freetype-doc-2.6.tar.bz2 --strip-components=2 -C docs

# cd freetype-2.6

./configure  --disable-static && make

# make install

FAAC:

FAAC is an MPEG-4 and MPEG-2 AAC audio encoder. It's very useful for played back on ipod.  iPod does not support other sound compression.
 
# cd /usr/local/src

# git clone --depth 1 git://github.com/mstorsjo/fdk-aac.git

# cd fdk-aac

# autoreconf -fiv

# ./configure --enable-shared

# make

# make install

Opus:

Opus package helps to compress lossy audio format developed by the internet engineer, particularly comfortable for interactive speech and audio transmission over the Internet.
# cd /usr/local/src

# wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz

# tar -zxvf opus-1.1.tar.gz

# cd opus-1.1

# ./configure --prefix=/usr --disable-static && make

LAME:

LAME is an open source application used to encode audio into the MP3 file format.
 
# cd /usr/local/src

# wget http://downloads.sourceforge.net/project/lame/lame/3.98.4/lame-3.98.4.tar.gz

# tar zxvf lame-3.98.4.tar.gz

# cd lame-3.98.4

# ./configure && make clean && make && make install

FLVTOOL2:

Note : Don't forget to install ruby package,
 
# cd /usr/local/src

# wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz

# tar zxvf flvtool2-1.0.6.tgz

# cd /usr/local/src/flvtool2-1.0.6/

# ruby setup.rb config && ruby setup.rb setup && ruby setup.rb install

 YAMDI:

yamdi stands for Yet Another MetaData Injector and is a metadata injector for FLV files. 
# cd /usr/local/src

# wget  "http://downloads.sourceforge.net/project/yamdi/yamdi/1.4/yamdi-1.4.tar.gz?use_mirror=garr"

# mv yamdi-1.4.tar.gz?use_mirror=garr yamdi-1.4.tar.gz

# tar zxvf yamdi-1.4.tar.gz

# cd yamdi-1.4

# gcc yamdi.c -o yamdi -O2 -Wall  -D_FILE_OFFSET_BITS=647

# cp yamdi /usr/bin/


MPLAYER (MENCODER):
 
# cd /usr/local/src

# wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc4.tar.bz2

# tar jxf MPlayer-1.0rc4.tar.bz2

# cd MPlayer-1.0rc4

# make clean

#./configure && make && make install && ldconfig

Libxvid

Libxvid encoder is supports the MPEG-4 Part 2 format, so that users easily  encode to this format without this library,
 
# cd /usr/local/src

#  wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz 

#  tar xvfz xvidcore-1.3.2.tar.gz 

#  cd xvidcore-1.3.2/build/generic 

# ./configure --enable-libxvid --enable-gpl

#  make

#  sudo make install

Libvorbis
 
# cd /usr/local/src

# wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz

# tar xzvf libvorbis-1.3.3.tar.gz

# cd libvorbis-1.3.3

./configure --enable-shared

# make

# make install

Libvpx:
 
# cd /usr/local/src

# git clone http://git.chromium.org/webm/libvpx.git

# cd libvpx

./configure --enable-shared

# make

# make install


Xvid:
 
# cd /usr/local/src

# wget http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz 

# tar xvfz xvidcore-1.3.2.tar.gz 

# cd xvidcore-1.3.2/build/generic 

# ./configure --prefix=/usr/local 

# make

# make install

Libmad:
 
# cd /usr/local/src

# wget ftp://ftp.mars.org/pub/mpeg/libmad-0.15.1b.tar.gz

# tar zxvf libmad-0.15.1b.tar.gz

# cd libmad-0.15.1b

# ./configure

# make

# make install

libaacplus:
 
# wget http://ffmpeg.gusari.org/uploads/libaacplus-2.0.2.tar.gz

#  tar -xzf libaacplus-2.0.2.tar.gz

# cd libaacplus-2.0.2

#  ./autogen.sh --enable-shared --enable-static

#  make

# make install

# ldconfig

Libass:
 
# yum install libass libass-devel


FFMPEG:
 
Once you have completed all the installation  packages try to configure with FFmpeg,

Download the ffmpeg by git comamnd  and configure it
 
# git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg

./configure --enable-shared --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --extra-libs=-lx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslin --enable-libass --enable-libvpx --enable-zlib --extra-ldflags=-L/usr/local/lib --enable-libx264 

 
# make

# make install

Find out version and installed modules on FFmpeg
 
# ffmpeg -v

Do you want to ensure that the modules has configured with FFmpeg,
 
# ffmpeg -encoders|grep -E "mp3|xvid|aac|gsm|amr|x264|theora|vorbis|libass"

ffmpeg version N-73671-ga39512b-syslin Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
  configuration: --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libfaac --enable-libmp3lame --enable-libtheora --enable-libvorbis --extra-libs=-lx264 --enable-libxvid --extra-cflags=-I/usr/local/cpffmpeg/include/ --extra-ldflags=-L/usr/local/cpffmpeg/lib --enable-version3 --extra-version=syslin --enable-libass --enable-libvpx --enable-zlib --enable-gpl 

  libavutil      54. 28.100 / 54. 28.100
  libavcodec     56. 48.100 / 56. 48.100
  libavformat    56. 40.100 / 56. 40.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 21.100 /  5. 21.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
 V..... libxvid              libxvidcore MPEG-4 part 2 (codec mpeg4)
 V..... libtheora            libtheora Theora (codec theora)
 A..X.. aac                  AAC (Advanced Audio Coding)
 A..... libfaac              libfaac AAC (Advanced Audio Coding) (codec aac)
 A..... libopencore_amrnb    OpenCORE AMR-NB (Adaptive Multi-Rate Narrow-Band) (codec amr_nb)
 A..... libmp3lame           libmp3lame MP3 (MPEG audio layer 3) (codec mp3)
 A..X.. vorbis               Vorbis
 A..... libvorbis            libvorbis (codec vorbis)


How to Configure FFMPEG-PHP:

Download the files from the URL and configure with PHP,
 
# cd /usr/local/src

 # git clone https://github.com/tony2001/ffmpeg-php.git

 # cd ffmpeg-php

 # make clean

 # phpize 

 # ./configure 

 # make

 # make install

 Restart the httpd service,
 
 # /etc/init.d/httpd restart

 Add the ffmpeg.so extesion in php.ini file.
 
# vim /usr/lib/php.ini 


[ffmpeg]
extension=ffmpeg.so
# php -i|grep ffmpeg

ffmpeg
ffmpeg-php version => 0.7.0
ffmpeg-php built on => Feb 11 2014 01:55:27
ffmpeg-php gd support  => enabled
ffmpeg libavcodec version => Lavc56.48.100