[英]How to install ffmpeg using xampp
I am trying to install ffmpeg onto my localhost server. 我正在尝试将ffmpeg安装到我的本地主机服务器上。 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. 正如它说的那样,当我这样做时,我在启动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 我已将扩展名添加到我的php.ini文件中
extension=php_ffmpeg.dll
延长= 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: 第一次使用该工具时,我将ffmpeg.exe文件放到了本地主机服务器上,并运行了以下命令:
$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
有人可以为我在哪里安装扩展程序有错误,或者为什么用shell_exec在lunix服务器上运行.exe文件不起作用提供一些建议或指导。
Yeah ive had problems with the extension version, with windows. 是的,我在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.
我发现不使用PHP扩展名要容易得多,只需在一个简单的类中用exec()调用Windows二进制文件的标准FFMPEG,就可以了。 It will be trivial for you to add a
ffmpeg_convert()
method to the class. 将
ffmpeg_convert()
方法添加到类中对于您来说将是微不足道的。
VideoThumbNailer.example.zip VideoThumbNailer.example.zip
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
有人可以为我在哪里安装扩展程序有错误,或者为什么用shell_exec在lunix服务器上运行.exe文件不起作用提供一些建议或指导。
Linux has its own versions of FFMPEG, you cant mix the two. Linux有其自己的FFMPEG版本,您不能将两者混合使用。 Your need to install FFMPEG on linux with something like:
您需要在Linux上安装FFMPEG,例如:
sudo apt-get -qqy php5-ffmpeg
And change the path to FFMPEG in your cmd to, leaving out the .exe part: 然后将cmd中的FFMPEG路径更改为,省略.exe部分:
ffmpeg -i $input -an -ss $sec -s $size $output
Hope it helps 希望能帮助到你
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.