Install FFmpeg

This tutorial is intended for Centos/Redhat versions

Installing FFMpeg

# yum install ffmpeg ffmpeg-devel

If you get package not found, then you will need to add few lines in the yum repository for dag packages installation. Create a file named dag.repo in /etc/yum.repos.d with the following contents on it

name=Dag RPM Repository for Red Hat Enterprise Linux

Then run
# yum install ffmpeg
# yum install ffmpeg-devel

If everything is fine, then the installation should proceed smoothly. If not you will get something like warning GPG public key missing

To fix rpmforge GPG key warning:
rpm -Uhv

You can then run # ffmpeg -formats to verify it’s working.

Install FFMPEG-PHP Extension

You can download the source tarball :

tar -xjf ffmpeg-


make install

1. If you get command not found error for phpize, then you will need to do yum install php-devel
2. If you get error like "ffmpeg headers not found" while configuring the source.
configure: error: ffmpeg headers not found. Make sure ffmpeg is compiled as shared libraries using the –enable-shared option

then it means you have not installed ffmpeg-devel packages.
To Fix: Just install ffmpeg-devel using
# yum install ffmpeg-devel

After it’s done, add the following to php.ini file:

refer URL:


- has written 121 posts.

Leave a Reply

You must be logged in to post a comment.