Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install FFMpeg in WampServer 2.0 (Windows XP) [closed]

I need to install the ffmpeg PHP extension on my localhost so I can test few of my scripts but I am having troubles figuring out how to do that.

I have WampServer 2.0 with PHP 5.2.9-2, my OS is Windows XP. Please somebody give me step by step instructions.

I have found some Windows builds here: http://sourceforge.net/projects/ffmpeg-php/files/

But I don't know which one to download and what to do with files.

EDITED:

What I have done so far:

  1. Download ffmpeg_new
  2. Copy php_ffmpeg.dll from the php5 folder to the C:\wamp\bin\php\php5.2.9-2\ext
  3. Copy files from common to the windows/system32 folder
  4. Add extension=php_ffmpeg.dll to php.ini file
  5. Restarted all services (Apache, PHP...)

I am gettings an error after using this code:

            $extension = 'ffmpeg';
            $extension_soname = 'php_ffmpeg.dll';
            $extension_fullname = PHP_EXTENSION_DIR . "/" . $extension_soname;

            // load extension
            if(false === extension_loaded($extension)) {
                if (false === dl($extension_soname))
                    throw new Exception("Can't load extension $extension_fullname\n");
            }

The error:

Warning: dl() [function.dl]: Not supported in multithreaded Web servers - use extension=ffmpeg.dll in your php.ini in C:\wamp\www\hunnyhive\application\modules\default\controllers\MyAccountController.php on line 314

Plus I also get the exception from above.

like image 623
Richard Knop Avatar asked Jul 23 '09 16:07

Richard Knop


1 Answers

add this line to your php.ini file

[PHP_ffmpeg]
extension=php_ffmpeg.dll
like image 163
Gajendra Bang Avatar answered Oct 04 '22 15:10

Gajendra Bang