• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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