Closed Demiurgich closed 3 years ago
If you’re using Sail, be sure to install FFMpeg within the container.
Thank you!
What I did: I published sail sail artisan sail:publish
.
Then I edited Dockerfile
: added lines COPY /usr/bin/ffmpeg /usr/bin/ffmpeg
and COPY /usr/bin/ffprobe /usr/bin/ffprobe
.
Now every time I run Docker those two files are copied to docker and ffmpeg works.
Thanks again!
I have the same issue, and I tried the above solution, but it does not work. When I run sail build I get the following:
[12/13] COPY /usr/local/bin/ffmpeg /usr/bin/ffmpeg:
[13/13] COPY /usr/local/bin/ffprobe /usr/bin/ffprobe:
failed to compute cache key: "/usr/local/bin/ffprobe" not found: not found ERROR: Service 'laravel.test' failed to build : Build failed ` I have verified that the path to the two files is correct. I can run them in the terminal, but sail will not copy them into the docker container.
macbook test every thinking good, when i upload to ubuntu
[2023-04-30 15:18:23] local.INFO: ffprobe running command '/usr/local/bin/ffprobe' '-help' '-loglevel' 'quiet'
[2023-04-30 15:18:23] local.INFO: ffprobe executed command successfully
[2023-04-30 15:18:23] local.INFO: ffprobe running command '/usr/local/bin/ffprobe' '/tmp/phpK1A3Cj' '-show_streams' '-print_format' 'json'
[2023-04-30 15:18:23] local.INFO: ffprobe executed command successfully
[2023-04-30 15:18:23] local.INFO: ffmpeg running command '/usr/local/bin/ffmpeg' '-y' '-ss' '00:00:10.00' '-i' '/tmp/phpK1A3Cj' '-vframes' '1' '-f' 'image2' '/www/wwwroot/ads.dopemv.com/storage/app/public/file/vjYS9ckPgYu4M2PojDaCSU5NshjSmTYRwz6CqV5s.mp4.jpg'
[2023-04-30 15:18:23] local.INFO: ffmpeg executed command successfully
[2023-04-30 15:18:23] local.ERROR: Unable to load FFProbe {"userId":1,"exception":"[object] (FFMpeg\Exception\ExecutableNotFoundException(code: 0): Unable to load FFProbe at /www/wwwroot/ads.dopemv.com/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php:50)
[stacktrace]
Hello,
I'm trying to use FFMPEG. Problem on local laptop with Ubuntu 20.04.
FFMPEG is installed on system. I can convert video in terminal using ffmpeg.
which ffmpeg
gives/usr/bin/ffmpeg
I use Laravel 8 and Sail.
Protonemedia/laravel-ffmpeg is installed using
sail composer require pbmedia/laravel-ffmpeg
.env
file containsFFMPEG_BINARIES=/usr/bin/ffmpeg
FFPROBE_BINARIES=/usr/bin/ffprobe
laravel-ffmpeg.php
contains ` 'ffmpeg' => [ 'binaries' => env('FFMPEG_BINARIES', '/usr/bin/ffmpeg'), 'threads' => 12, ],`
config/app.php
file containsProtoneMedia\LaravelFFMpeg\Support\ServiceProvider::class,
inproviders
and'FFMpeg' => ProtoneMedia\LaravelFFMpeg\Support\FFMpeg::class,
inaliases
.Controller file is using FFMPEG: ` use ProtoneMedia\LaravelFFMpeg\Support\FFMpeg; use FFMpeg\Coordinate\Dimension; use FFMpeg\Format\Video\X264;
class ConvertVideoForStreaming implements ShouldQueue { public function handle() { $lowBitrateFormat = (new X264)->setKiloBitrate(500); $midBitrateFormat = (new X264)->setKiloBitrate(1500); $highBitrateFormat = (new X264)->setKiloBitrate(3000);
} `
The error appears in
FFMpeg::open($this->profileVideo->file)
line.The error is: FFMpeg\Exception\ExecutableNotFoundException Unable to load FFMpeg
Help me please to handle it out.