0

I am using FFMPEG for converting mp4 to m3u8 format on an Ubuntu local machine. But I am facing an error Encoding Failed.

My controller code is:

FFMpeg::open(public_path()."/uploads/".$filename)
    ->exportForHLS()
    ->addFormat($lowBitrate)
    ->addFormat($midBitrate)
    ->addFormat($highBitrate)
    ->toDisk(env('APP_ENV'))
    ->save(public_path().'/converted/adaptive_steve.m3u8');

The error is:

Error

Config file is

Config file

How can I solve this? Thanks

3
  • Maybe this solution solves your problem. Commented Aug 17, 2021 at 4:55
  • I have also checked all possibilities and but I can not find solutions Commented Aug 17, 2021 at 4:58
  • First of all, please share your second image (config file) as literal string like your controller. Second, don't you have to add ->InFormat(new \FFMpeg\Format\Video\WHATEVER_FORMAT_IS_CORRECT) before ->save ? Read the documentation, they use that to export it to the desired format... Commented Aug 17, 2021 at 5:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.