Skip to content
Advertisement

php-ffmpeg installation on apache2

Trying to run PHP-FFMPEG and after install via composer I’m currently getting this.

PHP Fatal error: Uncaught AlchemyBinaryDriverExceptionExecutableNotFoundException: Executable not found, proposed : avprobe, ffprobe in /var/www/html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php:159nStack trace:n#0 /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php(48): AlchemyBinaryDriverAbstractBinary::load(Array, NULL, Object(AlchemyBinaryDriverConfiguration))n#1 /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(226): FFMpegDriverFFProbeDriver::create(Object(AlchemyBinaryDriverConfiguration), NULL)n#2 /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFMpeg.php(117): FFMpegFFProbe::create(Array, NULL, Object(DoctrineCommonCacheArrayCache))n#3 /var/www/html/starapp/test.php(4): FFMpegFFMpeg::create()n#4 {main}nnNext FFMpegExceptionExecutableNotFoundException: Unable to load FFProbe in /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php:50nStack trace:n#0 /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMp in /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php on line 50

Some people have suggested running the following:

$ffmpeg = FFMpegFFMpeg::create([
    'ffmpeg.binaries' => 'usr/bin/ffmpeg',
    'ffprobe.binaries' => 'usr/bin/ffprobe',
    'timeout' => 3600, 'ffmpeg.threads' => 12
]);

However I have no ffmpeg/ffprobe files in usr/bin and can’t seem to find them anywhere.

EDIT:

FFMpeg is installed. I rebooted the server and restarted apache2 and now the files are visible. Getting this now:

PHP Fatal error: Uncaught AlchemyBinaryDriverExceptionExecutableNotFoundException: Executable not found, proposed : usr/bin/ffprobe in /var/www/html/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php:159nStack trace:n#0 /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php(48): AlchemyBinaryDriverAbstractBinary::load(Array, NULL, Object(AlchemyBinaryDriverConfiguration))n#1 /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(226): FFMpegDriverFFProbeDriver::create(Object(AlchemyBinaryDriverConfiguration), NULL)n#2 /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFMpeg.php(117): FFMpegFFProbe::create(Array, NULL, Object(DoctrineCommonCacheArrayCache))n#3 /var/www/html/starapp/test.php(11): FFMpegFFMpeg::create(Array, NULL)n#4 {main}nnNext FFMpegExceptionExecutableNotFoundException: Unable to load FFProbe in /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php:50nStack trace:n#0 /var/www/html/vendor/php-ffmpeg/php-ffmp in /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php on line 50

Advertisement

Answer

Issue was the paths

'ffmpeg.binaries' => 'usr/bin/ffmpeg',
'ffprobe.binaries' => 'usr/bin/ffprobe'

Whereas:

'ffmpeg.binaries' => '/usr/bin/ffmpeg',
'ffprobe.binaries' => '/usr/bin/ffprobe'

Is working.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement