How to install ffmpeg for PHP

The easiest solution is to download an already compiled ffmpeg binary/executable and point your script to it. On the FFmpeg Download page refer to the Get the packages section for links to recent static builds for Linux, Windows, and macOS.

You can use shell_exec() as shown in FFmpeg Wiki: PHP and provide the full path to the downloaded binary.


Maybe too late, But here is a updated solution:

Install the lib in your Operating System https://www.vultr.com/docs/how-to-install-ffmpeg-on-debian-8-or-9

Install for PHP 7.x via composer https://github.com/PHP-FFMpeg/PHP-FFMpeg