Question

I've been trying this for a couple of days now. I am trying to install ffmpeg-php on my CentOS server.

  • OS : CentOS 6
  • PHP : 5.5
  • ffmpeg : 1.2.1
  • ffmpeg-php : 0.6.0

The ffmpeg installation went on without a hitch and I am able to convert files back and forth via the CLI.

While installing ffmpeg-php, I encountered errors while making (after configuring) due to time.h references which was corrected by renaming the files creating with an extension .loT to .lo (as rightly pointed out here)

Once this was done, the make process went on smoothly and the make install went through without a hitch. However, after specifying the extension=ffmpeg.so in the php.ini file and after restarting Apache, the module doesn't load or show up in phpinfo().

The Apache error log shows only "PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'ffmpeg.so' in Unknown on line 0" and nothing else.

make test also shows the same error and FAILS the associated tests. I've checked here which wasn't very helpful. Also, I read somewhere that it may be the issue with permissions but the permissions for the ffmpeg.so file is 755.

Any help is appreciated.

Thanks in advance.

Was it helpful?

Solution

After looking up for hours, it seems that time.h for some apparent reason has been used in ffmpeg 1.2.1 (this is what I tested). This caused conflict with the OS's own file of the same name. This causes the installation to break in CentOS 6.x, RHEL 5.6 and RHEL 6.x

While I cannot code in PHP (and can barely read PHP code), I have found a git repo maintained by tony2001 who has made changes to the original project and using his repo has helped me install it successfully on CentOS-6.2, CentOS-6.3 and CentOS-6.4.

You can find the repo here. This seems to solve the issues in CentOS 6.x, RHEL 5.6 and RHEL 6.x.

Hope this helps anyone else trying this in the future (and maybe someone else who lands up here eventually)

PS: Incidentally, at the time of writing this answer ffmpeg 2.0 has been released but I haven't got a chance to test it yet

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top