Hello, I got the error when installed and run code from example.
Mac IOS 10.9.5
Virtual Local server with Mamp Pro 3.5
PHP v - 7.0.0
Installed with composer.
$ which FFMpeg
/usr/local/bin/FFMpeg
$ which FFProbe
/usr/local/bin/FFProbe
$ which avprobe
/usr/local/bin/avprobe
$ which ffprobe
/usr/local/bin/ffprobe
Here the error:
Fatal error: Uncaught Alchemy\BinaryDriver\Exception\ExecutableNotFoundException: Executable not found, proposed : avprobe, ffprobe in .../vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php on line 50
FFMpeg\Exception\ExecutableNotFoundException: Unable to load FFProbe in .../vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php on line 50
Also echo exec("/usr/local/bin/ffmpeg ffmpeg -version", $output); - works
will appreciate any help.
Hi @jack-fdrv, this seems to be a duplicate of #172
To be sure, please post your result of the following tests:
<?php
var_dump(getenv('PATH'));
var_dump(exec('which ffmpeg'));
var_dump(ini_get('open_basedir'));
var_dump(is_file(exec('which ffmpeg')));
var_dump(is_executable(exec('which ffmpeg')));
and the output of composer show -i. Would be also helpful if you post your composer.json and composer.lock to hastebin or similar.
P.S.: When creating a issue, you were presented with an issue template. You are supposed to fill out the template as it says and don't ignore it completely please. :smile:
Ok, thank you =)
Well after some playing around it I have realized that the problem was in the path to avprobe and ffprobe is /usr/local/bin/ffprobe, while it should be /usr/bin/ffprobe, so I have manually created symlinks and it start working =)
If some one will have the same problem, just move ur extensions to `/usr/bin'
Thanks for the info.
New Info, i have updated my system to El Capitan and now we have protection for the /usr/bin folder, we cant disable it with this commands to prevent this error /usr/bin : Operation not permitted but I read readme.md and found that we can specify the path to extensions with this code:
$ffmpeg = FFMpeg\FFMpeg::create(array(
'ffmpeg.binaries' => '/usr/local/bin/ffmpeg',
'ffprobe.binaries' => '/usr/local/bin/ffprobe'
));
And it works perfect.
But I want make this path as default, so i go to the
vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFMpegServiceProvider.php
and try rewrite it
$app['ffmpeg.default.configuration'] = array(
'ffmpeg.threads' => 4,
'ffmpeg.timeout' => 300,
'ffmpeg.binaries' => array('/usr/local/bin/avconv', '/usr/local/bin/ffmpeg'),
'ffprobe.timeout' => 30,
'ffprobe.binaries' => array('/usr/local/bin/avprobe', '/usr/local/bin/ffprobe'),
);
or even
$app['ffmpeg.logger'] = array(
'ffmpeg.binaries' => '/usr/local/bin/ffmpeg',
'ffprobe.binaries' => '/usr/local/bin/ffprobe'
);
But this doesnt work, the same error is showing. Any idea what I do wrong?
<?php
var_dump(getenv('PATH'));
var_dump(exec('which ffmpeg'));
var_dump(ini_get('open_basedir'));
var_dump(is_file(exec('which ffmpeg')));
var_dump(is_executable(exec('which ffmpeg')));
shows
- '/usr/bin:/bin:/usr/sbin:/sbin' (length=29)
- '' (length=0)
- '' (length=0)
- false
- false
As the var_dump(getenv('PATH')); shows, your /usr/local/bin path is not in your PATH variable which the webserver uses.
See http://stackoverflow.com/questions/11256008/setting-environment-variables-in-mamp how to set environment variables for your MAMP Pro and adapt your PATH=$PATH:/usr/local/bin
It doesnt work in EL Capitan. Mamp ticket Stackoverflow
Most helpful comment
Hi @jack-fdrv, this seems to be a duplicate of #172
To be sure, please post your result of the following tests:
and the output of
composer show -i. Would be also helpful if you post yourcomposer.jsonandcomposer.lockto hastebin or similar.P.S.: When creating a issue, you were presented with an issue template. You are supposed to fill out the template as it says and don't ignore it completely please. :smile: