php 在 XAMPP 上安装 FFMPEG
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5977448/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Install FFMPEG on XAMPP
提问by user750477
I have installed xampp 1.7.4 with php version 5.3.5 on windows xp. How to install ffmpeg in xampp with php 5.3.5 on windows xp?
我已经在 windows xp 上安装了 xampp 1.7.4 和 php 版本 5.3.5。如何在 windows xp 上使用 php 5.3.5 在 xampp 中安装 ffmpeg?
采纳答案by Imran Khan
You can follow steps from hereor do the following steps.
您可以按照此处的步骤操作或执行以下步骤。
- Download ffmpeg from here: https://ffmpeg.org/download.html
- Copy php_ffmpeg.dll from the php5 folder to the C:\wamp\bin\php\php5.2.9-2\ext
- Copy files from common to the windows/system32 folder
- Add extension=php_ffmpeg.dll to php.ini file ( \apache...php.ini )
- Restarted all services (Apache, PHP...)
- 从这里下载 ffmpeg:https: //ffmpeg.org/download.html
- 将php_ffmpeg.dll从php5文件夹复制到C:\wamp\bin\php\php5.2.9-2\ext
- 将文件从 common 复制到 windows/system32 文件夹
- 将 extension=php_ffmpeg.dll 添加到 php.ini 文件( \apache...php.ini )
- 重新启动所有服务(Apache、PHP...)
And enable "extension=php_ffmpeg.dll" directive in your php.ini.
并在 php.ini 中启用“extension=php_ffmpeg.dll”指令。
回答by Jake
Sodobni-mediji.si's method worked, but some things need to be clarified.
Sodobni-mediji.si 的方法有效,但有些事情需要澄清。
Download: https://rapidshare.com/#!download|934l34|422916798|php_ffmpeg_v0.6.0_for_PHP_5.3.1.rar
下载地址:https: //rapidshare.com/#!download| 934l34|422916798|php_ffmpeg_v0.6.0_for_PHP_5.3.1.rar
- unzip
- copy ffmpeg.exe somewhere and remember the path for later use
- move php_ffmpeg.dll to php extension dir (usually c:\xampp\php\ext)
- move all other files to Windows\System32 (except COPYING.GPLv3.txt, readme.txt)
- add extension=php_ffmpeg.dll to php.ini (usually c:\xampp\php\php.ini)
- restart apache with fingers crossed
- questions/answers http://www.apachefriends.org/f/viewtopic.php?f=16&t=41913
- 解压
- 将ffmpeg.exe复制到某处,记住路径以备后用
- 将 php_ffmpeg.dll 移动到 php 扩展目录(通常是 c:\xampp\php\ext)
- 将所有其他文件移动到 Windows\System32(COPYING.GPLv3.txt、readme.txt 除外)
- 将 extension=php_ffmpeg.dll 添加到 php.ini (通常是 c:\xampp\php\php.ini)
- 用手指交叉重启apache
- 问题/答案http://www.apachefriends.org/f/viewtopic.php?f=16&t=41913
If you are using windows 64bit, you will also need to to copy all of those dll files to C:\Windows\SysWOW64 along with C:\Windows\System32.
如果您使用的是 Windows 64 位,您还需要将所有这些 dll 文件与 C:\Windows\System32 一起复制到 C:\Windows\SysWOW64。
You will probably have problems with toGdImage(), I have no idea how to fix this...
你可能会遇到 toGdImage() 的问题,我不知道如何解决这个问题......
回答by Ashu
If above solution not working, one thing you can do is as below:
如果上述解决方案不起作用,您可以做的一件事如下:
- Go to this url: http://ffmpeg.zeranoe.com/builds/
- Download 32 or 64 bit (as per your system) static FFMPEG.
- After download you can see "ffmpeg.exe' file, copy and paste this file in your xampp directory. (e.g. C:\xampp)
- Then, set "C:\xampp" this path in your application.
- Enjoy..
- 转到此网址:http: //ffmpeg.zeranoe.com/builds/
- 下载 32 位或 64 位(根据您的系统)静态 FFMPEG。
- 下载后你可以看到“ffmpeg.exe”文件,把这个文件复制粘贴到你的xampp目录下。(比如C:\xampp)
- 然后,在您的应用程序中设置“C:\xampp”这个路径。
- 享受..
回答by Sodobni-mediji.si
Go to apachefriends.orgYou will find a link to ffmpeg 0.6.0 for php 5.3.1 there.
转到apachefriends.org您会在那里找到 ffmpeg 0.6.0 for php 5.3.1 的链接。
- Copy php_ffmpeg.dll to xampp\php\ext.
- Copy ffmpeg.exe into root of your site or anywhere else as long you know where (you will have to define path to it in your php file)...
- Copy everything else to windows/system32.
- Add "extension=php_ffmpeg.dll" or remove ";" on the beginning of that line in php.ini file (xampp\php\php.ini )
- Restart apache server... and voila :)
- 将 php_ffmpeg.dll 复制到 xampp\php\ext。
- 将 ffmpeg.exe 复制到您网站的根目录或其他任何地方,只要您知道在哪里(您必须在您的 php 文件中定义它的路径)...
- 将其他所有内容复制到 windows/system32。
- 添加“extension=php_ffmpeg.dll”或删除“;” 在 php.ini 文件 (xampp\php\php.ini ) 中该行的开头
- 重新启动 apache 服务器……瞧:)
It worked for me on PHP 5.3.1 and 5.3.5 :) I found this on apachefriends.org
它在 PHP 5.3.1 和 5.3.5 上对我有用:) 我在apachefriends.org上找到了这个
Good luck :)
祝你好运 :)