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.

+5


source to share


4 answers


$ffmpeg = \FFMpeg\FFMpeg::create([
    'ffmpeg.binaries'  => '/usr/local/bin/ffmpeg',
    'ffprobe.binaries' => '/usr/local/bin/ffprobe' 
]);

      

ffmpeg installation path.



this is what @limonte means and it works for me.

+4


source


Specifying paths to binaries should help:



$ffmpeg = \FFMpeg\FFMpeg::create([
    'ffmpeg.binaries'  => exec('which ffmpeg'),
    'ffprobe.binaries' => exec('which ffprobe')
]);

      

+3


source


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

+2


source


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'

      

0


source







All Articles