ffmpeg-php does not work

1

I am trying to generate a thumbnail with ffmpeg-php, but no command of it works, it always gives an error saying that the class was not found, eg: Fatal error: Class 'ffmpeg_movie' not found.

Using the command if(!extension_loaded("ffmpeg")) exit("Extensão não carregada"); it always says that the extension was not loaded but the wamp shows the extension when I go in PHP > PHP extensions.

I do not know if it could be a problem with the dlls, but I took them from this site: link

    
asked by anonymous 26.10.2017 / 20:17

1 answer

2

Go to php.ini open it with an editor like notepad ++ or SublimeText and look for a place where it is written:

; Windows Extensions

And add this line:

extension=php_ffmpeg.dll

If the line already exists it should look like this:

;extension=php_ffmpeg.dll

Then take the semicolon and after restarting WampServer

If you still do not see anything in phpinfo(); because you downloaded the wrong version of the DLL, you have to download the version for the same architecture that PHP was compiled if it does not have the dll compatible and you can not compile for yourself then it will not be possible to use this extension, but there is an alternative.

Alternative in PHP

From the same creator there is a "port" written purely in PHP link , download the latest version at:

Then install "program" (I'm not talking about the DLL) ffmpeg or ffprobe :

26.10.2017 / 22:02