• We value your experience with Plesk during 2026
    Please help us understand which Plesk features made your work easier this year, what is still missing and how AI should help you in Plesk ?
    Take this short 5-minutes survey. Your answers go straight into the Plesk roadmap for 2027.

Resolved Installation of PHP-FFmpeg via Composer not works

AntoineW

New Pleskian
Server operating system version
Debian 10.12
Plesk version and microupdate number
Plesk Obsidian Version 18.0.42 Update 1
Hello,

Debian 10.12
Plesk Obsidian
Version 18.0.42 Update 1
PHP 8.0.18

I have setup Composer Extension and then install PHP-FFmpeg (GitHub - PHP-FFMpeg/PHP-FFMpeg: An object oriented PHP driver for FFMpeg binary) on one of my domain.

Image2.jpg
I have checked that :

  1. ffmpeg and ffprobe binaries are in /usb/bin --- OK
  2. autoload and all PHP stuff are in /vendor directory in /httpdocs of the domain --- OK

When i try to load default FFmpeg PHP script :

Code:
require 'vendor/autoload.php';
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg->open('video.mpg');
$video
    ->filters()
    ->resize(new FFMpeg\Coordinate\Dimension(320, 240))
    ->synchronize();
$video
    ->frame(FFMpeg\Coordinate\TimeCode::fromSeconds(10))
    ->save('frame.jpg');
$video
    ->save(new FFMpeg\Format\Video\X264(), 'export-x264.mp4')
    ->save(new FFMpeg\Format\Video\WMV(), 'export-wmv.wmv')
    ->save(new FFMpeg\Format\Video\WebM(), 'export-webm.webm');

I have the same error of those people : Fatal error: Uncaught exception 'Alchemy\BinaryDriver\Exception\ExecutableNotFoundException' with message 'Executable not found, proposed : avprobe, ffprobe' in D:\xampp\htdocs\d\trunk\vendor\alchemy\binary-driver\src\Alchemy\BinaryDriver\AbstractBinary.php:160 · Issue #370 · PHP-FFMpeg/PHP-FFMpeg

I am not able to make the path to /usr/bin work because of open_basedir.

Anyone has an idea ?

Cheers.
 
Her is the exact error message I have :

Fatal error: Uncaught Alchemy\BinaryDriver\Exception\ExecutableNotFoundException: Executable not found, proposed : avprobe, ffprobe in /var/www/vhosts/domain.com/httpdocs/vendor/php-ffmpeg/php-ffmpeg/src/Alchemy/BinaryDriver/AbstractBinary.php:159 Stack trace: #0 /var/www/vhosts/domain.com/httpdocs/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php(48): Alchemy\BinaryDriver\AbstractBinary::load() #1 /var/www/vhosts/domain.com/httpdocs/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(220): FFMpeg\Driver\FFProbeDriver::create() #2 /var/www/vhosts/domain.com/httpdocs/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFMpeg.php(130): FFMpeg\FFProbe::create() #3 /var/www/vhosts/domain.com/httpdocs/video-process.php(7): FFMpeg\FFMpeg::create() #4 {main} Next FFMpeg\Exception\ExecutableNotFoundException: Unable to load FFProbe in /var/www/vhosts/domain.com/httpdocs/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php:50 Stack trace: #0 /var/www/vhosts/domain.com/httpdocs/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(220): FFMpeg\Driver\FFProbeDriver::create() #1 /var/www/vhosts/domain.com/httpdocs/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFMpeg.php(130): FFMpeg\FFProbe::create() #2 /var/www/vhosts/domain.com/httpdocs/video-process.php(7): FFMpeg\FFMpeg::create() #3 {main} thrown in /var/www/vhosts/domain.com/httpdocs/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php on line 50
 
I have found the solution : I had to modify Open_basedir conf in PHP parameters of my domain :

Image4.png

Code:
{WEBSPACEROOT}{/}{:}{TMP}{/}:/usr/bin/ffmpeg:/usr/bin/ffprobe

Moreover a timeout parameter has to be in PHP code :

Code:
$ffmpeg = FFMpeg\FFMpeg::create(
  array(
   'timeout' => 0,
  )
);

instead of

Code:
$ffmpeg = FFMpeg\FFMpeg::create();

Now all work.
 
Back
Top