Unable to load FFProbe driver for FFmpeg
Asked Answered
K

5

15

Hi i am trying to install php-ffmpeg.
Can someone guide me or correct me in my steps.

  1. I installed the composer on windows and then traversed to my folder i had created to run install ffmpeg cmd

  2. After running this command a composer.json, composer.lock file were created along with a vendor folder.

  3. Later installed the Shared FFMpeg build for 64bit from here

    http://ffmpeg.zeranoe.com/builds/

and form this folder copied the bin folder to my directory to set the ffmpeg and ffprobe path during create() like this

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

Currently i am getting this error which says :

"Fatal error: Uncaught exception 'Alchemy\BinaryDriver\Exception\ExecutableNotFoundException' with message 'Executable not found, proposed : /vendor/bin/' in D:\xampp\htdocs\health\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\AbstractBinary.php:160 Stack trace: #0 D:\xampp\htdocs\health\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Driver\FFProbeDriver.php(48): Alchemy\BinaryDriver\AbstractBinary::load('/vendor/bin/', NULL, Object(Alchemy\BinaryDriver\Configuration)) #1 D:\xampp\htdocs\health\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFProbe.php(207): FFMpeg\Driver\FFProbeDriver::create(Array, NULL) #2 D:\xampp\htdocs\health\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\FFMpeg.php(117): FFMpeg\FFProbe::create(Array, NULL, NULL) #3 D:\xampp\htdocs\health\ff.php(6): FFMpeg\FFMpeg::create(Array) #4 {main} Next exception 'FFMpeg\Exception\ExecutableNotFoundException' with message 'Unable to load FFProbe' in D:\xampp\htdocs\health\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Driver\FFProbeDriver.php:50 Stack trace: #0 D:\xampp\htdocs\he in D:\xampp\htdocs\health\vendor\php-ffmpeg\php-ffmpeg\src\FFMpeg\Driver\FFProbeDriver.php on line 50".

So what could i have done wrong or am i missing any steps. Can someone point me to the right direction.

Keslie answered 30/9, 2015 at 6:41 Comment(0)
A
1

You need to install FFmpeg on your machine (if you are working on PC) else you need to install FFmpeg on your serve

Installing FFmpeg in Ubuntu:

sudo add-apt-repository ppa:mc3man/trusty-media  
sudo apt-get update  
sudo apt-get install ffmpeg  
sudo apt-get install frei0r-plugins  

Can't put complete details for other machine here please follow the given link Here is the link which explains how to do this.

https://github.com/adaptlearning/adapt_authoring/wiki/Installing-FFmpeg

On Mac

brew install ffmpeg
Anamorphoscope answered 8/3, 2018 at 8:1 Comment(0)
L
1

Just in case anyone is seeing this PHP error on their web server and have installed FFMPEG using composer, I was getting the same error and here is how I solved it.

For some reason (unknown to me) the FFMPEG binaries did not arrive at /usr/local/bin

I checked this is the terminal by running: ls /usr/local/bin No ffmpeg or ffprobe were present!

Here's a link to the binaries. Download the ones you need. If unclear if your server is 32-bit or 64-bit, run uname -m If your system is running 32-bit (i686 or i386) or 64-bit(x86_64).

I just downloaded the ffmpeg and ffprobe binaries to my local machine and then uploaded them via FTP to public_html/ but you can obviously put them anywhere.

Next, in the terminal, move the binaries to the right spot:

sudo cp -f public_html/ffmpeg /usr/local/bin

sudo cp -f public_html/ffprobe /usr/local/bin

Make sure they have arrived ls /usr/local/bin You should see both, and they will appear as white text.

After that you need to make both binaries executable. In the terminal:

sudo chmod +x /usr/local/bin/ffmpeg

sudo chmod +x /usr/local/bin/ffprobe

You're all set!

`

Lassiter answered 26/6, 2021 at 17:14 Comment(1)
Thanks this worked in laravel 8 and mac 11.6 BigSurVala
L
1

Well, I had this issue sometime ago and this is how I resolved it.

  1. Make sure that you have installed the right ffmpeg files on you machine; ei linux server or mac/windows if you are running local. You can download from ffmpeg.org Be sure to download the right Static Build for your cpu (mine was 64bit so i downloaded a 64bit static build)

  2. Extract the tar file on your server... and reference it like so if you are using an env file (don't forget the quotes)

  3. MAKE SURE THERE ARE QUOTES ON YOUR REFERENCE PATHS.

    FFMPEG_PATH = "/home/.../usr/bin/ffmpeg/ffmpeg"

    FFPROBE_PATH = "/home/.../usr/bin/ffmpeg/ffprobe"

if you aren't using an env file, you can directly reference like so

$ffmpeg = FFMpeg::create(
  array(
    'ffmpeg.binaries'  => "/home/.../usr/bin/ffmpeg/ffmpeg",
    'ffprobe.binaries' => "/home/.../usr/bin/ffmpeg/ffprobe",
    'timeout'          => 10,
    'ffmpeg.threads'   => 12,
   )
);
Leath answered 11/8, 2021 at 21:43 Comment(0)
M
0

Just in case anyone is experiencing similar issue on windows. The library removes the backslashes

(D:\binaries\ffmpeg\ffmpeg.exe)

so you should use forward slashes instead

(D:/binaries/ffmpeg/ffmpeg.exe)

this will work on widows. Hope this helps

Mouflon answered 4/2, 2016 at 8:34 Comment(0)
Z
-1

Probably correct path for ffmpeg.exe/ffprobe.exe on the "ffmpeg.binaries" and "ffprobe.binaries"

Zoogeography answered 30/10, 2015 at 16:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.