Pages

Sunday, August 18, 2013

Install FFmpeg and ffmpeg-php on CentOS

1. Create and open a new file called /etc/yum.repos.d/dag.repo.

vi /etc/yum.repos.d/dag.repo“.

2. Add the following text to the file:
[dag]
name=DAG RPM Repository
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1 
Finally, save and close the file.

3. In order to successfully use the DAG repository with tools such as yum, you need to add DAG’s GPG key.

Failure to do so will result in an error like the following: warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID 6b8d79e6 Public key for faac.x86_64.1.26-1.el5.rf.rpm is not installed 

4. In order to add the GPG key for DAG, run the following:
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt

5. Now that DAG is setup, it’s a good idea to update all your packages.

yum update

6. Search for ffmpeg package

yum search ffmpeg

7. Install package with depencdecy packages

yum install ffmpeg ffmpeg-devel ffmpeg-libpostproc

8. There are four things that are required to successfully install and run ffmpeg-php; they are:
  • ffmpeg-0.4.9_pre1 or higher
  • php-4.3.0 or higher
  • gd-2.0 or higher
  • php-devel
PHP and FFmpeg should be good to go since at the time of this writing, DAG has PHP version 5.1.6 and FFmpeg version 0.4.9. GD and php-devel can be easily installed by running the following yum command:
yum install php-gd php-devel
 
Installing ffmpeg-php

Now we are ready to install ffmpeg-php.
This can be done in six easy steps:

1. Download the latest ffmpeg-php release
2. Extract the archive: tar -xjf ffmpeg-php-X.x.x.tbz2
3. cd ffmpeg-php-X.x.x/
4. phpize
5 ./configure & & make
6 sudo make install

1 comment:

  1. I'm trying to do install the DAG key but when I access http://apt.sw.be/RPM-GPG-KEY.dag.txt I get 404 file not found. Is there a new location for this?

    ReplyDelete