Install FFMPEG on WAMP

2019-06-09 11:26发布

问题:

I've probably spent over 12 hours trying to install FFMPEG on WAMP. I'm aware that other people have had this question answered on this site, however it does not work for my setup.

I have tried the below:

Download ffmpeg_new
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
Restarted all services (Apache, PHP...)

My current setup is PHP 5.2.1, Apache 2.0.63. I have a Windows 7 64bit computer.

I get the following error in my PHP error log:

[22-Jun-2012 01:39:31] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.2.1/ext/php_ffmpeg.dll' - The specified module could not be found. in Unknown on line 0

Obviously I have placed the module in the ext folder.

Phpinfo.php verifies that the FFMPEG module is not being loaded. I have tried installing PHP 5.3 (with a later FFMPEG version), 5.2.6 and 5.2.9-2, but the module still fails to load. Is there anything else I should try? Does having a 64bit Windows 7 computer make any difference?

回答1:

Yes, having a 64-bit computer may make a difference. Try putting the "common" files in C:\Windows\SysWow64 instead of system32.

If that doesn't work, try using DependencyWalker to check the missing DLLs (open php_ffmpeg.dll with it)



回答2:

Steps to install ffmpeg:

  1. activate GD2 Php Extension

  2. Download ffmpeg.exe (www.ffmpeg.org)

  3. Unpack the downloaded zip file. There will be three files inside: ffmpeg.exe, ffplay.exe, and pthreadGC2.dll

  4. Download the FFMPEG windows dll files from

  5. Unpack the downloaded zip file. You will need three files: php_ffmpeg.dll, avcodec.dll and avformat.dll.

  6. Copy php_ffmpeg.dll in your wamp php extension folder: bin\php\php5.2.16\ext

  7. Add the line "extension=php_ffmpeg.dll" (without the quotes) into php.ini right on the end of the extension= section

  8. Copy avcodec.dll and avformat.dll and pthreadGC2.dll to C:\windows\system32

  9. Click on the WAMP icon and click restart all services. Wait for WAMP to restart.

  10. Copy ffmpeg.exe to C:\wamp\bin (Note: If you have installed WAMP to a different directory, copy the file to the /bin folder in your WAMP directory).

  11. The path to FFMPEG is now: C:\wamp\bin\ffmpeg.exe

    thanxxx... :)