From af041b86fae65a66a905ff8b53786303628b8cca Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 25 Jun 2021 14:48:31 +0200 Subject: [PATCH] Fix --- conf/ffmpeg.patch | 16 ++++++++++++++++ conf/ffprobe.patch | 17 ----------------- scripts/install | 1 + 3 files changed, 17 insertions(+), 17 deletions(-) create mode 100644 conf/ffmpeg.patch diff --git a/conf/ffmpeg.patch b/conf/ffmpeg.patch new file mode 100644 index 0000000..336b9f3 --- /dev/null +++ b/conf/ffmpeg.patch @@ -0,0 +1,16 @@ +diff --git a/app/Actions/Photo/Extensions/VideoEditing.php b/app/Actions/Photo/Extensions/VideoEditing.php +index 1a96769..5842606 100644 +--- a/app/Actions/Photo/Extensions/VideoEditing.php ++++ b/app/Actions/Photo/Extensions/VideoEditing.php +@@ -45,7 +45,10 @@ trait VideoEditing + /** + * ! check if we can use path instead of this ugly thing. + */ +- $ffmpeg = FFMpeg::create(); ++ $ffmpeg = FFMpeg::create(array( ++ 'ffmpeg.binaries' => '/usr/bin/ffmpeg', ++ 'ffprobe.binaries' => '/usr/bin/ffprobe', ++ )); + /** @var Video */ + $video = $ffmpeg->open(Storage::path('big/' . $photo->url)); + if (!($tmp = tempnam(sys_get_temp_dir(), 'lychee')) || diff --git a/conf/ffprobe.patch b/conf/ffprobe.patch index d676435..c5d298e 100644 --- a/conf/ffprobe.patch +++ b/conf/ffprobe.patch @@ -1,20 +1,3 @@ -diff --git a/app/Actions/Photo/Extensions/VideoEditing.php b/app/Actions/Photo/Extensions/VideoEditing.php -index 1a96769..5842606 100644 ---- a/app/Actions/Photo/Extensions/VideoEditing.php -+++ b/app/Actions/Photo/Extensions/VideoEditing.php -@@ -45,7 +45,10 @@ trait VideoEditing - /** - * ! check if we can use path instead of this ugly thing. - */ -- $ffmpeg = FFMpeg::create(); -+ $ffmpeg = FFMpeg::create(array( -+ 'ffmpeg.binaries' => '/usr/bin/ffmpeg', -+ 'ffprobe.binaries' => '/usr/bin/ffprobe', -+ )); - /** @var Video */ - $video = $ffmpeg->open(Storage::path('big/' . $photo->url)); - if (!($tmp = tempnam(sys_get_temp_dir(), 'lychee')) || - diff --git a/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php b/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php index 9ececfe..106eadd 100644 --- a/vendor/lychee-org/php-exif/lib/PHPExif/Adapter/FFprobe.php diff --git a/scripts/install b/scripts/install index a35bb49..b31852e 100755 --- a/scripts/install +++ b/scripts/install @@ -137,6 +137,7 @@ pushd $final_path php$phpversion artisan config:clear -n php$phpversion artisan config:cache -n patch -p1 < "$YNH_CWD/../conf/ffprobe.patch" + patch -p1 < "$YNH_CWD/../conf/ffmpeg.patch" popd # Setup custom user.css file