laravel-ffmpeg
laravel-ffmpeg copied to clipboard
ffmpeg failed to execute command '/opt/homebrew/bin/ffmpeg' '-version'
Hi
I am using this package first time.
I am receiving following error
Message ffmpeg failed to execute command '/opt/homebrew/bin/ffmpeg' '-version': Error Output:
Type Alchemy\BinaryDriver\Exception\ExecutionFailureException

I am using the example posted in your blog https://protone.media/en/blog/how-to-use-ffmpeg-in-your-laravel-projects
public function handle()
{
// create some video formats...
$lowBitrateFormat = (new X264)->setKiloBitrate(500);
$midBitrateFormat = (new X264)->setKiloBitrate(1500);
$highBitrateFormat = (new X264)->setKiloBitrate(3000);
// open the uploaded video from the right disk...
FFMpeg::fromDisk($this->video->disk)
->open($this->video->path)
// call the 'exportForHLS' method and specify the disk to which we want to export...
->exportForHLS()
->toDisk('streamable_videos')
// we'll add different formats so the stream will play smoothly
// with all kinds of internet connections...
->addFormat($lowBitrateFormat)
->addFormat($midBitrateFormat)
->addFormat($highBitrateFormat)
// call the 'save' method with a filename...
->save($this->video->id . '.m3u8');
// update the database so we know the convertion is done!
$this->video->update([
'converted_for_streaming_at' => Carbon::now(),
]);
}
Kindly help.