FFMPEG is a very useful tool for fast video audio converter and  its produce high quality videos.  It can also convert between different types format and resize video with high quality polyphase filter.

Install FFMPEG package in centos / RHEL :

Download the ffmpeg packages using wget command and extract tar file.

# wget http://www.ffmpeg.org/releases/ffmpeg-2.2.1.tar.gz

# tar -xf ffmpeg-2.2.1.tar.gz

# cd ffmpeg-2.2.1

# mkdir tmp

# export TMPDIR=/usr/local/ffmpeg/tmp

# mv ffmpeg-2.2.1 /usr/local/ffmpeg

# ./configure
yasm/nasm not found or too old. Use --disable-yasm for a crippled build.

You may get an error while configuring packages like "--disable-yasm", yasm  package does not installed in your server, so want to install using yum command.
 
#  yum install yasm

---> Package yasm.x86_64 0:1.1.0-1.el6.rf will be installed
--> Finished Dependency Resolution
.....
Dependencies Resolved
===========================================================
 Package        Arch          Version       Repository            Size
===========================================================
Installing:
 yasm            i386          0.7.1-1.el5       epel                   253 k

Transaction Summary
===========================================================
...

Now, try to install again,
 
#  ./configure

install prefix            /usr/local
source path               .
C compiler                gcc
C library                 glibc
ARCH                      x86 (generic)
big-endian                no
runtime cpu detection     yes
.........
# make && make install

FFMPEG installed location is,
 
# whereis ffmpeg

/usr/local/bin/ffmpeg /usr/local/ffmpeg

Do you need to create soft link just execute the below command,
 
#  ln -s /usr/local/bin/ffmpeg /usr/bin/ffmpeg

Ubuntu and Debian :
 
#sudo apt-get update

# sudo apt-get install ffmpeg

To find out FFMPEG version:
 
# ffmpeg -version

ffmpeg version 2.2.1
built on Feb  5 2015 15:47:25 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-11)
configuration:
libavutil      52. 66.100 / 52. 66.100
libavcodec     55. 52.102 / 55. 52.102
libavformat    55. 33.100 / 55. 33.100
libavdevice    55. 10.100 / 55. 10.100
libavfilter     4.  2.100 /  4.  2.100
libswscale      2.  5.102 /  2.  5.102
libswresample   0. 18.100 /  0. 18.100


Error:

If you may get an error while configuring package in server, create tmp directory and set path TMPDIR.
 
# ./configure

Unable to create and execute files in /var/tmp.  Set the TMPDIR environment
variable to another directory and make sure that it is not mounted noexec.
Sanity test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.

Solution:
 
# mkdir /usr/local/ffmpeg/tmp

# export TMPDIR=/usr/local/ffmpeg/tmp

# ./configure