quasarstream / PHP-FFmpeg-video-streaming

📼 Package media content for online streaming(DASH and HLS) using FFmpeg

Home Page:https://www.quasarstream.com/op/php/ffmpeg-streaming?u=php-ff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

  1. Post video from postman
  2. The store method will work
  3. The code 'FFMpeg::create($config, $log);' inside store method has issue

Expected behavior
response: Executed...

Screenshots
image

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.