I'm trying to integrate FFMpeg into a Laravel project but am getting the error when I call the end point:
FFMpeg\Exception\ExecutableNotFoundException: Unable to load FFMpeg in file /Users/me/Desktop/video/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFMpegDriver.php on line 55
What I've done:
brew install ffmpeg - installed FFMEG locally, can confirm that this works when using terminal
Fresh Laravel install composer create-project laravel/laravel example-app
Install php ffmpeg composer require php-ffmpeg/php-ffmpeg
install Laravel ffmpeg composer require pbmedia/laravel-ffmpeg
added FFMPEG to providers and aliases in app.php:
'providers' => [
...
ProtoneMedia\LaravelFFMpeg\Support\ServiceProvider::class,
...
];
'aliases' => [
...
'FFMpeg' => ProtoneMedia\LaravelFFMpeg\Support\FFMpeg::class
...
];
and then my controller is
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use FFMpeg;
class VideoController extends Controller
{
public function makeVideo()
{
FFMpeg::fromDisk('songs')
->open('yesterday.mp3')
->export()
->toDisk('converted_songs')
->inFormat(new \FFMpeg\Format\Audio\Aac)
->save('yesterday.aac');
return "hello";
}
}
which is the example they give on git. if I call the end point I get the above error. Has anyone got any ideas what's wrong or how to debug? The logs don't give me any more information!