Laravel can't load FFProbe?
I'm using the PHP-FFMpeg repository to do some video work inside my Laravel app, but I'm having some trouble getting it set up. Once I have installed the PHP-FFMpeg repo, I will try to instantiate FFMpeg
:
$ffmpeg = \FFMpeg\FFMpeg::create();
However, this doesn't work. In response, I get an ErrorException that simply states:
Unable to load FFProbe
It doesn't make sense to me, as when I start FFMpeg
and ffprobe
from my Mac terminal, I see they are installed. This is clearly a path / resolution issue, but I'm not sure how to fix it. Any ideas?
This is all hosted in a MAMP project running on localhost.
source to share
I spent a lot of time researching this and I am posting this answer to anyone experiencing a similar issue on Windows. The library removes the backslash
(D:\binaries\ffmpeg\ffmpeg.exe)
to use forward slashes instead of
(D:/binaries/ffmpeg/ffmpeg.exe)
it will work for widows. Hope it helps
source to share
For Mac OS:
'ffmpeg.binaries' => '/usr/local/bin/ffmpeg',
'ffprobe.binaries' => '/usr/local/bin/ffprobe'
For Windows:
'ffmpeg.binaries' => 'C:/FFmpeg/bin/ffmpeg.exe',
'ffprobe.binaries' => 'C:/FFmpeg/bin/ffprobe.exe'
For Ubantu:
'ffmpeg.binaries' => '/usr/bin/ffmpeg',
'ffprobe.binaries' => '/usr/bin/ffprobe'
source to share