I am trying to install a PHP package called ffmpeg - I have installed it on my Mac using brew but not not able to get it working in MAMP Pro after adding it to the ini file like so extension=ffmpeg.so
Asked
Active
Viewed 248 times
1

Peter Ayello Wright
- 127
- 1
- 3
- 13
-
Does this answer your question? [How to install gmp extension for php 7.2 using MAMP on OSX](https://stackoverflow.com/questions/50435455/how-to-install-gmp-extension-for-php-7-2-using-mamp-on-osx) – Code Spirit Jun 16 '21 at 14:34
-
Thanks @CodeSpirit but unfortunately I cannot see ffmpeg in that list of extensions. – Peter Ayello Wright Jun 16 '21 at 14:41
-
Your PHP configuration has a setting `extension_dir`. Basically you just have to copy your ffmpeg.so into that directory and than add `extension=ffmpeg.so` to your ini file. Another question is, what exactly is the error? – Code Spirit Jun 16 '21 at 14:46
-
Thanks, @CodeSpirit I have changed the syntax to my extension like so - `extension=/usr/local/bin/ffmpeg` but still no dice. Should I move the code from /usr/local/bin/ffmpeg to another location? The error is - Unable to load FFProbe relating to the FFMpeg class – Peter Ayello Wright Jun 16 '21 at 16:00
-
Ok I got this wrong. As far as I know now there is no dedicated PHP extension for ffmpeg. Could it be that you are using [`php-ffmpeg`](https://github.com/PHP-FFMpeg/PHP-FFMpeg) **library**? if so it will call ffmpeg with `shell_exec` so ffmpeg has to be installed on your system and at best be present in PATH. Also ffprobe is a seperate dependency which you have to install additionally. Have you checked: https://github.com/PHP-FFMpeg/PHP-FFMpeg/issues/45 – Code Spirit Jun 16 '21 at 16:21
-
I think I have got it now. I just had to set up where the calls were coming from ie ```\FFMpeg\FFMpeg::create([ 'ffmpeg.binaries' => '/usr/local/bin/ffmpeg', 'ffprobe.binaries' => '/usr/local/bin/ffprobe', 'timeout' => 3600, 'ffmpeg.threads' => 12, ]);``` – Peter Ayello Wright Jun 17 '21 at 07:48