Php-ffmpeg: Unable to load FFProbe

Created on 15 Jul 2013  路  14Comments  路  Source: PHP-FFMpeg/PHP-FFMpeg

I know this isn't exactly an issue with this package, but I have this error: "Unable to load FFProbe", and there does not seem to be any FFProbe binaries in the entire internet for PHP (5.4). FFMpeg is installed and working, but can't find anything on Probe. Running windows WAMP server for development and Linux server for production, if anyone has any ideas where to get these.

Most helpful comment

How I did it

I'm using the following directory for the FFMpeg binaries: C:FFmpegbin

  • Download the binaries and place them into a *C:* directory in my case.
  • Set your Windows PATH variable be sure to set both the user and system variable.
  • Open up your CLI (command line interface) by running cmd.exe and check if FFMpeg could be executed.
  • If the command could be executed run the following lines of PHP code to configure the FFMpeg wrapper and use it to create awesome video features for you application.
        $FFMpeg = FFMpeg\FFMpeg::create([
            'ffmpeg.binaries'  => 'C:/FFmpeg/bin/ffmpeg.exe', // the path to the FFMpeg binary
            'ffprobe.binaries' => 'C:/FFmpeg/bin/ffprobe.exe', // the path to the FFProbe binary
            'timeout'          => 3600, // the timeout for the underlying process
            'ffmpeg.threads'   => 12,   // the number of threads that FFMpeg should use
        ]);

_I'm using the PHP 5.4 short array syntax_

All 14 comments

Can you paste a snippet of code you use ?

Oops, must have used the company account earlier. I simply used the create method:

$ffmpeg = FFMpegFFMpeg::create();

At first I had an error that FFMpeg was not installed so I got that along with the common dlls that go in the SysWOW folder, after that I now have the FFProbe issue. Gd2 is also enabled. I'm using the Laravel 4 Framework with Composer.

ffprobe

Hello,

PHP-FFMpeg does not require the FFMpeg extension, it uses ffmpeg commandline.
Have you installed ffmpeg on the server you're running your script ?

ffmpeg provides few binaries, including ffmpeg and ffprobe. These binaries are required to use PHP-FFMpeg

Ah hah! Figured it all out, it tripped me up cause the error changed after I installed the PHP extension so I figured it was another extension I needed.

Thanks for the help!

https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu#ffmpeg appears to be the linux/ubuntu guide, for anyone searching for that.

How I did it

I'm using the following directory for the FFMpeg binaries: C:FFmpegbin

  • Download the binaries and place them into a *C:* directory in my case.
  • Set your Windows PATH variable be sure to set both the user and system variable.
  • Open up your CLI (command line interface) by running cmd.exe and check if FFMpeg could be executed.
  • If the command could be executed run the following lines of PHP code to configure the FFMpeg wrapper and use it to create awesome video features for you application.
        $FFMpeg = FFMpeg\FFMpeg::create([
            'ffmpeg.binaries'  => 'C:/FFmpeg/bin/ffmpeg.exe', // the path to the FFMpeg binary
            'ffprobe.binaries' => 'C:/FFmpeg/bin/ffprobe.exe', // the path to the FFProbe binary
            'timeout'          => 3600, // the timeout for the underlying process
            'ffmpeg.threads'   => 12,   // the number of threads that FFMpeg should use
        ]);

_I'm using the PHP 5.4 short array syntax_

I also thought just put ffmpeg and ffprobe at PATH would solve this problem. Maybe, I do wrong somewhere?

EDIT: My problem is solved. Am using configuration file, since I'm developing on Windows machine, while my code deployed on CentOS.

@bentinata just use the path's to the binaries in you unix machine mostly something like /usr/binaries/mmpeg or something.

Hello
my code is :
$ffmpeg = FFMpeg::create(array( 'ffmpeg.binaries' => '/root/bin/ffmpeg', 'ffprobe.binaries' => '/root/bin/ffprobe', 'timeout' => 3600, 'ffmpeg.threads' => 12, ));

but not work ! :(
please help me
untitled-4

@wonderco you should install ffmpeg first.

Hello
my code is :
$ffmpeg = FFMpeg::create(array( 'ffmpeg.binaries' => '/root/bin/ffmpeg', 'ffprobe.binaries' => '/root/bin/ffprobe', 'timeout' => 3600, 'ffmpeg.threads' => 12, ));

but not work ! :(
please help me
untitled-4

try to move the ffmpeg to the /usr/local/ffmpeg,a binary in the root folder will not allow a non-root user to execute that command. so use this command "sudo mv /root/bin/ffmpeg /usr/local/ffmpeg" "sudo nv /root/bin/ffprobe /usr/local/ffmpeg"

How to fix this in Ubuntu?
I already run sudo apt install ffmpeg and confirmed that the ffmpeg and ffprobe existed in path usr\bin\;

FFMpeg::create([
      'ffmpeg.binaries'  =>'\usr\bin\ffmpeg',
      'ffprobe.binaries' => '\usr\bin\ffprobe',
      'timeout'          => 3600,
      'ffmpeg.threads'   => 12,
    ])->open($file)
      ->getStreams()
      ->videos()
      ->first();

.env:

FFMPEG_BINARIES=/usr/bin/ffmpeg
FFPROBE_BINARIES=/usr/bin/ffprobe

For Windows users,

Do not forget the extension in the path, It was _.exe_, that I was missing in the path and thus leading to NotFoundException.

FFMPEG_PATH=C:\ffmpeg\bin\ffmpeg.exe
FFPROBE_PATH=C:\ffmpeg\bin\ffprobe.exe

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jack-fdrv picture jack-fdrv  路  7Comments

datangkang123 picture datangkang123  路  7Comments

sheikhasadmuneer picture sheikhasadmuneer  路  4Comments

iki789 picture iki789  路  7Comments

travoliti picture travoliti  路  6Comments