Reputation: 1135
I am trying to install ffmpeg onto my localhost server. I have followed countless blogs and tutorials online form other people who are stuck with this same problem. I follow everything to the letter.
As it says however when I do this I get this error when I start apache.
Fair play but it is in the folder
I also get this error as well:
And Again, here it is:
I have added the extention to my php.ini file
extension=php_ffmpeg.dll
The first time I go this to work I placed the ffmpeg.exe file onto my local host server and ran commands like this:
$cmd = "$ffmpegpath -i $input -an -ss $sec -s $size $output";
shell_exec($cmd);
This works fine on my computer but not on an actual server. Could somebody offer some advice or guidene on where I have one wrong installing the extension or why running the .exe file on a lunix server with shell_exec doesn't work
Upvotes: 0
Views: 3414
Reputation: 46602
Yeah ive had problems with the extension version, with windows. I found it is much easier to not use the PHP extension and just call the standard FFMPEG for windows binary with exec() within a simple class, ive added an example script. It will be trivial for you to add a ffmpeg_convert()
method to the class.
Just noticed this statement,
Could somebody offer some advice or guidene on where I have one wrong installing the extension or why running the .exe file on a lunix server with shell_exec doesn't work
Linux has its own versions of FFMPEG, you cant mix the two. Your need to install FFMPEG on linux with something like:
sudo apt-get -qqy php5-ffmpeg
And change the path to FFMPEG in your cmd to, leaving out the .exe part:
ffmpeg -i $input -an -ss $sec -s $size $output
Hope it helps
Upvotes: 1