Unable to load FFProbe
serey168 opened this issue · comments
Description
I've been trying to make the video in difference quality like Facebook or Youtube with Laravel 9 and PHP 8.1
To Reproduce
Steps to reproduce the behavior:
- Post video from postman
- The store method will work
- The code 'FFMpeg::create($config, $log);' inside store method has issue
Expected behavior
response: Executed...
Desktop:
- OS: MacOs
- Version: 12.5.1
- FFmpeg vesion: 5.1.1
Additional context
command line:
type: which ffmpeg
show: /usr/local/bin/ffmpeg
type: which ffprobe
show: /usr/local/bin/ffprobe
The codes below is located in store method.
$config = [
'ffmpeg.binaries' => '/usr/local/bin/ffmpeg',
'ffprobe.binaries' => '/usr/local/bin/ffprobe',
'timeout' => 3600, // The timeout for the underlying process
'ffmpeg.threads' => 12, // The number of threads that FFmpeg should use
];
$log = new Logger('FFmpeg_Streaming');
$log->pushHandler(new StreamHandler('/var/log/ffmpeg-streaming.log')); // path to log file
$ffmpeg = FFMpeg::create($config, $log);
return response([
'message' => 'Executed...',
//'post' => $post
], 200)->header('Accept', 'application/json');
Fixed...!
I used laravel sail. I fixed it by using this link https://tallpad.com/series/laravel-sail/lessons/customizing-laravel-sail.
watch and follow the video inside that link.