It is almost two weeks, I have started working on something which requires ffmpeg-php extensions. Downloaded some classes, none of them worked, because I was using windows platform, and ffmpeg decoders still don't like to work with windows. Oh, I have to go back linux again. Sarmed Vai suggested me to test linux at Oracle VirtualBox. That helped me a lot, because I had to install, re-install and uninstall different distributions of linux, direct installation could make my pc gone-forever.
Ubuntu couldn't help, it's not completely perfect for server things, but for personal use, it's awesome. And there is another version may be exist which is for making a server, but I had no cd of that. Gave up after multiple trial, then downloaded CentOS (again suggested by Sarmed Vai).
I had to install apache (httpd), php, mysql etc, and also ffmpeg, I am now going to tell you how I tried to install ffmpeg in CentOS.
Tried the following commands at terminal:
cd ~
mkdir ffmpeg
wget http://dfn.dl.sourceforge.net/sourceforge/ffmpeginstall/ffmpeginstall.3.2.1.tar.gz
tar zxf ffmpeginstall.3.2.1.tar.gz
cd ffmpeginstall.3.2.1
./install
I saw many things on screen, but don't know if it is really done. Just tested some functions, but couldn't see any progress. I quit. I did this procedure for multiple times, and in different distros. Now, I should to wait for a help.
I think I have to think about windows again. Let me do some search in google, found some posts, but not sure if they can help me.
It didn't help, followed the complete procedure, but it's not working. It's a nightmare for me, I lost lots of hours for doing this, and could not make it, Dhaaaaatt....
Thanks to Muntasir Rashid, he just have given me a ffmpeg-php enabled hosting. Just checked a function for making a thumbnail from a video, and wow! it is created successfully. Now, I have to make a video from set of pictures.
Got another way to install ffmpeg-php in my CentOS server.
Already did the following procedures:
1. Added a file: "/etc/yum.repos.d/dag.repo" with following contents to add a 3rd party yum repository:
[dag]
name=DAG RPM Repository
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
2. Ran following commands:
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
wget http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
rpm --import RPM-GPG-KEY.dag.txt
3. Tested the setup using the following command:
rpm -q gpg-pubkey-*
Got some multiple line output like: gpg-pubkey-e8562897-459f07a4
4. Then updated "yum" by the command: yum update
5. Installed ffmpeg using the command: yum install ffmpeg ffmpeg-devel
6. Downloaded and installed ffmpeg-php using the following command:
wget http://sourceforge.net/projects/ffmpeg-php/files/ffmpeg-php/0.6.0/ffmpeg-php-0.6.0.tbz2/download
tar -xjf ffmpeg-php-0.6.0.tbz2
cd ffmpeg-php-0.6.0
7. Some geniuses think there is an error in the file "ffmpeg_frame.c", I replaced all "PIX_FMT_RGBA32" patterned text into "PIX_FMT_RGB32". Hope, it will work.
8. Then I had to configure ffmpeg-php using the following command:
phpize
./configure && make
make install
Here, I had to fall in a situation. phpize command doesn't work. I tried to install php-devel by the command "yum install php-devel" and after it's installation, "phpize" command worked.
Then, I had to add the extension to /etc/php.ini by adding the following line:
extension=ffmpeg.so
Now, I have to check if it really works.
Alhamdulillah, it works.