To install ffmpeg library in a LAMP environment is very easy. We can do this within few steps as explained below.
1) Open the Terminal and enter the following commands in the order, they are specified.
2) sudo apt-get install ffmpeg
3) sudo apt-get install ffmpeg libavcodec-extra-52
To verify the installation put the following code in a php file which should be located in web root path of your web server.
Check the output of the above code by accessing that php file through the browser and do search with word ffmpeg.