0

I install PHP-FFMpeg on aapanel with apache/LAMP(PHP 8.0) (Digitas Ocean VPS)

also Installed ffmpeg using sudo apt install ffmpeg check with which ffmpeg and which ffprobe

ffmpeg path= /usr/bin/ffmpeg
ffprobe path= /usr/bin/ffprobe

Run composer require php-ffmpeg/php-ffmpeg to "/www/wwwroot/mydomain/"

I upload video.mp4(for testing) to "/www/wwwroot/mydomain/"

and create "index.php" to "/www/wwwroot/mydomain/", here the code:

<?php

require 'vendor/autoload.php';

$ffmpeg = FFMpeg\FFMpeg::create(array(
    'ffmpeg.binaries'  => '/usr/bin/ffmpeg',
    'ffprobe.binaries' => '/usr/bin/ffprobe',
    'timeout'          => 3600, // The timeout for the underlying process
    'ffmpeg.threads'   => 12,   // The number of threads that FFMpeg should use
));

$video = $ffmpeg->open('video.mp4');
$video
    ->save(new FFMpeg\Format\Video\WebM(), 'export-webm.webm');

and i receive this error:

Fatal error: Uncaught Symfony\Component\Process\Exception\LogicException: The Process class relies on proc_open, which is not available on your PHP installation. in /www/wwwroot/mydomain/vendor/symfony/process/Process.php:146 Stack trace: #0 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/Alchemy/BinaryDriver/ProcessBuilderFactory.php(168): Symfony\Component\Process\Process->__construct() #1 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/Alchemy/BinaryDriver/AbstractBinary.php(136): Alchemy\BinaryDriver\ProcessBuilderFactory->create() #2 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/OptionsTester.php(63): Alchemy\BinaryDriver\AbstractBinary->command() #3 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe/OptionsTester.php(43): FFMpeg\FFProbe\OptionsTester->retrieveHelpOutput() #4 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(231): FFMpeg\FFProbe\OptionsTester->has() #5 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFProbe.php(200): FFMpeg\FFProbe->probe() #6 /www/wwwroot/mydomain/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/FFMpeg.php(93): FFMpeg\FFProbe->streams() #7 /www/wwwroot/mydomain/index.php(13): FFMpeg\FFMpeg->open() #8 {main} thrown in /www/wwwroot/mydomain/vendor/symfony/process/Process.php on line 146

how do i solve this?

I want to convert the file

Moritz Ringler
  • 9,772
  • 9
  • 21
  • 34

0 Answers0