Hi everyone!
I just got started with Fly.io recently (after moving from Heroku). I know it’s not officially supported, but I migrated a small Symfony app. It mostly works fine, except when it come to file conversion.
I create an instance of FFMpeg, passing it the correct path of the installed binaries (I checked the paths by printing which ffmpeg/ffprobe
here):
FFMpeg::create([
'ffmpeg.binaries' => $this->ffmpegBinaryPath,
'ffprobe.binaries' => $this->ffprobeBinaryPath,
'timeout' => 3600,
'ffmpeg.threads' => 0,
]);
However, this is met with the following exception:
"message": "Uncaught PHP Exception FFMpeg\\Exception\\ExecutableNotFoundException: \"Unable to load FFProbe\" at /var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php line 50",
"context": {
"exception": {
"class": "FFMpeg\\Exception\\ExecutableNotFoundException",
"message": "Unable to load FFProbe",
"code": 0,
"file": "/var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/FFMpeg/Driver/FFProbeDriver.php:50",
"previous": {
"class": "Alchemy\\BinaryDriver\\Exception\\ExecutableNotFoundException",
"message": "Executable not found, proposed : /usr/bin/ffprobe",
"code": 0,
"file": "/var/www/html/vendor/php-ffmpeg/php-ffmpeg/src/Alchemy/BinaryDriver/AbstractBinary.php:159"
}
}
},
As for the installation, my Dockerfile is very basic:
ARG PHP_VERSION=8.1
FROM serversideup/php:${PHP_VERSION}-fpm-nginx-v1.5.0 as base
ARG PHP_VERSION
LABEL fly_launch_runtime="symfony"
RUN apt-get update && apt-get install -y \
git curl zip unzip rsync ca-certificates vim htop cron ffmpeg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
...
It’s worth noting that I can do the file conversion using system('ffmpeg ...')
, meaning ffmpeg
is definitely installed correctly and the binaries should have the required executable permissions.
I’ve spent around 2 days combing the internet, trying to find a solution but coming up short. Does anyone here perhaps have any ideas? I would really appreciate any help!