The above reply would bring you the apt solution. You just have to download the package for FFMpeg according to your Linux distributions and do further configurations.
Your modules are now copied to the default location of PHP modules and now you can add the ffmpeg by enabling it in the server. Finally, do the confirmation of the FFMpeg module added.
For more on FFMpeg, you can also check out Hioxindia