The error is:
[Sun May 19 11:41:03.158185 2019] [php7:error] [pid 32405] [client 85.133.232.4:35172] PHP Fatal error: Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException: ffmpeg failed to execute command '/usr/bin/ffmpeg' '-y' '-i' 'Sample.mp4' '-async' '1' '-metadata:s:v:0' 'start_time=0' '-f' 'webm' '-vcodec' 'libvpx' '-acodec' 'libvorbis' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-vf' '[in]scale=320:240 [out]' 'export-webm.webm' in /vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php:100\nStack trace:\n#0 /vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php(72): Alchemy\BinaryDriver\ProcessRunner->doExecutionFailure(''/usr/bin/ffmpe...')\n#1 /vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php(209): Alchemy\BinaryDriver\ProcessRunner->run(Object(Symfony\Component\Process\Process), Object(SplObjectStorage), false)\n#2 /vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php(137): Alchemy\BinaryDr in /vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/AbstractVideo.php on line 106a
What I trying to do is, save video:
require '/vendor/autoload.php';
$ffmpeg = FFMpeg\FFMpeg::create();
$ffprobe = FFMpeg\FFProbe::create();
$video = $ffmpeg->open('Sample.mp4');
$video
->filters()
->resize(new FFMpeg\Coordinate\Dimension(320, 240))
->synchronize();
$video
->save(new FFMpeg\Format\Video\X264('aac'), 'export-x264.mp4')
What I have done:
I searched and similar topics tell me to set permission to my files and folders, I set user and also set 755 to files and folders but still I have this error and no success, any idea?
Errorlog:
Fatal error: Uncaught Alchemy\BinaryDriver\Exception\ExecutionFailureException: ffmpeg failed to execute command '/usr/bin/ffmpeg' '-y' '-i' 'Sample.mp4' '-async' '1' '-metadata:s:v:0' 'start_time=0' '-vcodec' 'libx264' '-acodec' 'aac' '-b:v' '1000k' '-refs' '6' '-coder' '1' '-sc_threshold' '40' '-flags' '+loop' '-me_range' '16' '-subq' '7' '-i_qfactor' '0.71' '-qcomp' '0.6' '-qdiff' '4' '-trellis' '1' '-b:a' '128k' '-vf' '[in]scale=320:240 [out]' '-pass' '1' '-passlogfile' '/tmp/ffmpeg-passes5ce11d01dc0038yfbl/pass-5ce11d01dc0c7' 'export-x264.mp4' in /vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php:100 Stack trace: #0 /vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/ProcessRunner.php(72): Alchemy\BinaryDriver\ProcessRunner->doExecutionFailure(''/usr/bin/ffmpe...')
1 /vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/AbstractBinary.php(209):
Alchemy\BinaryDriver\ProcessRunner->run(Object(Symfony\Component\Process\Process), Object(SplObjectStorage), false) #2 /vendor/alchemy/binary-driver in /vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Media/AbstractVideo.php on line 106