4 Replies - 4086 Views - Last Post: 09 June 2017 - 10:07 AM

#1 eZACKe  Icon User is offline

  • Garbage Collector

Reputation: 120
  • View blog
  • Posts: 1,278
  • Joined: 01-June 09

Installing ffmpeg-php

Posted 21 August 2011 - 02:07 PM

Not sure if anyone here has used this before, but regardless you may be able to tell me what I'm doing wrong.

I will first say that I have Windows Vista OS. That may help..I don't know.

I'm using this "tutorial" (yes I know it says Windows XP but I don't think there would be any difference and this is the clearest tutorial on the subject I could find): http://ironlasso.com...hp_windows.html

I follow the steps there exactly:
1.) Download the windows ffmpeg dlls this link works http://azzerti.free....fmpeg_win32.zip everything else I found was dead, or source code. If you recompile it and get a newer dll please let me know. I'm tired.

2.) Unzip it, you'll see three dlls: php_ffmpeg_20050123.dll, php_ffmpeg_20050212.dll, php_ffmpeg_20050618.dll. Any one of these will work but the last one doesn't had the togdimage() function enabled. If you need that function use one of the first two.

3.) Copy one of these dlls to your php extensions directory i.e. C:\php\extensions and rename it to php_ffmpeg.dll
Open your php ini add extension=php_ffmpeg.dll. Note bellow php_gd2 is uncommented as well. If its not or isn't in your ini at all you need to get that working. Mine looked like this when it was said and done .

extension=php_gd2.dll

;added 11_11_07 to enable the ffmpeg api
extension=php_ffmpeg.dll

4.) Copy the avcodec.dll and avformat.dll to C:\WINDOWS\system32

5.) Restart apache and you should be good to go


I then added this code in my site:
$srcFile = "/path/to/clock.avi"; 
$destFile = "/path/to/clock.flv"; 
$ffmpegPath = "/path/to/ffmpeg"; 
$flvtool2Path = "/path/to/flvtool2"; 

// Create our FFMPEG-PHP class 
$ffmpegObj = new ffmpeg_movie($srcFile); 


And get this error:
Fatal error: Class 'ffmpeg_movie' not found in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\applelearning\new_profile.php on line 16

I also looked in phpinfo() and it says nothing about ffmpeg that I could find.

I tried this:
print_r(get_loaded_extensions());


And get this as output(notice nothing about ffmpeg):
Array ( [0] => bcmath [1] => calendar [2] => com_dotnet [3] => ctype [4] => session [5] => filter [6] => ftp [7] => hash [8] => iconv [9] => json [10] => odbc [11] => pcre [12] => Reflection [13] => date [14] => libxml [15] => standard [16] => tokenizer [17] => zlib [18] => SimpleXML [19] => dom [20] => SPL [21] => wddx [22] => xml [23] => xmlreader [24] => xmlwriter [25] => apache2handler [26] => gd [27] => imap [28] => mysql [29] => mysqli [30] => PDO [31] => pdo_mysql [32] => pdo_sqlite [33] => mcrypt )

So it appears to me it's not getting my extension at all. Anyone know why? Would really love to get this solved, been bothering me for a while now.

Is This A Good Question/Topic? 0
  • +

Replies To: Installing ffmpeg-php

#2 eZACKe  Icon User is offline

  • Garbage Collector

Reputation: 120
  • View blog
  • Posts: 1,278
  • Joined: 01-June 09

Re: Installing ffmpeg-php

Posted 21 August 2011 - 06:15 PM

FINALLY figured it out.

A note to anyone who is trying to get this working and failing (over and over and over again): The site I posted above doesn't go through all the necessary steps. This one is much better: http://www.vidionlin...mpeg-on-windows

Good luck!

This post has been edited by eZACKe: 21 August 2011 - 06:16 PM

Was This Post Helpful? 1
  • +
  • -

#3 dreamincodehamza  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: -12
  • View blog
  • Posts: 349
  • Joined: 12-September 08

Re: Installing ffmpeg-php

Posted 09 June 2017 - 05:33 AM

I am getting the same issue module is not loading.
I have tried everything.
Any help would be great.

View PosteZACKe, on 21 August 2011 - 02:07 PM, said:

Not sure if anyone here has used this before, but regardless you may be able to tell me what I'm doing wrong.

I will first say that I have Windows Vista OS. That may help..I don't know.

I'm using this "tutorial" (yes I know it says Windows XP but I don't think there would be any difference and this is the clearest tutorial on the subject I could find): http://ironlasso.com...hp_windows.html

I follow the steps there exactly:
1.) Download the windows ffmpeg dlls this link works http://azzerti.free....fmpeg_win32.zip everything else I found was dead, or source code. If you recompile it and get a newer dll please let me know. I'm tired.

2.) Unzip it, you'll see three dlls: php_ffmpeg_20050123.dll, php_ffmpeg_20050212.dll, php_ffmpeg_20050618.dll. Any one of these will work but the last one doesn't had the togdimage() function enabled. If you need that function use one of the first two.

3.) Copy one of these dlls to your php extensions directory i.e. C:\php\extensions and rename it to php_ffmpeg.dll
Open your php ini add extension=php_ffmpeg.dll. Note bellow php_gd2 is uncommented as well. If its not or isn't in your ini at all you need to get that working. Mine looked like this when it was said and done .

extension=php_gd2.dll

;added 11_11_07 to enable the ffmpeg api
extension=php_ffmpeg.dll

4.) Copy the avcodec.dll and avformat.dll to C:\WINDOWS\system32

5.) Restart apache and you should be good to go


I then added this code in my site:
$srcFile = "/path/to/clock.avi"; 
$destFile = "/path/to/clock.flv"; 
$ffmpegPath = "/path/to/ffmpeg"; 
$flvtool2Path = "/path/to/flvtool2"; 

// Create our FFMPEG-PHP class 
$ffmpegObj = new ffmpeg_movie($srcFile); 


And get this error:
Fatal error: Class 'ffmpeg_movie' not found in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\applelearning\new_profile.php on line 16

I also looked in phpinfo() and it says nothing about ffmpeg that I could find.

I tried this:
print_r(get_loaded_extensions());


And get this as output(notice nothing about ffmpeg):
Array ( [0] => bcmath [1] => calendar [2] => com_dotnet [3] => ctype [4] => session [5] => filter [6] => ftp [7] => hash [8] => iconv [9] => json [10] => odbc [11] => pcre [12] => Reflection [13] => date [14] => libxml [15] => standard [16] => tokenizer [17] => zlib [18] => SimpleXML [19] => dom [20] => SPL [21] => wddx [22] => xml [23] => xmlreader [24] => xmlwriter [25] => apache2handler [26] => gd [27] => imap [28] => mysql [29] => mysqli [30] => PDO [31] => pdo_mysql [32] => pdo_sqlite [33] => mcrypt )

So it appears to me it's not getting my extension at all. Anyone know why? Would really love to get this solved, been bothering me for a while now.

Was This Post Helpful? 0
  • +
  • -

#4 ArtificialSoldier  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 1836
  • View blog
  • Posts: 5,783
  • Joined: 15-January 14

Re: Installing ffmpeg-php

Posted 09 June 2017 - 09:33 AM

Check the error reporting settings in php.ini, specifically make sure that it will report startup errors and that it is using an error log, and check that error log for error messages about loading the extension.
Was This Post Helpful? 0
  • +
  • -

#5 no2pencil  Icon User is online

  • Professor Snuggly Pants
  • member icon

Reputation: 6556
  • View blog
  • Posts: 30,698
  • Joined: 10-May 07

Re: Installing ffmpeg-php

Posted 09 June 2017 - 10:07 AM

** Moved to Software Support -> Desktop -> Windows **
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1